mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Added changes missing from previous commit
This commit is contained in:
@@ -947,13 +947,11 @@ bool Unit::HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel) cons
|
||||
// absorb all damage by default
|
||||
uint32 currentAbsorb = damageInfo.GetDamage();
|
||||
|
||||
uint32 tempAbsorb = uint32(currentAbsorb);
|
||||
|
||||
// This aura type is used both by Spirit of Redemption (death not really prevented, must grant all credit immediately) and Cheat Death (death prevented)
|
||||
// repurpose PreventDefaultAction for this
|
||||
bool deathFullyPrevented = false;
|
||||
|
||||
absorbAurEff->GetBase()->CallScriptEffectAbsorbHandlers(absorbAurEff, aurApp, damageInfo, tempAbsorb, deathFullyPrevented);
|
||||
absorbAurEff->GetBase()->CallScriptEffectAbsorbHandlers(absorbAurEff, aurApp, damageInfo, currentAbsorb, deathFullyPrevented);
|
||||
|
||||
// absorb must be smaller than the damage itself
|
||||
currentAbsorb = std::min(currentAbsorb, damageInfo.GetDamage());
|
||||
|
||||
@@ -152,8 +152,6 @@ class spell_pal_ardent_defender : public AuraScript
|
||||
{
|
||||
// we are currently below desired health
|
||||
// absorb everything and heal up
|
||||
absorbAmount = dmgInfo.GetDamage();
|
||||
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_PALADIN_ARDENT_DEFENDER_HEAL,
|
||||
CastSpellExtraArgs(aurEff)
|
||||
.AddSpellMod(SPELLVALUE_BASE_POINT0, int32(targetHealth - GetTarget()->GetHealth())));
|
||||
|
||||
@@ -2170,13 +2170,11 @@ class spell_pri_spirit_of_redemption : public AuraScript
|
||||
return ValidateSpellInfo({ SPELL_PRIEST_SPIRIT_OF_REDEMPTION });
|
||||
}
|
||||
|
||||
void HandleAbsorb(AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount)
|
||||
void HandleAbsorb(AuraEffect const* aurEff, DamageInfo const& /*dmgInfo*/, uint32 const& /*absorbAmount*/) const
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
target->CastSpell(target, SPELL_PRIEST_SPIRIT_OF_REDEMPTION, aurEff);
|
||||
target->SetFullHealth();
|
||||
|
||||
absorbAmount = dmgInfo.GetDamage();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
Reference in New Issue
Block a user