diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_dh.cpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_dh.cpp b/src/server/scripts/Spells/spell_dh.cpp index adfa2b7ab10..62c129622c4 100644 --- a/src/server/scripts/Spells/spell_dh.cpp +++ b/src/server/scripts/Spells/spell_dh.cpp @@ -52,6 +52,8 @@ enum DemonHunterSpells SPELL_DH_BLUR_TRIGGER = 198589, SPELL_DH_BURNING_ALIVE = 207739, SPELL_DH_BURNING_ALIVE_TARGET_SELECTOR = 207760, + SPELL_DH_CALCIFIED_SPIKES_TALENT = 389720, + SPELL_DH_CALCIFIED_SPIKES_MOD_DAMAGE = 391171, SPELL_DH_CHAOS_NOVA = 179057, SPELL_DH_CHAOS_STRIKE = 162794, SPELL_DH_CHAOS_STRIKE_ENERGIZE = 193840, @@ -198,6 +200,54 @@ enum DemonHunterSpellCategories SPELL_CATEGORY_DH_BLADE_DANCE = 1640 }; +// Called by 203819 - Demon Spikes +class spell_dh_calcified_spikes : public AuraScript +{ + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_DH_CALCIFIED_SPIKES_TALENT, SPELL_DH_CALCIFIED_SPIKES_MOD_DAMAGE }); + } + + bool Load() override + { + return GetUnitOwner()->HasAura(SPELL_DH_CALCIFIED_SPIKES_TALENT); + } + + void HandleAfterRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) const + { + Unit* target = GetTarget(); + target->CastSpell(target, SPELL_DH_CALCIFIED_SPIKES_MOD_DAMAGE, CastSpellExtraArgsInit{ + .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR, + .TriggeringAura = aurEff + }); + } + + void Register() override + { + AfterEffectRemove += AuraEffectRemoveFn(spell_dh_calcified_spikes::HandleAfterRemove, EFFECT_1, SPELL_AURA_MOD_ARMOR_PCT_FROM_STAT, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); + } +}; + +// 391171 - Calcified Spikes +class spell_dh_calcified_spikes_periodic : public AuraScript +{ + bool Validate(SpellInfo const* spellInfo) override + { + return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } }); + } + + void HandlePeriodic(AuraEffect const* /*aurEff*/) const + { + if (AuraEffect* damagePctTaken = GetEffect(EFFECT_0)) + damagePctTaken->ChangeAmount(damagePctTaken->GetAmount() + 1); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_dh_calcified_spikes_periodic::HandlePeriodic, EFFECT_1, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } +}; + // 197125 - Chaos Strike class spell_dh_chaos_strike : public AuraScript { @@ -1121,6 +1171,8 @@ class spell_dh_vengeful_retreat_damage : public SpellScript void AddSC_demon_hunter_spell_scripts() { + RegisterSpellScript(spell_dh_calcified_spikes); + RegisterSpellScript(spell_dh_calcified_spikes_periodic); RegisterSpellScript(spell_dh_chaos_strike); RegisterSpellScript(spell_dh_chaotic_transformation); RegisterSpellScript(spell_dh_charred_warblades); |