From ebc28748b9ef3edcc67727077ea0e51e08611441 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 23 Nov 2021 21:35:00 -0500 Subject: [PATCH] Core/Spells: Fix assert triggered Port From (https://github.com/TrinityCore/TrinityCore/commit/36468203ddf9adb1a4c64f663aff6505701b8fb6) --- Source/Game/Entities/Unit/Unit.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Game/Entities/Unit/Unit.cs b/Source/Game/Entities/Unit/Unit.cs index e529fabe0..49a0cf3fb 100644 --- a/Source/Game/Entities/Unit/Unit.cs +++ b/Source/Game/Entities/Unit/Unit.cs @@ -1475,8 +1475,9 @@ namespace Game.Entities { // can't apply aura on unit which is going to be deleted - to not create a memory leak Cypher.Assert(!m_cleanupDone); - // aura musn't be removed - Cypher.Assert(!aura.IsRemoved()); + // aura musn't be removed (but it could have been removed by OnEffectHitTarget script handler + // casting a spell that killed the target and set deathState to CORPSE) + Cypher.Assert(!aura.IsRemoved() || !IsAlive()); // aura mustn't be already applied on target Cypher.Assert(!aura.IsAppliedOnTarget(GetGUID()), "Unit._CreateAuraApplication: aura musn't be applied on target");