Skip to content

Commit

Permalink
Rogue: Fix minor mistakes with cheat death
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Aug 16, 2023
1 parent f963617 commit e1b2bd6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/game/Spells/Scripts/Scripting/ClassScripts/Rogue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e1b2bd6

Please sign in to comment.