mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Core/Player): Force UpdateZone on resurrect to apply Zone auras (#21888)
This commit is contained in:
@@ -4535,7 +4535,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||
// trigger update zone for alive state zone updates
|
||||
uint32 newzone, newarea;
|
||||
GetZoneAndAreaId(newzone, newarea);
|
||||
UpdateZone(newzone, newarea);
|
||||
UpdateZone(newzone, newarea, true);
|
||||
sOutdoorPvPMgr->HandlePlayerResurrects(this, newzone);
|
||||
|
||||
if (Battleground* bg = GetBattleground())
|
||||
|
||||
@@ -1862,7 +1862,7 @@ public:
|
||||
itr->SetPvP(state);
|
||||
}
|
||||
void UpdatePvP(bool state, bool _override = false);
|
||||
void UpdateZone(uint32 newZone, uint32 newArea);
|
||||
void UpdateZone(uint32 newZone, uint32 newArea, bool force = false);
|
||||
void UpdateArea(uint32 newArea);
|
||||
void SetNeedZoneUpdate(bool needUpdate) { m_needZoneUpdate = needUpdate; }
|
||||
|
||||
|
||||
@@ -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