Quantcast WoWInterface - View Single Post - C_Map.GetMapPosFromWorldPos
View Single Post
07-24-18, 08:56 AM   #1
A Firelord
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 488

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)
1. number continentID
2. table worldPosition
3. (optional) number overrideUiMapID
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