mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
*Fix a bug that current cell is not set for creatures sometimes.
--HG-- branch : trunk
This commit is contained in:
@@ -1040,6 +1040,7 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell)
|
||||
|
||||
RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell);
|
||||
AddToGrid(c,getNGrid(new_cell.GridX(), new_cell.GridY()),new_cell);
|
||||
c->SetCurrentCell(new_cell);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1053,10 +1054,9 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell)
|
||||
#endif
|
||||
|
||||
RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell);
|
||||
{
|
||||
EnsureGridCreated(GridPair(new_cell.GridX(), new_cell.GridY()));
|
||||
AddToGrid(c,getNGrid(new_cell.GridX(), new_cell.GridY()),new_cell);
|
||||
}
|
||||
EnsureGridCreated(GridPair(new_cell.GridX(), new_cell.GridY()));
|
||||
AddToGrid(c,getNGrid(new_cell.GridX(), new_cell.GridY()),new_cell);
|
||||
c->SetCurrentCell(new_cell);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user