Closed ManaRealm closed 2 years ago
Your problem is that the coords in creature/gameobject table are global map coordinates and you are thinking in terms of local zone coordinates, which arent a thing ingame. That being said, for trinitycore there are some php codebases which are able to show a db like on wowhead and they likely have the code for translating global coords to zone coords.
https://github.com/alideny/Freehead/blob/master/includes/game.php#L282-L288 Here's old aowow (not new for trinity core) code to calculate zone and coordinates. It may be bad, it has Russian comments but it worked decent back in the day. It uses dbc data loaded into sql tables, because zones have min max x/y coordinates and script has to find what zone a point is in based on min max coordinates + filter to choose smallest one e.g. for capitals. It's just a reference ofc, don't expect a copy paste to work. If you are good with php/sql you can figure it out I'm sure
Closing this issue as celguar basically answered it.
Core Version
mangos-wotlk
Support Request Details
Hello,
Does anyone know how to use the x/y coordinates found within the wotlk db tables? I'm attempting to show some location(s) on a static sized map image within an HTML web page, similar to how WoWHead is showing location(s) here: https://classic.wowhead.com/npc=514/smith-argus
I've been extremely troubled trying to figure this out. Is there a image of the entire game's map that these coordinates work on, or am I looking in the wrong direction?
Steps to Reproduce
Crash Log
No response
Core SHA1 Commit Hash
N/A
Database SHA1 Commit Hash
N/A
Server Operating System
Windows Server
Client Version
3.3.5a (Wrath of the Lich King)
Client Operating System
Windows 10