Core/Player: Update map zone stats BEFORE invoking scripts. Fixes a crash with zone change scripts that invoke another zone change. Closes #20289.

This commit is contained in:
Treeston authored and Aokromes committed 2017-09-10 15:34:30 +02:00
1 parent 4f86677a16
commit 46657cca71
1 file changed
+2
@@ -7394,6 +7394,8 @@ void Player::UpdateArea(uint32 newArea)
void Player::UpdateZone(uint32 newZone, uint32 newArea)
{
GetMap()->UpdatePlayerZoneStats(m_zoneUpdateId, newZone);
if (m_zoneUpdateId != newZone)
{
sOutdoorPvPMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);