From b5b43dc2512e4b7d9fbd13a49e1d8dad490e8342 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 19 Jan 2021 13:28:00 -0500 Subject: [PATCH] Core/Maps: Prevent potential null dereference Port From (https://github.com/TrinityCore/TrinityCore/commit/7a21d02da12667e6e873163de83fa3cb25d028aa) --- Source/Game/Entities/Creature/Creature.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Game/Entities/Creature/Creature.cs b/Source/Game/Entities/Creature/Creature.cs index a56e9477f..70176c417 100644 --- a/Source/Game/Entities/Creature/Creature.cs +++ b/Source/Game/Entities/Creature/Creature.cs @@ -2215,7 +2215,7 @@ namespace Game.Entities } uint thisRespawnTime = (uint)(forceDelay != 0 ? Time.UnixTime + forceDelay : m_respawnTime); - GetMap().SaveRespawnTime(SpawnObjectType.Creature, m_spawnId, GetEntry(), thisRespawnTime, GetMap().GetZoneId(GetPhaseShift(), GetHomePosition()), GridDefines.ComputeGridCoord(GetHomePosition().GetPositionX(), GetHomePosition().GetPositionY()).GetId(), m_creatureData.dbData && saveToDb); + GetMap().SaveRespawnTime(SpawnObjectType.Creature, m_spawnId, GetEntry(), thisRespawnTime, GetMap().GetZoneId(GetPhaseShift(), GetHomePosition()), GridDefines.ComputeGridCoord(GetHomePosition().GetPositionX(), GetHomePosition().GetPositionY()).GetId(), saveToDb && m_creatureData != null && m_creatureData.dbData); } public bool CanCreatureAttack(Unit victim, bool force = true)