View Single Post
07-24-18, 08:56 AM   #1
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
C_Map.GetMapPosFromWorldPos

The usage for C_Map.GetMapPosFromWorldPos is:
Usage: local uiMapID, mapPosition = C_Map.GetMapPosFromWorldPos(continentID, worldPosition [, overrideUiMapID])

The in-game /api documentation is:

function C_Map.GetMapPosFromWorldPos(continentID, worldPosition, optional overrideUiMapID)
Arguments:
1. number continentID
2. table worldPosition
3. (optional) number overrideUiMapID
Returns
1. number uiMapID
2. table mapPosition

My question is: what is continentID? Is that the uiMapID of the continent? Some new numbering system? Can it be inferred from a uiMapID?

I'm trying to translate the returns of a UnitPosition (which can be on a different continent than the player is in; these are saved world positions) to map positions, and was hoping to use this.

edit: Actually, it appears the first argument should be the fourth return of UnitPosition. Or at least, they appear to translate to roughly the right numbers.

Last edited by Gello : 07-24-18 at 10:07 AM.
  Reply With Quote