Core/Player: Update map zone stats BEFORE invoking scripts. Fixes a crash with zone change scripts that invoke another zone change.
Port From (https://github.com/TrinityCore/TrinityCore/commit/8db10c67d7232b7b1e479018cfbf020a3a91fa5c)
This commit is contained in:
@@ -148,6 +148,8 @@ namespace Game.Entities
|
||||
|
||||
public void UpdateZone(uint newZone, uint newArea)
|
||||
{
|
||||
GetMap().UpdatePlayerZoneStats(m_zoneUpdateId, newZone);
|
||||
|
||||
if (m_zoneUpdateId != newZone)
|
||||
{
|
||||
Global.OutdoorPvPMgr.HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
@@ -160,8 +162,6 @@ namespace Game.Entities
|
||||
guild.UpdateMemberData(this, GuildMemberData.ZoneId, newZone);
|
||||
}
|
||||
|
||||
GetMap().UpdatePlayerZoneStats(m_zoneUpdateId, newZone);
|
||||
|
||||
// group update
|
||||
if (GetGroup())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user