From 021f3425024280d9b9840c17b6f41354eedff486 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 4 Jan 2022 17:56:58 -0500 Subject: [PATCH] Entities/Creature: Fix an edge case assertion failure with pets dying in specific situations while casting spells. Port From (https://github.com/TrinityCore/TrinityCore/commit/97bf9278a8d347badc85d7bcefdba0c1afb275e3) --- 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 5bc5efac5..32e21b2ec 100644 --- a/Source/Game/Entities/Creature/Creature.cs +++ b/Source/Game/Entities/Creature/Creature.cs @@ -2981,7 +2981,7 @@ namespace Game.Entities public override bool HasSpellFocus(Spell focusSpell = null) { - if (!IsAlive()) // dead creatures cannot focus + if (IsDead()) // dead creatures cannot focus { if (_spellFocusInfo.Spell != null || _spellFocusInfo.Delay != 0) Log.outWarn(LogFilter.Unit, $"Creature '{GetName()}' (entry {GetEntry()}) has spell focus (spell id {(_spellFocusInfo.Spell != null ? _spellFocusInfo.Spell.GetSpellInfo().Id : 0)}, delay {_spellFocusInfo.Delay}ms) despite being dead.");