Quantcast
C_Map.GetMapPosFromWorldPos - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
07-24-18, 08:56 AM   #1
Gello
A Firelord
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 492
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
 

WoWInterface » Developer Discussions » Lua/XML Help » C_Map.GetMapPosFromWorldPos

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off