diff options
Diffstat (limited to 'src/server/scripts/Northrend')
3 files changed, 96 insertions, 0 deletions
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp index ff4d610a59e..1ed17eda42e 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_anubarak_trial.cpp @@ -830,6 +830,49 @@ class npc_anubarak_spike : public CreatureScript }; }; +// 65920 - Pursuing Spikes +// 65922 - Pursuing Spikes +// 65923 - Pursuing Spikes +class spell_pursuing_spikes : public AuraScript +{ + PrepareAuraScript(spell_pursuing_spikes); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_PERMAFROST, SPELL_SPIKE_FAIL }); + } + + bool Load() override + { + return InstanceHasScript(GetUnitOwner(), ToCrScriptName); + } + + void PeriodicTick(AuraEffect const* /*aurEff*/) + { + PreventDefaultAction(); + + Unit* permafrostCaster = nullptr; + if (Aura* permafrostAura = GetTarget()->GetAura(SPELL_PERMAFROST)) + permafrostCaster = permafrostAura->GetCaster(); + + if (permafrostCaster) + { + if (Creature* permafrostCasterCreature = permafrostCaster->ToCreature()) + permafrostCasterCreature->DespawnOrUnsummon(3000); + + GetTarget()->CastSpell(nullptr, SPELL_SPIKE_FAIL, false); + GetTarget()->RemoveAllAuras(); + if (Creature* targetCreature = GetTarget()->ToCreature()) + targetCreature->DisappearAndDie(); + } + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_pursuing_spikes::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } +}; + class spell_impale : public SpellScriptLoader { public: @@ -909,6 +952,7 @@ void AddSC_boss_anubarak_trial() new npc_anubarak_spike(); new npc_frost_sphere(); + RegisterAuraScript(spell_pursuing_spikes); new spell_impale(); new spell_anubarak_leeching_swarm(); } diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp index 15bf3343129..aab0cd46128 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp @@ -1374,6 +1374,30 @@ public: } }; +// 66882 - Slime Pool +class spell_jormungars_slime_pool : public AuraScript +{ + PrepareAuraScript(spell_jormungars_slime_pool); + + bool Validate(SpellInfo const* spellInfo) override + { + return ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0)->TriggerSpell }); + } + + void PeriodicTick(AuraEffect const* aurEff) + { + PreventDefaultAction(); + + int32 const radius = static_cast<int32>(((aurEff->GetTickNumber() / 60.f) * 0.9f + 0.1f) * 10000.f * 2.f / 3.f); + GetTarget()->CastCustomSpell(GetSpellInfo()->GetEffect(aurEff->GetEffIndex())->TriggerSpell, SPELLVALUE_RADIUS_MOD, radius, nullptr, true, nullptr, aurEff); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_jormungars_slime_pool::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } +}; + class spell_jormungars_snakes_spray : public SpellScriptLoader { public: @@ -1460,6 +1484,7 @@ void AddSC_boss_northrend_beasts() new boss_dreadscale(); new npc_slime_pool(); new spell_jormungars_paralytic_toxin(); + RegisterAuraScript(spell_jormungars_slime_pool); new spell_jormungars_snakes_spray("spell_jormungars_burning_spray", SPELL_BURNING_BILE); new spell_jormungars_snakes_spray("spell_jormungars_paralytic_spray", SPELL_PARALYTIC_TOXIN); new spell_jormungars_paralysis(); diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp index 2203c878b77..d6cfcf0a165 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp @@ -94,6 +94,7 @@ enum Spells SPELL_DETONATE_MANA = 27819, SPELL_MANA_DETONATION_DAMAGE = 27820, SPELL_FROST_BLAST = 27808, + SPELL_FROST_BLAST_DMG = 29879, SPELL_CHAINS = 28410, SPELL_CHAINS_DUMMY = 28408, // this holds the category cooldown - the main chains spell can't have one as it is cast multiple times @@ -943,6 +944,31 @@ public: } }; +// 27808 - Frost Blast +class spell_kelthuzad_frost_blast : public AuraScript +{ + PrepareAuraScript(spell_kelthuzad_frost_blast); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_FROST_BLAST_DMG }); + } + + void PeriodicTick(AuraEffect const* aurEff) + { + PreventDefaultAction(); + + // Stuns the target, dealing 26% of the target's maximum health in Frost damage every second for 4 sec. + if (Unit* caster = GetCaster()) + caster->CastCustomSpell(SPELL_FROST_BLAST_DMG, SPELLVALUE_BASE_POINT0, int32(GetTarget()->CountPctFromMaxHealth(26)), GetTarget(), true, nullptr, aurEff); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_kelthuzad_frost_blast::PeriodicTick, EFFECT_1, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } +}; + class at_kelthuzad_center : public AreaTriggerScript { public: @@ -995,6 +1021,7 @@ void AddSC_boss_kelthuzad() new npc_kelthuzad_guardian(); new spell_kelthuzad_chains(); new spell_kelthuzad_detonate_mana(); + RegisterAuraScript(spell_kelthuzad_frost_blast); new at_kelthuzad_center(); new achievement_just_cant_get_enough(); } |
