mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
call SetPosition when player relocated by movement generator.
SetPosition should interrupt auras with movement or turn interrupt flags, update position for group, etc --HG-- branch : trunk
This commit is contained in:
@@ -1110,10 +1110,6 @@ Map::PlayerRelocation(Player *player, float x, float y, float z, float orientati
|
||||
{
|
||||
DEBUG_LOG("Player %s relocation grid[%u,%u]cell[%u,%u]->grid[%u,%u]cell[%u,%u]", player->GetName(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
|
||||
|
||||
// update player position for group at taxi flight
|
||||
if (player->GetGroup() && player->isInFlight())
|
||||
player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
|
||||
|
||||
NGridType* oldGrid = getNGrid(old_cell.GridX(), old_cell.GridY());
|
||||
RemoveFromGrid(player, oldGrid,old_cell);
|
||||
if (!old_cell.DiffGrid(new_cell))
|
||||
|
||||
@@ -139,7 +139,7 @@ inline float Traveller<Player>::GetMoveDestinationTo(float x, float y, float z)
|
||||
template<>
|
||||
inline void Traveller<Player>::Relocation(float x, float y, float z, float orientation)
|
||||
{
|
||||
i_traveller.GetMap()->PlayerRelocation(&i_traveller, x, y, z, orientation);
|
||||
i_traveller.SetPosition(x, y, z, orientation);
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
Reference in New Issue
Block a user