refactor(Scripts/Ulduar): Spell Scripts use registry macros (#19045)

* algalon phase punch

* algalon collapse

* algalon trigger 3 adds

* algalon cosmic smash damage

* algalon big bang

* algalon remove phase

* algalon supermassive fail

* auriaya sentinel blast

* ic shield of runes

* ic assembly meltdown

* ic rune of summoning

* thorim lightning pillar

* thorim trash impale

* kologarn ulduar stone grip cast target

* kologarn stone grip

* kologarn squeezed lifeless

* kologarn stone shout pair

* mimiron rapid burst

* mimiron laser barrage

* ignis scorch

* ignis grab initial

* ignis slag pot

* ulduar energy sap

* ulduar arachnopod damage

* xt tympanic tantrum

* xt gravity bomb damage

* xt gravity bomb pair

* xt searing light spwan life spark pair

* fl load into catapult

* fl auto repair

* fl systems shutdown

* fl pursue

* fl vehicle throw passenger

* fl tar blaze

* fl vehicle grab pyrite

* fl vehicle circuit overload

* fl orbital supports

* fl thorims hammer

* fl transitus shield beam

* fl shield generator

* fl demolisher ride vehicle

* yogg malady of the mind

* yogg brain_link pair

* yogg shadow beacon

* yogg destabilization matrix

* yogg titanic storm

* yogg lunatic gaze

* yogg protective gaze

* yogg empowered

* yogg insane periodic trigger

* yogg insane

* yogg sanity well

* yogg sanity reduce

* yogg empowering shadows

yogg empowering shadows

* yogg in the mwas of the old god

* yogg target selectors

* yogg grim reprisal

* add sql

* fixup! algalon phase punch

* fixup! algalon remove phase

* fixup! ic assembly meltdown

* vezax mark of the faceless periodic

* vezax mark of the faceless drainhealth

* vezax saronite vapors dummy

* vezax saronite vapors damage

* vezax aura of despair

vezax aura of despair style

vezax aura of despair add validate

* vezax aura of despair add validate hasspell

* Revert "vezax aura of despair add validate hasspell"

This reverts commit fccf163399a12119fc468c2fe41ea0798a55eefc.

* sort sql
This commit is contained in:
Jelle Meeus
2024-06-11 20:42:48 +02:00
committed by GitHub
parent 9684eb437a
commit 77d57efdd1
13 changed files with 1518 additions and 1982 deletions
@@ -0,0 +1,33 @@
--
UPDATE `spell_script_names` SET `ScriptName`='spell_algalon_collapse_aura' WHERE `spell_id`=62018;
UPDATE `spell_script_names` SET `ScriptName`='spell_algalon_phase_punch_aura' WHERE `spell_id`=64412;
UPDATE `spell_script_names` SET `ScriptName`='spell_algalon_remove_phase_aura' WHERE `spell_id`=64445;
UPDATE `spell_script_names` SET `ScriptName`='spell_assembly_rune_of_summoning_aura' WHERE `spell_id`=62019;
UPDATE `spell_script_names` SET `ScriptName`='spell_aura_of_despair_aura' WHERE `spell_id`=62692;
UPDATE `spell_script_names` SET `ScriptName`='spell_ignis_scorch_aura' WHERE `spell_id` IN (62546, 63474);
UPDATE `spell_script_names` SET `ScriptName`='spell_ignis_slag_pot_aura' WHERE `spell_id` IN (62717, 63477);
UPDATE `spell_script_names` SET `ScriptName`='spell_load_into_catapult_aura' WHERE `spell_id`=64414;
UPDATE `spell_script_names` SET `ScriptName`='spell_mark_of_the_faceless_periodic_aura' WHERE `spell_id`=63276;
UPDATE `spell_script_names` SET `ScriptName`='spell_mimiron_p3wx2_laser_barrage_aura' WHERE `spell_id`=63274;
UPDATE `spell_script_names` SET `ScriptName`='spell_mimiron_rapid_burst_aura' WHERE `spell_id`=63382;
UPDATE `spell_script_names` SET `ScriptName`='spell_orbital_supports_aura' WHERE `spell_id` IN (64482, 65075, 65076, 65077);
UPDATE `spell_script_names` SET `ScriptName`='spell_saronite_vapors_dummy_aura' WHERE `spell_id`=63322;
UPDATE `spell_script_names` SET `ScriptName`='spell_shield_generator_aura' WHERE `spell_id`=64677;
UPDATE `spell_script_names` SET `ScriptName`='spell_shield_of_runes_aura' WHERE `spell_id` IN (62274, 63489);
UPDATE `spell_script_names` SET `ScriptName`='spell_systems_shutdown_aura' WHERE `spell_id`=62475;
UPDATE `spell_script_names` SET `ScriptName`='spell_tar_blaze_aura' WHERE `spell_id`=62292;
UPDATE `spell_script_names` SET `ScriptName`='spell_thorim_lightning_pillar_P2_aura' WHERE `spell_id`=62976;
UPDATE `spell_script_names` SET `ScriptName`='spell_thorim_trash_impale_aura' WHERE `spell_id` IN (62331, 62418);
UPDATE `spell_script_names` SET `ScriptName`='spell_transitus_shield_beam_aura' WHERE `spell_id`=48310;
UPDATE `spell_script_names` SET `ScriptName`='spell_ulduar_arachnopod_damaged_aura' WHERE `spell_id`=64770;
UPDATE `spell_script_names` SET `ScriptName`='spell_ulduar_energy_sap_aura' WHERE `spell_id` IN (64740, 64876);
UPDATE `spell_script_names` SET `ScriptName`='spell_ulduar_stone_grip_aura' WHERE `spell_id` IN (62056, 63985);
UPDATE `spell_script_names` SET `ScriptName`='spell_vehicle_circuit_overload_aura' WHERE `spell_id`=62399;
UPDATE `spell_script_names` SET `ScriptName`='spell_xt002_gravity_bomb' WHERE `spell_id` IN (63024, 64234);
UPDATE `spell_script_names` SET `ScriptName`='spell_yogg_saron_empowered_aura' WHERE `spell_id`=64161;
UPDATE `spell_script_names` SET `ScriptName`='spell_yogg_saron_grim_reprisal_aura' WHERE `spell_id`=63305;
UPDATE `spell_script_names` SET `ScriptName`='spell_yogg_saron_insane_aura' WHERE `spell_id`=63120;
UPDATE `spell_script_names` SET `ScriptName`='spell_yogg_saron_malady_of_the_mind_aura' WHERE `spell_id` IN (63830, 63881) AND `ScriptName` = 'spell_yogg_saron_malady_of_the_mind';
UPDATE `spell_script_names` SET `ScriptName`='spell_yogg_saron_protective_gaze_aura' WHERE `spell_id`=64174 AND `ScriptName` = 'spell_yogg_saron_protective_gaze';
UPDATE `spell_script_names` SET `ScriptName`='spell_yogg_saron_sanity_well_aura' WHERE `spell_id`=64169;
UPDATE `spell_script_names` SET `ScriptName`='spell_yogg_saron_shadow_beacon_aura' WHERE `spell_id`=64465;
@@ -1192,14 +1192,14 @@ public:
}
};
class spell_algalon_phase_punch : public SpellScriptLoader
class spell_algalon_phase_punch_aura : public AuraScript
{
public:
spell_algalon_phase_punch() : SpellScriptLoader("spell_algalon_phase_punch") { }
PrepareAuraScript(spell_algalon_phase_punch_aura);
class spell_algalon_phase_punch_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_algalon_phase_punch_AuraScript);
return ValidateSpellInfo(PhasePunchAlphaId);
}
void HandlePeriodic(AuraEffect const* /*aurEff*/)
{
@@ -1219,25 +1219,14 @@ public:
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_algalon_phase_punch_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
OnEffectRemove += AuraEffectRemoveFn(spell_algalon_phase_punch_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_algalon_phase_punch_aura::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
OnEffectRemove += AuraEffectRemoveFn(spell_algalon_phase_punch_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
class spell_algalon_collapse_aura : public AuraScript
{
return new spell_algalon_phase_punch_AuraScript();
}
};
class spell_algalon_collapse : public SpellScriptLoader
{
public:
spell_algalon_collapse() : SpellScriptLoader("spell_algalon_collapse") { }
class spell_algalon_collapse_AuraScript : public AuraScript
{
PrepareAuraScript(spell_algalon_collapse_AuraScript);
PrepareAuraScript(spell_algalon_collapse_aura);
void HandlePeriodic(AuraEffect const* /*aurEff*/)
{
@@ -1247,13 +1236,7 @@ public:
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_algalon_collapse_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_algalon_collapse_AuraScript();
OnEffectPeriodic += AuraEffectPeriodicFn(spell_algalon_collapse_aura::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
@@ -1266,14 +1249,9 @@ public:
}
};
class spell_algalon_trigger_3_adds : public SpellScriptLoader
class spell_algalon_trigger_3_adds : public SpellScript
{
public:
spell_algalon_trigger_3_adds() : SpellScriptLoader("spell_algalon_trigger_3_adds") { }
class spell_algalon_trigger_3_adds_SpellScript : public SpellScript
{
PrepareSpellScript(spell_algalon_trigger_3_adds_SpellScript);
PrepareSpellScript(spell_algalon_trigger_3_adds);
void SelectTarget(std::list<WorldObject*>& targets)
{
@@ -1292,25 +1270,14 @@ public:
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_algalon_trigger_3_adds_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
OnEffectHitTarget += SpellEffectFn(spell_algalon_trigger_3_adds_SpellScript::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_algalon_trigger_3_adds::SelectTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
OnEffectHitTarget += SpellEffectFn(spell_algalon_trigger_3_adds::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
class spell_algalon_cosmic_smash_damage : public SpellScript
{
return new spell_algalon_trigger_3_adds_SpellScript();
}
};
class spell_algalon_cosmic_smash_damage : public SpellScriptLoader
{
public:
spell_algalon_cosmic_smash_damage() : SpellScriptLoader("spell_algalon_cosmic_smash_damage") { }
class spell_algalon_cosmic_smash_damage_SpellScript : public SpellScript
{
PrepareSpellScript(spell_algalon_cosmic_smash_damage_SpellScript);
PrepareSpellScript(spell_algalon_cosmic_smash_damage);
void RecalculateDamage()
{
@@ -1326,24 +1293,13 @@ public:
void Register() override
{
OnHit += SpellHitFn(spell_algalon_cosmic_smash_damage_SpellScript::RecalculateDamage);
OnHit += SpellHitFn(spell_algalon_cosmic_smash_damage::RecalculateDamage);
}
};
SpellScript* GetSpellScript() const override
class spell_algalon_big_bang : public SpellScript
{
return new spell_algalon_cosmic_smash_damage_SpellScript();
}
};
class spell_algalon_big_bang : public SpellScriptLoader
{
public:
spell_algalon_big_bang() : SpellScriptLoader("spell_algalon_big_bang") { }
class spell_algalon_big_bang_SpellScript : public SpellScript
{
PrepareSpellScript(spell_algalon_big_bang_SpellScript);
PrepareSpellScript(spell_algalon_big_bang);
bool Load() override
{
@@ -1365,27 +1321,22 @@ public:
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_algalon_big_bang_SpellScript::CountTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
AfterCast += SpellCastFn(spell_algalon_big_bang_SpellScript::CheckTargets);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_algalon_big_bang::CountTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
AfterCast += SpellCastFn(spell_algalon_big_bang::CheckTargets);
}
private:
uint32 _targetCount;
};
SpellScript* GetSpellScript() const override
class spell_algalon_remove_phase_aura : public AuraScript
{
return new spell_algalon_big_bang_SpellScript();
PrepareAuraScript(spell_algalon_remove_phase_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_BLACK_HOLE_DAMAGE });
}
};
class spell_algalon_remove_phase : public SpellScriptLoader
{
public:
spell_algalon_remove_phase() : SpellScriptLoader("spell_algalon_remove_phase") { }
class spell_algalon_remove_phase_AuraScript : public AuraScript
{
PrepareAuraScript(spell_algalon_remove_phase_AuraScript);
void HandlePeriodic(AuraEffect const* /*aurEff*/)
{
@@ -1396,24 +1347,13 @@ public:
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_algalon_remove_phase_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_algalon_remove_phase_aura::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
class spell_algalon_supermassive_fail : public SpellScript
{
return new spell_algalon_remove_phase_AuraScript();
}
};
class spell_algalon_supermassive_fail : public SpellScriptLoader
{
public:
spell_algalon_supermassive_fail() : SpellScriptLoader("spell_algalon_supermassive_fail") { }
class spell_algalon_supermassive_fail_SpellScript : public SpellScript
{
PrepareSpellScript(spell_algalon_supermassive_fail_SpellScript);
PrepareSpellScript(spell_algalon_supermassive_fail);
void RecalculateDamage()
{
@@ -1425,13 +1365,7 @@ public:
void Register() override
{
OnHit += SpellHitFn(spell_algalon_supermassive_fail_SpellScript::RecalculateDamage);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_algalon_supermassive_fail_SpellScript();
OnHit += SpellHitFn(spell_algalon_supermassive_fail::RecalculateDamage);
}
};
@@ -1470,13 +1404,13 @@ void AddSC_boss_algalon_the_observer()
new go_celestial_planetarium_access();
// Spells
new spell_algalon_phase_punch();
new spell_algalon_collapse();
new spell_algalon_trigger_3_adds();
new spell_algalon_cosmic_smash_damage();
new spell_algalon_big_bang();
new spell_algalon_remove_phase();
new spell_algalon_supermassive_fail();
RegisterSpellScript(spell_algalon_phase_punch_aura);
RegisterSpellScript(spell_algalon_collapse_aura);
RegisterSpellScript(spell_algalon_trigger_3_adds);
RegisterSpellScript(spell_algalon_cosmic_smash_damage);
RegisterSpellScript(spell_algalon_big_bang);
RegisterSpellScript(spell_algalon_remove_phase_aura);
RegisterSpellScript(spell_algalon_supermassive_fail);
// Achievements
new achievement_algalon_he_feeds_on_your_tears();
@@ -844,14 +844,14 @@ public:
};
};
class spell_shield_of_runes : public SpellScriptLoader
class spell_shield_of_runes_aura : public AuraScript
{
public:
spell_shield_of_runes() : SpellScriptLoader("spell_shield_of_runes") { }
PrepareAuraScript(spell_shield_of_runes_aura);
class spell_shield_of_runes_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_shield_of_runes_AuraScript);
return ValidateSpellInfo({ SPELL_SHIELD_OF_RUNES_BUFF });
}
void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
@@ -862,24 +862,13 @@ public:
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_shield_of_runes_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_shield_of_runes_aura::OnRemove, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
class spell_assembly_meltdown : public SpellScript
{
return new spell_shield_of_runes_AuraScript();
}
};
class spell_assembly_meltdown : public SpellScriptLoader
{
public:
spell_assembly_meltdown() : SpellScriptLoader("spell_assembly_meltdown") { }
class spell_assembly_meltdown_SpellScript : public SpellScript
{
PrepareSpellScript(spell_assembly_meltdown_SpellScript);
PrepareSpellScript(spell_assembly_meltdown);
void HandleInstaKill(SpellEffIndex /*effIndex*/)
{
@@ -890,24 +879,18 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_assembly_meltdown_SpellScript::HandleInstaKill, EFFECT_1, SPELL_EFFECT_INSTAKILL);
OnEffectHitTarget += SpellEffectFn(spell_assembly_meltdown::HandleInstaKill, EFFECT_1, SPELL_EFFECT_INSTAKILL);
}
};
SpellScript* GetSpellScript() const override
class spell_assembly_rune_of_summoning_aura : public AuraScript
{
return new spell_assembly_meltdown_SpellScript();
PrepareAuraScript(spell_assembly_rune_of_summoning_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_RUNE_OF_SUMMONING_SUMMON });
}
};
class spell_assembly_rune_of_summoning : public SpellScriptLoader
{
public:
spell_assembly_rune_of_summoning() : SpellScriptLoader("spell_assembly_rune_of_summoning") { }
class spell_assembly_rune_of_summoning_AuraScript : public AuraScript
{
PrepareAuraScript(spell_assembly_rune_of_summoning_AuraScript);
void OnPeriodic(AuraEffect const* aurEff)
{
@@ -924,14 +907,8 @@ public:
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_assembly_rune_of_summoning_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
OnEffectRemove += AuraEffectRemoveFn(spell_assembly_rune_of_summoning_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_assembly_rune_of_summoning_AuraScript();
OnEffectPeriodic += AuraEffectPeriodicFn(spell_assembly_rune_of_summoning_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
OnEffectRemove += AuraEffectRemoveFn(spell_assembly_rune_of_summoning_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
@@ -978,9 +955,9 @@ void AddSC_boss_assembly_of_iron()
new boss_stormcaller_brundir();
new npc_assembly_lightning();
new spell_shield_of_runes();
new spell_assembly_meltdown();
new spell_assembly_rune_of_summoning();
RegisterSpellScript(spell_shield_of_runes_aura);
RegisterSpellScript(spell_assembly_meltdown);
RegisterSpellScript(spell_assembly_rune_of_summoning_aura);
new achievement_assembly_of_iron("achievement_but_im_on_your_side", 0);
new achievement_assembly_of_iron("achievement_assembly_steelbreaker", NPC_STEELBREAKER);
@@ -432,14 +432,9 @@ public:
};
};
class spell_auriaya_sentinel_blast : public SpellScriptLoader
class spell_auriaya_sentinel_blast : public SpellScript
{
public:
spell_auriaya_sentinel_blast() : SpellScriptLoader("spell_auriaya_sentinel_blast") { }
class spell_auriaya_sentinel_blast_SpellScript : public SpellScript
{
PrepareSpellScript(spell_auriaya_sentinel_blast_SpellScript);
PrepareSpellScript(spell_auriaya_sentinel_blast);
void FilterTargets(std::list<WorldObject*>& unitList)
{
@@ -448,13 +443,7 @@ public:
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_auriaya_sentinel_blast_SpellScript::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_auriaya_sentinel_blast_SpellScript();
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_auriaya_sentinel_blast::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
@@ -496,7 +485,7 @@ void AddSC_boss_auriaya()
new npc_auriaya_sanctum_sentry();
new npc_auriaya_feral_defender();
new spell_auriaya_sentinel_blast();
RegisterSpellScript(spell_auriaya_sentinel_blast);
new achievement_auriaya_crazy_cat_lady();
new achievement_auriaya_nine_lives();
@@ -1437,19 +1437,19 @@ public:
}
};
class spell_load_into_catapult : public SpellScriptLoader
enum LoadIntoCataPult
{
enum Spells
{
SPELL_PASSENGER_LOADED = 62340,
SPELL_PASSENGER_LOADED = 62340
};
public:
spell_load_into_catapult() : SpellScriptLoader("spell_load_into_catapult") { }
class spell_load_into_catapult_AuraScript : public AuraScript
class spell_load_into_catapult_aura : public AuraScript
{
PrepareAuraScript(spell_load_into_catapult_AuraScript);
PrepareAuraScript(spell_load_into_catapult_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_PASSENGER_LOADED });
}
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -1471,30 +1471,24 @@ public:
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_load_into_catapult_AuraScript::OnApply, EFFECT_0, SPELL_AURA_CONTROL_VEHICLE, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_load_into_catapult_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_CONTROL_VEHICLE, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
OnEffectApply += AuraEffectApplyFn(spell_load_into_catapult_aura::OnApply, EFFECT_0, SPELL_AURA_CONTROL_VEHICLE, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_load_into_catapult_aura::OnRemove, EFFECT_0, SPELL_AURA_CONTROL_VEHICLE, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_load_into_catapult_AuraScript();
}
};
class spell_auto_repair : public SpellScriptLoader
{
enum Spells
enum AutoRepair
{
SPELL_AUTO_REPAIR = 62705,
};
public:
spell_auto_repair() : SpellScriptLoader("spell_auto_repair") {}
class spell_auto_repair_SpellScript : public SpellScript
class spell_auto_repair : public SpellScript
{
PrepareSpellScript(spell_auto_repair_SpellScript);
PrepareSpellScript(spell_auto_repair);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_AUTO_REPAIR });
}
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -1530,25 +1524,19 @@ public:
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_auto_repair_SpellScript::FilterTargets, EFFECT_ALL, TARGET_UNIT_DEST_AREA_ENTRY);
OnEffectHitTarget += SpellEffectFn(spell_auto_repair_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_auto_repair::FilterTargets, EFFECT_ALL, TARGET_UNIT_DEST_AREA_ENTRY);
OnEffectHitTarget += SpellEffectFn(spell_auto_repair::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
class spell_systems_shutdown_aura : public AuraScript
{
return new spell_auto_repair_SpellScript();
PrepareAuraScript(spell_systems_shutdown_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_GATHERING_SPEED });
}
};
class spell_systems_shutdown : public SpellScriptLoader
{
public:
spell_systems_shutdown() : SpellScriptLoader("spell_systems_shutdown") { }
class spell_systems_shutdown_AuraScript : public AuraScript
{
PrepareAuraScript(spell_systems_shutdown_AuraScript);
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -1558,8 +1546,8 @@ public:
owner->SetControlled(true, UNIT_STATE_STUNNED);
owner->RemoveAurasDueToSpell(SPELL_GATHERING_SPEED);
if (Vehicle* veh = owner->GetVehicleKit())
if (Unit* cannon = veh->GetPassenger(SEAT_CANNON))
if (Vehicle* vehicle = owner->GetVehicleKit())
if (Unit* cannon = vehicle->GetPassenger(SEAT_CANNON))
cannon->GetAI()->DoAction(ACTION_DELAY_CANNON);
}
@@ -1574,14 +1562,8 @@ public:
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_systems_shutdown_AuraScript::OnApply, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_systems_shutdown_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_systems_shutdown_AuraScript();
OnEffectApply += AuraEffectApplyFn(spell_systems_shutdown_aura::OnApply, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_systems_shutdown_aura::OnRemove, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN, AURA_EFFECT_HANDLE_REAL);
}
};
@@ -1625,14 +1607,9 @@ public:
}
};
class spell_pursue : public SpellScriptLoader
class spell_pursue : public SpellScript
{
public:
spell_pursue() : SpellScriptLoader("spell_pursue") {}
class spell_pursue_SpellScript : public SpellScript
{
PrepareSpellScript(spell_pursue_SpellScript);
PrepareSpellScript(spell_pursue);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -1666,25 +1643,15 @@ public:
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_pursue_SpellScript::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_pursue_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_pursue::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_pursue::HandleScript, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
}
};
SpellScript* GetSpellScript() const override
class spell_vehicle_throw_passenger : public SpellScript
{
return new spell_pursue_SpellScript();
}
};
PrepareSpellScript(spell_vehicle_throw_passenger);
class spell_vehicle_throw_passenger : public SpellScriptLoader
{
public:
spell_vehicle_throw_passenger() : SpellScriptLoader("spell_vehicle_throw_passenger") {}
class spell_vehicle_throw_passenger_SpellScript : public SpellScript
{
PrepareSpellScript(spell_vehicle_throw_passenger_SpellScript);
void HandleScript()
{
Spell* baseSpell = GetSpell();
@@ -1733,24 +1700,13 @@ public:
void Register() override
{
AfterCast += SpellCastFn(spell_vehicle_throw_passenger_SpellScript::HandleScript);
AfterCast += SpellCastFn(spell_vehicle_throw_passenger::HandleScript);
}
};
SpellScript* GetSpellScript() const override
class spell_tar_blaze_aura : public AuraScript
{
return new spell_vehicle_throw_passenger_SpellScript();
}
};
class spell_tar_blaze : public SpellScriptLoader
{
public:
spell_tar_blaze() : SpellScriptLoader("spell_tar_blaze") { }
class spell_tar_blaze_AuraScript : public AuraScript
{
PrepareAuraScript(spell_tar_blaze_AuraScript);
PrepareAuraScript(spell_tar_blaze_aura);
void OnPeriodic(AuraEffect const* aurEff)
{
@@ -1759,36 +1715,36 @@ public:
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_tar_blaze_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_tar_blaze_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const override
enum VehicleGrabPyrite
{
return new spell_tar_blaze_AuraScript();
}
SPELL_ADD_PYRITE = 62496
};
class spell_vehicle_grab_pyrite : public SpellScriptLoader
class spell_vehicle_grab_pyrite : public SpellScript
{
public:
spell_vehicle_grab_pyrite() : SpellScriptLoader("spell_vehicle_grab_pyrite") {}
PrepareSpellScript(spell_vehicle_grab_pyrite);
class spell_vehicle_grab_pyrite_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_vehicle_grab_pyrite_SpellScript);
return ValidateSpellInfo({ SPELL_ADD_PYRITE });
}
void HandleScript(SpellEffIndex /*effIndex*/)
{
if (Unit* target = GetHitUnit())
if (Unit* seat = GetCaster()->GetVehicleBase())
{
if (Vehicle* vSeat = seat->GetVehicleKit())
if (Unit* pyrite = vSeat->GetPassenger(1))
if (Vehicle* vehicle = seat->GetVehicleKit())
if (Unit* pyrite = vehicle->GetPassenger(1))
pyrite->ExitVehicle();
if (Unit* parent = seat->GetVehicleBase())
{
GetCaster()->CastSpell(parent, 62496 /*SPELL_ADD_PYRITE*/, true);
GetCaster()->CastSpell(parent, SPELL_ADD_PYRITE, true);
target->CastSpell(seat, GetEffectValue());
if (target->GetTypeId() == TYPEID_UNIT)
@@ -1799,24 +1755,18 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_vehicle_grab_pyrite_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHitTarget += SpellEffectFn(spell_vehicle_grab_pyrite::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
class spell_vehicle_circuit_overload_aura : public AuraScript
{
return new spell_vehicle_grab_pyrite_SpellScript();
PrepareAuraScript(spell_vehicle_circuit_overload_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_SYSTEMS_SHUTDOWN });
}
};
class spell_vehicle_circuit_overload : public SpellScriptLoader
{
public:
spell_vehicle_circuit_overload() : SpellScriptLoader("spell_vehicle_circuit_overload") { }
class spell_vehicle_circuit_overload_AuraScript : public AuraScript
{
PrepareAuraScript(spell_vehicle_circuit_overload_AuraScript);
void OnPeriodic(AuraEffect const* /*aurEff*/)
{
@@ -1830,24 +1780,13 @@ public:
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_vehicle_circuit_overload_AuraScript::OnPeriodic, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_vehicle_circuit_overload_aura::OnPeriodic, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const override
class spell_orbital_supports_aura : public AuraScript
{
return new spell_vehicle_circuit_overload_AuraScript();
}
};
class spell_orbital_supports : public SpellScriptLoader
{
public:
spell_orbital_supports() : SpellScriptLoader("spell_orbital_supports") { }
class spell_orbital_supports_AuraScript : public AuraScript
{
PrepareAuraScript(spell_orbital_supports_AuraScript);
PrepareAuraScript(spell_orbital_supports_aura);
bool CheckAreaTarget(Unit* target)
{
@@ -1855,24 +1794,13 @@ public:
}
void Register() override
{
DoCheckAreaTarget += AuraCheckAreaTargetFn(spell_orbital_supports_AuraScript::CheckAreaTarget);
DoCheckAreaTarget += AuraCheckAreaTargetFn(spell_orbital_supports_aura::CheckAreaTarget);
}
};
AuraScript* GetAuraScript() const override
class spell_thorims_hammer : public SpellScript
{
return new spell_orbital_supports_AuraScript();
}
};
class spell_thorims_hammer : public SpellScriptLoader
{
public:
spell_thorims_hammer() : SpellScriptLoader("spell_thorims_hammer") { }
class spell_thorims_hammer_SpellScript : public SpellScript
{
PrepareSpellScript(spell_thorims_hammer_SpellScript);
PrepareSpellScript(spell_thorims_hammer);
void RecalculateDamage(SpellEffIndex effIndex)
{
@@ -1896,24 +1824,18 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_thorims_hammer_SpellScript::RecalculateDamage, EFFECT_ALL, SPELL_EFFECT_SCHOOL_DAMAGE);
OnEffectHitTarget += SpellEffectFn(spell_thorims_hammer::RecalculateDamage, EFFECT_ALL, SPELL_EFFECT_SCHOOL_DAMAGE);
}
};
SpellScript* GetSpellScript() const override
class spell_transitus_shield_beam_aura : public AuraScript
{
return new spell_thorims_hammer_SpellScript();
PrepareAuraScript(spell_transitus_shield_beam_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_TRANSITUS_SHIELD_IMPACT });
}
};
class spell_transitus_shield_beam : public SpellScriptLoader
{
public:
spell_transitus_shield_beam() : SpellScriptLoader("spell_transitus_shield_beam") { }
class spell_transitus_shield_beam_AuraScript : public AuraScript
{
PrepareAuraScript(spell_transitus_shield_beam_AuraScript);
void HandleOnEffectApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
@@ -1955,33 +1877,20 @@ public:
}
}
void Register()
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_transitus_shield_beam_AuraScript::HandleOnEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
OnEffectRemove += AuraEffectRemoveFn(spell_transitus_shield_beam_AuraScript::HandleOnEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
OnEffectApply += AuraEffectApplyFn(spell_transitus_shield_beam_aura::HandleOnEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
OnEffectRemove += AuraEffectRemoveFn(spell_transitus_shield_beam_aura::HandleOnEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
}
};
AuraScript* GetAuraScript() const override
class spell_shield_generator_aura : public AuraScript
{
return new spell_transitus_shield_beam_AuraScript();
}
};
class spell_shield_generator : public SpellScriptLoader
{
public:
spell_shield_generator() : SpellScriptLoader("spell_shield_generator") { }
class spell_shield_generator_AuraScript : public AuraScript
{
PrepareAuraScript(spell_shield_generator_AuraScript);
uint32 absorbPct;
PrepareAuraScript(spell_shield_generator_aura);
bool Load() override
{
absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster());
_absorbPct = GetSpellInfo()->Effects[EFFECT_0].CalcValue(GetCaster());
return true;
}
@@ -1993,30 +1902,22 @@ public:
void Absorb(AuraEffect* /*aurEff*/, DamageInfo& dmgInfo, uint32& absorbAmount)
{
absorbAmount = CalculatePct(dmgInfo.GetDamage(), absorbPct);
absorbAmount = CalculatePct(dmgInfo.GetDamage(), _absorbPct);
}
void Register() override
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_shield_generator_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
OnEffectAbsorb += AuraEffectAbsorbFn(spell_shield_generator_AuraScript::Absorb, EFFECT_0);
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_shield_generator_aura::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
OnEffectAbsorb += AuraEffectAbsorbFn(spell_shield_generator_aura::Absorb, EFFECT_0);
}
private:
uint32 _absorbPct;
};
AuraScript* GetAuraScript() const override
class spell_demolisher_ride_vehicle : public SpellScript
{
return new spell_shield_generator_AuraScript();
}
};
class spell_demolisher_ride_vehicle : public SpellScriptLoader
{
public:
spell_demolisher_ride_vehicle() : SpellScriptLoader("spell_demolisher_ride_vehicle") {}
class spell_demolisher_ride_vehicle_SpellScript : public SpellScript
{
PrepareSpellScript(spell_demolisher_ride_vehicle_SpellScript);
PrepareSpellScript(spell_demolisher_ride_vehicle);
SpellCastResult CheckCast()
{
@@ -2027,12 +1928,12 @@ public:
if (!target || target->GetEntry() != NPC_SALVAGED_DEMOLISHER)
return SPELL_FAILED_DONT_REPORT;
Vehicle* veh = target->GetVehicleKit();
if (veh && veh->GetPassenger(0))
if (Unit* target2 = veh->GetPassenger(1))
if (Vehicle* veh2 = target2->GetVehicleKit())
Vehicle* vehicle = target->GetVehicleKit();
if (vehicle && vehicle->GetPassenger(0))
if (Unit* target2 = vehicle->GetPassenger(1))
if (Vehicle* vehicle2 = target2->GetVehicleKit())
{
if (!veh2->GetPassenger(0))
if (!vehicle2->GetPassenger(0))
target2->HandleSpellClick(GetCaster());
return SPELL_FAILED_DONT_REPORT;
@@ -2043,13 +1944,7 @@ public:
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_demolisher_ride_vehicle_SpellScript::CheckCast);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_demolisher_ride_vehicle_SpellScript();
OnCheckCast += SpellCheckCastFn(spell_demolisher_ride_vehicle::CheckCast);
}
};
@@ -2143,19 +2038,19 @@ void AddSC_boss_flame_leviathan()
new go_ulduar_tower();
// Spells
new spell_load_into_catapult();
new spell_auto_repair();
new spell_systems_shutdown();
new spell_pursue();
new spell_vehicle_throw_passenger();
new spell_tar_blaze();
new spell_vehicle_grab_pyrite();
new spell_vehicle_circuit_overload();
new spell_orbital_supports();
new spell_thorims_hammer();
new spell_transitus_shield_beam();
new spell_shield_generator();
new spell_demolisher_ride_vehicle();
RegisterSpellScript(spell_load_into_catapult_aura);
RegisterSpellScript(spell_auto_repair);
RegisterSpellScript(spell_systems_shutdown_aura);
RegisterSpellScript(spell_pursue);
RegisterSpellScript(spell_vehicle_throw_passenger);
RegisterSpellScript(spell_tar_blaze_aura);
RegisterSpellScript(spell_vehicle_grab_pyrite);
RegisterSpellScript(spell_vehicle_circuit_overload_aura);
RegisterSpellScript(spell_orbital_supports_aura);
RegisterSpellScript(spell_thorims_hammer);
RegisterSpellScript(spell_transitus_shield_beam_aura);
RegisterSpellScript(spell_shield_generator_aura);
RegisterSpellScript(spell_demolisher_ride_vehicle);
// Achievements
new achievement_flame_leviathan_towers("achievement_flame_leviathan_orbital_bombardment", 1);
@@ -472,14 +472,14 @@ public:
};
};
class spell_aura_of_despair : public SpellScriptLoader
class spell_aura_of_despair_aura : public AuraScript
{
public:
spell_aura_of_despair() : SpellScriptLoader("spell_aura_of_despair") { }
PrepareAuraScript(spell_aura_of_despair_aura);
class spell_aura_of_despair_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_aura_of_despair_AuraScript)
return ValidateSpellInfo({ SPELL_AURA_OF_DESPAIR_2, SPELL_CORRUPTED_RAGE, SPELL_CORRUPTED_WISDOM });
}
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -509,25 +509,19 @@ public:
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_aura_of_despair_AuraScript::OnApply, EFFECT_0, SPELL_AURA_PREVENT_REGENERATE_POWER, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_aura_of_despair_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PREVENT_REGENERATE_POWER, AURA_EFFECT_HANDLE_REAL);
OnEffectApply += AuraEffectApplyFn(spell_aura_of_despair_aura::OnApply, EFFECT_0, SPELL_AURA_PREVENT_REGENERATE_POWER, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_aura_of_despair_aura::OnRemove, EFFECT_0, SPELL_AURA_PREVENT_REGENERATE_POWER, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
class spell_mark_of_the_faceless_periodic_aura : public AuraScript
{
return new spell_aura_of_despair_AuraScript();
PrepareAuraScript(spell_mark_of_the_faceless_periodic_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_MARK_OF_THE_FACELESS_EFFECT });
}
};
class spell_mark_of_the_faceless_periodic : public SpellScriptLoader
{
public:
spell_mark_of_the_faceless_periodic() : SpellScriptLoader("spell_mark_of_the_faceless_periodic") { }
class spell_mark_of_the_faceless_periodic_AuraScript : public AuraScript
{
PrepareAuraScript(spell_mark_of_the_faceless_periodic_AuraScript)
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
{
@@ -542,24 +536,13 @@ public:
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mark_of_the_faceless_periodic_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mark_of_the_faceless_periodic_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const override
class spell_mark_of_the_faceless_drainhealth : public SpellScript
{
return new spell_mark_of_the_faceless_periodic_AuraScript();
}
};
class spell_mark_of_the_faceless_drainhealth : public SpellScriptLoader
{
public:
spell_mark_of_the_faceless_drainhealth() : SpellScriptLoader("spell_mark_of_the_faceless_drainhealth") { }
class spell_mark_of_the_faceless_drainhealth_SpellScript : public SpellScript
{
PrepareSpellScript(spell_mark_of_the_faceless_drainhealth_SpellScript);
PrepareSpellScript(spell_mark_of_the_faceless_drainhealth);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -570,24 +553,18 @@ public:
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_the_faceless_drainhealth_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_the_faceless_drainhealth::FilterTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
class spell_saronite_vapors_dummy_aura : public AuraScript
{
return new spell_mark_of_the_faceless_drainhealth_SpellScript();
PrepareAuraScript(spell_saronite_vapors_dummy_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_SARONITE_VAPORS_DMG });
}
};
class spell_saronite_vapors_dummy : public SpellScriptLoader
{
public:
spell_saronite_vapors_dummy() : SpellScriptLoader("spell_saronite_vapors_dummy") { }
class spell_saronite_vapors_dummy_AuraScript : public AuraScript
{
PrepareAuraScript(spell_saronite_vapors_dummy_AuraScript)
void HandleAfterEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -600,24 +577,18 @@ public:
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_saronite_vapors_dummy_AuraScript::HandleAfterEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
AfterEffectApply += AuraEffectApplyFn(spell_saronite_vapors_dummy_aura::HandleAfterEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
}
};
AuraScript* GetAuraScript() const override
class spell_saronite_vapors_damage : public SpellScript
{
return new spell_saronite_vapors_dummy_AuraScript();
PrepareSpellScript(spell_saronite_vapors_damage);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_SARONITE_VAPORS_ENERGIZE });
}
};
class spell_saronite_vapors_damage : public SpellScriptLoader
{
public:
spell_saronite_vapors_damage() : SpellScriptLoader("spell_saronite_vapors_damage") { }
class spell_saronite_vapors_damage_SpellScript : public SpellScript
{
PrepareSpellScript(spell_saronite_vapors_damage_SpellScript);
void HandleAfterHit()
{
@@ -625,20 +596,14 @@ public:
if (GetHitDamage() > 2)
{
int32 mana = GetHitDamage() / 2;
if (Unit* t = GetHitUnit())
caster->CastCustomSpell(t, SPELL_SARONITE_VAPORS_ENERGIZE, &mana, nullptr, nullptr, true);
if (Unit* target = GetHitUnit())
caster->CastCustomSpell(target, SPELL_SARONITE_VAPORS_ENERGIZE, &mana, nullptr, nullptr, true);
}
}
void Register() override
{
AfterHit += SpellHitFn(spell_saronite_vapors_damage_SpellScript::HandleAfterHit);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_saronite_vapors_damage_SpellScript();
AfterHit += SpellHitFn(spell_saronite_vapors_damage::HandleAfterHit);
}
};
@@ -693,11 +658,11 @@ void AddSC_boss_vezax()
new npc_ulduar_saronite_vapors();
new npc_ulduar_saronite_animus();
new spell_aura_of_despair();
new spell_mark_of_the_faceless_periodic();
new spell_mark_of_the_faceless_drainhealth();
new spell_saronite_vapors_dummy();
new spell_saronite_vapors_damage();
RegisterSpellScript(spell_aura_of_despair_aura);
RegisterSpellScript(spell_mark_of_the_faceless_periodic_aura);
RegisterSpellScript(spell_mark_of_the_faceless_drainhealth);
RegisterSpellScript(spell_saronite_vapors_dummy_aura);
RegisterSpellScript(spell_saronite_vapors_damage);
new achievement_smell_saronite();
new achievement_shadowdodger();
@@ -426,112 +426,112 @@ public:
};
};
class spell_ignis_scorch : public SpellScriptLoader
class spell_ignis_scorch_aura : public AuraScript
{
public:
spell_ignis_scorch() : SpellScriptLoader("spell_ignis_scorch") { }
PrepareAuraScript(spell_ignis_scorch_aura);
class spell_ignis_scorch_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_ignis_scorch_AuraScript)
return ValidateSpellInfo( { SPELL_SCORCHED_GROUND_10, SPELL_SCORCHED_GROUND_25 });
}
void HandleEffectPeriodic(AuraEffect const* aurEff)
{
if (aurEff->GetTotalTicks() >= 0 && aurEff->GetTickNumber() == uint32(aurEff->GetTotalTicks()))
if (Unit* c = GetCaster())
if (Creature* s = c->SummonCreature(NPC_SCORCHED_GROUND, c->GetPositionX() + 20.0f * cos(c->GetOrientation()), c->GetPositionY() + 20.0f * std::sin(c->GetOrientation()), 361.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 30000))
if (Unit* caster = GetCaster())
if (Creature* summon = caster->SummonCreature(NPC_SCORCHED_GROUND, caster->GetPositionX() + 20.0f * cos(caster->GetOrientation()), caster->GetPositionY() + 20.0f * std::sin(caster->GetOrientation()), 361.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 30000))
{
if (!s->FindNearestCreature(NPC_WATER_TRIGGER, 25.0f, true)) // must be away from the water
s->CastSpell(s, (aurEff->GetId() == 62546 ? SPELL_SCORCHED_GROUND_10 : SPELL_SCORCHED_GROUND_25), true);
if (!summon->FindNearestCreature(NPC_WATER_TRIGGER, 25.0f, true)) // must be away from the water
summon->CastSpell(summon, (aurEff->GetId() == SPELL_SCORCH_10 ? SPELL_SCORCHED_GROUND_10 : SPELL_SCORCHED_GROUND_25), true);
}
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_ignis_scorch_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_ignis_scorch_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
class spell_ignis_grab_initial : public SpellScript
{
return new spell_ignis_scorch_AuraScript();
PrepareSpellScript(spell_ignis_grab_initial);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo( { SPELL_GRAB_TRIGGERED });
}
};
class spell_ignis_grab_initial : public SpellScriptLoader
{
public:
spell_ignis_grab_initial() : SpellScriptLoader("spell_ignis_grab_initial") { }
class spell_ignis_grab_initial_SpellScript : public SpellScript
{
PrepareSpellScript(spell_ignis_grab_initial_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/)
{
if (Unit* t = GetHitUnit())
t->CastSpell(t, SPELL_GRAB_TRIGGERED, true);
if (Unit* target = GetHitUnit())
target->CastSpell(target, SPELL_GRAB_TRIGGERED, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_ignis_grab_initial_SpellScript::HandleScript, EFFECT_2, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHitTarget += SpellEffectFn(spell_ignis_grab_initial::HandleScript, EFFECT_2, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
enum SlagPot
{
return new spell_ignis_grab_initial_SpellScript();
}
SPELL_SLAG_POT_DAMAGE_1 = 65722,
SPELL_SLAG_POT_DAMAGE_2 = 65723,
SPELL_SCORCH_DAMAGE_1 = 62549,
SPELL_SCORCH_DAMAGE_2 = 63475,
SPELL_SLAG_IMBUED_1 = 62836,
SPELL_SLAG_IMBUED_2 = 63536
};
class spell_ignis_slag_pot : public SpellScriptLoader
class spell_ignis_slag_pot_aura : public AuraScript
{
public:
spell_ignis_slag_pot() : SpellScriptLoader("spell_ignis_slag_pot") { }
PrepareAuraScript(spell_ignis_slag_pot_aura);
class spell_ignis_slag_pot_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_ignis_slag_pot_AuraScript)
return ValidateSpellInfo(
{
SPELL_SLAG_POT_DAMAGE_1,
SPELL_SLAG_POT_DAMAGE_2,
SPELL_SCORCH_DAMAGE_1,
SPELL_SCORCH_DAMAGE_2,
SPELL_SLAG_IMBUED_1,
SPELL_SLAG_IMBUED_2
});
}
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
{
if (Unit* c = GetCaster())
if (Unit* t = GetTarget())
c->CastSpell(t, (GetId() == 62717 ? 65722 : 65723), true);
if (Unit* caster = GetCaster())
if (Unit* target = GetTarget())
caster->CastSpell(target, (GetId() == SPELL_SLAG_POT_10 ? SPELL_SLAG_POT_DAMAGE_1 : SPELL_SLAG_POT_DAMAGE_2), true);
}
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (Unit* t = GetTarget())
if (Unit* target = GetTarget())
{
t->ApplySpellImmune(GetId(), IMMUNITY_ID, 62549, true);
t->ApplySpellImmune(GetId(), IMMUNITY_ID, 63475, true);
target->ApplySpellImmune(GetId(), IMMUNITY_ID, SPELL_SCORCH_DAMAGE_1, true);
target->ApplySpellImmune(GetId(), IMMUNITY_ID, SPELL_SCORCH_DAMAGE_2, true);
}
}
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (Unit* t = GetTarget())
if (Unit* target = GetTarget())
{
t->ApplySpellImmune(GetId(), IMMUNITY_ID, 62549, false);
t->ApplySpellImmune(GetId(), IMMUNITY_ID, 63475, false);
if (t->IsAlive())
t->CastSpell(t, (GetId() == 62717 ? 62836 : 63536), true);
target->ApplySpellImmune(GetId(), IMMUNITY_ID, SPELL_SCORCH_DAMAGE_1, false);
target->ApplySpellImmune(GetId(), IMMUNITY_ID, SPELL_SCORCH_DAMAGE_2, false);
if (target->IsAlive())
target->CastSpell(target, (GetId() == SPELL_SLAG_POT_10 ? SPELL_SLAG_IMBUED_1 : SPELL_SLAG_IMBUED_2), true);
}
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_ignis_slag_pot_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
OnEffectApply += AuraEffectApplyFn(spell_ignis_slag_pot_AuraScript::OnApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_ignis_slag_pot_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_ignis_slag_pot_AuraScript();
OnEffectPeriodic += AuraEffectPeriodicFn(spell_ignis_slag_pot_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
OnEffectApply += AuraEffectApplyFn(spell_ignis_slag_pot_aura::OnApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_ignis_slag_pot_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
@@ -552,8 +552,8 @@ void AddSC_boss_ignis()
{
new boss_ignis();
new npc_ulduar_iron_construct();
new spell_ignis_scorch();
new spell_ignis_grab_initial();
new spell_ignis_slag_pot();
RegisterSpellScript(spell_ignis_scorch_aura);
RegisterSpellScript(spell_ignis_grab_initial);
RegisterSpellScript(spell_ignis_slag_pot_aura);
new achievement_ignis_shattered();
}
@@ -718,14 +718,9 @@ private:
Unit const* _victim;
};
class spell_ulduar_stone_grip_cast_target : public SpellScriptLoader
class spell_ulduar_stone_grip_cast_target : public SpellScript
{
public:
spell_ulduar_stone_grip_cast_target() : SpellScriptLoader("spell_ulduar_stone_grip_cast_target") { }
class spell_ulduar_stone_grip_cast_target_SpellScript : public SpellScript
{
PrepareSpellScript(spell_ulduar_stone_grip_cast_target_SpellScript);
PrepareSpellScript(spell_ulduar_stone_grip_cast_target);
bool Load() override
{
@@ -754,24 +749,13 @@ public:
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_ulduar_stone_grip_cast_target_SpellScript::FilterTargetsInitial, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_ulduar_stone_grip_cast_target::FilterTargetsInitial, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
class spell_ulduar_stone_grip_aura : public AuraScript
{
return new spell_ulduar_stone_grip_cast_target_SpellScript();
}
};
class spell_ulduar_stone_grip : public SpellScriptLoader
{
public:
spell_ulduar_stone_grip() : SpellScriptLoader("spell_ulduar_stone_grip") { }
class spell_ulduar_stone_grip_AuraScript : public AuraScript
{
PrepareAuraScript(spell_ulduar_stone_grip_AuraScript);
PrepareAuraScript(spell_ulduar_stone_grip_aura);
void OnRemoveStun(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
@@ -781,24 +765,13 @@ public:
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_ulduar_stone_grip_AuraScript::OnRemoveStun, EFFECT_2, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_ulduar_stone_grip_aura::OnRemoveStun, EFFECT_2, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
class spell_ulduar_squeezed_lifeless : public SpellScript
{
return new spell_ulduar_stone_grip_AuraScript();
}
};
class spell_ulduar_squeezed_lifeless : public SpellScriptLoader
{
public:
spell_ulduar_squeezed_lifeless() : SpellScriptLoader("spell_ulduar_squeezed_lifeless") { }
class spell_ulduar_squeezed_lifeless_SpellScript : public SpellScript
{
PrepareSpellScript(spell_ulduar_squeezed_lifeless_SpellScript);
PrepareSpellScript(spell_ulduar_squeezed_lifeless);
void HandleInstaKill(SpellEffIndex /*effIndex*/)
{
@@ -811,24 +784,29 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_ulduar_squeezed_lifeless_SpellScript::HandleInstaKill, EFFECT_1, SPELL_EFFECT_INSTAKILL);
OnEffectHitTarget += SpellEffectFn(spell_ulduar_squeezed_lifeless::HandleInstaKill, EFFECT_1, SPELL_EFFECT_INSTAKILL);
}
};
SpellScript* GetSpellScript() const override
class spell_kologarn_stone_shout : public SpellScript
{
return new spell_ulduar_squeezed_lifeless_SpellScript();
PrepareSpellScript(spell_kologarn_stone_shout);
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if (PlayerOrPetCheck());
}
void Register() override
{
if (m_scriptSpellId != SPELL_STONE_SHOUT_10 && m_scriptSpellId != SPELL_STONE_SHOUT_25)
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_kologarn_stone_shout::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
class spell_kologarn_stone_shout : public SpellScriptLoader
class spell_kologarn_stone_shout_aura : public AuraScript
{
public:
spell_kologarn_stone_shout() : SpellScriptLoader("spell_kologarn_stone_shout") { }
class spell_kologarn_stone_shout_AuraScript : public AuraScript
{
PrepareAuraScript(spell_kologarn_stone_shout_AuraScript);
PrepareAuraScript(spell_kologarn_stone_shout_aura);
void OnPeriodic(AuraEffect const* /*aurEff*/)
{
@@ -840,34 +818,7 @@ public:
void Register() override
{
if (m_scriptSpellId == SPELL_STONE_SHOUT_10 || m_scriptSpellId == SPELL_STONE_SHOUT_25)
OnEffectPeriodic += AuraEffectPeriodicFn(spell_kologarn_stone_shout_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_kologarn_stone_shout_AuraScript();
}
class spell_kologarn_stone_shout_SpellScript : public SpellScript
{
PrepareSpellScript(spell_kologarn_stone_shout_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if (PlayerOrPetCheck());
}
void Register() override
{
if (m_scriptSpellId != SPELL_STONE_SHOUT_10 && m_scriptSpellId != SPELL_STONE_SHOUT_25)
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_kologarn_stone_shout_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_kologarn_stone_shout_SpellScript();
OnEffectPeriodic += AuraEffectPeriodicFn(spell_kologarn_stone_shout_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
@@ -928,10 +879,10 @@ void AddSC_boss_kologarn()
RegisterUlduarCreatureAI(boss_kologarn_pit_kill_bunny);
// Spells
new spell_ulduar_stone_grip_cast_target();
new spell_ulduar_stone_grip();
new spell_ulduar_squeezed_lifeless();
new spell_kologarn_stone_shout();
RegisterSpellScript(spell_ulduar_stone_grip_cast_target);
RegisterSpellScript(spell_ulduar_stone_grip_aura);
RegisterSpellScript(spell_ulduar_squeezed_lifeless);
RegisterSpellAndAuraScriptPair(spell_kologarn_stone_shout, spell_kologarn_stone_shout_aura);
// Achievements
new achievement_kologarn_looks_could_kill();
@@ -2104,87 +2104,83 @@ public:
};
};
class spell_mimiron_rapid_burst : public SpellScriptLoader
class spell_mimiron_rapid_burst_aura : public AuraScript
{
public:
spell_mimiron_rapid_burst() : SpellScriptLoader("spell_mimiron_rapid_burst") { }
PrepareAuraScript(spell_mimiron_rapid_burst_aura);
class spell_mimiron_rapid_burst_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_mimiron_rapid_burst_AuraScript)
return ValidateSpellInfo(
{
SPELL_RAPID_BURST_DAMAGE_10_1,
SPELL_RAPID_BURST_DAMAGE_10_2,
SPELL_RAPID_BURST_DAMAGE_25_1,
SPELL_RAPID_BURST_DAMAGE_25_2
});
}
void HandleEffectPeriodic(AuraEffect const* aurEff)
{
if (Unit* c = GetCaster())
if (Unit* caster = GetCaster())
{
uint32 id = ( c->GetMap()->Is25ManRaid() ? ((aurEff->GetTickNumber() % 2) ? SPELL_RAPID_BURST_DAMAGE_25_2 : SPELL_RAPID_BURST_DAMAGE_25_1) : ((aurEff->GetTickNumber() % 2) ? SPELL_RAPID_BURST_DAMAGE_10_2 : SPELL_RAPID_BURST_DAMAGE_10_1) );
c->CastSpell((Unit*)nullptr, id, true);
uint32 id = (caster->GetMap()->Is25ManRaid() ? ((aurEff->GetTickNumber() % 2) ? SPELL_RAPID_BURST_DAMAGE_25_2 : SPELL_RAPID_BURST_DAMAGE_25_1) : ((aurEff->GetTickNumber() % 2) ? SPELL_RAPID_BURST_DAMAGE_10_2 : SPELL_RAPID_BURST_DAMAGE_10_1));
caster->CastSpell((Unit*)nullptr, id, true);
}
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mimiron_rapid_burst_AuraScript::HandleEffectPeriodic, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mimiron_rapid_burst_aura::HandleEffectPeriodic, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const override
enum p3wx2LaserBarrage
{
return new spell_mimiron_rapid_burst_AuraScript();
}
SPELL_P3WX2_LASER_BARRAGE_1 = 63297,
SPELL_P3WX2_LASER_BARRAGE_2 = 64042
};
class spell_mimiron_p3wx2_laser_barrage : public SpellScriptLoader
class spell_mimiron_p3wx2_laser_barrage_aura : public AuraScript
{
public:
spell_mimiron_p3wx2_laser_barrage() : SpellScriptLoader("spell_mimiron_p3wx2_laser_barrage") { }
class spell_mimiron_p3wx2_laser_barrage_AuraScript : public AuraScript
{
PrepareAuraScript(spell_mimiron_p3wx2_laser_barrage_AuraScript)
uint32 lastMSTime;
float lastOrientation;
PrepareAuraScript(spell_mimiron_p3wx2_laser_barrage_aura);
bool Load() override
{
lastMSTime = GameTime::GetGameTimeMS().count();
lastOrientation = -1.0f;
_lastMSTime = GameTime::GetGameTimeMS().count();
_lastOrientation = -1.0f;
return true;
}
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
{
if (Unit* c = GetCaster())
if (Unit* caster = GetCaster())
{
if (c->GetTypeId() != TYPEID_UNIT)
if (caster->GetTypeId() != TYPEID_UNIT)
return;
uint32 diff = getMSTimeDiff(lastMSTime, GameTime::GetGameTimeMS().count());
if (lastOrientation == -1.0f)
uint32 diff = getMSTimeDiff(_lastMSTime, GameTime::GetGameTimeMS().count());
if (_lastOrientation == -1.0f)
{
lastOrientation = (c->ToCreature()->AI()->GetData(0) * 2 * M_PI) / 100.0f;
_lastOrientation = (caster->ToCreature()->AI()->GetData(0) * 2 * M_PI) / 100.0f;
diff = 0;
}
float new_o = Position::NormalizeOrientation(lastOrientation - (M_PI / 60) * (diff / 250.0f));
lastMSTime = GameTime::GetGameTimeMS().count();
lastOrientation = new_o;
c->SetFacingTo(new_o);
float new_o = Position::NormalizeOrientation(_lastOrientation - (M_PI / 60) * (diff / 250.0f));
_lastMSTime = GameTime::GetGameTimeMS().count();
_lastOrientation = new_o;
caster->SetFacingTo(new_o);
c->CastSpell((Unit*)nullptr, 63297, true);
c->CastSpell((Unit*)nullptr, 64042, true);
caster->CastSpell((Unit*)nullptr, SPELL_P3WX2_LASER_BARRAGE_1, true);
caster->CastSpell((Unit*)nullptr, SPELL_P3WX2_LASER_BARRAGE_2, true);
}
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mimiron_p3wx2_laser_barrage_AuraScript::HandleEffectPeriodic, EFFECT_1, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mimiron_p3wx2_laser_barrage_aura::HandleEffectPeriodic, EFFECT_1, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_mimiron_p3wx2_laser_barrage_AuraScript();
}
private:
uint32 _lastMSTime;
float _lastOrientation;
};
class go_ulduar_do_not_push_this_button : public GameObjectScript
@@ -2518,8 +2514,8 @@ void AddSC_boss_mimiron()
new npc_ulduar_mimiron_rocket();
new npc_ulduar_magnetic_core();
new npc_ulduar_bot_summon_trigger();
new spell_mimiron_rapid_burst();
new spell_mimiron_p3wx2_laser_barrage();
RegisterSpellScript(spell_mimiron_rapid_burst_aura);
RegisterSpellScript(spell_mimiron_p3wx2_laser_barrage_aura);
new go_ulduar_do_not_push_this_button();
new npc_ulduar_flames_initial();
new npc_ulduar_flames_spread();
@@ -1729,14 +1729,9 @@ public:
}
};
class spell_thorim_lightning_pillar_P2 : public SpellScriptLoader
class spell_thorim_lightning_pillar_P2_aura : public AuraScript
{
public:
spell_thorim_lightning_pillar_P2() : SpellScriptLoader("spell_thorim_lightning_pillar_P2") { }
class spell_thorim_lightning_pillar_P2_AuraScript : public AuraScript
{
PrepareAuraScript(spell_thorim_lightning_pillar_P2_AuraScript);
PrepareAuraScript(spell_thorim_lightning_pillar_P2_aura);
void OnPeriodic(AuraEffect const* aurEff)
{
@@ -1747,24 +1742,13 @@ public:
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_thorim_lightning_pillar_P2_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_thorim_lightning_pillar_P2_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
class spell_thorim_trash_impale_aura : public AuraScript
{
return new spell_thorim_lightning_pillar_P2_AuraScript();
}
};
class spell_thorim_trash_impale : public SpellScriptLoader
{
public:
spell_thorim_trash_impale() : SpellScriptLoader("spell_thorim_trash_impale") { }
class spell_thorim_trash_impale_AuraScript : public AuraScript
{
PrepareAuraScript(spell_thorim_trash_impale_AuraScript);
PrepareAuraScript(spell_thorim_trash_impale_aura);
void OnPeriodic(AuraEffect const* /*aurEff*/)
{
@@ -1775,13 +1759,7 @@ public:
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_thorim_trash_impale_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_thorim_trash_impale_AuraScript();
OnEffectPeriodic += AuraEffectPeriodicFn(spell_thorim_trash_impale_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
}
};
@@ -1838,8 +1816,8 @@ void AddSC_boss_thorim()
new go_thorim_lever();
// Spells
new spell_thorim_lightning_pillar_P2();
new spell_thorim_trash_impale();
RegisterSpellScript(spell_thorim_lightning_pillar_P2_aura);
RegisterSpellScript(spell_thorim_trash_impale_aura);
// Achievements
new achievement_thorim_stand_in_the_lightning();
@@ -857,14 +857,9 @@ public:
};
// 62775 - Tympanic Tantrum
class spell_xt002_tympanic_tantrum : public SpellScriptLoader
class spell_xt002_tympanic_tantrum : public SpellScript
{
public:
spell_xt002_tympanic_tantrum() : SpellScriptLoader("spell_xt002_tympanic_tantrum") { }
class spell_xt002_tympanic_tantrum_SpellScript : public SpellScript
{
PrepareSpellScript(spell_xt002_tympanic_tantrum_SpellScript);
PrepareSpellScript(spell_xt002_tympanic_tantrum);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -879,36 +874,51 @@ public:
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_xt002_tympanic_tantrum_SpellScript::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY);
OnHit += SpellHitFn(spell_xt002_tympanic_tantrum_SpellScript::RecalculateDamage);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_xt002_tympanic_tantrum_SpellScript();
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_xt002_tympanic_tantrum::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY);
OnHit += SpellHitFn(spell_xt002_tympanic_tantrum::RecalculateDamage);
}
};
// 64234, 63024 - Gravity Bomb
class spell_xt002_gravity_bomb_aura : public SpellScriptLoader
enum GravityBomb
{
public:
spell_xt002_gravity_bomb_aura() : SpellScriptLoader("spell_xt002_gravity_bomb_aura") { }
SPELL_GRAVTY_BOMB_10 = 63025
};
class spell_xt002_gravity_bomb_aura_AuraScript : public AuraScript
class spell_xt002_gravity_bomb : public SpellScript
{
PrepareAuraScript(spell_xt002_gravity_bomb_aura_AuraScript);
PrepareSpellScript(spell_xt002_gravity_bomb);
void SelectTarget(std::list<WorldObject*>& targets)
{
if (Unit* victim = GetCaster()->GetVictim())
targets.remove_if(Acore::ObjectGUIDCheck(victim->GetGUID(), true));
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_xt002_gravity_bomb::SelectTarget, EFFECT_ALL, TARGET_UNIT_DEST_AREA_ENEMY);
}
};
class spell_xt002_gravity_bomb_aura : public AuraScript
{
PrepareAuraScript(spell_xt002_gravity_bomb_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_VOID_ZONE_DAMAGE });
}
void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
if (Player* player = GetOwner()->ToPlayer())
if (Unit* xt002 = GetCaster())
if (xt002->HasAura(aurEff->GetAmount())) // Heartbreak aura indicating hard mode
if (Creature* cr = xt002->SummonCreature(NPC_VOID_ZONE, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000))
if (Creature* creature = xt002->SummonCreature(NPC_VOID_ZONE, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000))
{
int32 damage = GetSpellInfo()->Id == 63025 ? 5000 : 7500;
cr->CastCustomSpell(cr, SPELL_VOID_ZONE_DAMAGE, &damage, 0, 0, true);
int32 damage = GetSpellInfo()->Id == SPELL_GRAVTY_BOMB_10 ? 5000 : 7500;
creature->CastCustomSpell(creature, SPELL_VOID_ZONE_DAMAGE, &damage, 0, 0, true);
}
}
@@ -929,47 +939,15 @@ public:
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_xt002_gravity_bomb_aura_AuraScript::OnPeriodic, EFFECT_2, SPELL_AURA_PERIODIC_DAMAGE);
AfterEffectRemove += AuraEffectRemoveFn(spell_xt002_gravity_bomb_aura_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_xt002_gravity_bomb_aura_AuraScript();
}
class spell_xt002_gravity_bomb_aura_SpellScript : public SpellScript
{
PrepareSpellScript(spell_xt002_gravity_bomb_aura_SpellScript);
void SelectTarget(std::list<WorldObject*>& targets)
{
if (Unit* victim = GetCaster()->GetVictim())
targets.remove_if(Acore::ObjectGUIDCheck(victim->GetGUID(), true));
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_xt002_gravity_bomb_aura_SpellScript::SelectTarget, EFFECT_ALL, TARGET_UNIT_DEST_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_xt002_gravity_bomb_aura_SpellScript();
OnEffectPeriodic += AuraEffectPeriodicFn(spell_xt002_gravity_bomb_aura::OnPeriodic, EFFECT_2, SPELL_AURA_PERIODIC_DAMAGE);
AfterEffectRemove += AuraEffectRemoveFn(spell_xt002_gravity_bomb_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
// 64233, 63025 - Gravity Bomb
class spell_xt002_gravity_bomb_damage : public SpellScriptLoader
class spell_xt002_gravity_bomb_damage : public SpellScript
{
public:
spell_xt002_gravity_bomb_damage() : SpellScriptLoader("spell_xt002_gravity_bomb_damage") { }
class spell_xt002_gravity_bomb_damage_SpellScript : public SpellScript
{
PrepareSpellScript(spell_xt002_gravity_bomb_damage_SpellScript);
PrepareSpellScript(spell_xt002_gravity_bomb_damage);
void HandleScript(SpellEffIndex /*eff*/)
{
@@ -984,25 +962,30 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_xt002_gravity_bomb_damage_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_xt002_gravity_bomb_damage_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_xt002_gravity_bomb_damage::HandleScript, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
}
};
// 63018, 65121 - Searing Light
class spell_xt002_searing_light_spawn_life_spark : public SpellScriptLoader
class spell_xt002_searing_light_spawn_life_spark : public SpellScript
{
public:
spell_xt002_searing_light_spawn_life_spark() : SpellScriptLoader("spell_xt002_searing_light_spawn_life_spark") { }
PrepareSpellScript(spell_xt002_searing_light_spawn_life_spark);
class spell_xt002_searing_light_spawn_life_spark_AuraScript : public AuraScript
void SelectTarget(std::list<WorldObject*>& targets)
{
PrepareAuraScript(spell_xt002_searing_light_spawn_life_spark_AuraScript);
if (Unit* victim = GetCaster()->GetVictim())
targets.remove_if(Acore::ObjectGUIDCheck(victim->GetGUID(), true));
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_xt002_searing_light_spawn_life_spark::SelectTarget, EFFECT_ALL, TARGET_UNIT_DEST_AREA_ENEMY);
}
};
class spell_xt002_searing_light_spawn_life_spark_aura : public AuraScript
{
PrepareAuraScript(spell_xt002_searing_light_spawn_life_spark_aura);
void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
@@ -1014,34 +997,7 @@ public:
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_xt002_searing_light_spawn_life_spark_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_xt002_searing_light_spawn_life_spark_AuraScript();
}
class spell_xt002_searing_light_spawn_life_spark_SpellScript : public SpellScript
{
PrepareSpellScript(spell_xt002_searing_light_spawn_life_spark_SpellScript);
void SelectTarget(std::list<WorldObject*>& targets)
{
if (Unit* victim = GetCaster()->GetVictim())
targets.remove_if(Acore::ObjectGUIDCheck(victim->GetGUID(), true));
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_xt002_searing_light_spawn_life_spark_SpellScript::SelectTarget, EFFECT_ALL, TARGET_UNIT_DEST_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_xt002_searing_light_spawn_life_spark_SpellScript();
OnEffectRemove += AuraEffectRemoveFn(spell_xt002_searing_light_spawn_life_spark_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
@@ -1088,10 +1044,10 @@ void AddSC_boss_xt002()
new npc_xt002_life_spark();
// Spells
new spell_xt002_tympanic_tantrum();
new spell_xt002_gravity_bomb_aura();
new spell_xt002_gravity_bomb_damage();
new spell_xt002_searing_light_spawn_life_spark();
RegisterSpellScript(spell_xt002_tympanic_tantrum);
RegisterSpellAndAuraScriptPair(spell_xt002_gravity_bomb, spell_xt002_gravity_bomb_aura);
RegisterSpellScript(spell_xt002_gravity_bomb_damage);
RegisterSpellAndAuraScriptPair(spell_xt002_searing_light_spawn_life_spark, spell_xt002_searing_light_spawn_life_spark_aura);
// Achievements
new achievement_xt002_nerf_engineering();
@@ -2269,14 +2269,14 @@ public:
};
// 63830, 63881 - Malady of the Mind
class spell_yogg_saron_malady_of_the_mind : public SpellScriptLoader
class spell_yogg_saron_malady_of_the_mind_aura : public AuraScript
{
public:
spell_yogg_saron_malady_of_the_mind() : SpellScriptLoader("spell_yogg_saron_malady_of_the_mind") { }
PrepareAuraScript(spell_yogg_saron_malady_of_the_mind_aura);
class spell_yogg_saron_malady_of_the_mind_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_yogg_saron_malady_of_the_mind_AuraScript);
return ValidateSpellInfo({ SPELL_DEATH_RAY_DAMAGE_REAL, SPELL_MALADY_OF_THE_MIND_TRIGGER });
}
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -2291,26 +2291,42 @@ public:
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_yogg_saron_malady_of_the_mind_AuraScript::OnApply, EFFECT_1, SPELL_AURA_MOD_FEAR, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_yogg_saron_malady_of_the_mind_AuraScript::OnRemove, EFFECT_1, SPELL_AURA_MOD_FEAR, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_yogg_saron_malady_of_the_mind_AuraScript();
OnEffectApply += AuraEffectApplyFn(spell_yogg_saron_malady_of_the_mind_aura::OnApply, EFFECT_1, SPELL_AURA_MOD_FEAR, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_yogg_saron_malady_of_the_mind_aura::OnRemove, EFFECT_1, SPELL_AURA_MOD_FEAR, AURA_EFFECT_HANDLE_REAL);
}
};
// 63802 - Brain Link
class spell_yogg_saron_brain_link : public SpellScriptLoader
class spell_yogg_saron_brain_link : public SpellScript
{
public:
spell_yogg_saron_brain_link() : SpellScriptLoader("spell_yogg_saron_brain_link") { }
PrepareSpellScript(spell_yogg_saron_brain_link);
class spell_yogg_saron_brain_link_AuraScript : public AuraScript
void FilterTargets(std::list<WorldObject*>& targets)
{
PrepareAuraScript(spell_yogg_saron_brain_link_AuraScript);
std::list<WorldObject*> tempList;
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
if ((*itr)->GetPositionZ() > 300.0f)
tempList.push_back(*itr);
targets.clear();
for (std::list<WorldObject*>::iterator itr = tempList.begin(); itr != tempList.end(); ++itr)
targets.push_back(*itr);
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_yogg_saron_brain_link::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
class spell_yogg_saron_brain_link_aura : public AuraScript
{
PrepareAuraScript(spell_yogg_saron_brain_link_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_BRAIN_LINK_DAMAGE, SPELL_BRAIN_LINK_OK });
}
void HandleOnEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -2363,56 +2379,18 @@ public:
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_yogg_saron_brain_link_AuraScript::HandleOnEffectApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_yogg_saron_brain_link_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
OnEffectApply += AuraEffectApplyFn(spell_yogg_saron_brain_link_aura::HandleOnEffectApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_yogg_saron_brain_link_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
protected:
ObjectGuid _targetGUID;
};
AuraScript* GetAuraScript() const override
{
return new spell_yogg_saron_brain_link_AuraScript();
}
class spell_yogg_saron_brain_link_SpellScript : public SpellScript
{
PrepareSpellScript(spell_yogg_saron_brain_link_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
std::list<WorldObject*> tempList;
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
if ((*itr)->GetPositionZ() > 300.0f)
tempList.push_back(*itr);
targets.clear();
for (std::list<WorldObject*>::iterator itr = tempList.begin(); itr != tempList.end(); ++itr)
targets.push_back(*itr);
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_yogg_saron_brain_link_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_yogg_saron_brain_link_SpellScript();
}
};
// 64465 - Shadow Beacon
class spell_yogg_saron_shadow_beacon : public SpellScriptLoader
class spell_yogg_saron_shadow_beacon_aura : public AuraScript
{
public:
spell_yogg_saron_shadow_beacon() : SpellScriptLoader("spell_yogg_saron_shadow_beacon") { }
class spell_yogg_saron_shadow_beacon_AuraScript : public AuraScript
{
PrepareAuraScript(spell_yogg_saron_shadow_beacon_AuraScript);
PrepareAuraScript(spell_yogg_saron_shadow_beacon_aura);
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -2432,26 +2410,20 @@ class spell_yogg_saron_shadow_beacon : public SpellScriptLoader
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_yogg_saron_shadow_beacon_AuraScript::OnApply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_yogg_saron_shadow_beacon_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_yogg_saron_shadow_beacon_AuraScript();
AfterEffectApply += AuraEffectApplyFn(spell_yogg_saron_shadow_beacon_aura::OnApply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_yogg_saron_shadow_beacon_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
// 65206 - Destabilization Matrix
class spell_yogg_saron_destabilization_matrix : public SpellScriptLoader
class spell_yogg_saron_destabilization_matrix : public SpellScript
{
public:
spell_yogg_saron_destabilization_matrix() : SpellScriptLoader("spell_yogg_saron_destabilization_matrix") { }
PrepareSpellScript(spell_yogg_saron_destabilization_matrix);
class spell_yogg_saron_destabilization_matrix_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_yogg_saron_destabilization_matrix_SpellScript);
return ValidateSpellInfo({ SPELL_DESTABILIZATION_MATRIX_ATTACK });
}
void HandleDummyEffect(SpellEffIndex effIndex)
{
@@ -2477,26 +2449,15 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_yogg_saron_destabilization_matrix_SpellScript::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_yogg_saron_destabilization_matrix_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_yogg_saron_destabilization_matrix_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_yogg_saron_destabilization_matrix::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_yogg_saron_destabilization_matrix::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
}
};
// 64172 - Titanic Storm
class spell_yogg_saron_titanic_storm : public SpellScriptLoader
class spell_yogg_saron_titanic_storm : public SpellScript
{
public:
spell_yogg_saron_titanic_storm() : SpellScriptLoader("spell_yogg_saron_titanic_storm") { }
class spell_yogg_saron_titanic_storm_SpellScript : public SpellScript
{
PrepareSpellScript(spell_yogg_saron_titanic_storm_SpellScript);
PrepareSpellScript(spell_yogg_saron_titanic_storm);
void HandleDummyEffect(SpellEffIndex effIndex)
{
@@ -2522,26 +2483,15 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_yogg_saron_titanic_storm_SpellScript::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_yogg_saron_titanic_storm_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_yogg_saron_titanic_storm_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_yogg_saron_titanic_storm::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_yogg_saron_titanic_storm::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
}
};
// 64164, 64168 - Lunatic Gaze
class spell_yogg_saron_lunatic_gaze : public SpellScriptLoader
class spell_yogg_saron_lunatic_gaze : public SpellScript
{
public:
spell_yogg_saron_lunatic_gaze() : SpellScriptLoader("spell_yogg_saron_lunatic_gaze") { }
class spell_yogg_saron_lunatic_gaze_SpellScript : public SpellScript
{
PrepareSpellScript(spell_yogg_saron_lunatic_gaze_SpellScript);
PrepareSpellScript(spell_yogg_saron_lunatic_gaze);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -2557,25 +2507,19 @@ public:
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_yogg_saron_lunatic_gaze_SpellScript::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_yogg_saron_lunatic_gaze_SpellScript();
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_yogg_saron_lunatic_gaze::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
// 64174 - Protective Gaze
class spell_yogg_saron_protective_gaze : public SpellScriptLoader
class spell_yogg_saron_protective_gaze_aura : public AuraScript
{
public:
spell_yogg_saron_protective_gaze() : SpellScriptLoader("spell_yogg_saron_protective_gaze") { }
PrepareAuraScript(spell_yogg_saron_protective_gaze_aura);
class spell_yogg_saron_protective_gaze_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_yogg_saron_protective_gaze_AuraScript);
return ValidateSpellInfo({ SPELL_HODIR_FLASH_FREEZE });
}
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
@@ -2596,26 +2540,20 @@ public:
void Register() override
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_yogg_saron_protective_gaze_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
OnEffectAbsorb += AuraEffectAbsorbFn(spell_yogg_saron_protective_gaze_AuraScript::Absorb, EFFECT_0);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_yogg_saron_protective_gaze_AuraScript();
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_yogg_saron_protective_gaze_aura::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
OnEffectAbsorb += AuraEffectAbsorbFn(spell_yogg_saron_protective_gaze_aura::Absorb, EFFECT_0);
}
};
// 64161 - Empowered
class spell_yogg_saron_empowered : public SpellScriptLoader
class spell_yogg_saron_empowered_aura : public AuraScript
{
public:
spell_yogg_saron_empowered() : SpellScriptLoader("spell_yogg_saron_empowered") { }
PrepareAuraScript(spell_yogg_saron_empowered_aura);
class spell_yogg_saron_empowered_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_yogg_saron_empowered_AuraScript);
return ValidateSpellInfo({ SPELL_EMPOWERED, SPELL_WEAKENED });
}
void OnPeriodic(AuraEffect const* /*aurEff*/)
{
@@ -2636,25 +2574,19 @@ public:
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_yogg_saron_empowered_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_yogg_saron_empowered_AuraScript();
OnEffectPeriodic += AuraEffectPeriodicFn(spell_yogg_saron_empowered_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
// 64555 - Insane Periodic
class spell_yogg_saron_insane_periodic_trigger : public SpellScriptLoader
class spell_yogg_saron_insane_periodic_trigger : public SpellScript
{
public:
spell_yogg_saron_insane_periodic_trigger() : SpellScriptLoader("spell_yogg_saron_insane_periodic_trigger") { }
PrepareSpellScript(spell_yogg_saron_insane_periodic_trigger);
class spell_yogg_saron_insane_periodic_trigger_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_yogg_saron_insane_periodic_trigger_SpellScript);
return ValidateSpellInfo({ SPELL_INSANE1, SPELL_INSANE2 });
}
void HandleDummyEffect(SpellEffIndex effIndex)
{
@@ -2682,26 +2614,15 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_yogg_saron_insane_periodic_trigger_SpellScript::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_yogg_saron_insane_periodic_trigger_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_yogg_saron_insane_periodic_trigger_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_yogg_saron_insane_periodic_trigger::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_yogg_saron_insane_periodic_trigger::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
// 63120 - Insane
class spell_yogg_saron_insane : public SpellScriptLoader
class spell_yogg_saron_insane_aura : public AuraScript
{
public:
spell_yogg_saron_insane() : SpellScriptLoader("spell_yogg_saron_insane") { }
class spell_yogg_saron_insane_AuraScript : public AuraScript
{
PrepareAuraScript(spell_yogg_saron_insane_AuraScript);
PrepareAuraScript(spell_yogg_saron_insane_aura);
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -2710,25 +2631,14 @@ public:
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_yogg_saron_insane_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_AOE_CHARM, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_yogg_saron_insane_AuraScript();
OnEffectRemove += AuraEffectRemoveFn(spell_yogg_saron_insane_aura::OnRemove, EFFECT_0, SPELL_AURA_AOE_CHARM, AURA_EFFECT_HANDLE_REAL);
}
};
// 64169 - Sanity Well
class spell_yogg_saron_sanity_well : public SpellScriptLoader
class spell_yogg_saron_sanity_well_aura : public AuraScript
{
public:
spell_yogg_saron_sanity_well() : SpellScriptLoader("spell_yogg_saron_sanity_well") { }
class spell_yogg_saron_sanity_well_AuraScript : public AuraScript
{
PrepareAuraScript(spell_yogg_saron_sanity_well_AuraScript);
PrepareAuraScript(spell_yogg_saron_sanity_well_aura);
void HandleEffectCalcPeriodic(AuraEffect const* /*aurEff*/, bool& isPeriodic, int32& amplitude)
{
@@ -2748,14 +2658,8 @@ public:
void Register() override
{
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_yogg_saron_sanity_well_AuraScript::HandleEffectCalcPeriodic, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_yogg_saron_sanity_well_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_yogg_saron_sanity_well_AuraScript();
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_yogg_saron_sanity_well_aura::HandleEffectCalcPeriodic, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_yogg_saron_sanity_well_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
}
};
@@ -2794,14 +2698,21 @@ class spell_keeper_freya_summon_sanity_well : public SpellScript
63803 - Brain Link
65301 - Psychosis
64168 - Lunatic Gaze */
class spell_yogg_saron_sanity_reduce : public SpellScriptLoader
enum SanityReduce
{
public:
spell_yogg_saron_sanity_reduce() : SpellScriptLoader("spell_yogg_saron_sanity_reduce") { }
SPELL_SANITY_SCREEN_EFFECT = 63752,
SPELL_LUNATIC_GAZE_TRIGGER = 64168,
SPELL_YS_LUNATIC_GAZE_TRIGGER = 64164
};
class spell_yogg_saron_sanity_reduce_SpellScript : public SpellScript
class spell_yogg_saron_sanity_reduce : public SpellScript
{
PrepareSpellScript(spell_yogg_saron_sanity_reduce_SpellScript);
PrepareSpellScript(spell_yogg_saron_sanity_reduce);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_CANCEL_ILLUSION_AURA, SPELL_SANITY_SCREEN_EFFECT });
}
void HandleScriptEffect(SpellEffIndex effIndex)
{
@@ -2828,10 +2739,10 @@ public:
case SPELL_BRAIN_LINK_DAMAGE:
_reduceAmount = 2;
break;
case 64168 /*SPELL_LUNATIC_GAZE*/:
case SPELL_LUNATIC_GAZE_TRIGGER:
_reduceAmount = 2;
break;
case 64164 /*SPELL_YS_LUNATIC_GAZE*/:
case SPELL_YS_LUNATIC_GAZE_TRIGGER:
_reduceAmount = 4;
break;
case SPELL_INDUCE_MADNESS:
@@ -2847,61 +2758,50 @@ public:
if (Aura* aur = target->GetAura(SPELL_SANITY))
{
if ((aur->GetStackAmount() - _reduceAmount) <= 20)
target->CastSpell(target, 63752 /*SANITY_SCREEN_EFFECT*/, true);
target->CastSpell(target, SPELL_SANITY_SCREEN_EFFECT, true);
aur->ModStackAmount(-_reduceAmount);
}
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_yogg_saron_sanity_reduce_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_yogg_saron_sanity_reduce_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_yogg_saron_sanity_reduce::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
// 64467 - Empowering Shadows
class spell_yogg_saron_empowering_shadows : public SpellScriptLoader
enum EmpoweringShadows
{
public:
spell_yogg_saron_empowering_shadows() : SpellScriptLoader("spell_yogg_saron_empowering_shadows") { }
SPELL_EMPOWERING_SHADOWS_HEAL_10 = 64468,
SPELL_EMPOWERING_SHADOWS_HEAL_25 = 64486
};
class spell_yogg_saron_empowering_shadows_SpellScript : public SpellScript
class spell_yogg_saron_empowering_shadows : public SpellScript
{
PrepareSpellScript(spell_yogg_saron_empowering_shadows_SpellScript);
PrepareSpellScript(spell_yogg_saron_empowering_shadows);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_EMPOWERING_SHADOWS_HEAL_10, SPELL_EMPOWERING_SHADOWS_HEAL_25 });
}
void HandleScriptEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (Unit* target = GetHitUnit())
target->CastSpell(target, target->GetMap()->Is25ManRaid() ? 64486 : 64468, true); // SPELL_EMPOWERING_SHADOWS_HEAL
target->CastSpell(target, target->GetMap()->Is25ManRaid() ? SPELL_EMPOWERING_SHADOWS_HEAL_25 : SPELL_EMPOWERING_SHADOWS_HEAL_10, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_yogg_saron_empowering_shadows_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_yogg_saron_empowering_shadows_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_yogg_saron_empowering_shadows::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
// 64184 - In the Maws of the Old God
class spell_yogg_saron_in_the_maws_of_the_old_god : public SpellScriptLoader
class spell_yogg_saron_in_the_maws_of_the_old_god : public SpellScript
{
public:
spell_yogg_saron_in_the_maws_of_the_old_god() : SpellScriptLoader("spell_yogg_saron_in_the_maws_of_the_old_god") {}
class spell_yogg_saron_in_the_maws_of_the_old_god_SpellScript : public SpellScript
{
PrepareSpellScript(spell_yogg_saron_in_the_maws_of_the_old_god_SpellScript);
PrepareSpellScript(spell_yogg_saron_in_the_maws_of_the_old_god);
SpellCastResult CheckCast()
{
@@ -2921,27 +2821,16 @@ public:
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_yogg_saron_in_the_maws_of_the_old_god_SpellScript::CheckCast);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_yogg_saron_in_the_maws_of_the_old_god_SpellScript();
OnCheckCast += SpellCheckCastFn(spell_yogg_saron_in_the_maws_of_the_old_god::CheckCast);
}
};
/* 63744 - Sara's Anger
63747 - Sara's Fervor
63745 - Sara's Blessing */
class spell_yogg_saron_target_selectors : public SpellScriptLoader
class spell_yogg_saron_target_selectors : public SpellScript
{
public:
spell_yogg_saron_target_selectors() : SpellScriptLoader("spell_yogg_saron_target_selectors") { }
class spell_yogg_saron_target_selectors_SpellScript : public SpellScript
{
PrepareSpellScript(spell_yogg_saron_target_selectors_SpellScript);
PrepareSpellScript(spell_yogg_saron_target_selectors);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -2954,25 +2843,14 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_yogg_saron_target_selectors_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_yogg_saron_target_selectors_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_yogg_saron_target_selectors::HandleScript, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
// 63305 - Grim Reprisal
class spell_yogg_saron_grim_reprisal : public SpellScriptLoader
class spell_yogg_saron_grim_reprisal_aura : public AuraScript
{
public:
spell_yogg_saron_grim_reprisal() : SpellScriptLoader("spell_yogg_saron_grim_reprisal") { }
class spell_yogg_saron_grim_reprisal_AuraScript : public AuraScript
{
PrepareAuraScript(spell_yogg_saron_grim_reprisal_AuraScript);
PrepareAuraScript(spell_yogg_saron_grim_reprisal_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -2994,13 +2872,7 @@ public:
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_yogg_saron_grim_reprisal_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_yogg_saron_grim_reprisal_AuraScript();
OnEffectProc += AuraEffectProcFn(spell_yogg_saron_grim_reprisal_aura::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
@@ -3089,23 +2961,23 @@ void AddSC_boss_yoggsaron()
new boss_yoggsaron_voice();
// SPELLS
new spell_yogg_saron_malady_of_the_mind();
new spell_yogg_saron_brain_link();
new spell_yogg_saron_shadow_beacon();
new spell_yogg_saron_destabilization_matrix();
new spell_yogg_saron_titanic_storm();
new spell_yogg_saron_lunatic_gaze();
new spell_yogg_saron_protective_gaze();
new spell_yogg_saron_empowered();
new spell_yogg_saron_insane_periodic_trigger();
new spell_yogg_saron_insane();
new spell_yogg_saron_sanity_well();
RegisterSpellScript(spell_yogg_saron_malady_of_the_mind_aura);
RegisterSpellAndAuraScriptPair(spell_yogg_saron_brain_link, spell_yogg_saron_brain_link_aura);
RegisterSpellScript(spell_yogg_saron_shadow_beacon_aura);
RegisterSpellScript(spell_yogg_saron_destabilization_matrix);
RegisterSpellScript(spell_yogg_saron_titanic_storm);
RegisterSpellScript(spell_yogg_saron_lunatic_gaze);
RegisterSpellScript(spell_yogg_saron_protective_gaze_aura);
RegisterSpellScript(spell_yogg_saron_empowered_aura);
RegisterSpellScript(spell_yogg_saron_insane_periodic_trigger);
RegisterSpellScript(spell_yogg_saron_insane_aura);
RegisterSpellScript(spell_yogg_saron_sanity_well_aura);
RegisterSpellScript(spell_keeper_freya_summon_sanity_well);
new spell_yogg_saron_sanity_reduce();
new spell_yogg_saron_empowering_shadows();
new spell_yogg_saron_in_the_maws_of_the_old_god();
new spell_yogg_saron_target_selectors();
new spell_yogg_saron_grim_reprisal();
RegisterSpellScript(spell_yogg_saron_sanity_reduce);
RegisterSpellScript(spell_yogg_saron_empowering_shadows);
RegisterSpellScript(spell_yogg_saron_in_the_maws_of_the_old_god);
RegisterSpellScript(spell_yogg_saron_target_selectors);
RegisterSpellScript(spell_yogg_saron_grim_reprisal_aura);
// ACHIEVEMENTS
new achievement_yogg_saron_drive_me_crazy();
@@ -79,7 +79,8 @@ enum UldSpells
{
SPELL_SIMPLE_TELEPORT = 12980,
SPELL_KEEPER_TELEPORT = 62940,
SPELL_SNOW_MOUND_PARTICLES = 64615
SPELL_SNOW_MOUND_PARTICLES = 64615,
SPELL_ENERGY_SAP_10 = 64740
};
class npc_ulduar_keeper : public CreatureScript
@@ -201,30 +202,30 @@ public:
}
};
class spell_ulduar_energy_sap : public SpellScriptLoader
enum EnergySap
{
public:
spell_ulduar_energy_sap() : SpellScriptLoader("spell_ulduar_energy_sap") { }
SPELL_ENERGY_SAP_DAMAGE_1 = 64747,
SPELL_ENERGY_SAP_DAMAGE_2 = 64863,
};
class spell_ulduar_energy_sap_AuraScript : public AuraScript
class spell_ulduar_energy_sap_aura : public AuraScript
{
PrepareAuraScript(spell_ulduar_energy_sap_AuraScript)
PrepareAuraScript(spell_ulduar_energy_sap_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_ENERGY_SAP_DAMAGE_1, SPELL_ENERGY_SAP_DAMAGE_2 });
}
void HandleEffectPeriodic(AuraEffect const* aurEff)
{
if (Unit* target = GetTarget())
target->CastSpell(target, (aurEff->GetId() == 64740) ? 64747 : 64863, true);
target->CastSpell(target, (aurEff->GetId() == SPELL_ENERGY_SAP_10) ? SPELL_ENERGY_SAP_DAMAGE_1 : SPELL_ENERGY_SAP_DAMAGE_2, true);
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_ulduar_energy_sap_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_ulduar_energy_sap_AuraScript();
OnEffectPeriodic += AuraEffectPeriodicFn(spell_ulduar_energy_sap_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
}
};
@@ -500,30 +501,19 @@ public:
};
};
class spell_ulduar_arachnopod_damaged : public SpellScriptLoader
class spell_ulduar_arachnopod_damaged_aura : public AuraScript
{
public:
spell_ulduar_arachnopod_damaged() : SpellScriptLoader("spell_ulduar_arachnopod_damaged") { }
class spell_ulduar_arachnopod_damaged_AuraScript : public AuraScript
{
PrepareAuraScript(spell_ulduar_arachnopod_damaged_AuraScript)
PrepareAuraScript(spell_ulduar_arachnopod_damaged_aura);
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
{
if (Unit* c = GetCaster())
Unit::Kill(c, c, false);
if (Unit* caster = GetCaster())
Unit::Kill(caster, caster, false);
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_ulduar_arachnopod_damaged_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_ulduar_arachnopod_damaged_AuraScript();
OnEffectPeriodic += AuraEffectPeriodicFn(spell_ulduar_arachnopod_damaged_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
@@ -576,11 +566,11 @@ struct npc_salvaged_siege_engine : public VehicleAI
void AddSC_ulduar()
{
new npc_ulduar_keeper();
new spell_ulduar_energy_sap();
RegisterSpellScript(spell_ulduar_energy_sap_aura);
RegisterUlduarCreatureAI(npc_ulduar_snow_mound);
new npc_ulduar_storm_tempered_keeper();
new npc_ulduar_arachnopod_destroyer();
new spell_ulduar_arachnopod_damaged();
RegisterSpellScript(spell_ulduar_arachnopod_damaged_aura);
new AreaTrigger_at_celestial_planetarium_enterance();
RegisterCreatureAI(npc_salvaged_siege_engine);
}