From c5bd2ceda4834fdf88351016b66f1e23b7888de3 Mon Sep 17 00:00:00 2001 From: Seyden Date: Fri, 30 Dec 2022 12:52:22 +0100 Subject: Core/Auras: Fixed iterator invalidation crash in Unit::CalcHealAbsorb (#28515) --- src/server/game/Entities/Unit/Unit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index f3e30d49f00..3c249b44a39 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -2002,14 +2002,14 @@ void Unit::HandleEmoteCommand(Emote emoteId, Player* target /*=nullptr*/, Trinit tempAbsorb = currentAbsorb; absorbAurEff->GetBase()->CallScriptEffectAfterAbsorbHandlers(absorbAurEff, aurApp, healInfo, tempAbsorb); - // Check if our aura is using amount to count damage + // Check if our aura is using amount to count heal if (absorbAurEff->GetAmount() >= 0) { // Reduce shield amount absorbAurEff->ChangeAmount(absorbAurEff->GetAmount() - currentAbsorb); // Aura cannot absorb anything more - remove it if (absorbAurEff->GetAmount() <= 0) - absorbAurEff->GetBase()->Remove(AURA_REMOVE_BY_ENEMY_SPELL); + existExpired = true; } } -- cgit v1.2.3