Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetMapPointData

From RoR Wiki

UI Lua API · Game functions
Version: WAR 1.4.8

Returns information about one point (pin) shown on a map display window.

pointData = GetMapPointData(mapDisplayName, pointIndex)

Arguments

mapDisplayName
string – Name of the map display window.
pointIndex
number – Index of the point on that map, as supplied by the map's point events.

Returns

pointData
table – Data about the point, or nothing if the point is not found.

Fields set for every point:

Key Type Meaning
pointType number Type of the point, compared with SystemData.MapPips values.
id number Id of the thing the point stands for (for a quest point, the quest id).
mapIcon number Map icon id for GetMapIconData.

Further fields depend on the point type. Static points add zone (number) and distance (number, distance from the player rounded down to a whole number). The stock tooltip code also reads fields such as name, text, realm, services, rewards, difficulty and glyphsRequired for particular point types.

Details

  • pointIndex is converted to an integer.
  • If the map data is not loaded, or no point with that index exists on that map, the function returns nothing. The stock UI checks the result for nil.
  • The function needs at least two arguments and only reads the last two.

Errors

None.

Example

From easystem_tooltips/source/maptooltips.lua:

for _, ptIndex in ipairs( points ) do
    local ptData = GetMapPointData( mapDisplay, ptIndex )
    if (ptData ~= nil) then
        ptData.pointIndex = ptIndex

        local sortIndex = MapPointSortOrder[ptData.pointType]

From easystem_utils/source/maputils.lua:

local pointData = GetMapPointData( mapDisplay, ptIndex )

if( pointData.pointType == SystemData.MapPips.QUEST_AREA) then

See also