From 8ff2e2d75bc3c49380b387d2b44472eb572ee7f8 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Fri, 24 Dec 2021 20:25:47 -0500 Subject: [PATCH] Core/Creatures: Fixed crash in CreatureAI::JustAppeared caused by scripted summons without SummonProperties Port From (https://github.com/TrinityCore/TrinityCore/commit/1c00109756815b6888303b31748595521fd7809c) --- Source/Game/AI/CoreAI/CreatureAI.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Game/AI/CoreAI/CreatureAI.cs b/Source/Game/AI/CoreAI/CreatureAI.cs index 3cac478b8..0c113e6cf 100644 --- a/Source/Game/AI/CoreAI/CreatureAI.cs +++ b/Source/Game/AI/CoreAI/CreatureAI.cs @@ -156,8 +156,9 @@ namespace Game.AI if (!me.IsSummon()) return; + // Summons without SummonProperties are generally scripted summons that don't belong to any owner TempSummon summon = me.ToTempSummon(); - if (summon.m_Properties.Control != SummonCategory.Unk && summon.m_Properties.Control != SummonCategory.Pet) + if (summon.m_Properties == null || (summon.m_Properties.Control != SummonCategory.Unk && summon.m_Properties.Control != SummonCategory.Pet)) return; // Not applied to vehicles