mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-19 22:49:39 -04:00
Core/Player: Resequence Player::UpdateZone some more to hopefully prevent future edge cases like #20289 from occurring.
This commit is contained in:
@@ -6997,24 +6997,10 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
|
||||
{
|
||||
GetMap()->UpdatePlayerZoneStats(m_zoneUpdateId, newZone);
|
||||
|
||||
if (m_zoneUpdateId != newZone)
|
||||
{
|
||||
sOutdoorPvPMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
sOutdoorPvPMgr->HandlePlayerEnterZone(this, newZone);
|
||||
sBattlefieldMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
sBattlefieldMgr->HandlePlayerEnterZone(this, newZone);
|
||||
SendInitWorldStates(newZone, newArea); // only if really enters to new zone, not just area change, works strange...
|
||||
if (Guild* guild = GetGuild())
|
||||
guild->UpdateMemberData(this, GUILD_MEMBER_DATA_ZONEID, newZone);
|
||||
}
|
||||
|
||||
// group update
|
||||
if (GetGroup())
|
||||
SetGroupUpdateFlag(GROUP_UPDATE_FULL);
|
||||
|
||||
m_zoneUpdateId = newZone;
|
||||
m_zoneUpdateTimer = ZONE_UPDATE_INTERVAL;
|
||||
|
||||
// zone changed, so area changed as well, update it
|
||||
UpdateArea(newArea);
|
||||
|
||||
@@ -7079,6 +7065,19 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
|
||||
UpdateLocalChannels(newZone);
|
||||
|
||||
UpdateZoneDependentAuras(newZone);
|
||||
|
||||
m_zoneUpdateTimer = ZONE_UPDATE_INTERVAL;
|
||||
if (m_zoneUpdateId != newZone)
|
||||
{
|
||||
m_zoneUpdateId = newZone;
|
||||
sOutdoorPvPMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
sOutdoorPvPMgr->HandlePlayerEnterZone(this, newZone);
|
||||
sBattlefieldMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
sBattlefieldMgr->HandlePlayerEnterZone(this, newZone);
|
||||
SendInitWorldStates(newZone, newArea); // only if really enters to new zone, not just area change, works strange...
|
||||
if (Guild* guild = GetGuild())
|
||||
guild->UpdateMemberData(this, GUILD_MEMBER_DATA_ZONEID, newZone);
|
||||
}
|
||||
}
|
||||
|
||||
//If players are too far away from the duel flag... they lose the duel
|
||||
|
||||
Reference in New Issue
Block a user