Quantcast WoWInterface - View Single Post - New/changed in build 26522.
View Single Post
05-02-18, 01:15 PM   #5
Fishing Trainer
Seerah's Avatar
WoWInterface Super Mod
Join Date: Oct 2006
Posts: 10,727
Originally Posted by VincentSDSH View Post
Wow...this seems like a lot to get coords, am I doing this right?
Lua Code:
  1. local x, y = C_Map.GetPlayerMapPosition(  C_Map.GetBestMapForUnit("player") , "player" ):GetXY()
Or you could just do this:
Lua Code:
  1. local positionData = C_Map.GetPlayerMapPosition(C_Map.GetBestMapForUnit("player"), "player")
And then use positionData.x and positionData.y

/edited because GetCurrentMapID is tied to the world map display
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

Last edited by Seerah : 05-02-18 at 01:52 PM.
  Reply With Quote