From e1b2bd63ab63b851f7be393d1e9e481f4f8161e7 Mon Sep 17 00:00:00 2001 From: killerwife Date: Wed, 16 Aug 2023 10:26:11 +0200 Subject: [PATCH] Rogue: Fix minor mistakes with cheat death https://github.com/cmangos/issues/issues/3527 --- src/game/Spells/Scripts/Scripting/ClassScripts/Rogue.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/Spells/Scripts/Scripting/ClassScripts/Rogue.cpp b/src/game/Spells/Scripts/Scripting/ClassScripts/Rogue.cpp index b0217654f3..d50ae2a2e6 100644 --- a/src/game/Spells/Scripts/Scripting/ClassScripts/Rogue.cpp +++ b/src/game/Spells/Scripts/Scripting/ClassScripts/Rogue.cpp @@ -151,7 +151,7 @@ struct CheatDeathRogue : public AuraScript void OnAbsorb(Aura* aura, int32& currentAbsorb, int32& remainingDamage, uint32& /*reflectedSpellId*/, int32& /*reflectDamage*/, bool& preventedDeath, bool& dropCharge) const override { if (!preventedDeath && aura->GetTarget()->IsPlayer() && - aura->GetTarget()->IsSpellReady(31231) && + aura->GetHolder()->IsProcReady(aura->GetTarget()->GetMap()->GetCurrentClockTime()) && // Only if no cooldown roll_chance_i(aura->GetModifier()->m_amount)) // Only if roll @@ -160,6 +160,8 @@ struct CheatDeathRogue : public AuraScript } // always skip this spell in charge dropping, absorb amount calculation since it has chance as m_amount and doesn't need to absorb any damage dropCharge = false; + currentAbsorb = 0; // absorb is only done in death prevention case + remainingDamage += currentAbsorb; } void OnAuraDeathPrevention(Aura* aura, int32& remainingDamage) const override