diff options
| author | Shauren <shauren.trinity@gmail.com> | 2024-09-19 15:03:15 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2024-09-19 15:03:15 +0200 |
| commit | 33507e010774d74690169558f6a12aa76c29b052 (patch) | |
| tree | 94e36f1c32288edee5c836ba0737f5e743ce79e5 /src/server/scripts/Spells | |
| parent | 11a832fa8ba2362a0efcde601e7225582326e0da (diff) | |
Scripts/Spells: Update Shadow Word: Death script and define new spell effect attribute related to one of its effects
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index b8dbcf13aed..ad4fccf6699 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -3088,13 +3088,16 @@ class spell_pri_shadow_word_death : public SpellScript bool Validate(SpellInfo const* spellInfo) override { return ValidateSpellInfo({ SPELL_PRIEST_SHADOW_WORD_DEATH_DAMAGE }) - && ValidateSpellEffect({ { spellInfo->Id, EFFECT_4 } }); + && ValidateSpellEffect({ { spellInfo->Id, EFFECT_5 } }) + && spellInfo->GetEffect(EFFECT_2).IsEffect(SPELL_EFFECT_DUMMY) + && spellInfo->GetEffect(EFFECT_3).IsEffect(SPELL_EFFECT_SCRIPT_EFFECT) + && spellInfo->GetEffect(EFFECT_5).IsEffect(SPELL_EFFECT_DUMMY); } void HandleDamageCalculation(Unit const* victim, int32 const& /*damage*/, int32 const& /*flatMod*/, float& pctMod) const { - if (victim->HealthBelowPct(GetEffectInfo(EFFECT_1).CalcValue(GetCaster()))) - AddPct(pctMod, GetEffectInfo(EFFECT_2).CalcValue(GetCaster())); + if (victim->HealthBelowPct(GetEffectInfo(EFFECT_2).CalcValue(GetCaster()))) + AddPct(pctMod, GetEffectInfo(EFFECT_3).CalcValue(GetCaster())); } void DetermineKillStatus(DamageInfo const& damageInfo, uint32& /*resistAmount*/, int32& /*absorbAmount*/) const @@ -3103,7 +3106,7 @@ class spell_pri_shadow_word_death : public SpellScript if (!killed) { Unit* caster = GetCaster(); - int32 backlashDamage = caster->CountPctFromMaxHealth(GetEffectInfo(EFFECT_4).CalcValue(caster)); + int32 backlashDamage = caster->CountPctFromMaxHealth(GetEffectInfo(EFFECT_5).CalcValue(caster)); caster->m_Events.AddEventAtOffset([caster, originalCastId = GetSpell()->m_castId, backlashDamage] { caster->CastSpell(caster, SPELL_PRIEST_SHADOW_WORD_DEATH_DAMAGE, CastSpellExtraArgs() |
