From 72d14758637e8e3e2790e1ec7dafd6abc8ff9ee6 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 19 Jan 2021 13:33:43 -0500 Subject: [PATCH] Core/Map: Fix a crash bug when teleporting out of map before being fully added to that map. Port From (https://github.com/TrinityCore/TrinityCore/commit/6a69dcced2e5bb6227eff28c48c4636cfdb23a1e) --- Source/Game/Entities/Player/Player.Map.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Game/Entities/Player/Player.Map.cs b/Source/Game/Entities/Player/Player.Map.cs index 7bab41851..b426ca64d 100644 --- a/Source/Game/Entities/Player/Player.Map.cs +++ b/Source/Game/Entities/Player/Player.Map.cs @@ -150,6 +150,9 @@ namespace Game.Entities public void UpdateZone(uint newZone, uint newArea) { + if (!IsInWorld) + return; + uint oldZone = m_zoneUpdateId; m_zoneUpdateId = newZone; m_zoneUpdateTimer = 1 * Time.InMilliseconds;