fix(Core/Grids): Standardize grid coordinates (#21479)

This commit is contained in:
Takenbacon
2025-02-17 22:16:36 -08:00
committed by GitHub
parent 8207d1e8d0
commit 58d13e69e1
7 changed files with 30 additions and 59 deletions

View File

@@ -133,11 +133,10 @@ public:
// grid tile location
Player* player = handler->GetSession()->GetPlayer();
int32 gx = 32 - player->GetPositionX() / SIZE_OF_GRIDS;
int32 gy = 32 - player->GetPositionY() / SIZE_OF_GRIDS;
GridCoord const gridCoord = Acore::ComputeGridCoord(player->GetPositionX(), player->GetPositionY());
handler->PSendSysMessage("{}{}{}.mmtile", player->GetMapId(), gx, gy);
handler->PSendSysMessage("gridloc [{}, {}]", gy, gx);
handler->PSendSysMessage("{}{}{}.mmtile", player->GetMapId(), gridCoord.x_coord, gridCoord.y_coord);
handler->PSendSysMessage("gridloc [{}, {}]", gridCoord.x_coord, gridCoord.y_coord);
// calculate navmesh tile location
dtNavMesh const* navmesh = MMAP::MMapFactory::createOrGetMMapMgr()->GetNavMesh(handler->GetSession()->GetPlayer()->GetMapId());