From c2ab67c6d2aabad26c6171c664e1bd25b5384820 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 24 Jan 2023 23:10:42 -0500 Subject: [PATCH] Core/Auras: Fully remove auras that had all of their effect suppressed with immunity Port From (https://github.com/TrinityCore/TrinityCore/commit/8568b08350b954afb6603bf2c64897493230f2b1) --- Source/Game/Entities/Unit/Unit.Spells.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Game/Entities/Unit/Unit.Spells.cs b/Source/Game/Entities/Unit/Unit.Spells.cs index 8b9cef7ba..3c219c6c7 100644 --- a/Source/Game/Entities/Unit/Unit.Spells.cs +++ b/Source/Game/Entities/Unit/Unit.Spells.cs @@ -2949,7 +2949,13 @@ namespace Game.Entities }, removeMode); foreach (Aura aura in aurasToUpdateTargets) + { aura.UpdateTargetMap(aura.GetCaster()); + + // Fully remove the aura if all effects were removed + if (!aura.IsPassive() && aura.GetOwner() == this && aura.GetApplicationOfTarget(GetGUID()) == null) + aura.Remove(removeMode); + } } public void RemoveAurasDueToSpellBySteal(uint spellId, ObjectGuid casterGUID, WorldObject stealer, int stolenCharges = 1) {