aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Globals/ObjectMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rwxr-xr-xsrc/server/game/Globals/ObjectMgr.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index ae7e2d57991..b9eab8588fe 100755
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -1568,8 +1568,8 @@ void ObjectMgr::AddCreatureToGrid(uint32 guid, CreatureData const* data)
{
if (mask & 1)
{
- CellPair cell_pair = Trinity::ComputeCellPair(data->posX, data->posY);
- uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
+ CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
+ uint32 cell_id = (cellCoord.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cellCoord.x_coord;
CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cell_id];
cell_guids.creatures.insert(guid);
@@ -1584,8 +1584,8 @@ void ObjectMgr::RemoveCreatureFromGrid(uint32 guid, CreatureData const* data)
{
if (mask & 1)
{
- CellPair cell_pair = Trinity::ComputeCellPair(data->posX, data->posY);
- uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
+ CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
+ uint32 cell_id = (cellCoord.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cellCoord.x_coord;
CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cell_id];
cell_guids.creatures.erase(guid);
@@ -1880,8 +1880,8 @@ void ObjectMgr::AddGameobjectToGrid(uint32 guid, GameObjectData const* data)
{
if (mask & 1)
{
- CellPair cell_pair = Trinity::ComputeCellPair(data->posX, data->posY);
- uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
+ CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
+ uint32 cell_id = (cellCoord.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cellCoord.x_coord;
CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cell_id];
cell_guids.gameobjects.insert(guid);
@@ -1896,8 +1896,8 @@ void ObjectMgr::RemoveGameobjectFromGrid(uint32 guid, GameObjectData const* data
{
if (mask & 1)
{
- CellPair cell_pair = Trinity::ComputeCellPair(data->posX, data->posY);
- uint32 cell_id = (cell_pair.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cell_pair.x_coord;
+ CellCoord cellCoord = Trinity::ComputeCellCoord(data->posX, data->posY);
+ uint32 cell_id = (cellCoord.y_coord*TOTAL_NUMBER_OF_CELLS_PER_MAP) + cellCoord.x_coord;
CellObjectGuids& cell_guids = mMapObjectGuids[MAKE_PAIR32(data->mapid, i)][cell_id];
cell_guids.gameobjects.erase(guid);