diff options
| author | offl <11556157+offl@users.noreply.github.com> | 2021-11-24 17:05:01 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-03-23 00:06:37 +0100 |
| commit | 83b4c8cd37bd3b6894cfbd1f48c1c7e7234f853f (patch) | |
| tree | f11585c048cac1e49ecb36634e22494428ec61bd /src/server/scripts/EasternKingdoms | |
| parent | 4281049e0c0d38a968d1d37bdd3ec04e35b81850 (diff) | |
Scripts/Spells: Small cleanup for gen/item spell scripts (#27311)
(cherry picked from commit ef4c878d260c0e01a6ab2f4391af46c261d04785)
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
| -rw-r--r-- | src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp | 20 | ||||
| -rw-r--r-- | src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp | 26 |
2 files changed, 46 insertions, 0 deletions
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp index 37f3488e2ad..8bb98703bf3 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp @@ -25,6 +25,8 @@ EndScriptData */ #include "InstanceScript.h" #include "Log.h" #include "ScriptedCreature.h" +#include "SpellAuraEffects.h" +#include "SpellScript.h" #include "sunwell_plateau.h" enum Quotes @@ -343,7 +345,25 @@ public: } }; +// 46394 - Burn +class spell_brutallus_burn : public AuraScript +{ + PrepareAuraScript(spell_brutallus_burn); + + void HandleEffectPeriodicUpdate(AuraEffect* aurEff) + { + if (aurEff->GetTickNumber() % 11 == 0) + aurEff->SetAmount(aurEff->GetAmount() * 2); + } + + void Register() override + { + OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_brutallus_burn::HandleEffectPeriodicUpdate, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE); + } +}; + void AddSC_boss_brutallus() { new boss_brutallus(); + RegisterSpellScript(spell_brutallus_burn); } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index a1b2cb54d8f..7487fe51f28 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -608,6 +608,31 @@ class spell_summon_blood_elves_periodic : public AuraScript } }; +// 46284 - Negative Energy Periodic +class spell_muru_negative_energy_periodic : public AuraScript +{ + PrepareAuraScript(spell_muru_negative_energy_periodic); + + bool Validate(SpellInfo const* spellInfo) override + { + return !spellInfo->GetEffects().empty() && ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0).TriggerSpell }); + } + + void PeriodicTick(AuraEffect const* aurEff) + { + PreventDefaultAction(); + + CastSpellExtraArgs args(aurEff); + args.AddSpellMod(SPELLVALUE_MAX_TARGETS, aurEff->GetTickNumber() / 10 + 1); + GetTarget()->CastSpell(nullptr, aurEff->GetSpellEffectInfo().TriggerSpell, args); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_muru_negative_energy_periodic::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } +}; + void AddSC_boss_muru() { RegisterSunwellPlateauCreatureAI(boss_muru); @@ -621,4 +646,5 @@ void AddSC_boss_muru() RegisterSpellScript(spell_dark_fiend_skin); RegisterSpellScript(spell_transform_visual_missile_periodic); RegisterSpellScript(spell_summon_blood_elves_periodic); + RegisterSpellScript(spell_muru_negative_energy_periodic); } |
