mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
fix(Core/Players): Update the player's zone and area only after update the player's position server-side (#9419)
This commit is contained in:
@@ -1115,6 +1115,15 @@ bool Player::UpdatePosition(float x, float y, float z, float orientation,
|
||||
if (!Unit::UpdatePosition(x, y, z, orientation, teleport))
|
||||
return false;
|
||||
|
||||
// Update player zone if needed
|
||||
if (m_needZoneUpdate)
|
||||
{
|
||||
uint32 newZone, newArea;
|
||||
GetZoneAndAreaId(newZone, newArea);
|
||||
UpdateZone(newZone, newArea);
|
||||
m_needZoneUpdate = false;
|
||||
}
|
||||
|
||||
if (GetGroup())
|
||||
SetGroupUpdateFlag(GROUP_UPDATE_FLAG_POSITION);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user