mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 11:25:42 +00:00
fix(Core/Player): Force UpdateZone on resurrect to apply Zone auras (#21888)
This commit is contained in:
@@ -1249,17 +1249,20 @@ void Player::UpdateArea(uint32 newArea)
|
||||
RemoveRestFlag(REST_FLAG_IN_FACTION_AREA);
|
||||
}
|
||||
|
||||
void Player::UpdateZone(uint32 newZone, uint32 newArea)
|
||||
void Player::UpdateZone(uint32 newZone, uint32 newArea, bool force)
|
||||
{
|
||||
if (!newZone)
|
||||
return;
|
||||
|
||||
if (m_zoneUpdateId != newZone)
|
||||
if (m_zoneUpdateId != newZone || force)
|
||||
{
|
||||
sOutdoorPvPMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
sOutdoorPvPMgr->HandlePlayerEnterZone(this, newZone);
|
||||
sWorldState->HandlePlayerLeaveZone(this, static_cast<WorldStateZoneId>(m_zoneUpdateId));
|
||||
sWorldState->HandlePlayerEnterZone(this, static_cast<WorldStateZoneId>(newZone));
|
||||
}
|
||||
if (m_zoneUpdateId != newZone)
|
||||
{
|
||||
sBattlefieldMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
sBattlefieldMgr->HandlePlayerEnterZone(this, newZone);
|
||||
SendInitWorldStates(newZone,
|
||||
|
||||
Reference in New Issue
Block a user