refactor(Scripts/IcecrownCitadel): Spell Scripts use registry macros (#19508)

* boss_blood_queen_lana_thel aura:spell_blood_queen_pact_of_the_darkfallen_dmg_aura

* boss_blood_queen_lana_thel spell:spell_blood_queen_pact_of_the_darkfallen

* boss_blood_queen_lana_thel spell:spell_blood_queen_pact_of_the_darkfallen_dmg_target

* boss_blood_queen_lana_thel spell:spell_blood_queen_bloodbolt

* boss_blood_queen_lana_thel aura:spell_blood_queen_frenzied_bloodthirst_aura

* boss_blood_queen_lana_thel aura:spell_blood_queen_essence_of_the_blood_queen_aura

* boss_blood_queen_lana_thel spell:spell_blood_queen_vampiric_bite

* boss_blood_queen_lana_thel spell:spell_blood_queen_swarming_shadows_floor_dmg

* boss_blood_queen_lana_thel spell:spell_blood_queen_presence_of_the_darkfallen

* icecrown_citadel aura:spell_icc_stoneform_aura

* icecrown_citadel spell:spell_icc_sprit_alarm

* icecrown_citadel spell:spell_icc_geist_alarm

* icecrown_citadel spell:spell_frost_giant_death_plague

* icecrown_citadel spell:spell_icc_harvest_blight_specimen

* icecrown_citadel spell:spell_svalna_revive_champion

* icecrown_citadel spell:spell_svalna_remove_spear

* icecrown_citadel spell:spell_icc_soul_missile

* icecrown_citadel aura:spell_icc_web_wrap_aura

* icecrown_citadel aura:spell_icc_dark_reckoning_aura

* icecrown_citadel spell:spell_stinky_precious_decimate

* icecrown_citadel aura:spell_icc_yf_frozen_orb_aura

* icecrown_citadel aura:spell_icc_yh_volley_aura

* icecrown_citadel spell:spell_icc_yd_summon_undead

* icecrown_citadel spell:spell_icc_shattered_bones

* boss_deathbringer_saurfang aura:spell_deathbringer_blood_link_aura

* boss_deathbringer_saurfang aura:spell_deathbringer_blood_link_blood_beast_aura

* boss_deathbringer_saurfang spell:spell_deathbringer_blood_link

* boss_deathbringer_saurfang pair:spell_deathbringer_blood_power

* boss_deathbringer_saurfang spell:spell_deathbringer_blood_nova_targeting

* boss_deathbringer_saurfang spell:spell_deathbringer_boiling_blood

* boss_festergut spell:spell_festergut_pungent_blight

* boss_festergut aura:spell_festergut_blighted_spores_aura

* boss_festergut spell:spell_festergut_gastric_bloat

* boss_valithria_dreamwalker spell:spell_dreamwalker_summon_portal

* boss_valithria_dreamwalker spell:spell_dreamwalker_twisted_nightmares

* boss_valithria_dreamwalker aura:spell_dreamwalker_nightmare_cloud_aura

* boss_valithria_dreamwalker aura:spell_dreamwalker_mana_void_aura

* boss_valithria_dreamwalker aura:spell_dreamwalker_decay_periodic_timer_aura

* boss_valithria_dreamwalker spell:spell_dreamwalker_summoner

* boss_valithria_dreamwalker aura:spell_dreamwalker_summon_suppresser_aura

* boss_valithria_dreamwalker spell:spell_dreamwalker_summon_suppresser_effect

* boss_valithria_dreamwalker aura:spell_valithria_suppression_aura

* boss_lady_deathwhisper aura:spell_deathwhisper_mana_barrier_aura

* boss_professor_putricide spell:spell_putricide_slime_puddle

* boss_professor_putricide spell:spell_putricide_slime_puddle_spawn

* boss_professor_putricide aura:spell_putricide_grow_stacker_aura

* boss_professor_putricide spell:spell_putricide_unstable_experiment

* boss_professor_putricide spell:spell_putricide_tear_gas_effect

* boss_professor_putricide aura:spell_putricide_gaseous_bloat_aura

* boss_professor_putricide spell:spell_putricide_ooze_channel

* boss_professor_putricide spell:spell_putricide_ooze_eruption_searcher

* boss_professor_putricide aura:spell_putricide_mutated_plague_aura

* boss_professor_putricide spell:spell_putricide_unbound_plague

* boss_professor_putricide aura:spell_putricide_unbound_plague_dmg_aura

* boss_professor_putricide spell:spell_putricide_choking_gas_bomb

* boss_professor_putricide spell:spell_putricide_clear_aura_effect_value

* boss_professor_putricide pair:spell_putricide_mutation_init

* boss_professor_putricide spell:spell_putricide_mutated_transformation

* boss_professor_putricide aura:spell_putricide_mutated_transformation_dismiss_aura

* boss_professor_putricide spell:spell_putricide_mutated_transformation_dmg

* boss_professor_putricide spell:spell_putricide_eat_ooze

* boss_professor_putricide spell:spell_putricide_regurgitated_ooze

* boss_sindragosa spell:spell_sindragosa_s_fury

* boss_sindragosa aura:spell_sindragosa_permeating_chill_aura

* boss_sindragosa aura:spell_sindragosa_instability_aura

* boss_sindragosa spell:spell_sindragosa_icy_grip

* boss_sindragosa spell:spell_sindragosa_icy_grip_jump

* boss_sindragosa aura:spell_sindragosa_frost_beacon_aura

* boss_sindragosa spell:spell_sindragosa_ice_tomb_filter

* boss_sindragosa pair:spell_sindragosa_ice_tomb

* boss_sindragosa spell:spell_sindragosa_mystic_buffet

* boss_sindragosa aura:spell_sindragosa_soul_preservation_aura

* boss_sindragosa spell:spell_rimefang_icy_blast

* boss_sindragosa spell:spell_frostwarden_handler_order_whelp

* boss_sindragosa pair:spell_frostwarden_handler_focus_fire

* boss_sindragosa spell:spell_sindragosa_frost_breath

* boss_lord_marrowgar spell:spell_marrowgar_coldflame

* boss_lord_marrowgar spell:spell_marrowgar_bone_spike_graveyard

* boss_lord_marrowgar spell:spell_marrowgar_coldflame_bonestorm

* boss_lord_marrowgar spell:spell_marrowgar_bone_storm

* boss_lord_marrowgar spell:spell_marrowgar_bone_slice

* boss_the_lich_king spell:spell_the_lich_king_quake

* boss_the_lich_king spell:spell_the_lich_king_jump

* boss_the_lich_king spell:spell_the_lich_king_jump_remove_aura

* boss_the_lich_king spell:spell_the_lich_king_play_movie

* boss_the_lich_king aura:spell_the_lich_king_infest_aura

* boss_the_lich_king aura:spell_the_lich_king_necrotic_plague_aura

* boss_the_lich_king pair:spell_the_lich_king_necrotic_plague_jump

* boss_the_lich_king aura:spell_the_lich_king_shadow_trap_visual_aura

* boss_the_lich_king spell:spell_the_lich_king_shadow_trap_periodic

* boss_the_lich_king spell:spell_the_lich_king_ice_burst_target_search

* boss_the_lich_king spell:spell_the_lich_king_raging_spirit

* boss_the_lich_king spell:spell_the_lich_king_defile

* boss_the_lich_king aura:spell_the_lich_king_soul_reaper_aura

* boss_the_lich_king spell:spell_the_lich_king_summon_into_air

* boss_the_lich_king spell:spell_the_lich_king_teleport_to_frostmourne_hc

* boss_the_lich_king spell:spell_the_lich_king_valkyr_target_search

* boss_the_lich_king spell:spell_the_lich_king_cast_back_to_caster

* boss_the_lich_king spell:spell_the_lich_king_life_siphon

* boss_the_lich_king aura:spell_the_lich_king_vile_spirits_aura

* boss_the_lich_king spell:spell_the_lich_king_vile_spirits_visual

* boss_the_lich_king spell:spell_the_lich_king_vile_spirit_move_target_search

* boss_the_lich_king spell:spell_the_lich_king_vile_spirit_damage_target_search

* boss_the_lich_king aura:spell_the_lich_king_harvest_soul_aura

* boss_the_lich_king aura:spell_the_lich_king_lights_favor_aura

* boss_the_lich_king spell:spell_the_lich_king_restore_soul

* boss_the_lich_king aura:spell_the_lich_king_dark_hunger_aura

* boss_the_lich_king aura:spell_the_lich_king_soul_rip_aura

* boss_the_lich_king spell:spell_the_lich_king_summon_spirit_bomb

* boss_the_lich_king spell:spell_the_lich_king_trigger_vile_spirit

* boss_icecrown_gunship_battle aura:spell_igb_rocket_pack_aura

* boss_icecrown_gunship_battle aura:spell_igb_rocket_pack_useable_aura

* boss_icecrown_gunship_battle spell:spell_igb_teleport_to_enemy_ship

* boss_icecrown_gunship_battle spell:spell_igb_check_for_players

* boss_icecrown_gunship_battle spell:spell_igb_gunship_fall_teleport

* boss_icecrown_gunship_battle aura:spell_igb_explosion_main_aura

* boss_icecrown_gunship_battle spell:spell_igb_explosion

* boss_icecrown_gunship_battle spell:spell_igb_teleport_players_on_victory

* boss_icecrown_gunship_battle aura:spell_igb_periodic_trigger_with_power_cost_aura

* boss_icecrown_gunship_battle aura:spell_igb_overheat_aura

* boss_icecrown_gunship_battle spell:spell_igb_cannon_blast

* boss_icecrown_gunship_battle spell:spell_igb_incinerating_blast

* boss_icecrown_gunship_battle spell:spell_igb_burning_pitch_selector

* boss_icecrown_gunship_battle spell:spell_igb_burning_pitch

* boss_icecrown_gunship_battle spell:spell_igb_rocket_artillery

* boss_icecrown_gunship_battle spell:spell_igb_rocket_artillery_explosion

* boss_icecrown_gunship_battle spell:spell_igb_below_zero

* boss_icecrown_gunship_battle aura:spell_igb_on_gunship_deck_aura

* boss_blood_prince_council aura:spell_blood_council_shadow_prison_aura

* boss_blood_prince_council spell:spell_blood_council_shadow_prison_damage

* boss_blood_prince_council spell:spell_taldaram_glittering_sparks

* boss_blood_prince_council spell:spell_taldaram_summon_flame_ball

* boss_blood_prince_council spell:spell_taldaram_ball_of_inferno_flame

* boss_blood_prince_council pair:spell_valanar_kinetic_bomb

* boss_blood_prince_council aura:spell_valanar_kinetic_bomb_absorb_aura

* boss_blood_prince_council spell:spell_valanar_kinetic_bomb_knockback

* boss_blood_prince_council spell:spell_valanar_kinetic_bomb_summon

* boss_blood_prince_council spell:spell_blood_council_summon_shadow_resonance

* boss_rotface pair:spell_rotface_mutated_infection

* boss_rotface spell:spell_rotface_little_ooze_combine

* boss_rotface spell:spell_rotface_large_ooze_combine

* boss_rotface spell:spell_rotface_large_ooze_buff_combine

* boss_rotface spell:spell_rotface_unstable_ooze_explosion_init

* boss_rotface spell:spell_rotface_unstable_ooze_explosion

* boss_rotface aura:spell_rotface_unstable_ooze_explosion_suicide_aura

* icecrown_citadel.h spell:spell_trigger_spell_from_caster
This commit is contained in:
Jelle Meeus
2024-07-29 14:57:25 +02:00
committed by GitHub
parent 1c5ee47151
commit a3be4c25db
15 changed files with 3812 additions and 5186 deletions
@@ -0,0 +1,43 @@
--
UPDATE `spell_script_names` SET `ScriptName`='spell_blood_queen_pact_of_the_darkfallen_dmg_aura' WHERE `spell_id`=71340 AND `ScriptName`='spell_blood_queen_pact_of_the_darkfallen_dmg';
UPDATE `spell_script_names` SET `ScriptName`='spell_blood_queen_frenzied_bloodthirst_aura' WHERE `spell_id` IN (70877,71474) AND `ScriptName`='spell_blood_queen_frenzied_bloodthirst';
UPDATE `spell_script_names` SET `ScriptName`='spell_blood_queen_essence_of_the_blood_queen_aura' WHERE `spell_id`=70871 AND `ScriptName`='spell_blood_queen_essence_of_the_blood_queen';
UPDATE `spell_script_names` SET `ScriptName`='spell_icc_stoneform_aura' WHERE `spell_id`=70733 AND `ScriptName`='spell_icc_stoneform';
UPDATE `spell_script_names` SET `ScriptName`='spell_icc_web_wrap_aura' WHERE `spell_id`=70980 AND `ScriptName`='spell_icc_web_wrap';
UPDATE `spell_script_names` SET `ScriptName`='spell_icc_dark_reckoning_aura' WHERE `spell_id`=69483 AND `ScriptName`='spell_icc_dark_reckoning';
UPDATE `spell_script_names` SET `ScriptName`='spell_icc_yf_frozen_orb_aura' WHERE `spell_id`=71274 AND `ScriptName`='spell_icc_yf_frozen_orb';
UPDATE `spell_script_names` SET `ScriptName`='spell_icc_yh_volley_aura' WHERE `spell_id`=71252 AND `ScriptName`='spell_icc_yh_volley';
UPDATE `spell_script_names` SET `ScriptName`='spell_festergut_blighted_spores_aura' WHERE `spell_id` IN (69290,71222,73033,73034) AND `ScriptName`='spell_festergut_blighted_spores';
UPDATE `spell_script_names` SET `ScriptName`='spell_dreamwalker_nightmare_cloud_aura' WHERE `spell_id`=71970 AND `ScriptName`='spell_dreamwalker_nightmare_cloud';
UPDATE `spell_script_names` SET `ScriptName`='spell_dreamwalker_mana_void_aura' WHERE `spell_id`=71085 AND `ScriptName`='spell_dreamwalker_mana_void';
UPDATE `spell_script_names` SET `ScriptName`='spell_dreamwalker_decay_periodic_timer_aura' WHERE `spell_id` IN (70912,70913,70915,70916) AND `ScriptName`='spell_dreamwalker_decay_periodic_timer';
UPDATE `spell_script_names` SET `ScriptName`='spell_dreamwalker_summon_suppresser_aura' WHERE `spell_id`=70912 AND `ScriptName`='spell_dreamwalker_summon_suppresser';
UPDATE `spell_script_names` SET `ScriptName`='spell_valithria_suppression_aura' WHERE `spell_id`=70588 AND `ScriptName`='spell_valithria_suppression';
UPDATE `spell_script_names` SET `ScriptName`='spell_deathwhisper_mana_barrier_aura' WHERE `spell_id`=70842 AND `ScriptName`='spell_deathwhisper_mana_barrier';
UPDATE `spell_script_names` SET `ScriptName`='spell_putricide_grow_stacker_aura' WHERE `spell_id`=70345 AND `ScriptName`='spell_putricide_grow_stacker';
UPDATE `spell_script_names` SET `ScriptName`='spell_putricide_gaseous_bloat_aura' WHERE `spell_id` IN (70672,72455,72832,72833) AND `ScriptName`='spell_putricide_gaseous_bloat';
UPDATE `spell_script_names` SET `ScriptName`='spell_putricide_mutated_plague_aura' WHERE `spell_id` IN (72451,72463,72671,72672) AND `ScriptName`='spell_putricide_mutated_plague';
UPDATE `spell_script_names` SET `ScriptName`='spell_putricide_unbound_plague_dmg_aura' WHERE `spell_id` IN (70911,72854,72855,72856) AND `ScriptName`='spell_putricide_unbound_plague_dmg';
UPDATE `spell_script_names` SET `ScriptName`='spell_putricide_mutated_transformation_dismiss_aura' WHERE `spell_id` IN (70405,72508,72509,72510) AND `ScriptName`='spell_putricide_mutated_transformation_dismiss';
UPDATE `spell_script_names` SET `ScriptName`='spell_sindragosa_permeating_chill_aura' WHERE `spell_id`=70107 AND `ScriptName`='spell_sindragosa_permeating_chill';
UPDATE `spell_script_names` SET `ScriptName`='spell_sindragosa_instability_aura' WHERE `spell_id`=69766 AND `ScriptName`='spell_sindragosa_instability';
UPDATE `spell_script_names` SET `ScriptName`='spell_sindragosa_frost_beacon_aura' WHERE `spell_id`=70126 AND `ScriptName`='spell_sindragosa_frost_beacon';
UPDATE `spell_script_names` SET `ScriptName`='spell_sindragosa_soul_preservation_aura' WHERE `spell_id`=72465 AND `ScriptName`='spell_sindragosa_soul_preservation';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_infest_aura' WHERE `spell_id` IN (70541,73779,73780,73781) AND `ScriptName`='spell_the_lich_king_infest';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_necrotic_plague_aura' WHERE `spell_id` IN (70337,73912,73913,73914) AND `ScriptName`='spell_the_lich_king_necrotic_plague';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_shadow_trap_visual_aura' WHERE `spell_id`=73530 AND `ScriptName`='spell_the_lich_king_shadow_trap_visual';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_soul_reaper_aura' WHERE `spell_id` IN (69409,73797,73798,73799) AND `ScriptName`='spell_the_lich_king_soul_reaper';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_vile_spirits_aura' WHERE `spell_id`=70498 AND `ScriptName`='spell_the_lich_king_vile_spirits';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_harvest_soul_aura' WHERE `spell_id` IN (68980,74296,74297,74325) AND `ScriptName`='spell_the_lich_king_harvest_soul';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_lights_favor_aura' WHERE `spell_id`=69382 AND `ScriptName`='spell_the_lich_king_lights_favor';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_dark_hunger_aura' WHERE `spell_id`=69383 AND `ScriptName`='spell_the_lich_king_dark_hunger';
UPDATE `spell_script_names` SET `ScriptName`='spell_the_lich_king_soul_rip_aura' WHERE `spell_id`=69397 AND `ScriptName`='spell_the_lich_king_soul_rip';
UPDATE `spell_script_names` SET `ScriptName`='spell_igb_rocket_pack_aura' WHERE `spell_id`=68721 AND `ScriptName`='spell_igb_rocket_pack';
UPDATE `spell_script_names` SET `ScriptName`='spell_igb_rocket_pack_useable_aura' WHERE `spell_id`=70348 AND `ScriptName`='spell_igb_rocket_pack_useable';
UPDATE `spell_script_names` SET `ScriptName`='spell_igb_explosion_main_aura' WHERE `spell_id` IN (72134,72137) AND `ScriptName`='spell_igb_explosion_main';
UPDATE `spell_script_names` SET `ScriptName`='spell_igb_periodic_trigger_with_power_cost_aura' WHERE `spell_id` IN (69470,69487) AND `ScriptName`='spell_igb_periodic_trigger_with_power_cost';
UPDATE `spell_script_names` SET `ScriptName`='spell_igb_overheat_aura' WHERE `spell_id`=69487 AND `ScriptName`='spell_igb_overheat';
UPDATE `spell_script_names` SET `ScriptName`='spell_igb_on_gunship_deck_aura' WHERE `spell_id` IN (70120,70121) AND `ScriptName`='spell_igb_on_gunship_deck';
UPDATE `spell_script_names` SET `ScriptName`='spell_blood_council_shadow_prison_aura' WHERE `spell_id`=73001 AND `ScriptName`='spell_blood_council_shadow_prison';
UPDATE `spell_script_names` SET `ScriptName`='spell_valanar_kinetic_bomb_absorb_aura' WHERE `spell_id`=72054 AND `ScriptName`='spell_valanar_kinetic_bomb_absorb';
UPDATE `spell_script_names` SET `ScriptName`='spell_rotface_unstable_ooze_explosion_suicide_aura' WHERE `spell_id`=71441 AND `ScriptName`='spell_rotface_unstable_ooze_explosion_suicide';
@@ -1440,14 +1440,14 @@ public:
} }
}; };
class spell_blood_council_shadow_prison : public SpellScriptLoader class spell_blood_council_shadow_prison_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_blood_council_shadow_prison_aura);
spell_blood_council_shadow_prison() : SpellScriptLoader("spell_blood_council_shadow_prison") { }
class spell_blood_council_shadow_prison_AuraScript : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_blood_council_shadow_prison_AuraScript); return ValidateSpellInfo({ SPELL_SHADOW_PRISON_DAMAGE });
}
void HandleDummyTick(AuraEffect const* aurEff) void HandleDummyTick(AuraEffect const* aurEff)
{ {
@@ -1459,24 +1459,13 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_blood_council_shadow_prison_AuraScript::HandleDummyTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); OnEffectPeriodic += AuraEffectPeriodicFn(spell_blood_council_shadow_prison_aura::HandleDummyTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_blood_council_shadow_prison_AuraScript();
} }
}; };
class spell_blood_council_shadow_prison_damage : public SpellScriptLoader class spell_blood_council_shadow_prison_damage : public SpellScript
{ {
public: PrepareSpellScript(spell_blood_council_shadow_prison_damage);
spell_blood_council_shadow_prison_damage() : SpellScriptLoader("spell_blood_council_shadow_prison_damage") { }
class spell_blood_council_shadow_prison_SpellScript : public SpellScript
{
PrepareSpellScript(spell_blood_council_shadow_prison_SpellScript);
void AddExtraDamage() void AddExtraDamage()
{ {
@@ -1491,24 +1480,13 @@ public:
void Register() override void Register() override
{ {
OnHit += SpellHitFn(spell_blood_council_shadow_prison_SpellScript::AddExtraDamage); OnHit += SpellHitFn(spell_blood_council_shadow_prison_damage::AddExtraDamage);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_blood_council_shadow_prison_SpellScript();
} }
}; };
class spell_taldaram_glittering_sparks : public SpellScriptLoader class spell_taldaram_glittering_sparks : public SpellScript
{ {
public: PrepareSpellScript(spell_taldaram_glittering_sparks);
spell_taldaram_glittering_sparks() : SpellScriptLoader("spell_taldaram_glittering_sparks") { }
class spell_taldaram_glittering_sparks_SpellScript : public SpellScript
{
PrepareSpellScript(spell_taldaram_glittering_sparks_SpellScript);
void HandleScript(SpellEffIndex effIndex) void HandleScript(SpellEffIndex effIndex)
{ {
@@ -1518,24 +1496,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_taldaram_glittering_sparks_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_taldaram_glittering_sparks::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_taldaram_glittering_sparks_SpellScript();
} }
}; };
class spell_taldaram_summon_flame_ball : public SpellScriptLoader class spell_taldaram_summon_flame_ball : public SpellScript
{ {
public: PrepareSpellScript(spell_taldaram_summon_flame_ball);
spell_taldaram_summon_flame_ball() : SpellScriptLoader("spell_taldaram_summon_flame_ball") { }
class spell_taldaram_summon_flame_ball_SpellScript : public SpellScript
{
PrepareSpellScript(spell_taldaram_summon_flame_ball_SpellScript);
bool Load() override bool Load() override
{ {
@@ -1555,24 +1522,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_taldaram_summon_flame_ball_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_DUMMY); OnEffectHitTarget += SpellEffectFn(spell_taldaram_summon_flame_ball::HandleScript, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_taldaram_summon_flame_ball_SpellScript();
} }
}; };
class spell_taldaram_ball_of_inferno_flame : public SpellScriptLoader class spell_taldaram_ball_of_inferno_flame : public SpellScript
{ {
public: PrepareSpellScript(spell_taldaram_ball_of_inferno_flame);
spell_taldaram_ball_of_inferno_flame() : SpellScriptLoader("spell_taldaram_ball_of_inferno_flame") { }
class spell_taldaram_ball_of_inferno_flame_SpellScript : public SpellScript
{
PrepareSpellScript(spell_taldaram_ball_of_inferno_flame_SpellScript);
void ModAuraStack() void ModAuraStack()
{ {
@@ -1582,24 +1538,13 @@ public:
void Register() override void Register() override
{ {
AfterHit += SpellHitFn(spell_taldaram_ball_of_inferno_flame_SpellScript::ModAuraStack); AfterHit += SpellHitFn(spell_taldaram_ball_of_inferno_flame::ModAuraStack);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_taldaram_ball_of_inferno_flame_SpellScript();
} }
}; };
class spell_valanar_kinetic_bomb : public SpellScriptLoader class spell_valanar_kinetic_bomb : public SpellScript
{ {
public: PrepareSpellScript(spell_valanar_kinetic_bomb);
spell_valanar_kinetic_bomb() : SpellScriptLoader("spell_valanar_kinetic_bomb") { }
class spell_valanar_kinetic_bomb_SpellScript : public SpellScript
{
PrepareSpellScript(spell_valanar_kinetic_bomb_SpellScript);
void ChangeSummonPos(SpellEffIndex /*effIndex*/) void ChangeSummonPos(SpellEffIndex /*effIndex*/)
{ {
@@ -1612,13 +1557,18 @@ public:
void Register() override void Register() override
{ {
OnEffectHit += SpellEffectFn(spell_valanar_kinetic_bomb_SpellScript::ChangeSummonPos, EFFECT_0, SPELL_EFFECT_SUMMON); OnEffectHit += SpellEffectFn(spell_valanar_kinetic_bomb::ChangeSummonPos, EFFECT_0, SPELL_EFFECT_SUMMON);
} }
}; };
class spell_valanar_kinetic_bomb_AuraScript : public AuraScript class spell_valanar_kinetic_bomb_aura : public AuraScript
{
PrepareAuraScript(spell_valanar_kinetic_bomb_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_valanar_kinetic_bomb_AuraScript); return ValidateSpellInfo({ SPELL_KINETIC_BOMB_EXPLOSION, SPELL_KINETIC_BOMB_VISUAL });
}
void HandleDummyTick(AuraEffect const* /*aurEff*/) void HandleDummyTick(AuraEffect const* /*aurEff*/)
{ {
@@ -1637,29 +1587,13 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_valanar_kinetic_bomb_AuraScript::HandleDummyTick, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY); OnEffectPeriodic += AuraEffectPeriodicFn(spell_valanar_kinetic_bomb_aura::HandleDummyTick, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_valanar_kinetic_bomb_SpellScript();
}
AuraScript* GetAuraScript() const override
{
return new spell_valanar_kinetic_bomb_AuraScript();
} }
}; };
class spell_valanar_kinetic_bomb_absorb : public SpellScriptLoader class spell_valanar_kinetic_bomb_absorb_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_valanar_kinetic_bomb_absorb_aura);
spell_valanar_kinetic_bomb_absorb() : SpellScriptLoader("spell_valanar_kinetic_bomb_absorb") { }
class spell_valanar_kinetic_bomb_absorb_AuraScript : public AuraScript
{
PrepareAuraScript(spell_valanar_kinetic_bomb_absorb_AuraScript);
void OnAbsorb(AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount) void OnAbsorb(AuraEffect* aurEff, DamageInfo& dmgInfo, uint32& absorbAmount)
{ {
@@ -1670,24 +1604,13 @@ public:
void Register() override void Register() override
{ {
OnEffectAbsorb += AuraEffectAbsorbFn(spell_valanar_kinetic_bomb_absorb_AuraScript::OnAbsorb, EFFECT_0); OnEffectAbsorb += AuraEffectAbsorbFn(spell_valanar_kinetic_bomb_absorb_aura::OnAbsorb, EFFECT_0);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_valanar_kinetic_bomb_absorb_AuraScript();
} }
}; };
class spell_valanar_kinetic_bomb_knockback : public SpellScriptLoader class spell_valanar_kinetic_bomb_knockback : public SpellScript
{ {
public: PrepareSpellScript(spell_valanar_kinetic_bomb_knockback);
spell_valanar_kinetic_bomb_knockback() : SpellScriptLoader("spell_valanar_kinetic_bomb_knockback") { }
class spell_valanar_kinetic_bomb_knockback_SpellScript : public SpellScript
{
PrepareSpellScript(spell_valanar_kinetic_bomb_knockback_SpellScript);
void KnockIntoAir(SpellMissInfo missInfo) void KnockIntoAir(SpellMissInfo missInfo)
{ {
@@ -1702,24 +1625,13 @@ public:
void Register() override void Register() override
{ {
BeforeHit += BeforeSpellHitFn(spell_valanar_kinetic_bomb_knockback_SpellScript::KnockIntoAir); BeforeHit += BeforeSpellHitFn(spell_valanar_kinetic_bomb_knockback::KnockIntoAir);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_valanar_kinetic_bomb_knockback_SpellScript();
} }
}; };
class spell_valanar_kinetic_bomb_summon : public SpellScriptLoader class spell_valanar_kinetic_bomb_summon : public SpellScript
{ {
public: PrepareSpellScript(spell_valanar_kinetic_bomb_summon);
spell_valanar_kinetic_bomb_summon() : SpellScriptLoader("spell_valanar_kinetic_bomb_summon") { }
class spell_valanar_kinetic_bomb_summon_SpellScript : public SpellScript
{
PrepareSpellScript(spell_valanar_kinetic_bomb_summon_SpellScript);
void SelectDest() void SelectDest()
{ {
@@ -1734,24 +1646,13 @@ public:
void Register() override void Register() override
{ {
BeforeCast += SpellCastFn(spell_valanar_kinetic_bomb_summon_SpellScript::SelectDest); BeforeCast += SpellCastFn(spell_valanar_kinetic_bomb_summon::SelectDest);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_valanar_kinetic_bomb_summon_SpellScript();
} }
}; };
class spell_blood_council_summon_shadow_resonance : public SpellScriptLoader class spell_blood_council_summon_shadow_resonance : public SpellScript
{ {
public: PrepareSpellScript(spell_blood_council_summon_shadow_resonance);
spell_blood_council_summon_shadow_resonance() : SpellScriptLoader("spell_blood_council_summon_shadow_resonance") { }
class spell_blood_council_summon_shadow_resonance_SpellScript : public SpellScript
{
PrepareSpellScript(spell_blood_council_summon_shadow_resonance_SpellScript);
void SetDest(SpellDestination& dest) void SetDest(SpellDestination& dest)
{ {
@@ -1785,13 +1686,7 @@ public:
void Register() override void Register() override
{ {
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_blood_council_summon_shadow_resonance_SpellScript::SetDest, EFFECT_0, TARGET_DEST_CASTER_RANDOM); OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_blood_council_summon_shadow_resonance::SetDest, EFFECT_0, TARGET_DEST_CASTER_RANDOM);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_blood_council_summon_shadow_resonance_SpellScript();
} }
}; };
@@ -1804,15 +1699,15 @@ void AddSC_boss_blood_prince_council()
new npc_dark_nucleus(); new npc_dark_nucleus();
new npc_ball_of_flame(); new npc_ball_of_flame();
new npc_kinetic_bomb(); new npc_kinetic_bomb();
new spell_blood_council_shadow_prison(); RegisterSpellScript(spell_blood_council_shadow_prison_aura);
new spell_blood_council_shadow_prison_damage(); RegisterSpellScript(spell_blood_council_shadow_prison_damage);
new spell_taldaram_glittering_sparks(); RegisterSpellScript(spell_taldaram_glittering_sparks);
new spell_taldaram_summon_flame_ball(); RegisterSpellScript(spell_taldaram_summon_flame_ball);
new spell_taldaram_ball_of_inferno_flame(); RegisterSpellScript(spell_taldaram_ball_of_inferno_flame);
new spell_valanar_kinetic_bomb(); RegisterSpellAndAuraScriptPair(spell_valanar_kinetic_bomb, spell_valanar_kinetic_bomb_aura);
new spell_valanar_kinetic_bomb_absorb(); RegisterSpellScript(spell_valanar_kinetic_bomb_absorb_aura);
new spell_valanar_kinetic_bomb_knockback(); RegisterSpellScript(spell_valanar_kinetic_bomb_knockback);
new spell_valanar_kinetic_bomb_summon(); RegisterSpellScript(spell_valanar_kinetic_bomb_summon);
new spell_blood_council_summon_shadow_resonance(); RegisterSpellScript(spell_blood_council_summon_shadow_resonance);
} }
@@ -587,14 +587,9 @@ public:
// shortened version for clear code // shortened version for clear code
typedef boss_blood_queen_lana_thel::boss_blood_queen_lana_thelAI LanaThelAI; typedef boss_blood_queen_lana_thel::boss_blood_queen_lana_thelAI LanaThelAI;
class spell_blood_queen_pact_of_the_darkfallen_dmg : public SpellScriptLoader class spell_blood_queen_pact_of_the_darkfallen_dmg_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_blood_queen_pact_of_the_darkfallen_dmg_aura);
spell_blood_queen_pact_of_the_darkfallen_dmg() : SpellScriptLoader("spell_blood_queen_pact_of_the_darkfallen_dmg") { }
class spell_blood_queen_pact_of_the_darkfallen_dmg_AuraScript : public AuraScript
{
PrepareAuraScript(spell_blood_queen_pact_of_the_darkfallen_dmg_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -616,24 +611,13 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_blood_queen_pact_of_the_darkfallen_dmg_AuraScript::PeriodicTick, EFFECT_1, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_blood_queen_pact_of_the_darkfallen_dmg_aura::PeriodicTick, EFFECT_1, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_blood_queen_pact_of_the_darkfallen_dmg_AuraScript();
} }
}; };
class spell_blood_queen_pact_of_the_darkfallen : public SpellScriptLoader class spell_blood_queen_pact_of_the_darkfallen : public SpellScript
{ {
public: PrepareSpellScript(spell_blood_queen_pact_of_the_darkfallen);
spell_blood_queen_pact_of_the_darkfallen() : SpellScriptLoader("spell_blood_queen_pact_of_the_darkfallen") { }
class spell_blood_queen_pact_of_the_darkfallen_SpellScript : public SpellScript
{
PrepareSpellScript(spell_blood_queen_pact_of_the_darkfallen_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets) void FilterTargets(std::list<WorldObject*>& targets)
{ {
@@ -661,24 +645,13 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_blood_queen_pact_of_the_darkfallen_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_blood_queen_pact_of_the_darkfallen::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_blood_queen_pact_of_the_darkfallen_SpellScript();
} }
}; };
class spell_blood_queen_pact_of_the_darkfallen_dmg_target : public SpellScriptLoader class spell_blood_queen_pact_of_the_darkfallen_dmg_target : public SpellScript
{ {
public: PrepareSpellScript(spell_blood_queen_pact_of_the_darkfallen_dmg_target);
spell_blood_queen_pact_of_the_darkfallen_dmg_target() : SpellScriptLoader("spell_blood_queen_pact_of_the_darkfallen_dmg_target") { }
class spell_blood_queen_pact_of_the_darkfallen_dmg_SpellScript : public SpellScript
{
PrepareSpellScript(spell_blood_queen_pact_of_the_darkfallen_dmg_SpellScript);
void FilterTargets(std::list<WorldObject*>& unitList) void FilterTargets(std::list<WorldObject*>& unitList)
{ {
@@ -688,13 +661,7 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_blood_queen_pact_of_the_darkfallen_dmg_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_blood_queen_pact_of_the_darkfallen_dmg_target::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_blood_queen_pact_of_the_darkfallen_dmg_SpellScript();
} }
}; };
@@ -712,14 +679,9 @@ private:
LanaThelAI* _ai; LanaThelAI* _ai;
}; };
class spell_blood_queen_bloodbolt : public SpellScriptLoader class spell_blood_queen_bloodbolt : public SpellScript
{ {
public: PrepareSpellScript(spell_blood_queen_bloodbolt);
spell_blood_queen_bloodbolt() : SpellScriptLoader("spell_blood_queen_bloodbolt") { }
class spell_blood_queen_bloodbolt_SpellScript : public SpellScript
{
PrepareSpellScript(spell_blood_queen_bloodbolt_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -749,25 +711,19 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_blood_queen_bloodbolt_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_blood_queen_bloodbolt::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_blood_queen_bloodbolt_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_blood_queen_bloodbolt::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_blood_queen_bloodbolt_SpellScript();
} }
}; };
class spell_blood_queen_frenzied_bloodthirst : public SpellScriptLoader class spell_blood_queen_frenzied_bloodthirst_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_blood_queen_frenzied_bloodthirst_aura);
spell_blood_queen_frenzied_bloodthirst() : SpellScriptLoader("spell_blood_queen_frenzied_bloodthirst") { }
class spell_blood_queen_frenzied_bloodthirst_AuraScript : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_blood_queen_frenzied_bloodthirst_AuraScript); return ValidateSpellInfo({ SPELL_UNCONTROLLABLE_FRENZY });
}
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{ {
@@ -795,25 +751,14 @@ public:
void Register() override void Register() override
{ {
OnEffectApply += AuraEffectApplyFn(spell_blood_queen_frenzied_bloodthirst_AuraScript::OnApply, EFFECT_0, SPELL_AURA_OVERRIDE_SPELLS, AURA_EFFECT_HANDLE_REAL); OnEffectApply += AuraEffectApplyFn(spell_blood_queen_frenzied_bloodthirst_aura::OnApply, EFFECT_0, SPELL_AURA_OVERRIDE_SPELLS, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_blood_queen_frenzied_bloodthirst_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_OVERRIDE_SPELLS, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_blood_queen_frenzied_bloodthirst_aura::OnRemove, EFFECT_0, SPELL_AURA_OVERRIDE_SPELLS, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_blood_queen_frenzied_bloodthirst_AuraScript();
} }
}; };
class spell_blood_queen_essence_of_the_blood_queen : public SpellScriptLoader class spell_blood_queen_essence_of_the_blood_queen_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_blood_queen_essence_of_the_blood_queen_aura);
spell_blood_queen_essence_of_the_blood_queen() : SpellScriptLoader("spell_blood_queen_essence_of_the_blood_queen") { }
class spell_blood_queen_essence_of_the_blood_queen_AuraScript : public AuraScript
{
PrepareAuraScript(spell_blood_queen_essence_of_the_blood_queen_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -837,24 +782,13 @@ public:
void Register() override void Register() override
{ {
OnEffectProc += AuraEffectProcFn(spell_blood_queen_essence_of_the_blood_queen_AuraScript::OnProc, EFFECT_1, SPELL_AURA_DUMMY); OnEffectProc += AuraEffectProcFn(spell_blood_queen_essence_of_the_blood_queen_aura::OnProc, EFFECT_1, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_blood_queen_essence_of_the_blood_queen_AuraScript();
} }
}; };
class spell_blood_queen_vampiric_bite : public SpellScriptLoader class spell_blood_queen_vampiric_bite : public SpellScript
{ {
public: PrepareSpellScript(spell_blood_queen_vampiric_bite);
spell_blood_queen_vampiric_bite() : SpellScriptLoader("spell_blood_queen_vampiric_bite") { }
class spell_blood_queen_vampiric_bite_SpellScript : public SpellScript
{
PrepareSpellScript(spell_blood_queen_vampiric_bite_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -923,26 +857,15 @@ public:
void Register() override void Register() override
{ {
OnCheckCast += SpellCheckCastFn(spell_blood_queen_vampiric_bite_SpellScript::CheckTarget); OnCheckCast += SpellCheckCastFn(spell_blood_queen_vampiric_bite::CheckTarget);
BeforeHit += BeforeSpellHitFn(spell_blood_queen_vampiric_bite_SpellScript::OnCast); BeforeHit += BeforeSpellHitFn(spell_blood_queen_vampiric_bite::OnCast);
OnEffectHitTarget += SpellEffectFn(spell_blood_queen_vampiric_bite_SpellScript::HandlePresence, EFFECT_1, SPELL_EFFECT_TRIGGER_SPELL); OnEffectHitTarget += SpellEffectFn(spell_blood_queen_vampiric_bite::HandlePresence, EFFECT_1, SPELL_EFFECT_TRIGGER_SPELL);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_blood_queen_vampiric_bite_SpellScript();
} }
}; };
class spell_blood_queen_swarming_shadows_floor_dmg : public SpellScriptLoader class spell_blood_queen_swarming_shadows_floor_dmg : public SpellScript
{ {
public: PrepareSpellScript(spell_blood_queen_swarming_shadows_floor_dmg);
spell_blood_queen_swarming_shadows_floor_dmg() : SpellScriptLoader("spell_blood_queen_swarming_shadows_floor_dmg") { }
class spell_blood_queen_swarming_shadows_floor_dmg_SpellScript : public SpellScript
{
PrepareSpellScript(spell_blood_queen_swarming_shadows_floor_dmg_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets) void FilterTargets(std::list<WorldObject*>& targets)
{ {
@@ -951,24 +874,13 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_blood_queen_swarming_shadows_floor_dmg_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_blood_queen_swarming_shadows_floor_dmg::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_blood_queen_swarming_shadows_floor_dmg_SpellScript();
} }
}; };
class spell_blood_queen_presence_of_the_darkfallen : public SpellScriptLoader class spell_blood_queen_presence_of_the_darkfallen : public SpellScript
{ {
public: PrepareSpellScript(spell_blood_queen_presence_of_the_darkfallen);
spell_blood_queen_presence_of_the_darkfallen() : SpellScriptLoader("spell_blood_queen_presence_of_the_darkfallen") { }
class spell_blood_queen_presence_of_the_darkfallen_SpellScript : public SpellScript
{
PrepareSpellScript(spell_blood_queen_presence_of_the_darkfallen_SpellScript);
void HandleScript(SpellEffIndex effIndex) void HandleScript(SpellEffIndex effIndex)
{ {
@@ -982,13 +894,7 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_blood_queen_presence_of_the_darkfallen_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_FORCE_CAST); OnEffectHitTarget += SpellEffectFn(spell_blood_queen_presence_of_the_darkfallen::HandleScript, EFFECT_0, SPELL_EFFECT_FORCE_CAST);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_blood_queen_presence_of_the_darkfallen_SpellScript();
} }
}; };
@@ -1014,15 +920,15 @@ public:
void AddSC_boss_blood_queen_lana_thel() void AddSC_boss_blood_queen_lana_thel()
{ {
new boss_blood_queen_lana_thel(); new boss_blood_queen_lana_thel();
new spell_blood_queen_pact_of_the_darkfallen_dmg(); RegisterSpellScript(spell_blood_queen_pact_of_the_darkfallen_dmg_aura);
new spell_blood_queen_pact_of_the_darkfallen(); RegisterSpellScript(spell_blood_queen_pact_of_the_darkfallen);
new spell_blood_queen_pact_of_the_darkfallen_dmg_target(); RegisterSpellScript(spell_blood_queen_pact_of_the_darkfallen_dmg_target);
new spell_blood_queen_bloodbolt(); RegisterSpellScript(spell_blood_queen_bloodbolt);
new spell_blood_queen_frenzied_bloodthirst(); RegisterSpellScript(spell_blood_queen_frenzied_bloodthirst_aura);
new spell_blood_queen_essence_of_the_blood_queen(); RegisterSpellScript(spell_blood_queen_essence_of_the_blood_queen_aura);
new spell_blood_queen_vampiric_bite(); RegisterSpellScript(spell_blood_queen_vampiric_bite);
new spell_blood_queen_swarming_shadows_floor_dmg(); RegisterSpellScript(spell_blood_queen_swarming_shadows_floor_dmg);
new spell_blood_queen_presence_of_the_darkfallen(); RegisterSpellScript(spell_blood_queen_presence_of_the_darkfallen);
new achievement_once_bitten_twice_shy("achievement_once_bitten_twice_shy_n_10", 0, false); new achievement_once_bitten_twice_shy("achievement_once_bitten_twice_shy_n_10", 0, false);
new achievement_once_bitten_twice_shy("achievement_once_bitten_twice_shy_v_10", 0, true); new achievement_once_bitten_twice_shy("achievement_once_bitten_twice_shy_v_10", 0, true);
new achievement_once_bitten_twice_shy("achievement_once_bitten_twice_shy_n_25", 1, false); new achievement_once_bitten_twice_shy("achievement_once_bitten_twice_shy_n_25", 1, false);
@@ -1042,14 +1042,14 @@ public:
} }
}; };
class spell_deathbringer_blood_link_aura : public SpellScriptLoader class spell_deathbringer_blood_link_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_deathbringer_blood_link_aura);
spell_deathbringer_blood_link_aura() : SpellScriptLoader("spell_deathbringer_blood_link_aura") { }
class spell_deathbringer_blood_link_AuraScript : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_deathbringer_blood_link_AuraScript); return ValidateSpellInfo({ SPELL_BLOOD_LINK_DUMMY });
}
void HandlePeriodicTick(AuraEffect const* /*aurEff*/) void HandlePeriodicTick(AuraEffect const* /*aurEff*/)
{ {
@@ -1092,26 +1092,20 @@ public:
void Register() override void Register() override
{ {
DoCheckProc += AuraCheckProcFn(spell_deathbringer_blood_link_AuraScript::CheckProc); DoCheckProc += AuraCheckProcFn(spell_deathbringer_blood_link_aura::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_deathbringer_blood_link_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); OnEffectProc += AuraEffectProcFn(spell_deathbringer_blood_link_aura::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_deathbringer_blood_link_AuraScript::HandlePeriodicTick, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY); OnEffectPeriodic += AuraEffectPeriodicFn(spell_deathbringer_blood_link_aura::HandlePeriodicTick, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_deathbringer_blood_link_AuraScript();
} }
}; };
class spell_deathbringer_blood_link_blood_beast_aura : public SpellScriptLoader class spell_deathbringer_blood_link_blood_beast_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_deathbringer_blood_link_blood_beast_aura);
spell_deathbringer_blood_link_blood_beast_aura() : SpellScriptLoader("spell_deathbringer_blood_link_blood_beast_aura") { }
class spell_deathbringer_blood_link_blood_beast_aura_AuraScript : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_deathbringer_blood_link_blood_beast_aura_AuraScript); return ValidateSpellInfo({ SPELL_BLOOD_LINK_DUMMY });
}
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
@@ -1141,25 +1135,19 @@ public:
void Register() override void Register() override
{ {
DoCheckProc += AuraCheckProcFn(spell_deathbringer_blood_link_blood_beast_aura_AuraScript::CheckProc); DoCheckProc += AuraCheckProcFn(spell_deathbringer_blood_link_blood_beast_aura::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_deathbringer_blood_link_blood_beast_aura_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); OnEffectProc += AuraEffectProcFn(spell_deathbringer_blood_link_blood_beast_aura::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_deathbringer_blood_link_blood_beast_aura_AuraScript();
} }
}; };
class spell_deathbringer_blood_link : public SpellScriptLoader class spell_deathbringer_blood_link : public SpellScript
{ {
public: PrepareSpellScript(spell_deathbringer_blood_link);
spell_deathbringer_blood_link() : SpellScriptLoader("spell_deathbringer_blood_link") { }
class spell_deathbringer_blood_link_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_deathbringer_blood_link_SpellScript); return ValidateSpellInfo({ SPELL_BLOOD_LINK_POWER });
}
void HandleDummy(SpellEffIndex /*effIndex*/) void HandleDummy(SpellEffIndex /*effIndex*/)
{ {
@@ -1171,24 +1159,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_deathbringer_blood_link_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); OnEffectHitTarget += SpellEffectFn(spell_deathbringer_blood_link::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_deathbringer_blood_link_SpellScript();
} }
}; };
class spell_deathbringer_blood_power : public SpellScriptLoader class spell_deathbringer_blood_power : public SpellScript
{ {
public: PrepareSpellScript(spell_deathbringer_blood_power);
spell_deathbringer_blood_power() : SpellScriptLoader("spell_deathbringer_blood_power") { }
class spell_deathbringer_blood_power_SpellScript : public SpellScript
{
PrepareSpellScript(spell_deathbringer_blood_power_SpellScript);
void ModAuraValue() void ModAuraValue()
{ {
@@ -1198,13 +1175,13 @@ public:
void Register() override void Register() override
{ {
AfterHit += SpellHitFn(spell_deathbringer_blood_power_SpellScript::ModAuraValue); AfterHit += SpellHitFn(spell_deathbringer_blood_power::ModAuraValue);
} }
}; };
class spell_deathbringer_blood_power_AuraScript : public AuraScript class spell_deathbringer_blood_power_aura : public AuraScript
{ {
PrepareAuraScript(spell_deathbringer_blood_power_AuraScript); PrepareAuraScript(spell_deathbringer_blood_power_aura);
void RecalculateHook(AuraEffect const* /*aurEffect*/, int32& amount, bool& canBeRecalculated) void RecalculateHook(AuraEffect const* /*aurEffect*/, int32& amount, bool& canBeRecalculated)
{ {
@@ -1214,42 +1191,19 @@ public:
void Register() override void Register() override
{ {
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_deathbringer_blood_power_AuraScript::RecalculateHook, EFFECT_0, SPELL_AURA_MOD_SCALE); DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_deathbringer_blood_power_aura::RecalculateHook, EFFECT_0, SPELL_AURA_MOD_SCALE);
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_deathbringer_blood_power_AuraScript::RecalculateHook, EFFECT_1, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE); DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_deathbringer_blood_power_aura::RecalculateHook, EFFECT_1, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
}
bool Load() override
{
if (GetUnitOwner()->getPowerType() != POWER_ENERGY)
return false;
return true;
}
};
SpellScript* GetSpellScript() const override
{
return new spell_deathbringer_blood_power_SpellScript();
}
AuraScript* GetAuraScript() const override
{
return new spell_deathbringer_blood_power_AuraScript();
} }
}; };
class spell_deathbringer_blood_nova_targeting : public SpellScriptLoader class spell_deathbringer_blood_nova_targeting : public SpellScript
{ {
public: PrepareSpellScript(spell_deathbringer_blood_nova_targeting);
spell_deathbringer_blood_nova_targeting() : SpellScriptLoader("spell_deathbringer_blood_nova_targeting") { }
class spell_deathbringer_blood_nova_targeting_SpellScript : public SpellScript
{
PrepareSpellScript(spell_deathbringer_blood_nova_targeting_SpellScript);
bool Load() override bool Load() override
{ {
// initialize variable // initialize variable
target = nullptr; _target = nullptr;
return true; return true;
} }
@@ -1274,44 +1228,34 @@ public:
std::list<WorldObject*>::iterator itrTarget = targets.begin(); std::list<WorldObject*>::iterator itrTarget = targets.begin();
std::advance(itrTarget, urand(0, targetsAtRange - 1)); std::advance(itrTarget, urand(0, targetsAtRange - 1));
target = *itrTarget; _target = *itrTarget;
targets.clear(); targets.clear();
targets.push_back(target); targets.push_back(_target);
} }
// use the same target for first and second effect // use the same target for first and second effect
void FilterTargetsSubsequent(std::list<WorldObject*>& targets) void FilterTargetsSubsequent(std::list<WorldObject*>& targets)
{ {
if (!target) if (!_target)
return; return;
targets.clear(); targets.clear();
targets.push_back(target); targets.push_back(_target);
} }
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_deathbringer_blood_nova_targeting_SpellScript::FilterTargetsInitial, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_deathbringer_blood_nova_targeting::FilterTargetsInitial, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_deathbringer_blood_nova_targeting_SpellScript::FilterTargetsSubsequent, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_deathbringer_blood_nova_targeting::FilterTargetsSubsequent, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
} }
WorldObject* target; private:
}; WorldObject* _target;
SpellScript* GetSpellScript() const override
{
return new spell_deathbringer_blood_nova_targeting_SpellScript();
}
}; };
class spell_deathbringer_boiling_blood : public SpellScriptLoader class spell_deathbringer_boiling_blood : public SpellScript
{ {
public: PrepareSpellScript(spell_deathbringer_boiling_blood);
spell_deathbringer_boiling_blood() : SpellScriptLoader("spell_deathbringer_boiling_blood") { }
class spell_deathbringer_boiling_blood_SpellScript : public SpellScript
{
PrepareSpellScript(spell_deathbringer_boiling_blood_SpellScript);
bool Load() override bool Load() override
{ {
@@ -1336,13 +1280,7 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_deathbringer_boiling_blood_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_deathbringer_boiling_blood::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_deathbringer_boiling_blood_SpellScript();
} }
}; };
@@ -1412,12 +1350,12 @@ void AddSC_boss_deathbringer_saurfang()
new npc_high_overlord_saurfang_icc(); new npc_high_overlord_saurfang_icc();
new npc_muradin_bronzebeard_icc(); new npc_muradin_bronzebeard_icc();
new npc_saurfang_event(); new npc_saurfang_event();
new spell_deathbringer_blood_link_aura(); RegisterSpellScript(spell_deathbringer_blood_link_aura);
new spell_deathbringer_blood_link_blood_beast_aura(); RegisterSpellScript(spell_deathbringer_blood_link_blood_beast_aura);
new spell_deathbringer_blood_link(); RegisterSpellScript(spell_deathbringer_blood_link);
new spell_deathbringer_blood_power(); RegisterSpellAndAuraScriptPair(spell_deathbringer_blood_power, spell_deathbringer_blood_power_aura);
new spell_deathbringer_blood_nova_targeting(); RegisterSpellScript(spell_deathbringer_blood_nova_targeting);
new spell_deathbringer_boiling_blood(); RegisterSpellScript(spell_deathbringer_boiling_blood);
new achievement_ive_gone_and_made_a_mess(); new achievement_ive_gone_and_made_a_mess();
new npc_icc_blood_beast(); new npc_icc_blood_beast();
} }
@@ -284,14 +284,9 @@ public:
} }
}; };
class spell_festergut_pungent_blight : public SpellScriptLoader class spell_festergut_pungent_blight : public SpellScript
{ {
public: PrepareSpellScript(spell_festergut_pungent_blight);
spell_festergut_pungent_blight() : SpellScriptLoader("spell_festergut_pungent_blight") { }
class spell_festergut_pungent_blight_SpellScript : public SpellScript
{
PrepareSpellScript(spell_festergut_pungent_blight_SpellScript);
bool Load() override bool Load() override
{ {
@@ -318,24 +313,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_festergut_pungent_blight_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_festergut_pungent_blight::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_festergut_pungent_blight_SpellScript();
} }
}; };
class spell_festergut_blighted_spores : public SpellScriptLoader class spell_festergut_blighted_spores_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_festergut_blighted_spores_aura);
spell_festergut_blighted_spores() : SpellScriptLoader("spell_festergut_blighted_spores") { }
class spell_festergut_blighted_spores_AuraScript : public AuraScript
{
PrepareAuraScript(spell_festergut_blighted_spores_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -363,24 +347,13 @@ public:
void Register() override void Register() override
{ {
AfterEffectRemove += AuraEffectRemoveFn(spell_festergut_blighted_spores_AuraScript::ExtraEffect, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_festergut_blighted_spores_aura::ExtraEffect, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_festergut_blighted_spores_AuraScript();
} }
}; };
class spell_festergut_gastric_bloat : public SpellScriptLoader class spell_festergut_gastric_bloat : public SpellScript
{ {
public: PrepareSpellScript(spell_festergut_gastric_bloat);
spell_festergut_gastric_bloat() : SpellScriptLoader("spell_festergut_gastric_bloat") { }
class spell_festergut_gastric_bloat_SpellScript : public SpellScript
{
PrepareSpellScript(spell_festergut_gastric_bloat_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -399,13 +372,7 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_festergut_gastric_bloat_SpellScript::HandleScript, EFFECT_2, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_festergut_gastric_bloat::HandleScript, EFFECT_2, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_festergut_gastric_bloat_SpellScript();
} }
}; };
@@ -496,9 +463,9 @@ public:
void AddSC_boss_festergut() void AddSC_boss_festergut()
{ {
new boss_festergut(); new boss_festergut();
new spell_festergut_pungent_blight(); RegisterSpellScript(spell_festergut_pungent_blight);
new spell_festergut_blighted_spores(); RegisterSpellScript(spell_festergut_blighted_spores_aura);
new spell_festergut_gastric_bloat(); RegisterSpellScript(spell_festergut_gastric_bloat);
new achievement_flu_shot_shortage(); new achievement_flu_shot_shortage();
new npc_stinky_icc(); new npc_stinky_icc();
@@ -1974,14 +1974,9 @@ public:
} }
}; };
class spell_igb_rocket_pack : public SpellScriptLoader class spell_igb_rocket_pack_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_igb_rocket_pack_aura);
spell_igb_rocket_pack() : SpellScriptLoader("spell_igb_rocket_pack") { }
class spell_igb_rocket_pack_AuraScript : public AuraScript
{
PrepareAuraScript(spell_igb_rocket_pack_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -2007,25 +2002,14 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_igb_rocket_pack_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); OnEffectPeriodic += AuraEffectPeriodicFn(spell_igb_rocket_pack_aura::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
OnEffectRemove += AuraEffectRemoveFn(spell_igb_rocket_pack_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL); OnEffectRemove += AuraEffectRemoveFn(spell_igb_rocket_pack_aura::HandleRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_igb_rocket_pack_AuraScript();
} }
}; };
class spell_igb_rocket_pack_useable : public SpellScriptLoader class spell_igb_rocket_pack_useable_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_igb_rocket_pack_useable_aura);
spell_igb_rocket_pack_useable() : SpellScriptLoader("spell_igb_rocket_pack_useable") { }
class spell_igb_rocket_pack_useable_AuraScript : public AuraScript
{
PrepareAuraScript(spell_igb_rocket_pack_useable_AuraScript);
bool Load() override bool Load() override
{ {
@@ -2055,26 +2039,15 @@ public:
void Register() override void Register() override
{ {
DoCheckAreaTarget += AuraCheckAreaTargetFn(spell_igb_rocket_pack_useable_AuraScript::CheckAreaTarget); DoCheckAreaTarget += AuraCheckAreaTargetFn(spell_igb_rocket_pack_useable_aura::CheckAreaTarget);
AfterEffectApply += AuraEffectApplyFn(spell_igb_rocket_pack_useable_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); AfterEffectApply += AuraEffectApplyFn(spell_igb_rocket_pack_useable_aura::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_igb_rocket_pack_useable_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_igb_rocket_pack_useable_aura::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_igb_rocket_pack_useable_AuraScript();
} }
}; };
class spell_igb_teleport_to_enemy_ship : public SpellScriptLoader class spell_igb_teleport_to_enemy_ship : public SpellScript
{ {
public: PrepareSpellScript(spell_igb_teleport_to_enemy_ship);
spell_igb_teleport_to_enemy_ship() : SpellScriptLoader("spell_igb_teleport_to_enemy_ship") { }
class spell_igb_teleport_to_enemy_ship_SpellScript : public SpellScript
{
PrepareSpellScript(spell_igb_teleport_to_enemy_ship_SpellScript);
void RelocateTransportOffset(SpellEffIndex /*effIndex*/) void RelocateTransportOffset(SpellEffIndex /*effIndex*/)
{ {
@@ -2091,24 +2064,18 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_igb_teleport_to_enemy_ship_SpellScript::RelocateTransportOffset, EFFECT_0, SPELL_EFFECT_TELEPORT_UNITS); OnEffectHitTarget += SpellEffectFn(spell_igb_teleport_to_enemy_ship::RelocateTransportOffset, EFFECT_0, SPELL_EFFECT_TELEPORT_UNITS);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_igb_teleport_to_enemy_ship_SpellScript();
} }
}; };
class spell_igb_check_for_players : public SpellScriptLoader class spell_igb_check_for_players : public SpellScript
{ {
public: PrepareSpellScript(spell_igb_check_for_players);
spell_igb_check_for_players() : SpellScriptLoader("spell_igb_check_for_players") { }
class spell_igb_check_for_players_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_igb_check_for_players_SpellScript); return ValidateSpellInfo({ SPELL_GUNSHIP_FALL_TELEPORT });
}
bool Load() override bool Load() override
{ {
@@ -2135,28 +2102,18 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_igb_check_for_players_SpellScript::CountTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_igb_check_for_players::CountTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
AfterCast += SpellCastFn(spell_igb_check_for_players_SpellScript::TriggerWipe); AfterCast += SpellCastFn(spell_igb_check_for_players::TriggerWipe);
OnEffectHitTarget += SpellEffectFn(spell_igb_check_for_players_SpellScript::TeleportPlayer, EFFECT_0, SPELL_EFFECT_DUMMY); OnEffectHitTarget += SpellEffectFn(spell_igb_check_for_players::TeleportPlayer, EFFECT_0, SPELL_EFFECT_DUMMY);
} }
private:
uint32 _playerCount; uint32 _playerCount;
};
SpellScript* GetSpellScript() const override
{
return new spell_igb_check_for_players_SpellScript();
}
}; };
class spell_igb_gunship_fall_teleport : public SpellScriptLoader class spell_igb_gunship_fall_teleport : public SpellScript
{ {
public: PrepareSpellScript(spell_igb_gunship_fall_teleport);
spell_igb_gunship_fall_teleport() : SpellScriptLoader("spell_igb_gunship_fall_teleport") { }
class spell_igb_gunship_fall_teleport_SpellScript : public SpellScript
{
PrepareSpellScript(spell_igb_gunship_fall_teleport_SpellScript);
bool Load() override bool Load() override
{ {
@@ -2178,50 +2135,34 @@ public:
void Register() override void Register() override
{ {
OnObjectTargetSelect += SpellObjectTargetSelectFn(spell_igb_gunship_fall_teleport_SpellScript::SelectTransport, EFFECT_0, TARGET_DEST_NEARBY_ENTRY); OnObjectTargetSelect += SpellObjectTargetSelectFn(spell_igb_gunship_fall_teleport::SelectTransport, EFFECT_0, TARGET_DEST_NEARBY_ENTRY);
OnEffectLaunch += SpellEffectFn(spell_igb_gunship_fall_teleport_SpellScript::RelocateDest, EFFECT_0, SPELL_EFFECT_TELEPORT_UNITS); OnEffectLaunch += SpellEffectFn(spell_igb_gunship_fall_teleport::RelocateDest, EFFECT_0, SPELL_EFFECT_TELEPORT_UNITS);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_igb_gunship_fall_teleport_SpellScript();
} }
}; };
class spell_igb_explosion_main : public SpellScriptLoader class spell_igb_explosion_main_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_igb_explosion_main_aura);
spell_igb_explosion_main() : SpellScriptLoader("spell_igb_explosion_main") { }
class spell_igb_explosion_main_AuraScript : public AuraScript
{
PrepareAuraScript(spell_igb_explosion_main_AuraScript);
bool Load() override bool Load() override
{ {
tickNo = urand(0, 3); _tickNo = urand(0, 3);
return true; return true;
} }
void PeriodicTick(AuraEffect const* aurEff) void PeriodicTick(AuraEffect const* aurEff)
{ {
if ((aurEff->GetTickNumber() % 4) != tickNo) if ((aurEff->GetTickNumber() % 4) != _tickNo)
PreventDefaultAction(); PreventDefaultAction();
} }
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_igb_explosion_main_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_igb_explosion_main_aura::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
} }
uint32 tickNo; private:
}; uint32 _tickNo;
AuraScript* GetAuraScript() const override
{
return new spell_igb_explosion_main_AuraScript();
}
}; };
class IgbExplosionCheck class IgbExplosionCheck
@@ -2238,14 +2179,9 @@ private:
Unit* _source; Unit* _source;
}; };
class spell_igb_explosion : public SpellScriptLoader class spell_igb_explosion : public SpellScript
{ {
public: PrepareSpellScript(spell_igb_explosion);
spell_igb_explosion() : SpellScriptLoader("spell_igb_explosion") { }
class spell_igb_explosion_SpellScript : public SpellScript
{
PrepareSpellScript(spell_igb_explosion_SpellScript);
void SelectTarget(std::list<WorldObject*>& targets) void SelectTarget(std::list<WorldObject*>& targets)
{ {
@@ -2255,13 +2191,7 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_igb_explosion_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_DEST_AREA_ENTRY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_igb_explosion::SelectTarget, EFFECT_0, TARGET_UNIT_DEST_AREA_ENTRY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_igb_explosion_SpellScript();
} }
}; };
@@ -2279,14 +2209,9 @@ private:
InstanceScript* _inst; InstanceScript* _inst;
}; };
class spell_igb_teleport_players_on_victory : public SpellScriptLoader class spell_igb_teleport_players_on_victory : public SpellScript
{ {
public: PrepareSpellScript(spell_igb_teleport_players_on_victory);
spell_igb_teleport_players_on_victory() : SpellScriptLoader("spell_igb_teleport_players_on_victory") { }
class spell_igb_teleport_players_on_victory_SpellScript : public SpellScript
{
PrepareSpellScript(spell_igb_teleport_players_on_victory_SpellScript);
bool Load() override bool Load() override
{ {
@@ -2301,24 +2226,13 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_igb_teleport_players_on_victory_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENTRY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_igb_teleport_players_on_victory::FilterTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENTRY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_igb_teleport_players_on_victory_SpellScript();
} }
}; };
class spell_igb_periodic_trigger_with_power_cost : public SpellScriptLoader class spell_igb_periodic_trigger_with_power_cost_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_igb_periodic_trigger_with_power_cost_aura);
spell_igb_periodic_trigger_with_power_cost() : SpellScriptLoader("spell_igb_periodic_trigger_with_power_cost") { }
class spell_igb_periodic_trigger_with_power_cost_AuraScript : public AuraScript
{
PrepareAuraScript(spell_igb_periodic_trigger_with_power_cost_AuraScript);
void HandlePeriodicTick(AuraEffect const* /*aurEff*/) void HandlePeriodicTick(AuraEffect const* /*aurEff*/)
{ {
@@ -2328,24 +2242,13 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_igb_periodic_trigger_with_power_cost_AuraScript::HandlePeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_igb_periodic_trigger_with_power_cost_aura::HandlePeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_igb_periodic_trigger_with_power_cost_AuraScript();
} }
}; };
class spell_igb_overheat : public SpellScriptLoader class spell_igb_overheat_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_igb_overheat_aura);
spell_igb_overheat() : SpellScriptLoader("spell_igb_overheat") { }
class spell_igb_overheat_AuraScript : public AuraScript
{
PrepareAuraScript(spell_igb_overheat_AuraScript);
bool Load() override bool Load() override
{ {
@@ -2383,25 +2286,19 @@ public:
void Register() override void Register() override
{ {
AfterEffectApply += AuraEffectApplyFn(spell_igb_overheat_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); AfterEffectApply += AuraEffectApplyFn(spell_igb_overheat_aura::HandleApply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_igb_overheat_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_igb_overheat_aura::HandleRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_igb_overheat_AuraScript();
} }
}; };
class spell_igb_cannon_blast : public SpellScriptLoader class spell_igb_cannon_blast : public SpellScript
{ {
public: PrepareSpellScript(spell_igb_cannon_blast);
spell_igb_cannon_blast() : SpellScriptLoader("spell_igb_cannon_blast") { }
class spell_igb_cannon_blast_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_igb_cannon_blast_SpellScript); return ValidateSpellInfo({ SPELL_OVERHEAT });
}
bool Load() override bool Load() override
{ {
@@ -2444,26 +2341,15 @@ public:
void Register() override void Register() override
{ {
OnCast += SpellCastFn(spell_igb_cannon_blast_SpellScript::CalculatePower); OnCast += SpellCastFn(spell_igb_cannon_blast::CalculatePower);
OnEffectHitTarget += SpellEffectFn(spell_igb_cannon_blast_SpellScript::PreventPowerGainOnHit, EFFECT_1, SPELL_EFFECT_ENERGIZE); OnEffectHitTarget += SpellEffectFn(spell_igb_cannon_blast::PreventPowerGainOnHit, EFFECT_1, SPELL_EFFECT_ENERGIZE);
} }
};
SpellScript* GetSpellScript() const override
{
return new spell_igb_cannon_blast_SpellScript();
}
}; };
class spell_igb_incinerating_blast : public SpellScriptLoader class spell_igb_incinerating_blast : public SpellScript
{ {
public: PrepareSpellScript(spell_igb_incinerating_blast);
spell_igb_incinerating_blast() : SpellScriptLoader("spell_igb_incinerating_blast") { }
class spell_igb_incinerating_blast_SpellScript : public SpellScript
{
PrepareSpellScript(spell_igb_incinerating_blast_SpellScript);
void StoreEnergy() void StoreEnergy()
{ {
@@ -2495,18 +2381,13 @@ public:
void Register() override void Register() override
{ {
OnCast += SpellCastFn(spell_igb_incinerating_blast_SpellScript::StoreEnergy); OnCast += SpellCastFn(spell_igb_incinerating_blast::StoreEnergy);
AfterCast += SpellCastFn(spell_igb_incinerating_blast_SpellScript::RemoveEnergy); AfterCast += SpellCastFn(spell_igb_incinerating_blast::RemoveEnergy);
OnEffectHit += SpellEffectFn(spell_igb_incinerating_blast_SpellScript::CalculateDamage, EFFECT_0, SPELL_EFFECT_TRIGGER_MISSILE); OnEffectHit += SpellEffectFn(spell_igb_incinerating_blast::CalculateDamage, EFFECT_0, SPELL_EFFECT_TRIGGER_MISSILE);
} }
private:
uint32 _energyLeft; uint32 _energyLeft;
};
SpellScript* GetSpellScript() const override
{
return new spell_igb_incinerating_blast_SpellScript();
}
}; };
class BurningPitchFilterCheck class BurningPitchFilterCheck
@@ -2525,14 +2406,9 @@ private:
uint32 _entry; uint32 _entry;
}; };
class spell_igb_burning_pitch_selector : public SpellScriptLoader class spell_igb_burning_pitch_selector : public SpellScript
{ {
public: PrepareSpellScript(spell_igb_burning_pitch_selector);
spell_igb_burning_pitch_selector() : SpellScriptLoader("spell_igb_burning_pitch_selector") { }
class spell_igb_burning_pitch_selector_SpellScript : public SpellScript
{
PrepareSpellScript(spell_igb_burning_pitch_selector_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets) void FilterTargets(std::list<WorldObject*>& targets)
{ {
@@ -2557,25 +2433,19 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_igb_burning_pitch_selector_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_igb_burning_pitch_selector::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
OnEffectHitTarget += SpellEffectFn(spell_igb_burning_pitch_selector_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); OnEffectHitTarget += SpellEffectFn(spell_igb_burning_pitch_selector::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_igb_burning_pitch_selector_SpellScript();
} }
}; };
class spell_igb_burning_pitch : public SpellScriptLoader class spell_igb_burning_pitch : public SpellScript
{ {
public: PrepareSpellScript(spell_igb_burning_pitch);
spell_igb_burning_pitch() : SpellScriptLoader("spell_igb_burning_pitch") { }
class spell_igb_burning_pitch_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_igb_burning_pitch_SpellScript); return ValidateSpellInfo({ 8000, SPELL_BURNING_PITCH });
}
void HandleDummy(SpellEffIndex effIndex) void HandleDummy(SpellEffIndex effIndex)
{ {
@@ -2586,13 +2456,7 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_igb_burning_pitch_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); OnEffectHitTarget += SpellEffectFn(spell_igb_burning_pitch::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_igb_burning_pitch_SpellScript();
} }
}; };
@@ -2611,14 +2475,9 @@ private:
uint32 _entry; uint32 _entry;
}; };
class spell_igb_rocket_artillery : public SpellScriptLoader class spell_igb_rocket_artillery : public SpellScript
{ {
public: PrepareSpellScript(spell_igb_rocket_artillery);
spell_igb_rocket_artillery() : SpellScriptLoader("spell_igb_rocket_artillery") { }
class spell_igb_rocket_artillery_SpellScript : public SpellScript
{
PrepareSpellScript(spell_igb_rocket_artillery_SpellScript);
void SelectRandomTarget(std::list<WorldObject*>& targets) void SelectRandomTarget(std::list<WorldObject*>& targets)
{ {
@@ -2645,25 +2504,19 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_igb_rocket_artillery_SpellScript::SelectRandomTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_igb_rocket_artillery::SelectRandomTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_igb_rocket_artillery_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_igb_rocket_artillery::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_igb_rocket_artillery_SpellScript();
} }
}; };
class spell_igb_rocket_artillery_explosion : public SpellScriptLoader class spell_igb_rocket_artillery_explosion : public SpellScript
{ {
public: PrepareSpellScript(spell_igb_rocket_artillery_explosion);
spell_igb_rocket_artillery_explosion() : SpellScriptLoader("spell_igb_rocket_artillery_explosion") { }
class spell_igb_rocket_artillery_explosion_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_igb_rocket_artillery_explosion_SpellScript); return ValidateSpellInfo({ SPELL_BURNING_PITCH_DAMAGE_A, SPELL_BURNING_PITCH_DAMAGE_H, 5000 });
}
void DamageGunship(SpellEffIndex /*effIndex*/) void DamageGunship(SpellEffIndex /*effIndex*/)
{ {
@@ -2673,24 +2526,18 @@ public:
void Register() override void Register() override
{ {
OnEffectHit += SpellEffectFn(spell_igb_rocket_artillery_explosion_SpellScript::DamageGunship, EFFECT_0, SPELL_EFFECT_TRIGGER_MISSILE); OnEffectHit += SpellEffectFn(spell_igb_rocket_artillery_explosion::DamageGunship, EFFECT_0, SPELL_EFFECT_TRIGGER_MISSILE);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_igb_rocket_artillery_explosion_SpellScript();
} }
}; };
class spell_igb_below_zero : public SpellScriptLoader class spell_igb_below_zero : public SpellScript
{ {
public: PrepareSpellScript(spell_igb_below_zero);
spell_igb_below_zero() : SpellScriptLoader("spell_igb_below_zero") { }
class spell_igb_below_zero_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_igb_below_zero_SpellScript); return ValidateSpellInfo({ SPELL_EJECT_ALL_PASSENGERS });
}
void RemovePassengers(SpellMissInfo missInfo) void RemovePassengers(SpellMissInfo missInfo)
{ {
@@ -2705,24 +2552,13 @@ public:
void Register() override void Register() override
{ {
BeforeHit += BeforeSpellHitFn(spell_igb_below_zero_SpellScript::RemovePassengers); BeforeHit += BeforeSpellHitFn(spell_igb_below_zero::RemovePassengers);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_igb_below_zero_SpellScript();
} }
}; };
class spell_igb_on_gunship_deck : public SpellScriptLoader class spell_igb_on_gunship_deck_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_igb_on_gunship_deck_aura);
spell_igb_on_gunship_deck() : SpellScriptLoader("spell_igb_on_gunship_deck") { }
class spell_igb_on_gunship_deck_AuraScript : public AuraScript
{
PrepareAuraScript(spell_igb_on_gunship_deck_AuraScript);
bool Load() override bool Load() override
{ {
@@ -2747,17 +2583,12 @@ public:
void Register() override void Register() override
{ {
DoCheckAreaTarget += AuraCheckAreaTargetFn(spell_igb_on_gunship_deck_AuraScript::CheckAreaTarget); DoCheckAreaTarget += AuraCheckAreaTargetFn(spell_igb_on_gunship_deck_aura::CheckAreaTarget);
AfterEffectApply += AuraEffectApplyFn(spell_igb_on_gunship_deck_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); AfterEffectApply += AuraEffectApplyFn(spell_igb_on_gunship_deck_aura::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
} }
private:
TeamId _teamIdInInstance; TeamId _teamIdInInstance;
};
AuraScript* GetAuraScript() const override
{
return new spell_igb_on_gunship_deck_AuraScript();
}
}; };
class achievement_im_on_a_boat : public AchievementCriteriaScript class achievement_im_on_a_boat : public AchievementCriteriaScript
@@ -2799,24 +2630,24 @@ void AddSC_boss_icecrown_gunship_battle()
new npc_gunship_mage(); new npc_gunship_mage();
new npc_gunship_gunner(); new npc_gunship_gunner();
new npc_gunship_rocketeer(); new npc_gunship_rocketeer();
new spell_igb_rocket_pack(); RegisterSpellScript(spell_igb_rocket_pack_aura);
new spell_igb_rocket_pack_useable(); RegisterSpellScript(spell_igb_rocket_pack_useable_aura);
new spell_igb_teleport_to_enemy_ship(); RegisterSpellScript(spell_igb_teleport_to_enemy_ship);
new spell_igb_check_for_players(); RegisterSpellScript(spell_igb_check_for_players);
new spell_igb_gunship_fall_teleport(); RegisterSpellScript(spell_igb_gunship_fall_teleport);
new spell_igb_explosion_main(); RegisterSpellScript(spell_igb_explosion_main_aura);
new spell_igb_explosion(); RegisterSpellScript(spell_igb_explosion);
new spell_igb_teleport_players_on_victory(); RegisterSpellScript(spell_igb_teleport_players_on_victory);
new spell_igb_periodic_trigger_with_power_cost(); RegisterSpellScript(spell_igb_periodic_trigger_with_power_cost_aura);
new spell_igb_overheat(); RegisterSpellScript(spell_igb_overheat_aura);
new spell_igb_cannon_blast(); RegisterSpellScript(spell_igb_cannon_blast);
new spell_igb_incinerating_blast(); RegisterSpellScript(spell_igb_incinerating_blast);
new spell_igb_burning_pitch_selector(); RegisterSpellScript(spell_igb_burning_pitch_selector);
new spell_igb_burning_pitch(); RegisterSpellScript(spell_igb_burning_pitch);
new spell_igb_rocket_artillery(); RegisterSpellScript(spell_igb_rocket_artillery);
new spell_igb_rocket_artillery_explosion(); RegisterSpellScript(spell_igb_rocket_artillery_explosion);
new spell_igb_below_zero(); RegisterSpellScript(spell_igb_below_zero);
new spell_igb_on_gunship_deck(); RegisterSpellScript(spell_igb_on_gunship_deck_aura);
new achievement_im_on_a_boat(); new achievement_im_on_a_boat();
RegisterSpellScript(spell_igb_battle_experience_check); RegisterSpellScript(spell_igb_battle_experience_check);
} }
@@ -1113,14 +1113,9 @@ public:
} }
}; };
class spell_deathwhisper_mana_barrier : public SpellScriptLoader class spell_deathwhisper_mana_barrier_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_deathwhisper_mana_barrier_aura);
spell_deathwhisper_mana_barrier() : SpellScriptLoader("spell_deathwhisper_mana_barrier") { }
class spell_deathwhisper_mana_barrier_AuraScript : public AuraScript
{
PrepareAuraScript(spell_deathwhisper_mana_barrier_AuraScript);
void HandlePeriodicTick(AuraEffect const* /*aurEff*/) void HandlePeriodicTick(AuraEffect const* /*aurEff*/)
{ {
@@ -1135,13 +1130,7 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_deathwhisper_mana_barrier_AuraScript::HandlePeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_deathwhisper_mana_barrier_aura::HandlePeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_deathwhisper_mana_barrier_AuraScript();
} }
}; };
@@ -1197,7 +1186,7 @@ void AddSC_boss_lady_deathwhisper()
new npc_darnavan(); new npc_darnavan();
// Spells // Spells
new spell_deathwhisper_mana_barrier(); RegisterSpellScript(spell_deathwhisper_mana_barrier_aura);
RegisterSpellScript(spell_deathwhisper_dark_reckoning); RegisterSpellScript(spell_deathwhisper_dark_reckoning);
// AreaTriggers // AreaTriggers
@@ -475,14 +475,9 @@ public:
} }
}; };
class spell_marrowgar_coldflame : public SpellScriptLoader class spell_marrowgar_coldflame : public SpellScript
{ {
public: PrepareSpellScript(spell_marrowgar_coldflame);
spell_marrowgar_coldflame() : SpellScriptLoader("spell_marrowgar_coldflame") { }
class spell_marrowgar_coldflame_SpellScript : public SpellScript
{
PrepareSpellScript(spell_marrowgar_coldflame_SpellScript);
void SelectTarget(std::list<WorldObject*>& targets) void SelectTarget(std::list<WorldObject*>& targets)
{ {
@@ -520,25 +515,19 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_marrowgar_coldflame_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_marrowgar_coldflame::SelectTarget, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_marrowgar_coldflame_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_marrowgar_coldflame::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_marrowgar_coldflame_SpellScript();
} }
}; };
class spell_marrowgar_bone_spike_graveyard : public SpellScriptLoader class spell_marrowgar_bone_spike_graveyard : public SpellScript
{ {
public: PrepareSpellScript(spell_marrowgar_bone_spike_graveyard);
spell_marrowgar_bone_spike_graveyard() : SpellScriptLoader("spell_marrowgar_bone_spike_graveyard") { }
class spell_marrowgar_bone_spike_graveyard_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_marrowgar_bone_spike_graveyard_SpellScript); return ValidateSpellInfo({ SPELL_IMPALED });
}
void HandleSpikes(SpellEffIndex effIndex) void HandleSpikes(SpellEffIndex effIndex)
{ {
@@ -578,24 +567,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_marrowgar_bone_spike_graveyard_SpellScript::HandleSpikes, EFFECT_1, SPELL_EFFECT_APPLY_AURA); OnEffectHitTarget += SpellEffectFn(spell_marrowgar_bone_spike_graveyard::HandleSpikes, EFFECT_1, SPELL_EFFECT_APPLY_AURA);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_marrowgar_bone_spike_graveyard_SpellScript();
} }
}; };
class spell_marrowgar_coldflame_bonestorm : public SpellScriptLoader class spell_marrowgar_coldflame_bonestorm : public SpellScript
{ {
public: PrepareSpellScript(spell_marrowgar_coldflame_bonestorm);
spell_marrowgar_coldflame_bonestorm() : SpellScriptLoader("spell_marrowgar_coldflame_bonestorm") { }
class spell_marrowgar_coldflame_SpellScript : public SpellScript
{
PrepareSpellScript(spell_marrowgar_coldflame_SpellScript);
void HandleScriptEffect(SpellEffIndex effIndex) void HandleScriptEffect(SpellEffIndex effIndex)
{ {
@@ -618,24 +596,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_marrowgar_coldflame_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_marrowgar_coldflame_bonestorm::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_marrowgar_coldflame_SpellScript();
} }
}; };
class spell_marrowgar_bone_storm : public SpellScriptLoader class spell_marrowgar_bone_storm : public SpellScript
{ {
public: PrepareSpellScript(spell_marrowgar_bone_storm);
spell_marrowgar_bone_storm() : SpellScriptLoader("spell_marrowgar_bone_storm") { }
class spell_marrowgar_bone_storm_SpellScript : public SpellScript
{
PrepareSpellScript(spell_marrowgar_bone_storm_SpellScript);
void RecalculateDamage() void RecalculateDamage()
{ {
@@ -647,24 +614,13 @@ public:
void Register() override void Register() override
{ {
OnHit += SpellHitFn(spell_marrowgar_bone_storm_SpellScript::RecalculateDamage); OnHit += SpellHitFn(spell_marrowgar_bone_storm::RecalculateDamage);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_marrowgar_bone_storm_SpellScript();
} }
}; };
class spell_marrowgar_bone_slice : public SpellScriptLoader class spell_marrowgar_bone_slice : public SpellScript
{ {
public: PrepareSpellScript(spell_marrowgar_bone_slice);
spell_marrowgar_bone_slice() : SpellScriptLoader("spell_marrowgar_bone_slice") { }
class spell_marrowgar_bone_slice_SpellScript : public SpellScript
{
PrepareSpellScript(spell_marrowgar_bone_slice_SpellScript);
bool Load() override bool Load() override
{ {
@@ -687,17 +643,12 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_marrowgar_bone_slice_SpellScript::CountTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_marrowgar_bone_slice::CountTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
OnHit += SpellHitFn(spell_marrowgar_bone_slice_SpellScript::SplitDamage); OnHit += SpellHitFn(spell_marrowgar_bone_slice::SplitDamage);
} }
private:
uint32 _targetCount; uint32 _targetCount;
};
SpellScript* GetSpellScript() const override
{
return new spell_marrowgar_bone_slice_SpellScript();
}
}; };
void AddSC_boss_lord_marrowgar() void AddSC_boss_lord_marrowgar()
@@ -705,10 +656,10 @@ void AddSC_boss_lord_marrowgar()
RegisterIcecrownCitadelCreatureAI(boss_lord_marrowgar); RegisterIcecrownCitadelCreatureAI(boss_lord_marrowgar);
new npc_coldflame(); new npc_coldflame();
new npc_bone_spike(); new npc_bone_spike();
new spell_marrowgar_coldflame(); RegisterSpellScript(spell_marrowgar_coldflame);
new spell_marrowgar_coldflame_bonestorm(); RegisterSpellScript(spell_marrowgar_coldflame_bonestorm);
new spell_marrowgar_bone_spike_graveyard(); RegisterSpellScript(spell_marrowgar_bone_spike_graveyard);
new spell_marrowgar_bone_storm(); RegisterSpellScript(spell_marrowgar_bone_storm);
new spell_marrowgar_bone_slice(); RegisterSpellScript(spell_marrowgar_bone_slice);
} }
@@ -873,14 +873,9 @@ public:
} }
}; };
class spell_putricide_slime_puddle : public SpellScriptLoader class spell_putricide_slime_puddle : public SpellScript
{ {
public: PrepareSpellScript(spell_putricide_slime_puddle);
spell_putricide_slime_puddle() : SpellScriptLoader("spell_putricide_slime_puddle") { }
class spell_putricide_slime_puddle_SpellScript : public SpellScript
{
PrepareSpellScript(spell_putricide_slime_puddle_SpellScript);
void ScaleRange(std::list<WorldObject*>& targets) void ScaleRange(std::list<WorldObject*>& targets)
{ {
@@ -902,26 +897,15 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_slime_puddle_SpellScript::ScaleRange, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_slime_puddle::ScaleRange, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_slime_puddle_SpellScript::ScaleRange, EFFECT_1, TARGET_UNIT_DEST_AREA_ENTRY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_slime_puddle::ScaleRange, EFFECT_1, TARGET_UNIT_DEST_AREA_ENTRY);
OnEffectHitTarget += SpellEffectFn(spell_putricide_slime_puddle_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_APPLY_AURA); OnEffectHitTarget += SpellEffectFn(spell_putricide_slime_puddle::HandleScript, EFFECT_1, SPELL_EFFECT_APPLY_AURA);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_putricide_slime_puddle_SpellScript();
} }
}; };
class spell_putricide_slime_puddle_spawn : public SpellScriptLoader class spell_putricide_slime_puddle_spawn : public SpellScript
{ {
public: PrepareSpellScript(spell_putricide_slime_puddle_spawn);
spell_putricide_slime_puddle_spawn() : SpellScriptLoader("spell_putricide_slime_puddle_spawn") { }
class spell_putricide_slime_puddle_spawn_SpellScript : public SpellScript
{
PrepareSpellScript(spell_putricide_slime_puddle_spawn_SpellScript);
void SelectDest() void SelectDest()
{ {
@@ -935,24 +919,18 @@ public:
void Register() override void Register() override
{ {
BeforeCast += SpellCastFn(spell_putricide_slime_puddle_spawn_SpellScript::SelectDest); BeforeCast += SpellCastFn(spell_putricide_slime_puddle_spawn::SelectDest);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_putricide_slime_puddle_spawn_SpellScript();
} }
}; };
class spell_putricide_grow_stacker : public SpellScriptLoader class spell_putricide_grow_stacker_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_putricide_grow_stacker_aura);
spell_putricide_grow_stacker() : SpellScriptLoader("spell_putricide_grow_stacker") { }
class spell_putricide_grow_stacker_AuraScript : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_putricide_grow_stacker_AuraScript); return ValidateSpellInfo({ SPELL_TEAR_GAS_CREATURE });
}
void HandleTriggerSpell(AuraEffect const* /*aurEff*/) void HandleTriggerSpell(AuraEffect const* /*aurEff*/)
{ {
@@ -963,24 +941,13 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_putricide_grow_stacker_AuraScript::HandleTriggerSpell, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_putricide_grow_stacker_aura::HandleTriggerSpell, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_putricide_grow_stacker_AuraScript();
} }
}; };
class spell_putricide_unstable_experiment : public SpellScriptLoader class spell_putricide_unstable_experiment : public SpellScript
{ {
public: PrepareSpellScript(spell_putricide_unstable_experiment);
spell_putricide_unstable_experiment() : SpellScriptLoader("spell_putricide_unstable_experiment") { }
class spell_putricide_unstable_experiment_SpellScript : public SpellScript
{
PrepareSpellScript(spell_putricide_unstable_experiment_SpellScript);
void HandleScript(SpellEffIndex effIndex) void HandleScript(SpellEffIndex effIndex)
{ {
@@ -1015,24 +982,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_putricide_unstable_experiment_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_putricide_unstable_experiment::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_putricide_unstable_experiment_SpellScript();
} }
}; };
class spell_putricide_tear_gas_effect : public SpellScriptLoader class spell_putricide_tear_gas_effect : public SpellScript
{ {
public: PrepareSpellScript(spell_putricide_tear_gas_effect);
spell_putricide_tear_gas_effect() : SpellScriptLoader("spell_putricide_tear_gas_effect") { }
class spell_putricide_tear_gas_effect_SpellScript : public SpellScript
{
PrepareSpellScript(spell_putricide_tear_gas_effect_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets) void FilterTargets(std::list<WorldObject*>& targets)
{ {
@@ -1045,25 +1001,19 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_tear_gas_effect_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_tear_gas_effect::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_tear_gas_effect_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_tear_gas_effect::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_putricide_tear_gas_effect_SpellScript();
} }
}; };
class spell_putricide_gaseous_bloat : public SpellScriptLoader class spell_putricide_gaseous_bloat_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_putricide_gaseous_bloat_aura);
spell_putricide_gaseous_bloat() : SpellScriptLoader("spell_putricide_gaseous_bloat") { }
class spell_putricide_gaseous_bloat_AuraScript : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_putricide_gaseous_bloat_AuraScript); return ValidateSpellInfo({ SPELL_GASEOUS_BLOAT });
}
void HandleExtraEffect(AuraEffect const* /*aurEff*/) void HandleExtraEffect(AuraEffect const* /*aurEff*/)
{ {
@@ -1076,24 +1026,13 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_putricide_gaseous_bloat_AuraScript::HandleExtraEffect, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE); OnEffectPeriodic += AuraEffectPeriodicFn(spell_putricide_gaseous_bloat_aura::HandleExtraEffect, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_putricide_gaseous_bloat_AuraScript();
} }
}; };
class spell_putricide_ooze_channel : public SpellScriptLoader class spell_putricide_ooze_channel : public SpellScript
{ {
public: PrepareSpellScript(spell_putricide_ooze_channel);
spell_putricide_ooze_channel() : SpellScriptLoader("spell_putricide_ooze_channel") { }
class spell_putricide_ooze_channel_SpellScript : public SpellScript
{
PrepareSpellScript(spell_putricide_ooze_channel_SpellScript);
bool Validate(SpellInfo const* spell) override bool Validate(SpellInfo const* spell) override
{ {
@@ -1147,29 +1086,24 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_ooze_channel_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_ooze_channel::SelectTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_ooze_channel_SpellScript::SetTarget, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_ooze_channel::SetTarget, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_ooze_channel_SpellScript::SetTarget, EFFECT_2, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_ooze_channel::SetTarget, EFFECT_2, TARGET_UNIT_SRC_AREA_ENEMY);
AfterHit += SpellHitFn(spell_putricide_ooze_channel_SpellScript::StartAttack); AfterHit += SpellHitFn(spell_putricide_ooze_channel::StartAttack);
} }
private:
WorldObject* _target; WorldObject* _target;
};
SpellScript* GetSpellScript() const override
{
return new spell_putricide_ooze_channel_SpellScript();
}
}; };
class spell_putricide_ooze_eruption_searcher : public SpellScriptLoader class spell_putricide_ooze_eruption_searcher : public SpellScript
{ {
public: PrepareSpellScript(spell_putricide_ooze_eruption_searcher);
spell_putricide_ooze_eruption_searcher() : SpellScriptLoader("spell_putricide_ooze_eruption_searcher") { }
class spell_putricide_ooze_eruption_searcher_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_putricide_ooze_eruption_searcher_SpellScript); return ValidateSpellInfo({ SPELL_OOZE_ERUPTION });
}
void HandleDummy(SpellEffIndex /*effIndex*/) void HandleDummy(SpellEffIndex /*effIndex*/)
{ {
@@ -1183,24 +1117,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_putricide_ooze_eruption_searcher_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); OnEffectHitTarget += SpellEffectFn(spell_putricide_ooze_eruption_searcher::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_putricide_ooze_eruption_searcher_SpellScript();
} }
}; };
class spell_putricide_mutated_plague : public SpellScriptLoader class spell_putricide_mutated_plague_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_putricide_mutated_plague_aura);
spell_putricide_mutated_plague() : SpellScriptLoader("spell_putricide_mutated_plague") { }
class spell_putricide_mutated_plague_AuraScript : public AuraScript
{
PrepareAuraScript(spell_putricide_mutated_plague_AuraScript);
void HandleTriggerSpell(AuraEffect const* aurEff) void HandleTriggerSpell(AuraEffect const* aurEff)
{ {
@@ -1233,25 +1156,14 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_putricide_mutated_plague_AuraScript::HandleTriggerSpell, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_putricide_mutated_plague_aura::HandleTriggerSpell, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
AfterEffectRemove += AuraEffectRemoveFn(spell_putricide_mutated_plague_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_putricide_mutated_plague_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_putricide_mutated_plague_AuraScript();
} }
}; };
class spell_putricide_unbound_plague : public SpellScriptLoader class spell_putricide_unbound_plague : public SpellScript
{ {
public: PrepareSpellScript(spell_putricide_unbound_plague);
spell_putricide_unbound_plague() : SpellScriptLoader("spell_putricide_unbound_plague") { }
class spell_putricide_unbound_plague_SpellScript : public SpellScript
{
PrepareSpellScript(spell_putricide_unbound_plague_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -1307,25 +1219,14 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_unbound_plague_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_unbound_plague::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY);
OnEffectHitTarget += SpellEffectFn(spell_putricide_unbound_plague_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_putricide_unbound_plague::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_putricide_unbound_plague_SpellScript();
} }
}; };
class spell_putricide_unbound_plague_dmg : public SpellScriptLoader class spell_putricide_unbound_plague_dmg_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_putricide_unbound_plague_dmg_aura);
spell_putricide_unbound_plague_dmg() : SpellScriptLoader("spell_putricide_unbound_plague_dmg") { }
class spell_putricide_unbound_plague_dmg_AuraScript : public AuraScript
{
PrepareAuraScript(spell_putricide_unbound_plague_dmg_AuraScript);
void HandlePeriodic(AuraEffect* aurEff) void HandlePeriodic(AuraEffect* aurEff)
{ {
@@ -1338,24 +1239,13 @@ public:
void Register() override void Register() override
{ {
OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_putricide_unbound_plague_dmg_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE); OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_putricide_unbound_plague_dmg_aura::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_putricide_unbound_plague_dmg_AuraScript();
} }
}; };
class spell_putricide_choking_gas_bomb : public SpellScriptLoader class spell_putricide_choking_gas_bomb : public SpellScript
{ {
public: PrepareSpellScript(spell_putricide_choking_gas_bomb);
spell_putricide_choking_gas_bomb() : SpellScriptLoader("spell_putricide_choking_gas_bomb") { }
class spell_putricide_choking_gas_bomb_SpellScript : public SpellScript
{
PrepareSpellScript(spell_putricide_choking_gas_bomb_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/) void HandleScript(SpellEffIndex /*effIndex*/)
{ {
@@ -1372,25 +1262,14 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_putricide_choking_gas_bomb_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_putricide_choking_gas_bomb::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_putricide_choking_gas_bomb_SpellScript();
} }
}; };
// Removes aura with id stored in effect value // Removes aura with id stored in effect value
class spell_putricide_clear_aura_effect_value : public SpellScriptLoader class spell_putricide_clear_aura_effect_value : public SpellScript
{ {
public: PrepareSpellScript(spell_putricide_clear_aura_effect_value);
spell_putricide_clear_aura_effect_value() : SpellScriptLoader("spell_putricide_clear_aura_effect_value") { }
class spell_putricide_clear_aura_effect_value_SpellScript : public SpellScript
{
PrepareSpellScript(spell_putricide_clear_aura_effect_value_SpellScript);
void HandleScript(SpellEffIndex effIndex) void HandleScript(SpellEffIndex effIndex)
{ {
@@ -1401,24 +1280,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_putricide_clear_aura_effect_value_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_putricide_clear_aura_effect_value::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_putricide_clear_aura_effect_value_SpellScript();
} }
}; };
class spell_putricide_mutation_init : public SpellScriptLoader class spell_putricide_mutation_init : public SpellScript
{ {
public: PrepareSpellScript(spell_putricide_mutation_init);
spell_putricide_mutation_init() : SpellScriptLoader("spell_putricide_mutation_init") { }
class spell_putricide_mutation_init_SpellScript : public SpellScript
{
PrepareSpellScript(spell_putricide_mutation_init_SpellScript);
SpellCastResult CheckRequirementInternal(SpellCustomErrors& extendedError) SpellCastResult CheckRequirementInternal(SpellCustomErrors& extendedError)
{ {
@@ -1466,13 +1334,13 @@ public:
void Register() override void Register() override
{ {
OnCheckCast += SpellCheckCastFn(spell_putricide_mutation_init_SpellScript::CheckRequirement); OnCheckCast += SpellCheckCastFn(spell_putricide_mutation_init::CheckRequirement);
} }
}; };
class spell_putricide_mutation_init_AuraScript : public AuraScript class spell_putricide_mutation_init_aura : public AuraScript
{ {
PrepareAuraScript(spell_putricide_mutation_init_AuraScript); PrepareAuraScript(spell_putricide_mutation_init_aura);
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{ {
@@ -1485,29 +1353,23 @@ public:
void Register() override void Register() override
{ {
AfterEffectRemove += AuraEffectRemoveFn(spell_putricide_mutation_init_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_putricide_mutation_init_aura::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_putricide_mutation_init_SpellScript();
}
AuraScript* GetAuraScript() const override
{
return new spell_putricide_mutation_init_AuraScript();
} }
}; };
class spell_putricide_mutated_transformation : public SpellScriptLoader class spell_putricide_mutated_transformation : public SpellScript
{ {
public: PrepareSpellScript(spell_putricide_mutated_transformation);
spell_putricide_mutated_transformation() : SpellScriptLoader("spell_putricide_mutated_transformation") { }
class spell_putricide_mutated_transformation_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_putricide_mutated_transformation_SpellScript); return ValidateSpellInfo({
SPELL_ABOMINATION_VEHICLE_POWER_DRAIN,
SPELL_MUTATED_TRANSFORMATION_DAMAGE,
SPELL_MUTATED_TRANSFORMATION_NAME,
VEHICLE_SPELL_RIDE_HARDCODED
});
}
void HandleSummon(SpellEffIndex effIndex) void HandleSummon(SpellEffIndex effIndex)
{ {
@@ -1561,24 +1423,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHit += SpellEffectFn(spell_putricide_mutated_transformation_SpellScript::HandleSummon, EFFECT_0, SPELL_EFFECT_SUMMON); OnEffectHit += SpellEffectFn(spell_putricide_mutated_transformation::HandleSummon, EFFECT_0, SPELL_EFFECT_SUMMON);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_putricide_mutated_transformation_SpellScript();
} }
}; };
class spell_putricide_mutated_transformation_dismiss : public SpellScriptLoader class spell_putricide_mutated_transformation_dismiss_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_putricide_mutated_transformation_dismiss_aura);
spell_putricide_mutated_transformation_dismiss() : SpellScriptLoader("spell_putricide_mutated_transformation_dismiss") { }
class spell_putricide_mutated_transformation_dismiss_AuraScript : public AuraScript
{
PrepareAuraScript(spell_putricide_mutated_transformation_dismiss_AuraScript);
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{ {
@@ -1588,24 +1439,13 @@ public:
void Register() override void Register() override
{ {
AfterEffectRemove += AuraEffectRemoveFn(spell_putricide_mutated_transformation_dismiss_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_putricide_mutated_transformation_dismiss_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_putricide_mutated_transformation_dismiss_AuraScript();
} }
}; };
class spell_putricide_mutated_transformation_dmg : public SpellScriptLoader class spell_putricide_mutated_transformation_dmg : public SpellScript
{ {
public: PrepareSpellScript(spell_putricide_mutated_transformation_dmg);
spell_putricide_mutated_transformation_dmg() : SpellScriptLoader("spell_putricide_mutated_transformation_dmg") { }
class spell_putricide_mutated_transformation_dmg_SpellScript : public SpellScript
{
PrepareSpellScript(spell_putricide_mutated_transformation_dmg_SpellScript);
void FilterTargetsInitial(std::list<WorldObject*>& targets) void FilterTargetsInitial(std::list<WorldObject*>& targets)
{ {
@@ -1615,24 +1455,18 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_mutated_transformation_dmg_SpellScript::FilterTargetsInitial, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_mutated_transformation_dmg::FilterTargetsInitial, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_putricide_mutated_transformation_dmg_SpellScript();
} }
}; };
class spell_putricide_eat_ooze : public SpellScriptLoader class spell_putricide_eat_ooze : public SpellScript
{ {
public: PrepareSpellScript(spell_putricide_eat_ooze);
spell_putricide_eat_ooze() : SpellScriptLoader("spell_putricide_eat_ooze") { }
class spell_putricide_eat_ooze_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_putricide_eat_ooze_SpellScript); return ValidateSpellInfo({ SPELL_GROW_STACKER });
}
void SelectTarget(std::list<WorldObject*>& targets) void SelectTarget(std::list<WorldObject*>& targets)
{ {
@@ -1666,25 +1500,14 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_putricide_eat_ooze_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_putricide_eat_ooze::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_eat_ooze_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_DEST_AREA_ENTRY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_putricide_eat_ooze::SelectTarget, EFFECT_0, TARGET_UNIT_DEST_AREA_ENTRY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_putricide_eat_ooze_SpellScript();
} }
}; };
class spell_putricide_regurgitated_ooze : public SpellScriptLoader class spell_putricide_regurgitated_ooze : public SpellScript
{ {
public: PrepareSpellScript(spell_putricide_regurgitated_ooze);
spell_putricide_regurgitated_ooze() : SpellScriptLoader("spell_putricide_regurgitated_ooze") { }
class spell_putricide_regurgitated_ooze_SpellScript : public SpellScript
{
PrepareSpellScript(spell_putricide_regurgitated_ooze_SpellScript);
// the only purpose of this hook is to fail the achievement // the only purpose of this hook is to fail the achievement
void ExtraEffect(SpellEffIndex /*effIndex*/) void ExtraEffect(SpellEffIndex /*effIndex*/)
@@ -1695,13 +1518,7 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_putricide_regurgitated_ooze_SpellScript::ExtraEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA); OnEffectHitTarget += SpellEffectFn(spell_putricide_regurgitated_ooze::ExtraEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_putricide_regurgitated_ooze_SpellScript();
} }
}; };
@@ -1710,24 +1527,24 @@ void AddSC_boss_professor_putricide()
new boss_professor_putricide(); new boss_professor_putricide();
new npc_volatile_ooze(); new npc_volatile_ooze();
new npc_gas_cloud(); new npc_gas_cloud();
new spell_putricide_slime_puddle(); RegisterSpellScript(spell_putricide_slime_puddle);
new spell_putricide_slime_puddle_spawn(); RegisterSpellScript(spell_putricide_slime_puddle_spawn);
new spell_putricide_grow_stacker(); RegisterSpellScript(spell_putricide_grow_stacker_aura);
new spell_putricide_unstable_experiment(); RegisterSpellScript(spell_putricide_unstable_experiment);
new spell_putricide_tear_gas_effect(); RegisterSpellScript(spell_putricide_tear_gas_effect);
new spell_putricide_gaseous_bloat(); RegisterSpellScript(spell_putricide_gaseous_bloat_aura);
new spell_putricide_ooze_channel(); RegisterSpellScript(spell_putricide_ooze_channel);
new spell_putricide_ooze_eruption_searcher(); RegisterSpellScript(spell_putricide_ooze_eruption_searcher);
new spell_putricide_mutated_plague(); RegisterSpellScript(spell_putricide_mutated_plague_aura);
new spell_putricide_unbound_plague(); RegisterSpellScript(spell_putricide_unbound_plague);
new spell_putricide_unbound_plague_dmg(); RegisterSpellScript(spell_putricide_unbound_plague_dmg_aura);
new spell_putricide_choking_gas_bomb(); RegisterSpellScript(spell_putricide_choking_gas_bomb);
new spell_putricide_clear_aura_effect_value(); RegisterSpellScript(spell_putricide_clear_aura_effect_value);
new spell_putricide_mutation_init(); RegisterSpellAndAuraScriptPair(spell_putricide_mutation_init, spell_putricide_mutation_init_aura);
new spell_putricide_mutated_transformation(); RegisterSpellScript(spell_putricide_mutated_transformation);
new spell_putricide_mutated_transformation_dismiss(); RegisterSpellScript(spell_putricide_mutated_transformation_dismiss_aura);
new spell_putricide_mutated_transformation_dmg(); RegisterSpellScript(spell_putricide_mutated_transformation_dmg);
new spell_putricide_eat_ooze(); RegisterSpellScript(spell_putricide_eat_ooze);
new spell_putricide_regurgitated_ooze(); RegisterSpellScript(spell_putricide_regurgitated_ooze);
} }
@@ -506,14 +506,9 @@ public:
} }
}; };
class spell_rotface_mutated_infection : public SpellScriptLoader class spell_rotface_mutated_infection : public SpellScript
{ {
public: PrepareSpellScript(spell_rotface_mutated_infection);
spell_rotface_mutated_infection() : SpellScriptLoader("spell_rotface_mutated_infection") { }
class spell_rotface_mutated_infection_SpellScript : public SpellScript
{
PrepareSpellScript(spell_rotface_mutated_infection_SpellScript);
bool Load() override bool Load() override
{ {
@@ -552,18 +547,19 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rotface_mutated_infection_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rotface_mutated_infection::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rotface_mutated_infection_SpellScript::ReplaceTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rotface_mutated_infection::ReplaceTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rotface_mutated_infection_SpellScript::ReplaceTargets, EFFECT_2, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rotface_mutated_infection::ReplaceTargets, EFFECT_2, TARGET_UNIT_SRC_AREA_ENEMY);
AfterHit += SpellHitFn(spell_rotface_mutated_infection_SpellScript::NotifyTargets); AfterHit += SpellHitFn(spell_rotface_mutated_infection::NotifyTargets);
} }
private:
WorldObject* _target; WorldObject* _target;
}; };
class spell_rotface_mutated_infection_AuraScript : public AuraScript class spell_rotface_mutated_infection_aura : public AuraScript
{ {
PrepareAuraScript(spell_rotface_mutated_infection_AuraScript); PrepareAuraScript(spell_rotface_mutated_infection_aura);
void ExtraRemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) void ExtraRemoveEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{ {
@@ -572,29 +568,18 @@ public:
void Register() override void Register() override
{ {
AfterEffectRemove += AuraEffectRemoveFn(spell_rotface_mutated_infection_AuraScript::ExtraRemoveEffect, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_rotface_mutated_infection_aura::ExtraRemoveEffect, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_rotface_mutated_infection_SpellScript();
}
AuraScript* GetAuraScript() const override
{
return new spell_rotface_mutated_infection_AuraScript();
} }
}; };
class spell_rotface_little_ooze_combine : public SpellScriptLoader class spell_rotface_little_ooze_combine : public SpellScript
{ {
public: PrepareSpellScript(spell_rotface_little_ooze_combine);
spell_rotface_little_ooze_combine() : SpellScriptLoader("spell_rotface_little_ooze_combine") { }
class spell_rotface_little_ooze_combine_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_rotface_little_ooze_combine_SpellScript); return ValidateSpellInfo({ SPELL_LITTLE_OOZE_COMBINE, SPELL_OOZE_MERGE });
}
void HandleScript(SpellEffIndex /*effIndex*/) void HandleScript(SpellEffIndex /*effIndex*/)
{ {
@@ -613,24 +598,18 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_rotface_little_ooze_combine_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_rotface_little_ooze_combine::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_rotface_little_ooze_combine_SpellScript();
} }
}; };
class spell_rotface_large_ooze_combine : public SpellScriptLoader class spell_rotface_large_ooze_combine : public SpellScript
{ {
public: PrepareSpellScript(spell_rotface_large_ooze_combine);
spell_rotface_large_ooze_combine() : SpellScriptLoader("spell_rotface_large_ooze_combine") { }
class spell_rotface_large_ooze_combine_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_rotface_large_ooze_combine_SpellScript); return ValidateSpellInfo({ SPELL_UNSTABLE_OOZE, 69844, SPELL_LARGE_OOZE_BUFF_COMBINE, SPELL_LARGE_OOZE_COMBINE, SPELL_UNSTABLE_OOZE_EXPLOSION });
}
void HandleScript(SpellEffIndex /*effIndex*/) void HandleScript(SpellEffIndex /*effIndex*/)
{ {
@@ -691,24 +670,18 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_rotface_large_ooze_combine_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_rotface_large_ooze_combine::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_rotface_large_ooze_combine_SpellScript();
} }
}; };
class spell_rotface_large_ooze_buff_combine : public SpellScriptLoader class spell_rotface_large_ooze_buff_combine : public SpellScript
{ {
public: PrepareSpellScript(spell_rotface_large_ooze_buff_combine);
spell_rotface_large_ooze_buff_combine() : SpellScriptLoader("spell_rotface_large_ooze_buff_combine") { }
class spell_rotface_large_ooze_buff_combine_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_rotface_large_ooze_buff_combine_SpellScript); return ValidateSpellInfo({ 69844, SPELL_LARGE_OOZE_BUFF_COMBINE, SPELL_LARGE_OOZE_COMBINE, SPELL_UNSTABLE_OOZE_EXPLOSION, SPELL_LITTLE_OOZE_COMBINE });
}
void HandleScript(SpellEffIndex /*effIndex*/) void HandleScript(SpellEffIndex /*effIndex*/)
{ {
@@ -754,24 +727,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_rotface_large_ooze_buff_combine_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_rotface_large_ooze_buff_combine::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_rotface_large_ooze_buff_combine_SpellScript();
} }
}; };
class spell_rotface_unstable_ooze_explosion_init : public SpellScriptLoader class spell_rotface_unstable_ooze_explosion_init : public SpellScript
{ {
public: PrepareSpellScript(spell_rotface_unstable_ooze_explosion_init);
spell_rotface_unstable_ooze_explosion_init() : SpellScriptLoader("spell_rotface_unstable_ooze_explosion_init") { }
class spell_rotface_unstable_ooze_explosion_init_SpellScript : public SpellScript
{
PrepareSpellScript(spell_rotface_unstable_ooze_explosion_init_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -792,24 +754,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_rotface_unstable_ooze_explosion_init_SpellScript::HandleCast, EFFECT_0, SPELL_EFFECT_FORCE_CAST); OnEffectHitTarget += SpellEffectFn(spell_rotface_unstable_ooze_explosion_init::HandleCast, EFFECT_0, SPELL_EFFECT_FORCE_CAST);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_rotface_unstable_ooze_explosion_init_SpellScript();
} }
}; };
class spell_rotface_unstable_ooze_explosion : public SpellScriptLoader class spell_rotface_unstable_ooze_explosion : public SpellScript
{ {
public: PrepareSpellScript(spell_rotface_unstable_ooze_explosion);
spell_rotface_unstable_ooze_explosion() : SpellScriptLoader("spell_rotface_unstable_ooze_explosion") { }
class spell_rotface_unstable_ooze_explosion_SpellScript : public SpellScript
{
PrepareSpellScript(spell_rotface_unstable_ooze_explosion_SpellScript);
void CheckTarget(SpellEffIndex effIndex) void CheckTarget(SpellEffIndex effIndex)
{ {
@@ -829,24 +780,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHit += SpellEffectFn(spell_rotface_unstable_ooze_explosion_SpellScript::CheckTarget, EFFECT_0, SPELL_EFFECT_TRIGGER_MISSILE); OnEffectHit += SpellEffectFn(spell_rotface_unstable_ooze_explosion::CheckTarget, EFFECT_0, SPELL_EFFECT_TRIGGER_MISSILE);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_rotface_unstable_ooze_explosion_SpellScript();
} }
}; };
class spell_rotface_unstable_ooze_explosion_suicide : public SpellScriptLoader class spell_rotface_unstable_ooze_explosion_suicide_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_rotface_unstable_ooze_explosion_suicide_aura);
spell_rotface_unstable_ooze_explosion_suicide() : SpellScriptLoader("spell_rotface_unstable_ooze_explosion_suicide") { }
class spell_rotface_unstable_ooze_explosion_suicide_AuraScript : public AuraScript
{
PrepareAuraScript(spell_rotface_unstable_ooze_explosion_suicide_AuraScript);
void DespawnSelf(AuraEffect const* /*aurEff*/) void DespawnSelf(AuraEffect const* /*aurEff*/)
{ {
@@ -863,13 +803,7 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_rotface_unstable_ooze_explosion_suicide_AuraScript::DespawnSelf, EFFECT_2, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_rotface_unstable_ooze_explosion_suicide_aura::DespawnSelf, EFFECT_2, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_rotface_unstable_ooze_explosion_suicide_AuraScript();
} }
}; };
@@ -969,13 +903,13 @@ void AddSC_boss_rotface()
new boss_rotface(); new boss_rotface();
new npc_little_ooze(); new npc_little_ooze();
new npc_big_ooze(); new npc_big_ooze();
new spell_rotface_mutated_infection(); RegisterSpellAndAuraScriptPair(spell_rotface_mutated_infection, spell_rotface_mutated_infection_aura);
new spell_rotface_little_ooze_combine(); RegisterSpellScript(spell_rotface_little_ooze_combine);
new spell_rotface_large_ooze_combine(); RegisterSpellScript(spell_rotface_large_ooze_combine);
new spell_rotface_large_ooze_buff_combine(); RegisterSpellScript(spell_rotface_large_ooze_buff_combine);
new spell_rotface_unstable_ooze_explosion_init(); RegisterSpellScript(spell_rotface_unstable_ooze_explosion_init);
new spell_rotface_unstable_ooze_explosion(); RegisterSpellScript(spell_rotface_unstable_ooze_explosion);
new spell_rotface_unstable_ooze_explosion_suicide(); RegisterSpellScript(spell_rotface_unstable_ooze_explosion_suicide_aura);
new npc_precious_icc(); new npc_precious_icc();
} }
@@ -767,14 +767,9 @@ public:
} }
}; };
class spell_sindragosa_s_fury : public SpellScriptLoader class spell_sindragosa_s_fury : public SpellScript
{ {
public: PrepareSpellScript(spell_sindragosa_s_fury);
spell_sindragosa_s_fury() : SpellScriptLoader("spell_sindragosa_s_fury") { }
class spell_sindragosa_s_fury_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sindragosa_s_fury_SpellScript);
bool Load() override bool Load() override
{ {
@@ -828,18 +823,13 @@ public:
void Register() override void Register() override
{ {
BeforeCast += SpellCastFn(spell_sindragosa_s_fury_SpellScript::SelectDest); BeforeCast += SpellCastFn(spell_sindragosa_s_fury::SelectDest);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sindragosa_s_fury_SpellScript::CountTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENTRY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sindragosa_s_fury::CountTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENTRY);
OnEffectHitTarget += SpellEffectFn(spell_sindragosa_s_fury_SpellScript::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY); OnEffectHitTarget += SpellEffectFn(spell_sindragosa_s_fury::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
} }
private:
uint32 _targetCount; uint32 _targetCount;
};
SpellScript* GetSpellScript() const override
{
return new spell_sindragosa_s_fury_SpellScript();
}
}; };
class UnchainedMagicTargetSelector class UnchainedMagicTargetSelector
@@ -895,14 +885,9 @@ class spell_sindragosa_unchained_magic : public SpellScript
} }
}; };
class spell_sindragosa_permeating_chill : public SpellScriptLoader class spell_sindragosa_permeating_chill_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_sindragosa_permeating_chill_aura);
spell_sindragosa_permeating_chill() : SpellScriptLoader("spell_sindragosa_permeating_chill") { }
class spell_sindragosa_permeating_chill_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sindragosa_permeating_chill_AuraScript);
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
@@ -911,24 +896,13 @@ public:
void Register() override void Register() override
{ {
DoCheckProc += AuraCheckProcFn(spell_sindragosa_permeating_chill_AuraScript::CheckProc); DoCheckProc += AuraCheckProcFn(spell_sindragosa_permeating_chill_aura::CheckProc);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sindragosa_permeating_chill_AuraScript();
} }
}; };
class spell_sindragosa_instability : public SpellScriptLoader class spell_sindragosa_instability_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_sindragosa_instability_aura);
spell_sindragosa_instability() : SpellScriptLoader("spell_sindragosa_instability") { }
class spell_sindragosa_instability_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sindragosa_instability_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -943,24 +917,13 @@ public:
void Register() override void Register() override
{ {
AfterEffectRemove += AuraEffectRemoveFn(spell_sindragosa_instability_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_sindragosa_instability_aura::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sindragosa_instability_AuraScript();
} }
}; };
class spell_sindragosa_icy_grip : public SpellScriptLoader class spell_sindragosa_icy_grip : public SpellScript
{ {
public: PrepareSpellScript(spell_sindragosa_icy_grip);
spell_sindragosa_icy_grip() : SpellScriptLoader("spell_sindragosa_icy_grip") { }
class spell_sindragosa_icy_grip_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sindragosa_icy_grip_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -978,24 +941,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_sindragosa_icy_grip_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_sindragosa_icy_grip::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sindragosa_icy_grip_SpellScript();
} }
}; };
class spell_sindragosa_icy_grip_jump : public SpellScriptLoader class spell_sindragosa_icy_grip_jump : public SpellScript
{ {
public: PrepareSpellScript(spell_sindragosa_icy_grip_jump);
spell_sindragosa_icy_grip_jump() : SpellScriptLoader("spell_sindragosa_icy_grip_jump") { }
class spell_sindragosa_icy_grip_jump_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sindragosa_icy_grip_jump_SpellScript);
void HandleSpecial(SpellEffIndex effIndex) void HandleSpecial(SpellEffIndex effIndex)
{ {
@@ -1019,24 +971,13 @@ public:
void Register() override void Register() override
{ {
OnEffectLaunchTarget += SpellEffectFn(spell_sindragosa_icy_grip_jump_SpellScript::HandleSpecial, EFFECT_0, SPELL_EFFECT_JUMP); OnEffectLaunchTarget += SpellEffectFn(spell_sindragosa_icy_grip_jump::HandleSpecial, EFFECT_0, SPELL_EFFECT_JUMP);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sindragosa_icy_grip_jump_SpellScript();
} }
}; };
class spell_sindragosa_frost_beacon : public SpellScriptLoader class spell_sindragosa_frost_beacon_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_sindragosa_frost_beacon_aura);
spell_sindragosa_frost_beacon() : SpellScriptLoader("spell_sindragosa_frost_beacon") { }
class spell_sindragosa_frost_beacon_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sindragosa_frost_beacon_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -1052,13 +993,7 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_sindragosa_frost_beacon_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_sindragosa_frost_beacon_aura::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sindragosa_frost_beacon_AuraScript();
} }
}; };
@@ -1076,14 +1011,9 @@ public:
} }
}; };
class spell_sindragosa_ice_tomb_filter : public SpellScriptLoader class spell_sindragosa_ice_tomb_filter : public SpellScript
{ {
public: PrepareSpellScript(spell_sindragosa_ice_tomb_filter);
spell_sindragosa_ice_tomb_filter() : SpellScriptLoader("spell_sindragosa_ice_tomb_filter") { }
class spell_sindragosa_ice_tomb_filter_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sindragosa_ice_tomb_filter_SpellScript);
void FilterTargets(std::list<WorldObject*>& unitList) void FilterTargets(std::list<WorldObject*>& unitList)
{ {
@@ -1092,26 +1022,13 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sindragosa_ice_tomb_filter_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sindragosa_ice_tomb_filter::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sindragosa_ice_tomb_filter_SpellScript();
} }
}; };
class spell_sindragosa_ice_tomb : public SpellScriptLoader class spell_sindragosa_ice_tomb_trap : public SpellScript
{ {
public: PrepareSpellScript(spell_sindragosa_ice_tomb_trap);
spell_sindragosa_ice_tomb() : SpellScriptLoader("spell_sindragosa_ice_tomb_trap") { }
class spell_sindragosa_ice_tomb_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sindragosa_ice_tomb_SpellScript);
std::list<WorldObject*> targetList;
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -1125,26 +1042,34 @@ public:
void FilterTargets(std::list<WorldObject*>& unitList) void FilterTargets(std::list<WorldObject*>& unitList)
{ {
unitList.remove_if(Acore::UnitAuraCheck(true, GetSpellInfo()->Id)); unitList.remove_if(Acore::UnitAuraCheck(true, GetSpellInfo()->Id));
targetList.clear(); _targetList.clear();
targetList = unitList; _targetList = unitList;
} }
void FilterTargetsSubseq(std::list<WorldObject*>& unitList) void FilterTargetsSubseq(std::list<WorldObject*>& unitList)
{ {
unitList.clear(); unitList.clear();
unitList = targetList; unitList = _targetList;
} }
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sindragosa_ice_tomb_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sindragosa_ice_tomb_trap::FilterTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sindragosa_ice_tomb_SpellScript::FilterTargetsSubseq, EFFECT_2, TARGET_UNIT_DEST_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sindragosa_ice_tomb_trap::FilterTargetsSubseq, EFFECT_2, TARGET_UNIT_DEST_AREA_ENEMY);
} }
};
class spell_sindragosa_ice_tomb_AuraScript : public AuraScript private:
std::list<WorldObject*> _targetList;
};
class spell_sindragosa_ice_tomb_trap_aura : public AuraScript
{
PrepareAuraScript(spell_sindragosa_ice_tomb_trap_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_sindragosa_ice_tomb_AuraScript); return ValidateSpellInfo({ SPELL_ASPHYXIATION, SPELL_ICE_TOMB_UNTARGETABLE });
}
void PeriodicTick(AuraEffect const* /*aurEff*/) void PeriodicTick(AuraEffect const* /*aurEff*/)
{ {
@@ -1165,20 +1090,9 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_sindragosa_ice_tomb_AuraScript::PeriodicTick, EFFECT_2, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_sindragosa_ice_tomb_trap_aura::PeriodicTick, EFFECT_2, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
AfterEffectRemove += AuraEffectRemoveFn(spell_sindragosa_ice_tomb_AuraScript::ExtraRemoveEffect, EFFECT_1, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_sindragosa_ice_tomb_trap_aura::ExtraRemoveEffect, EFFECT_1, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL);
AfterEffectApply += AuraEffectApplyFn(spell_sindragosa_ice_tomb_AuraScript::AfterApply, EFFECT_1, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL); AfterEffectApply += AuraEffectApplyFn(spell_sindragosa_ice_tomb_trap_aura::AfterApply, EFFECT_1, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sindragosa_ice_tomb_SpellScript();
}
AuraScript* GetAuraScript() const override
{
return new spell_sindragosa_ice_tomb_AuraScript();
} }
}; };
@@ -1208,14 +1122,9 @@ private:
Unit* _caster; Unit* _caster;
}; };
class spell_sindragosa_mystic_buffet : public SpellScriptLoader class spell_sindragosa_mystic_buffet : public SpellScript
{ {
public: PrepareSpellScript(spell_sindragosa_mystic_buffet);
spell_sindragosa_mystic_buffet() : SpellScriptLoader("spell_sindragosa_mystic_buffet") { }
class spell_sindragosa_mystic_buffet_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sindragosa_mystic_buffet_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets) void FilterTargets(std::list<WorldObject*>& targets)
{ {
@@ -1224,24 +1133,18 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sindragosa_mystic_buffet_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sindragosa_mystic_buffet::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sindragosa_mystic_buffet_SpellScript();
} }
}; };
class spell_sindragosa_soul_preservation : public SpellScriptLoader class spell_sindragosa_soul_preservation_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_sindragosa_soul_preservation_aura);
spell_sindragosa_soul_preservation() : SpellScriptLoader("spell_sindragosa_soul_preservation") { }
class spell_sindragosa_soul_preservation_AuraScript : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_sindragosa_soul_preservation_AuraScript); return ValidateSpellInfo({ 72466, 72424 });
}
void PeriodicTick(AuraEffect const* /*aurEff*/) void PeriodicTick(AuraEffect const* /*aurEff*/)
{ {
@@ -1258,13 +1161,7 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_sindragosa_soul_preservation_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); OnEffectPeriodic += AuraEffectPeriodicFn(spell_sindragosa_soul_preservation_aura::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sindragosa_soul_preservation_AuraScript();
} }
}; };
@@ -1597,14 +1494,9 @@ public:
} }
}; };
class spell_rimefang_icy_blast : public SpellScriptLoader class spell_rimefang_icy_blast : public SpellScript
{ {
public: PrepareSpellScript(spell_rimefang_icy_blast);
spell_rimefang_icy_blast() : SpellScriptLoader("spell_rimefang_icy_blast") { }
class spell_rimefang_icy_blast_SpellScript : public SpellScript
{
PrepareSpellScript(spell_rimefang_icy_blast_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -1621,13 +1513,7 @@ public:
void Register() override void Register() override
{ {
OnEffectHit += SpellEffectFn(spell_rimefang_icy_blast_SpellScript::HandleTriggerMissile, EFFECT_1, SPELL_EFFECT_TRIGGER_MISSILE); OnEffectHit += SpellEffectFn(spell_rimefang_icy_blast::HandleTriggerMissile, EFFECT_1, SPELL_EFFECT_TRIGGER_MISSILE);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_rimefang_icy_blast_SpellScript();
} }
}; };
@@ -1800,14 +1686,9 @@ private:
Creature* _owner; Creature* _owner;
}; };
class spell_frostwarden_handler_order_whelp : public SpellScriptLoader class spell_frostwarden_handler_order_whelp : public SpellScript
{ {
public: PrepareSpellScript(spell_frostwarden_handler_order_whelp);
spell_frostwarden_handler_order_whelp() : SpellScriptLoader("spell_frostwarden_handler_order_whelp") { }
class spell_frostwarden_handler_order_whelp_SpellScript : public SpellScript
{
PrepareSpellScript(spell_frostwarden_handler_order_whelp_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -1842,25 +1723,14 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_frostwarden_handler_order_whelp_SpellScript::HandleForcedCast, EFFECT_0, SPELL_EFFECT_FORCE_CAST); OnEffectHitTarget += SpellEffectFn(spell_frostwarden_handler_order_whelp::HandleForcedCast, EFFECT_0, SPELL_EFFECT_FORCE_CAST);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_frostwarden_handler_order_whelp_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_frostwarden_handler_order_whelp::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_frostwarden_handler_order_whelp_SpellScript();
} }
}; };
class spell_frostwarden_handler_focus_fire : public SpellScriptLoader class spell_frostwarden_handler_focus_fire : public SpellScript
{ {
public: PrepareSpellScript(spell_frostwarden_handler_focus_fire);
spell_frostwarden_handler_focus_fire() : SpellScriptLoader("spell_frostwarden_handler_focus_fire") { }
class spell_frostwarden_handler_focus_fire_SpellScript : public SpellScript
{
PrepareSpellScript(spell_frostwarden_handler_focus_fire_SpellScript);
void HandleScript(SpellEffIndex effIndex) void HandleScript(SpellEffIndex effIndex)
{ {
@@ -1871,13 +1741,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_frostwarden_handler_focus_fire_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_frostwarden_handler_focus_fire::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
} }
}; };
class spell_frostwarden_handler_focus_fire_AuraScript : public AuraScript class spell_frostwarden_handler_focus_fire_aura : public AuraScript
{ {
PrepareAuraScript(spell_frostwarden_handler_focus_fire_AuraScript); PrepareAuraScript(spell_frostwarden_handler_focus_fire_aura);
void PeriodicTick(AuraEffect const* /*aurEff*/) void PeriodicTick(AuraEffect const* /*aurEff*/)
{ {
@@ -1891,29 +1761,18 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_frostwarden_handler_focus_fire_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); OnEffectPeriodic += AuraEffectPeriodicFn(spell_frostwarden_handler_focus_fire_aura::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_frostwarden_handler_focus_fire_SpellScript();
}
AuraScript* GetAuraScript() const override
{
return new spell_frostwarden_handler_focus_fire_AuraScript();
} }
}; };
class spell_sindragosa_frost_breath : public SpellScriptLoader class spell_sindragosa_frost_breath : public SpellScript
{ {
public: PrepareSpellScript(spell_sindragosa_frost_breath);
spell_sindragosa_frost_breath() : SpellScriptLoader("spell_sindragosa_frost_breath") { }
class spell_sindragosa_frost_breath_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_sindragosa_frost_breath_SpellScript); return ValidateSpellInfo({ SPELL_UNSATED_CRAVING, SPELL_FROST_IMBUED_BLADE, SPELL_FROST_INFUSION });
}
void HandleInfusion() void HandleInfusion()
{ {
@@ -1941,13 +1800,7 @@ public:
void Register() override void Register() override
{ {
AfterHit += SpellHitFn(spell_sindragosa_frost_breath_SpellScript::HandleInfusion); AfterHit += SpellHitFn(spell_sindragosa_frost_breath::HandleInfusion);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sindragosa_frost_breath_SpellScript();
} }
}; };
@@ -1955,29 +1808,29 @@ void AddSC_boss_sindragosa()
{ {
new boss_sindragosa(); new boss_sindragosa();
new npc_ice_tomb(); new npc_ice_tomb();
new spell_sindragosa_s_fury(); RegisterSpellScript(spell_sindragosa_s_fury);
RegisterSpellScript(spell_sindragosa_unchained_magic); RegisterSpellScript(spell_sindragosa_unchained_magic);
new spell_sindragosa_permeating_chill(); RegisterSpellScript(spell_sindragosa_permeating_chill_aura);
new spell_sindragosa_instability(); RegisterSpellScript(spell_sindragosa_instability_aura);
new spell_sindragosa_icy_grip(); RegisterSpellScript(spell_sindragosa_icy_grip);
new spell_sindragosa_icy_grip_jump(); RegisterSpellScript(spell_sindragosa_icy_grip_jump);
new spell_sindragosa_ice_tomb_filter(); RegisterSpellScript(spell_sindragosa_ice_tomb_filter);
new spell_trigger_spell_from_caster("spell_sindragosa_ice_tomb", SPELL_ICE_TOMB_DUMMY); RegisterSpellScriptWithArgs(spell_trigger_spell_from_caster, "spell_sindragosa_ice_tomb", SPELL_ICE_TOMB_DUMMY);
new spell_trigger_spell_from_caster("spell_sindragosa_ice_tomb_dummy", SPELL_FROST_BEACON); RegisterSpellScriptWithArgs(spell_trigger_spell_from_caster, "spell_sindragosa_ice_tomb_dummy", SPELL_FROST_BEACON);
new spell_sindragosa_frost_beacon(); RegisterSpellScript(spell_sindragosa_frost_beacon_aura);
new spell_sindragosa_ice_tomb(); RegisterSpellAndAuraScriptPair(spell_sindragosa_ice_tomb_trap, spell_sindragosa_ice_tomb_trap_aura);
new spell_sindragosa_mystic_buffet(); RegisterSpellScript(spell_sindragosa_mystic_buffet);
new spell_sindragosa_soul_preservation(); RegisterSpellScript(spell_sindragosa_soul_preservation_aura);
new achievement_all_you_can_eat(); new achievement_all_you_can_eat();
new npc_spinestalker(); new npc_spinestalker();
new npc_rimefang(); new npc_rimefang();
new spell_rimefang_icy_blast(); RegisterSpellScript(spell_rimefang_icy_blast);
new at_sindragosa_lair(); new at_sindragosa_lair();
new npc_sindragosa_trash(); new npc_sindragosa_trash();
new spell_frostwarden_handler_order_whelp(); RegisterSpellScript(spell_frostwarden_handler_order_whelp);
new spell_frostwarden_handler_focus_fire(); RegisterSpellAndAuraScriptPair(spell_frostwarden_handler_focus_fire, spell_frostwarden_handler_focus_fire_aura);
new spell_sindragosa_frost_breath(); RegisterSpellScript(spell_sindragosa_frost_breath);
} }
@@ -1675,14 +1675,9 @@ public:
} }
}; };
class spell_the_lich_king_quake : public SpellScriptLoader class spell_the_lich_king_quake : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_quake);
spell_the_lich_king_quake() : SpellScriptLoader("spell_the_lich_king_quake") { }
class spell_the_lich_king_quake_SpellScript : public SpellScript
{
PrepareSpellScript(spell_the_lich_king_quake_SpellScript);
bool Load() override bool Load() override
{ {
@@ -1703,25 +1698,19 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_quake_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_quake::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
OnEffectHit += SpellEffectFn(spell_the_lich_king_quake_SpellScript::HandleSendEvent, EFFECT_1, SPELL_EFFECT_SEND_EVENT); OnEffectHit += SpellEffectFn(spell_the_lich_king_quake::HandleSendEvent, EFFECT_1, SPELL_EFFECT_SEND_EVENT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_quake_SpellScript();
} }
}; };
class spell_the_lich_king_jump : public SpellScriptLoader class spell_the_lich_king_jump : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_jump);
spell_the_lich_king_jump() : SpellScriptLoader("spell_the_lich_king_jump") { }
class spell_the_lich_king_jump_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_the_lich_king_jump_SpellScript); return ValidateSpellInfo({ SPELL_RAISE_DEAD, SPELL_JUMP_2 });
}
void HandleScript(SpellEffIndex effIndex) void HandleScript(SpellEffIndex effIndex)
{ {
@@ -1735,24 +1724,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_jump_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_jump::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_jump_SpellScript();
} }
}; };
class spell_the_lich_king_jump_remove_aura : public SpellScriptLoader class spell_the_lich_king_jump_remove_aura : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_jump_remove_aura);
spell_the_lich_king_jump_remove_aura() : SpellScriptLoader("spell_the_lich_king_jump_remove_aura") { }
class spell_the_lich_king_jump_SpellScript : public SpellScript
{
PrepareSpellScript(spell_the_lich_king_jump_SpellScript);
void HandleScript(SpellEffIndex effIndex) void HandleScript(SpellEffIndex effIndex)
{ {
@@ -1762,24 +1740,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_jump_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_jump_remove_aura::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_jump_SpellScript();
} }
}; };
class spell_the_lich_king_play_movie : public SpellScriptLoader class spell_the_lich_king_play_movie : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_play_movie);
spell_the_lich_king_play_movie() : SpellScriptLoader("spell_the_lich_king_play_movie") { }
class spell_the_lich_king_play_movie_SpellScript : public SpellScript
{
PrepareSpellScript(spell_the_lich_king_play_movie_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -1797,13 +1764,7 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_play_movie_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_play_movie::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_play_movie_SpellScript();
} }
}; };
@@ -1879,14 +1840,9 @@ public:
} }
}; };
class spell_the_lich_king_infest : public SpellScriptLoader class spell_the_lich_king_infest_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_the_lich_king_infest_aura);
spell_the_lich_king_infest() : SpellScriptLoader("spell_the_lich_king_infest") { }
class spell_the_lich_king_infest_AuraScript : public AuraScript
{
PrepareAuraScript(spell_the_lich_king_infest_AuraScript);
void OnPeriodic(AuraEffect const* /*aurEff*/) void OnPeriodic(AuraEffect const* /*aurEff*/)
{ {
@@ -1908,25 +1864,14 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_the_lich_king_infest_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE); OnEffectPeriodic += AuraEffectPeriodicFn(spell_the_lich_king_infest_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_the_lich_king_infest_AuraScript::OnUpdate, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE); OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_the_lich_king_infest_aura::OnUpdate, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_the_lich_king_infest_AuraScript();
} }
}; };
class spell_the_lich_king_necrotic_plague : public SpellScriptLoader class spell_the_lich_king_necrotic_plague_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_the_lich_king_necrotic_plague_aura);
spell_the_lich_king_necrotic_plague() : SpellScriptLoader("spell_the_lich_king_necrotic_plague") { }
class spell_the_lich_king_necrotic_plague_AuraScript : public AuraScript
{
PrepareAuraScript(spell_the_lich_king_necrotic_plague_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -1958,24 +1903,13 @@ public:
void Register() override void Register() override
{ {
AfterEffectRemove += AuraEffectRemoveFn(spell_the_lich_king_necrotic_plague_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_the_lich_king_necrotic_plague_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_the_lich_king_necrotic_plague_AuraScript();
} }
}; };
class spell_the_lich_king_necrotic_plague_jump : public SpellScriptLoader class spell_the_lich_king_necrotic_plague_jump : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_necrotic_plague_jump);
spell_the_lich_king_necrotic_plague_jump() : SpellScriptLoader("spell_the_lich_king_necrotic_plague_jump") { }
class spell_the_lich_king_necrotic_plague_SpellScript : public SpellScript
{
PrepareSpellScript(spell_the_lich_king_necrotic_plague_SpellScript);
bool Load() override bool Load() override
{ {
@@ -2022,18 +1956,24 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_necrotic_plague_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_necrotic_plague_jump::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
BeforeHit += BeforeSpellHitFn(spell_the_lich_king_necrotic_plague_SpellScript::CheckAura); BeforeHit += BeforeSpellHitFn(spell_the_lich_king_necrotic_plague_jump::CheckAura);
OnHit += SpellHitFn(spell_the_lich_king_necrotic_plague_SpellScript::AddMissingStack); OnHit += SpellHitFn(spell_the_lich_king_necrotic_plague_jump::AddMissingStack);
} }
private:
bool _hadJumpingAura; bool _hadJumpingAura;
bool _hadInitialAura; bool _hadInitialAura;
}; };
class spell_the_lich_king_necrotic_plague_AuraScript : public AuraScript class spell_the_lich_king_necrotic_plague_jump_aura : public AuraScript
{
PrepareAuraScript(spell_the_lich_king_necrotic_plague_jump_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_the_lich_king_necrotic_plague_AuraScript); return ValidateSpellInfo({ SPELL_NECROTIC_PLAGUE_JUMP, SPELL_PLAGUE_SIPHON });
}
bool Load() override bool Load() override
{ {
@@ -2090,34 +2030,24 @@ public:
void Register() override void Register() override
{ {
OnEffectApply += AuraEffectApplyFn(spell_the_lich_king_necrotic_plague_AuraScript::OnApply, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); OnEffectApply += AuraEffectApplyFn(spell_the_lich_king_necrotic_plague_jump_aura::OnApply, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
AfterEffectRemove += AuraEffectRemoveFn(spell_the_lich_king_necrotic_plague_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_the_lich_king_necrotic_plague_jump_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_the_lich_king_necrotic_plague_AuraScript::OnDispel, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAPPLY); AfterEffectRemove += AuraEffectRemoveFn(spell_the_lich_king_necrotic_plague_jump_aura::OnDispel, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAPPLY);
AfterEffectApply += AuraEffectApplyFn(spell_the_lich_king_necrotic_plague_AuraScript::AfterDispel, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAPPLY); AfterEffectApply += AuraEffectApplyFn(spell_the_lich_king_necrotic_plague_jump_aura::AfterDispel, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAPPLY);
} }
private:
int32 _lastAmount; int32 _lastAmount;
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_necrotic_plague_SpellScript();
}
AuraScript* GetAuraScript() const override
{
return new spell_the_lich_king_necrotic_plague_AuraScript();
}
}; };
class spell_the_lich_king_shadow_trap_visual : public SpellScriptLoader class spell_the_lich_king_shadow_trap_visual_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_the_lich_king_shadow_trap_visual_aura);
spell_the_lich_king_shadow_trap_visual() : SpellScriptLoader("spell_the_lich_king_shadow_trap_visual") { }
class spell_the_lich_king_shadow_trap_visual_AuraScript : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_the_lich_king_shadow_trap_visual_AuraScript); return ValidateSpellInfo({ SPELL_SHADOW_TRAP_AURA });
}
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{ {
@@ -2127,24 +2057,18 @@ public:
void Register() override void Register() override
{ {
AfterEffectRemove += AuraEffectRemoveFn(spell_the_lich_king_shadow_trap_visual_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_the_lich_king_shadow_trap_visual_aura::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_the_lich_king_shadow_trap_visual_AuraScript();
} }
}; };
class spell_the_lich_king_shadow_trap_periodic : public SpellScriptLoader class spell_the_lich_king_shadow_trap_periodic : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_shadow_trap_periodic);
spell_the_lich_king_shadow_trap_periodic() : SpellScriptLoader("spell_the_lich_king_shadow_trap_periodic") { }
class spell_the_lich_king_shadow_trap_periodic_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_the_lich_king_shadow_trap_periodic_SpellScript); return ValidateSpellInfo({ SPELL_SHADOW_TRAP_KNOCKBACK });
}
void CheckTargetCount(std::list<WorldObject*>& targets) void CheckTargetCount(std::list<WorldObject*>& targets)
{ {
@@ -2160,24 +2084,13 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_shadow_trap_periodic_SpellScript::CheckTargetCount, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_shadow_trap_periodic::CheckTargetCount, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_shadow_trap_periodic_SpellScript();
} }
}; };
class spell_the_lich_king_ice_burst_target_search : public SpellScriptLoader class spell_the_lich_king_ice_burst_target_search : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_ice_burst_target_search);
spell_the_lich_king_ice_burst_target_search() : SpellScriptLoader("spell_the_lich_king_ice_burst_target_search") { }
class spell_the_lich_king_ice_burst_target_search_SpellScript : public SpellScript
{
PrepareSpellScript(spell_the_lich_king_ice_burst_target_search_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -2195,13 +2108,7 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_ice_burst_target_search_SpellScript::CheckTargetCount, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_ice_burst_target_search::CheckTargetCount, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_ice_burst_target_search_SpellScript();
} }
}; };
@@ -2283,14 +2190,9 @@ public:
} }
}; };
class spell_the_lich_king_raging_spirit : public SpellScriptLoader class spell_the_lich_king_raging_spirit : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_raging_spirit);
spell_the_lich_king_raging_spirit() : SpellScriptLoader("spell_the_lich_king_raging_spirit") { }
class spell_the_lich_king_raging_spirit_SpellScript : public SpellScript
{
PrepareSpellScript(spell_the_lich_king_raging_spirit_SpellScript);
void HandleScript(SpellEffIndex effIndex) void HandleScript(SpellEffIndex effIndex)
{ {
@@ -2301,13 +2203,7 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_raging_spirit_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_raging_spirit::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_raging_spirit_SpellScript();
} }
}; };
@@ -2444,14 +2340,14 @@ public:
} }
}; };
class spell_the_lich_king_defile : public SpellScriptLoader class spell_the_lich_king_defile : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_defile);
spell_the_lich_king_defile() : SpellScriptLoader("spell_the_lich_king_defile") { }
class spell_the_lich_king_defile_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_the_lich_king_defile_SpellScript); return ValidateSpellInfo({ SPELL_DEFILE_GROW });
}
void CorrectRange(std::list<WorldObject*>& targets) void CorrectRange(std::list<WorldObject*>& targets)
{ {
@@ -2472,26 +2368,15 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_defile_SpellScript::CorrectRange, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_defile::CorrectRange, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_defile_SpellScript::CorrectRange, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_defile::CorrectRange, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
OnHit += SpellHitFn(spell_the_lich_king_defile_SpellScript::ChangeDamageAndGrow); OnHit += SpellHitFn(spell_the_lich_king_defile::ChangeDamageAndGrow);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_defile_SpellScript();
} }
}; };
class spell_the_lich_king_soul_reaper : public SpellScriptLoader class spell_the_lich_king_soul_reaper_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_the_lich_king_soul_reaper_aura);
spell_the_lich_king_soul_reaper() : SpellScriptLoader("spell_the_lich_king_soul_reaper") { }
class spell_the_lich_king_soul_reaper_AuraScript : public AuraScript
{
PrepareAuraScript(spell_the_lich_king_soul_reaper_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -2506,13 +2391,7 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_the_lich_king_soul_reaper_AuraScript::OnPeriodic, EFFECT_1, SPELL_AURA_PERIODIC_DAMAGE); OnEffectPeriodic += AuraEffectPeriodicFn(spell_the_lich_king_soul_reaper_aura::OnPeriodic, EFFECT_1, SPELL_AURA_PERIODIC_DAMAGE);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_the_lich_king_soul_reaper_AuraScript();
} }
}; };
@@ -2725,14 +2604,9 @@ public:
} }
}; };
class spell_the_lich_king_summon_into_air : public SpellScriptLoader class spell_the_lich_king_summon_into_air : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_summon_into_air);
spell_the_lich_king_summon_into_air() : SpellScriptLoader("spell_the_lich_king_summon_into_air") { }
class spell_the_lich_king_summon_into_air_SpellScript : public SpellScript
{
PrepareSpellScript(spell_the_lich_king_summon_into_air_SpellScript);
void ModDestHeight(SpellEffIndex effIndex) void ModDestHeight(SpellEffIndex effIndex)
{ {
@@ -2757,24 +2631,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHit += SpellEffectFn(spell_the_lich_king_summon_into_air_SpellScript::ModDestHeight, EFFECT_0, SPELL_EFFECT_SUMMON); OnEffectHit += SpellEffectFn(spell_the_lich_king_summon_into_air::ModDestHeight, EFFECT_0, SPELL_EFFECT_SUMMON);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_summon_into_air_SpellScript();
} }
}; };
class spell_the_lich_king_teleport_to_frostmourne_hc : public SpellScriptLoader class spell_the_lich_king_teleport_to_frostmourne_hc : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_teleport_to_frostmourne_hc);
spell_the_lich_king_teleport_to_frostmourne_hc() : SpellScriptLoader("spell_the_lich_king_teleport_to_frostmourne_hc") { }
class spell_the_lich_king_teleport_to_frostmourne_hc_SpellScript : public SpellScript
{
PrepareSpellScript(spell_the_lich_king_teleport_to_frostmourne_hc_SpellScript);
void ModDest(SpellEffIndex /*effIndex*/) void ModDest(SpellEffIndex /*effIndex*/)
{ {
@@ -2788,24 +2651,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHit += SpellEffectFn(spell_the_lich_king_teleport_to_frostmourne_hc_SpellScript::ModDest, EFFECT_1, SPELL_EFFECT_TELEPORT_UNITS); OnEffectHit += SpellEffectFn(spell_the_lich_king_teleport_to_frostmourne_hc::ModDest, EFFECT_1, SPELL_EFFECT_TELEPORT_UNITS);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_teleport_to_frostmourne_hc_SpellScript();
} }
}; };
class spell_the_lich_king_valkyr_target_search : public SpellScriptLoader class spell_the_lich_king_valkyr_target_search : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_valkyr_target_search);
spell_the_lich_king_valkyr_target_search() : SpellScriptLoader("spell_the_lich_king_valkyr_target_search") { }
class spell_the_lich_king_valkyr_target_search_SpellScript : public SpellScript
{
PrepareSpellScript(spell_the_lich_king_valkyr_target_search_SpellScript);
WorldObject* _target; WorldObject* _target;
@@ -2863,26 +2715,15 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_valkyr_target_search_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_valkyr_target_search::SelectTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_valkyr_target_search_SpellScript::ReplaceTarget, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_valkyr_target_search::ReplaceTarget, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_valkyr_target_search_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_valkyr_target_search::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_valkyr_target_search_SpellScript();
} }
}; };
class spell_the_lich_king_cast_back_to_caster : public SpellScriptLoader class spell_the_lich_king_cast_back_to_caster : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_cast_back_to_caster);
spell_the_lich_king_cast_back_to_caster() : SpellScriptLoader("spell_the_lich_king_cast_back_to_caster") { }
class spell_the_lich_king_cast_back_to_caster_SpellScript : public SpellScript
{
PrepareSpellScript(spell_the_lich_king_cast_back_to_caster_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/) void HandleScript(SpellEffIndex /*effIndex*/)
{ {
@@ -2891,24 +2732,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_cast_back_to_caster_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_cast_back_to_caster::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_cast_back_to_caster_SpellScript();
} }
}; };
class spell_the_lich_king_life_siphon : public SpellScriptLoader class spell_the_lich_king_life_siphon : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_life_siphon);
spell_the_lich_king_life_siphon() : SpellScriptLoader("spell_the_lich_king_life_siphon") { }
class spell_the_lich_king_life_siphon_SpellScript : public SpellScript
{
PrepareSpellScript(spell_the_lich_king_life_siphon_SpellScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -2922,24 +2752,13 @@ public:
void Register() override void Register() override
{ {
AfterHit += SpellHitFn(spell_the_lich_king_life_siphon_SpellScript::TriggerHeal); AfterHit += SpellHitFn(spell_the_lich_king_life_siphon::TriggerHeal);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_life_siphon_SpellScript();
} }
}; };
class spell_the_lich_king_vile_spirits : public SpellScriptLoader class spell_the_lich_king_vile_spirits_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_the_lich_king_vile_spirits_aura);
spell_the_lich_king_vile_spirits() : SpellScriptLoader("spell_the_lich_king_vile_spirits") { }
class spell_the_lich_king_vile_spirits_AuraScript : public AuraScript
{
PrepareAuraScript(spell_the_lich_king_vile_spirits_AuraScript);
bool Load() override bool Load() override
{ {
@@ -2955,26 +2774,16 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_the_lich_king_vile_spirits_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); OnEffectPeriodic += AuraEffectPeriodicFn(spell_the_lich_king_vile_spirits_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
} }
private:
bool _is25Man; bool _is25Man;
};
AuraScript* GetAuraScript() const override
{
return new spell_the_lich_king_vile_spirits_AuraScript();
}
}; };
class spell_the_lich_king_vile_spirits_visual : public SpellScriptLoader class spell_the_lich_king_vile_spirits_visual : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_vile_spirits_visual);
spell_the_lich_king_vile_spirits_visual() : SpellScriptLoader("spell_the_lich_king_vile_spirits_visual") { }
class spell_the_lich_king_vile_spirits_visual_SpellScript : public SpellScript
{
PrepareSpellScript(spell_the_lich_king_vile_spirits_visual_SpellScript);
void ModDestHeight(SpellEffIndex /*effIndex*/) void ModDestHeight(SpellEffIndex /*effIndex*/)
{ {
@@ -2984,24 +2793,13 @@ public:
void Register() override void Register() override
{ {
OnEffectLaunch += SpellEffectFn(spell_the_lich_king_vile_spirits_visual_SpellScript::ModDestHeight, EFFECT_0, SPELL_EFFECT_DUMMY); OnEffectLaunch += SpellEffectFn(spell_the_lich_king_vile_spirits_visual::ModDestHeight, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_vile_spirits_visual_SpellScript();
} }
}; };
class spell_the_lich_king_vile_spirit_move_target_search : public SpellScriptLoader class spell_the_lich_king_vile_spirit_move_target_search : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_vile_spirit_move_target_search);
spell_the_lich_king_vile_spirit_move_target_search() : SpellScriptLoader("spell_the_lich_king_vile_spirit_move_target_search") { }
class spell_the_lich_king_vile_spirit_move_target_search_SpellScript : public SpellScript
{
PrepareSpellScript(spell_the_lich_king_vile_spirit_move_target_search_SpellScript);
bool Load() override bool Load() override
{ {
@@ -3030,27 +2828,22 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_vile_spirit_move_target_search_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_vile_spirit_move_target_search::SelectTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_vile_spirit_move_target_search_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_vile_spirit_move_target_search::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
} }
private:
WorldObject* _target; WorldObject* _target;
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_vile_spirit_move_target_search_SpellScript();
}
}; };
class spell_the_lich_king_vile_spirit_damage_target_search : public SpellScriptLoader class spell_the_lich_king_vile_spirit_damage_target_search : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_vile_spirit_damage_target_search);
spell_the_lich_king_vile_spirit_damage_target_search() : SpellScriptLoader("spell_the_lich_king_vile_spirit_damage_target_search") { }
class spell_the_lich_king_vile_spirit_damage_target_search_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_the_lich_king_vile_spirit_damage_target_search_SpellScript); return ValidateSpellInfo({ SPELL_VILE_SPIRIT_DAMAGE_SEARCH, SPELL_SPIRIT_BURST });
}
void CheckTargetCount(std::list<WorldObject*>& targets) void CheckTargetCount(std::list<WorldObject*>& targets)
{ {
@@ -3074,24 +2867,18 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_vile_spirit_damage_target_search_SpellScript::CheckTargetCount, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_vile_spirit_damage_target_search::CheckTargetCount, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_vile_spirit_damage_target_search_SpellScript();
} }
}; };
class spell_the_lich_king_harvest_soul : public SpellScriptLoader class spell_the_lich_king_harvest_soul_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_the_lich_king_harvest_soul_aura);
spell_the_lich_king_harvest_soul() : SpellScriptLoader("spell_the_lich_king_harvest_soul") { }
class spell_the_lich_king_harvest_soul_AuraScript : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_the_lich_king_harvest_soul_AuraScript); return ValidateSpellInfo({ SPELL_HARVESTED_SOUL_LK_BUFF });
}
bool Load() override bool Load() override
{ {
@@ -3107,13 +2894,7 @@ public:
void Register() override void Register() override
{ {
AfterEffectRemove += AuraEffectRemoveFn(spell_the_lich_king_harvest_soul_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_the_lich_king_harvest_soul_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_the_lich_king_harvest_soul_AuraScript();
} }
}; };
@@ -3389,14 +3170,9 @@ public:
} }
}; };
class spell_the_lich_king_lights_favor : public SpellScriptLoader class spell_the_lich_king_lights_favor_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_the_lich_king_lights_favor_aura);
spell_the_lich_king_lights_favor() : SpellScriptLoader("spell_the_lich_king_lights_favor") { }
class spell_the_lich_king_lights_favor_AuraScript : public AuraScript
{
PrepareAuraScript(spell_the_lich_king_lights_favor_AuraScript);
void OnPeriodic(AuraEffect const* /*aurEff*/) void OnPeriodic(AuraEffect const* /*aurEff*/)
{ {
@@ -3415,25 +3191,19 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_the_lich_king_lights_favor_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_HEAL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_the_lich_king_lights_favor_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_HEAL);
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_the_lich_king_lights_favor_AuraScript::CalculateBonus, EFFECT_1, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE); DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_the_lich_king_lights_favor_aura::CalculateBonus, EFFECT_1, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_the_lich_king_lights_favor_AuraScript();
} }
}; };
class spell_the_lich_king_restore_soul : public SpellScriptLoader class spell_the_lich_king_restore_soul : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_restore_soul);
spell_the_lich_king_restore_soul() : SpellScriptLoader("spell_the_lich_king_restore_soul") { }
class spell_the_lich_king_restore_soul_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_the_lich_king_restore_soul_SpellScript); return ValidateSpellInfo({ SPELL_HARVEST_SOULS_TELEPORT, SPELL_HARVEST_SOUL_TELEPORT });
}
bool Load() override bool Load() override
{ {
@@ -3467,16 +3237,11 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_restore_soul_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_restore_soul::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
} }
private:
InstanceScript* _instance; InstanceScript* _instance;
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_restore_soul_SpellScript();
}
}; };
class npc_spirit_warden : public CreatureScript class npc_spirit_warden : public CreatureScript
@@ -3526,14 +3291,9 @@ public:
} }
}; };
class spell_the_lich_king_dark_hunger : public SpellScriptLoader class spell_the_lich_king_dark_hunger_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_the_lich_king_dark_hunger_aura);
spell_the_lich_king_dark_hunger() : SpellScriptLoader("spell_the_lich_king_dark_hunger") { }
class spell_the_lich_king_dark_hunger_AuraScript : public AuraScript
{
PrepareAuraScript(spell_the_lich_king_dark_hunger_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -3557,24 +3317,18 @@ public:
void Register() override void Register() override
{ {
OnEffectProc += AuraEffectProcFn(spell_the_lich_king_dark_hunger_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); OnEffectProc += AuraEffectProcFn(spell_the_lich_king_dark_hunger_aura::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_the_lich_king_dark_hunger_AuraScript();
} }
}; };
class spell_the_lich_king_soul_rip : public SpellScriptLoader class spell_the_lich_king_soul_rip_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_the_lich_king_soul_rip_aura);
spell_the_lich_king_soul_rip() : SpellScriptLoader("spell_the_lich_king_soul_rip") { }
class spell_the_lich_king_soul_rip_AuraScript : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_the_lich_king_soul_rip_AuraScript); return ValidateSpellInfo({ SPELL_SOUL_RIP_DAMAGE, 5000 });
}
void OnPeriodic(AuraEffect const* aurEff) void OnPeriodic(AuraEffect const* aurEff)
{ {
@@ -3586,13 +3340,7 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_the_lich_king_soul_rip_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); OnEffectPeriodic += AuraEffectPeriodicFn(spell_the_lich_king_soul_rip_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_the_lich_king_soul_rip_AuraScript();
} }
}; };
@@ -3617,14 +3365,9 @@ public:
} }
}; };
class spell_the_lich_king_summon_spirit_bomb : public SpellScriptLoader class spell_the_lich_king_summon_spirit_bomb : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_summon_spirit_bomb);
spell_the_lich_king_summon_spirit_bomb() : SpellScriptLoader("spell_the_lich_king_summon_spirit_bomb") { }
class spell_the_lich_king_summon_spirit_bomb_SpellScript : public SpellScript
{
PrepareSpellScript(spell_the_lich_king_summon_spirit_bomb_SpellScript);
void HandleScript(SpellEffIndex effIndex) void HandleScript(SpellEffIndex effIndex)
{ {
@@ -3634,13 +3377,7 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_summon_spirit_bomb_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_summon_spirit_bomb::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_summon_spirit_bomb_SpellScript();
} }
}; };
@@ -3701,14 +3438,9 @@ public:
} }
}; };
class spell_the_lich_king_trigger_vile_spirit : public SpellScriptLoader class spell_the_lich_king_trigger_vile_spirit : public SpellScript
{ {
public: PrepareSpellScript(spell_the_lich_king_trigger_vile_spirit);
spell_the_lich_king_trigger_vile_spirit() : SpellScriptLoader("spell_the_lich_king_trigger_vile_spirit") { }
class spell_the_lich_king_trigger_vile_spirit_SpellScript : public SpellScript
{
PrepareSpellScript(spell_the_lich_king_trigger_vile_spirit_SpellScript);
void ActivateSpirit() void ActivateSpirit()
{ {
@@ -3724,13 +3456,7 @@ public:
void Register() override void Register() override
{ {
OnHit += SpellHitFn(spell_the_lich_king_trigger_vile_spirit_SpellScript::ActivateSpirit); OnHit += SpellHitFn(spell_the_lich_king_trigger_vile_spirit::ActivateSpirit);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_the_lich_king_trigger_vile_spirit_SpellScript();
} }
}; };
@@ -3803,47 +3529,47 @@ void AddSC_boss_the_lich_king()
{ {
new boss_the_lich_king(); new boss_the_lich_king();
new npc_tirion_fordring_tft(); new npc_tirion_fordring_tft();
new spell_the_lich_king_quake(); RegisterSpellScript(spell_the_lich_king_quake);
new spell_the_lich_king_jump(); RegisterSpellScript(spell_the_lich_king_jump);
new spell_the_lich_king_jump_remove_aura(); RegisterSpellScript(spell_the_lich_king_jump_remove_aura);
new spell_trigger_spell_from_caster("spell_the_lich_king_mass_resurrection", SPELL_MASS_RESURRECTION_REAL); RegisterSpellScriptWithArgs(spell_trigger_spell_from_caster, "spell_the_lich_king_mass_resurrection", SPELL_MASS_RESURRECTION_REAL);
new spell_the_lich_king_play_movie(); RegisterSpellScript(spell_the_lich_king_play_movie);
// fight stuff below // fight stuff below
new npc_shambling_horror_icc(); new npc_shambling_horror_icc();
new spell_the_lich_king_infest(); RegisterSpellScript(spell_the_lich_king_infest_aura);
new spell_the_lich_king_necrotic_plague(); RegisterSpellScript(spell_the_lich_king_necrotic_plague_aura);
new spell_the_lich_king_necrotic_plague_jump(); RegisterSpellAndAuraScriptPair(spell_the_lich_king_necrotic_plague_jump, spell_the_lich_king_necrotic_plague_jump_aura);
new spell_the_lich_king_shadow_trap_visual(); RegisterSpellScript(spell_the_lich_king_shadow_trap_visual_aura);
new spell_the_lich_king_shadow_trap_periodic(); RegisterSpellScript(spell_the_lich_king_shadow_trap_periodic);
new spell_the_lich_king_ice_burst_target_search(); RegisterSpellScript(spell_the_lich_king_ice_burst_target_search);
new npc_icc_ice_sphere(); new npc_icc_ice_sphere();
new spell_the_lich_king_raging_spirit(); RegisterSpellScript(spell_the_lich_king_raging_spirit);
new npc_raging_spirit(); new npc_raging_spirit();
new spell_the_lich_king_defile(); RegisterSpellScript(spell_the_lich_king_defile);
new spell_the_lich_king_soul_reaper(); RegisterSpellScript(spell_the_lich_king_soul_reaper_aura);
new npc_valkyr_shadowguard(); new npc_valkyr_shadowguard();
new spell_the_lich_king_summon_into_air(); RegisterSpellScript(spell_the_lich_king_summon_into_air);
new spell_the_lich_king_teleport_to_frostmourne_hc(); RegisterSpellScript(spell_the_lich_king_teleport_to_frostmourne_hc);
new spell_the_lich_king_valkyr_target_search(); RegisterSpellScript(spell_the_lich_king_valkyr_target_search);
new spell_the_lich_king_cast_back_to_caster(); RegisterSpellScript(spell_the_lich_king_cast_back_to_caster);
new spell_the_lich_king_life_siphon(); RegisterSpellScript(spell_the_lich_king_life_siphon);
new spell_the_lich_king_vile_spirits(); RegisterSpellScript(spell_the_lich_king_vile_spirits_aura);
new spell_the_lich_king_vile_spirits_visual(); RegisterSpellScript(spell_the_lich_king_vile_spirits_visual);
new spell_the_lich_king_vile_spirit_move_target_search(); RegisterSpellScript(spell_the_lich_king_vile_spirit_move_target_search);
new spell_the_lich_king_vile_spirit_damage_target_search(); RegisterSpellScript(spell_the_lich_king_vile_spirit_damage_target_search);
new spell_the_lich_king_harvest_soul(); RegisterSpellScript(spell_the_lich_king_harvest_soul_aura);
new npc_strangulate_vehicle(); new npc_strangulate_vehicle();
new npc_terenas_menethil(); new npc_terenas_menethil();
new spell_the_lich_king_lights_favor(); RegisterSpellScript(spell_the_lich_king_lights_favor_aura);
new spell_the_lich_king_restore_soul(); RegisterSpellScript(spell_the_lich_king_restore_soul);
new npc_spirit_warden(); new npc_spirit_warden();
new spell_the_lich_king_dark_hunger(); RegisterSpellScript(spell_the_lich_king_dark_hunger_aura);
new spell_the_lich_king_soul_rip(); RegisterSpellScript(spell_the_lich_king_soul_rip_aura);
new npc_icc_lk_checktarget(); new npc_icc_lk_checktarget();
new spell_the_lich_king_summon_spirit_bomb(); RegisterSpellScript(spell_the_lich_king_summon_spirit_bomb);
new npc_lk_spirit_bomb(); new npc_lk_spirit_bomb();
new spell_the_lich_king_trigger_vile_spirit(); RegisterSpellScript(spell_the_lich_king_trigger_vile_spirit);
new npc_lk_wicked_spirit(); new npc_lk_wicked_spirit();
new achievement_been_waiting_long_time(); new achievement_been_waiting_long_time();
new achievement_neck_deep_in_vile(); new achievement_neck_deep_in_vile();
@@ -1138,14 +1138,9 @@ public:
} }
}; };
class spell_dreamwalker_summon_portal : public SpellScriptLoader class spell_dreamwalker_summon_portal : public SpellScript
{ {
public: PrepareSpellScript(spell_dreamwalker_summon_portal);
spell_dreamwalker_summon_portal() : SpellScriptLoader("spell_dreamwalker_summon_portal") { }
class spell_dreamwalker_summon_portal_SpellScript : public SpellScript
{
PrepareSpellScript(spell_dreamwalker_summon_portal_SpellScript);
void HandleScript(SpellEffIndex effIndex) void HandleScript(SpellEffIndex effIndex)
{ {
@@ -1166,24 +1161,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_dreamwalker_summon_portal_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_dreamwalker_summon_portal::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_dreamwalker_summon_portal_SpellScript();
} }
}; };
class spell_dreamwalker_twisted_nightmares : public SpellScriptLoader class spell_dreamwalker_twisted_nightmares : public SpellScript
{ {
public: PrepareSpellScript(spell_dreamwalker_twisted_nightmares);
spell_dreamwalker_twisted_nightmares() : SpellScriptLoader("spell_dreamwalker_twisted_nightmares") { }
class spell_dreamwalker_twisted_nightmares_SpellScript : public SpellScript
{
PrepareSpellScript(spell_dreamwalker_twisted_nightmares_SpellScript);
void HandleScript(SpellEffIndex effIndex) void HandleScript(SpellEffIndex effIndex)
{ {
@@ -1197,24 +1181,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_dreamwalker_twisted_nightmares_SpellScript::HandleScript, EFFECT_2, SPELL_EFFECT_FORCE_CAST); OnEffectHitTarget += SpellEffectFn(spell_dreamwalker_twisted_nightmares::HandleScript, EFFECT_2, SPELL_EFFECT_FORCE_CAST);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_dreamwalker_twisted_nightmares_SpellScript();
} }
}; };
class spell_dreamwalker_nightmare_cloud : public SpellScriptLoader class spell_dreamwalker_nightmare_cloud_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_dreamwalker_nightmare_cloud_aura);
spell_dreamwalker_nightmare_cloud() : SpellScriptLoader("spell_dreamwalker_nightmare_cloud") { }
class spell_dreamwalker_nightmare_cloud_AuraScript : public AuraScript
{
PrepareAuraScript(spell_dreamwalker_nightmare_cloud_AuraScript);
bool Load() override bool Load() override
{ {
@@ -1230,26 +1203,16 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_dreamwalker_nightmare_cloud_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_dreamwalker_nightmare_cloud_aura::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
} }
private:
InstanceScript* _instance; InstanceScript* _instance;
};
AuraScript* GetAuraScript() const override
{
return new spell_dreamwalker_nightmare_cloud_AuraScript();
}
}; };
class spell_dreamwalker_mana_void : public SpellScriptLoader class spell_dreamwalker_mana_void_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_dreamwalker_mana_void_aura);
spell_dreamwalker_mana_void() : SpellScriptLoader("spell_dreamwalker_mana_void") { }
class spell_dreamwalker_mana_void_AuraScript : public AuraScript
{
PrepareAuraScript(spell_dreamwalker_mana_void_AuraScript);
void PeriodicTick(AuraEffect const* aurEff) void PeriodicTick(AuraEffect const* aurEff)
{ {
@@ -1262,24 +1225,13 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_dreamwalker_mana_void_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_dreamwalker_mana_void_aura::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_dreamwalker_mana_void_AuraScript();
} }
}; };
class spell_dreamwalker_decay_periodic_timer : public SpellScriptLoader class spell_dreamwalker_decay_periodic_timer_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_dreamwalker_decay_periodic_timer_aura);
spell_dreamwalker_decay_periodic_timer() : SpellScriptLoader("spell_dreamwalker_decay_periodic_timer") { }
class spell_dreamwalker_decay_periodic_timer_AuraScript : public AuraScript
{
PrepareAuraScript(spell_dreamwalker_decay_periodic_timer_AuraScript);
bool Load() override bool Load() override
{ {
@@ -1298,26 +1250,16 @@ public:
void Register() override void Register() override
{ {
OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_dreamwalker_decay_periodic_timer_AuraScript::DecayPeriodicTimer, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_dreamwalker_decay_periodic_timer_aura::DecayPeriodicTimer, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
} }
private:
int32 _decayRate; int32 _decayRate;
};
AuraScript* GetAuraScript() const override
{
return new spell_dreamwalker_decay_periodic_timer_AuraScript();
}
}; };
class spell_dreamwalker_summoner : public SpellScriptLoader class spell_dreamwalker_summoner : public SpellScript
{ {
public: PrepareSpellScript(spell_dreamwalker_summoner);
spell_dreamwalker_summoner() : SpellScriptLoader("spell_dreamwalker_summoner") { }
class spell_dreamwalker_summoner_SpellScript : public SpellScript
{
PrepareSpellScript(spell_dreamwalker_summoner_SpellScript);
bool Load() override bool Load() override
{ {
@@ -1354,25 +1296,19 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dreamwalker_summoner_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dreamwalker_summoner::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
OnEffectHitTarget += SpellEffectFn(spell_dreamwalker_summoner_SpellScript::HandleForceCast, EFFECT_0, SPELL_EFFECT_FORCE_CAST); OnEffectHitTarget += SpellEffectFn(spell_dreamwalker_summoner::HandleForceCast, EFFECT_0, SPELL_EFFECT_FORCE_CAST);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_dreamwalker_summoner_SpellScript();
} }
}; };
class spell_dreamwalker_summon_suppresser : public SpellScriptLoader class spell_dreamwalker_summon_suppresser_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_dreamwalker_summon_suppresser_aura);
spell_dreamwalker_summon_suppresser() : SpellScriptLoader("spell_dreamwalker_summon_suppresser") { }
class spell_dreamwalker_summon_suppresser_AuraScript : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_dreamwalker_summon_suppresser_AuraScript); return ValidateSpellInfo({ SPELL_SUMMON_SUPPRESSER });
}
void PeriodicTick(AuraEffect const* /*aurEff*/) void PeriodicTick(AuraEffect const* /*aurEff*/)
{ {
@@ -1401,24 +1337,13 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_dreamwalker_summon_suppresser_AuraScript::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_dreamwalker_summon_suppresser_aura::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_dreamwalker_summon_suppresser_AuraScript();
} }
}; };
class spell_dreamwalker_summon_suppresser_effect : public SpellScriptLoader class spell_dreamwalker_summon_suppresser_effect : public SpellScript
{ {
public: PrepareSpellScript(spell_dreamwalker_summon_suppresser_effect);
spell_dreamwalker_summon_suppresser_effect() : SpellScriptLoader("spell_dreamwalker_summon_suppresser_effect") { }
class spell_dreamwalker_summon_suppresser_effect_SpellScript : public SpellScript
{
PrepareSpellScript(spell_dreamwalker_summon_suppresser_effect_SpellScript);
bool Load() override bool Load() override
{ {
@@ -1438,24 +1363,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_dreamwalker_summon_suppresser_effect_SpellScript::HandleForceCast, EFFECT_0, SPELL_EFFECT_FORCE_CAST); OnEffectHitTarget += SpellEffectFn(spell_dreamwalker_summon_suppresser_effect::HandleForceCast, EFFECT_0, SPELL_EFFECT_FORCE_CAST);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_dreamwalker_summon_suppresser_effect_SpellScript();
} }
}; };
class spell_valithria_suppression : public SpellScriptLoader class spell_valithria_suppression_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_valithria_suppression_aura);
spell_valithria_suppression() : SpellScriptLoader("spell_valithria_suppression") { }
class spell_valithria_suppression_AuraScript : public AuraScript
{
PrepareAuraScript(spell_valithria_suppression_AuraScript);
void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{ {
@@ -1496,14 +1410,8 @@ public:
void Register() override void Register() override
{ {
AfterEffectApply += AuraEffectApplyFn(spell_valithria_suppression_AuraScript::OnApply, EFFECT_0, SPELL_AURA_MOD_HEALING_PCT, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); AfterEffectApply += AuraEffectApplyFn(spell_valithria_suppression_aura::OnApply, EFFECT_0, SPELL_AURA_MOD_HEALING_PCT, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
AfterEffectRemove += AuraEffectRemoveFn(spell_valithria_suppression_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_MOD_HEALING_PCT, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_valithria_suppression_aura::OnRemove, EFFECT_0, SPELL_AURA_MOD_HEALING_PCT, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_valithria_suppression_AuraScript();
} }
}; };
@@ -1531,15 +1439,15 @@ void AddSC_boss_valithria_dreamwalker()
new npc_blistering_zombie(); new npc_blistering_zombie();
new npc_gluttonous_abomination(); new npc_gluttonous_abomination();
new spell_dreamwalker_summon_portal(); RegisterSpellScript(spell_dreamwalker_summon_portal);
new spell_dreamwalker_twisted_nightmares(); RegisterSpellScript(spell_dreamwalker_twisted_nightmares);
new spell_dreamwalker_nightmare_cloud(); RegisterSpellScript(spell_dreamwalker_nightmare_cloud_aura);
new spell_dreamwalker_mana_void(); RegisterSpellScript(spell_dreamwalker_mana_void_aura);
new spell_dreamwalker_decay_periodic_timer(); RegisterSpellScript(spell_dreamwalker_decay_periodic_timer_aura);
new spell_dreamwalker_summoner(); RegisterSpellScript(spell_dreamwalker_summoner);
new spell_dreamwalker_summon_suppresser(); RegisterSpellScript(spell_dreamwalker_summon_suppresser_aura);
new spell_dreamwalker_summon_suppresser_effect(); RegisterSpellScript(spell_dreamwalker_summon_suppresser_effect);
new spell_valithria_suppression(); RegisterSpellScript(spell_valithria_suppression_aura);
new achievement_portal_jockey(); new achievement_portal_jockey();
} }
@@ -1890,14 +1890,9 @@ public:
} }
}; };
class spell_icc_stoneform : public SpellScriptLoader class spell_icc_stoneform_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_icc_stoneform_aura);
spell_icc_stoneform() : SpellScriptLoader("spell_icc_stoneform") { }
class spell_icc_stoneform_AuraScript : public AuraScript
{
PrepareAuraScript(spell_icc_stoneform_AuraScript);
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{ {
@@ -1923,25 +1918,19 @@ public:
void Register() override void Register() override
{ {
OnEffectApply += AuraEffectApplyFn(spell_icc_stoneform_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); OnEffectApply += AuraEffectApplyFn(spell_icc_stoneform_aura::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_icc_stoneform_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); OnEffectRemove += AuraEffectRemoveFn(spell_icc_stoneform_aura::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_icc_stoneform_AuraScript();
} }
}; };
class spell_icc_sprit_alarm : public SpellScriptLoader class spell_icc_sprit_alarm : public SpellScript
{ {
public: PrepareSpellScript(spell_icc_sprit_alarm);
spell_icc_sprit_alarm() : SpellScriptLoader("spell_icc_sprit_alarm") { }
class spell_icc_sprit_alarm_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_icc_sprit_alarm_SpellScript); return ValidateSpellInfo({ SPELL_STONEFORM });
}
void HandleEvent(SpellEffIndex effIndex) void HandleEvent(SpellEffIndex effIndex)
{ {
@@ -1987,24 +1976,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHit += SpellEffectFn(spell_icc_sprit_alarm_SpellScript::HandleEvent, EFFECT_2, SPELL_EFFECT_SEND_EVENT); OnEffectHit += SpellEffectFn(spell_icc_sprit_alarm::HandleEvent, EFFECT_2, SPELL_EFFECT_SEND_EVENT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_icc_sprit_alarm_SpellScript();
} }
}; };
class spell_icc_geist_alarm : public SpellScriptLoader class spell_icc_geist_alarm : public SpellScript
{ {
public: PrepareSpellScript(spell_icc_geist_alarm);
spell_icc_geist_alarm() : SpellScriptLoader("spell_icc_geist_alarm") { }
class spell_icc_geist_alarm_SpellScript : public SpellScript
{
PrepareSpellScript(spell_icc_geist_alarm_SpellScript);
void HandleEvent(SpellEffIndex effIndex) void HandleEvent(SpellEffIndex effIndex)
{ {
@@ -2046,24 +2024,18 @@ public:
void Register() override void Register() override
{ {
OnEffectHit += SpellEffectFn(spell_icc_geist_alarm_SpellScript::HandleEvent, EFFECT_2, SPELL_EFFECT_SEND_EVENT); OnEffectHit += SpellEffectFn(spell_icc_geist_alarm::HandleEvent, EFFECT_2, SPELL_EFFECT_SEND_EVENT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_icc_geist_alarm_SpellScript();
} }
}; };
class spell_frost_giant_death_plague : public SpellScriptLoader class spell_frost_giant_death_plague : public SpellScript
{ {
public: PrepareSpellScript(spell_frost_giant_death_plague);
spell_frost_giant_death_plague() : SpellScriptLoader("spell_frost_giant_death_plague") { }
class spell_frost_giant_death_plague_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_frost_giant_death_plague_SpellScript); return ValidateSpellInfo({ SPELL_DEATH_PLAGUE_AURA, SPELL_DEATH_PLAGUE_KILL, SPELL_RECENTLY_INFECTED });
}
// First effect // First effect
void CountTargets(std::list<WorldObject*>& targets) void CountTargets(std::list<WorldObject*>& targets)
@@ -2095,25 +2067,14 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_frost_giant_death_plague_SpellScript::CountTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_frost_giant_death_plague::CountTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY);
OnEffectHitTarget += SpellEffectFn(spell_frost_giant_death_plague_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE); OnEffectHitTarget += SpellEffectFn(spell_frost_giant_death_plague::HandleScript, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_frost_giant_death_plague_SpellScript();
} }
}; };
class spell_icc_harvest_blight_specimen : public SpellScriptLoader class spell_icc_harvest_blight_specimen : public SpellScript
{ {
public: PrepareSpellScript(spell_icc_harvest_blight_specimen);
spell_icc_harvest_blight_specimen() : SpellScriptLoader("spell_icc_harvest_blight_specimen") { }
class spell_icc_harvest_blight_specimen_SpellScript : public SpellScript
{
PrepareSpellScript(spell_icc_harvest_blight_specimen_SpellScript);
void HandleScript(SpellEffIndex effIndex) void HandleScript(SpellEffIndex effIndex)
{ {
@@ -2128,14 +2089,8 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_icc_harvest_blight_specimen_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_icc_harvest_blight_specimen::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHitTarget += SpellEffectFn(spell_icc_harvest_blight_specimen_SpellScript::HandleQuestComplete, EFFECT_1, SPELL_EFFECT_QUEST_COMPLETE); OnEffectHitTarget += SpellEffectFn(spell_icc_harvest_blight_specimen::HandleQuestComplete, EFFECT_1, SPELL_EFFECT_QUEST_COMPLETE);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_icc_harvest_blight_specimen_SpellScript();
} }
}; };
@@ -2150,14 +2105,9 @@ public:
} }
}; };
class spell_svalna_revive_champion : public SpellScriptLoader class spell_svalna_revive_champion : public SpellScript
{ {
public: PrepareSpellScript(spell_svalna_revive_champion);
spell_svalna_revive_champion() : SpellScriptLoader("spell_svalna_revive_champion") { }
class spell_svalna_revive_champion_SpellScript : public SpellScript
{
PrepareSpellScript(spell_svalna_revive_champion_SpellScript);
void RemoveAliveTarget(std::list<WorldObject*>& targets) void RemoveAliveTarget(std::list<WorldObject*>& targets)
{ {
@@ -2180,25 +2130,19 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_svalna_revive_champion_SpellScript::RemoveAliveTarget, EFFECT_0, TARGET_UNIT_DEST_AREA_ENTRY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_svalna_revive_champion::RemoveAliveTarget, EFFECT_0, TARGET_UNIT_DEST_AREA_ENTRY);
OnEffectHit += SpellEffectFn(spell_svalna_revive_champion_SpellScript::Land, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHit += SpellEffectFn(spell_svalna_revive_champion::Land, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_svalna_revive_champion_SpellScript();
} }
}; };
class spell_svalna_remove_spear : public SpellScriptLoader class spell_svalna_remove_spear : public SpellScript
{ {
public: PrepareSpellScript(spell_svalna_remove_spear);
spell_svalna_remove_spear() : SpellScriptLoader("spell_svalna_remove_spear") { }
class spell_svalna_remove_spear_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_svalna_remove_spear_SpellScript); return ValidateSpellInfo({ SPELL_IMPALING_SPEAR });
}
void HandleScript(SpellEffIndex effIndex) void HandleScript(SpellEffIndex effIndex)
{ {
@@ -2213,24 +2157,13 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_svalna_remove_spear_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_svalna_remove_spear::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_svalna_remove_spear_SpellScript();
} }
}; };
class spell_icc_soul_missile : public SpellScriptLoader class spell_icc_soul_missile : public SpellScript
{ {
public: PrepareSpellScript(spell_icc_soul_missile);
spell_icc_soul_missile() : SpellScriptLoader("spell_icc_soul_missile") { }
class spell_icc_soul_missile_SpellScript : public SpellScript
{
PrepareSpellScript(spell_icc_soul_missile_SpellScript);
void RelocateDest() void RelocateDest()
{ {
@@ -2240,13 +2173,7 @@ public:
void Register() override void Register() override
{ {
OnCast += SpellCastFn(spell_icc_soul_missile_SpellScript::RelocateDest); OnCast += SpellCastFn(spell_icc_soul_missile::RelocateDest);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_icc_soul_missile_SpellScript();
} }
}; };
@@ -2346,14 +2273,14 @@ public:
// pussywizard below: // pussywizard below:
class spell_icc_web_wrap : public SpellScriptLoader class spell_icc_web_wrap_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_icc_web_wrap_aura);
spell_icc_web_wrap() : SpellScriptLoader("spell_icc_web_wrap") { }
class spell_icc_web_wrap_AuraScript : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_icc_web_wrap_AuraScript); return ValidateSpellInfo({ 71010 });
}
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{ {
@@ -2364,24 +2291,18 @@ public:
void Register() override void Register() override
{ {
OnEffectRemove += AuraEffectRemoveFn(spell_icc_web_wrap_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_MOD_ROOT, AURA_EFFECT_HANDLE_REAL); OnEffectRemove += AuraEffectRemoveFn(spell_icc_web_wrap_aura::OnRemove, EFFECT_0, SPELL_AURA_MOD_ROOT, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_icc_web_wrap_AuraScript();
} }
}; };
class spell_icc_dark_reckoning : public SpellScriptLoader class spell_icc_dark_reckoning_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_icc_dark_reckoning_aura);
spell_icc_dark_reckoning() : SpellScriptLoader("spell_icc_dark_reckoning") { }
class spell_icc_dark_reckoning_AuraScript : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_icc_dark_reckoning_AuraScript); return ValidateSpellInfo({ 69482 });
}
void OnPeriodic(AuraEffect const* /*aurEff*/) void OnPeriodic(AuraEffect const* /*aurEff*/)
{ {
@@ -2391,24 +2312,13 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_icc_dark_reckoning_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); OnEffectPeriodic += AuraEffectPeriodicFn(spell_icc_dark_reckoning_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_icc_dark_reckoning_AuraScript();
} }
}; };
class spell_stinky_precious_decimate : public SpellScriptLoader class spell_stinky_precious_decimate : public SpellScript
{ {
public: PrepareSpellScript(spell_stinky_precious_decimate);
spell_stinky_precious_decimate() : SpellScriptLoader("spell_stinky_precious_decimate") { }
class spell_stinky_precious_decimate_SpellScript : public SpellScript
{
PrepareSpellScript(spell_stinky_precious_decimate_SpellScript);
void HandleScript(SpellEffIndex /*effIndex*/) void HandleScript(SpellEffIndex /*effIndex*/)
{ {
@@ -2421,24 +2331,18 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_stinky_precious_decimate_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); OnEffectHitTarget += SpellEffectFn(spell_stinky_precious_decimate::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_stinky_precious_decimate_SpellScript();
} }
}; };
class spell_icc_yf_frozen_orb : public SpellScriptLoader class spell_icc_yf_frozen_orb_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_icc_yf_frozen_orb_aura);
spell_icc_yf_frozen_orb() : SpellScriptLoader("spell_icc_yf_frozen_orb") { }
class spell_icc_yf_frozen_orb_AuraScript : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_icc_yf_frozen_orb_AuraScript) return ValidateSpellInfo({ 71285 });
}
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/) void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
{ {
@@ -2450,24 +2354,18 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_icc_yf_frozen_orb_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_icc_yf_frozen_orb_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_icc_yf_frozen_orb_AuraScript();
} }
}; };
class spell_icc_yh_volley : public SpellScriptLoader class spell_icc_yh_volley_aura : public AuraScript
{ {
public: PrepareAuraScript(spell_icc_yh_volley_aura);
spell_icc_yh_volley() : SpellScriptLoader("spell_icc_yh_volley") { }
class spell_icc_yh_volley_AuraScript : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareAuraScript(spell_icc_yh_volley_AuraScript) return ValidateSpellInfo({ 41089 });
}
void HandleEffectPeriodic(AuraEffect const* aurEff) void HandleEffectPeriodic(AuraEffect const* aurEff)
{ {
@@ -2484,24 +2382,18 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_icc_yh_volley_AuraScript::HandleEffectPeriodic, EFFECT_1, SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE); OnEffectPeriodic += AuraEffectPeriodicFn(spell_icc_yh_volley_aura::HandleEffectPeriodic, EFFECT_1, SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_icc_yh_volley_AuraScript();
} }
}; };
class spell_icc_yd_summon_undead : public SpellScriptLoader class spell_icc_yd_summon_undead : public SpellScript
{ {
public: PrepareSpellScript(spell_icc_yd_summon_undead);
spell_icc_yd_summon_undead() : SpellScriptLoader("spell_icc_yd_summon_undead") { }
class spell_icc_yd_summon_undead_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_icc_yd_summon_undead_SpellScript); return ValidateSpellInfo({ 71302 });
}
void HandleDummyLaunch(SpellEffIndex /*effIndex*/) void HandleDummyLaunch(SpellEffIndex /*effIndex*/)
{ {
@@ -2513,24 +2405,18 @@ public:
void Register() override void Register() override
{ {
OnEffectLaunch += SpellEffectFn(spell_icc_yd_summon_undead_SpellScript::HandleDummyLaunch, EFFECT_0, SPELL_EFFECT_DUMMY); OnEffectLaunch += SpellEffectFn(spell_icc_yd_summon_undead::HandleDummyLaunch, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_icc_yd_summon_undead_SpellScript();
} }
}; };
class spell_icc_shattered_bones : public SpellScriptLoader class spell_icc_shattered_bones : public SpellScript
{ {
public: PrepareSpellScript(spell_icc_shattered_bones);
spell_icc_shattered_bones() : SpellScriptLoader("spell_icc_shattered_bones") { }
class spell_icc_shattered_bones_SpellScript : public SpellScript bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
PrepareSpellScript(spell_icc_shattered_bones_SpellScript); return ValidateSpellInfo({ 70963 });
}
void HandleDummy() void HandleDummy()
{ {
@@ -2540,13 +2426,7 @@ public:
void Register() override void Register() override
{ {
AfterCast += SpellCastFn(spell_icc_shattered_bones_SpellScript::HandleDummy); AfterCast += SpellCastFn(spell_icc_shattered_bones::HandleDummy);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_icc_shattered_bones_SpellScript();
} }
}; };
@@ -3780,28 +3660,29 @@ void AddSC_icecrown_citadel()
new npc_frostwing_vrykul(); new npc_frostwing_vrykul();
new npc_impaling_spear(); new npc_impaling_spear();
new npc_arthas_teleport_visual(); new npc_arthas_teleport_visual();
new spell_icc_stoneform(); RegisterSpellScript(spell_icc_stoneform_aura);
new spell_icc_sprit_alarm(); RegisterSpellScript(spell_icc_sprit_alarm);
new spell_icc_geist_alarm(); RegisterSpellScript(spell_icc_geist_alarm);
new spell_frost_giant_death_plague(); RegisterSpellScript(spell_frost_giant_death_plague);
new spell_icc_harvest_blight_specimen(); RegisterSpellScript(spell_icc_harvest_blight_specimen);
new spell_trigger_spell_from_caster("spell_svalna_caress_of_death", SPELL_IMPALING_SPEAR_KILL); RegisterSpellScriptWithArgs(spell_trigger_spell_from_caster, "spell_svalna_caress_of_death", SPELL_IMPALING_SPEAR_KILL);
new spell_svalna_revive_champion();
new spell_svalna_remove_spear(); RegisterSpellScript(spell_svalna_revive_champion);
new spell_icc_soul_missile(); RegisterSpellScript(spell_svalna_remove_spear);
RegisterSpellScript(spell_icc_soul_missile);
new at_icc_saurfang_portal(); new at_icc_saurfang_portal();
new at_icc_shutdown_traps(); new at_icc_shutdown_traps();
new at_icc_start_blood_quickening(); new at_icc_start_blood_quickening();
new at_icc_start_frostwing_gauntlet(); new at_icc_start_frostwing_gauntlet();
// pussywizard below: // pussywizard below:
new spell_icc_web_wrap(); RegisterSpellScript(spell_icc_web_wrap_aura);
new spell_icc_dark_reckoning(); RegisterSpellScript(spell_icc_dark_reckoning_aura);
new spell_stinky_precious_decimate(); RegisterSpellScript(spell_stinky_precious_decimate);
new spell_icc_yf_frozen_orb(); RegisterSpellScript(spell_icc_yf_frozen_orb_aura);
new spell_icc_yh_volley(); RegisterSpellScript(spell_icc_yh_volley_aura);
new spell_icc_yd_summon_undead(); RegisterSpellScript(spell_icc_yd_summon_undead);
new spell_icc_shattered_bones(); RegisterSpellScript(spell_icc_shattered_bones);
new npc_icc_skybreaker_hierophant(); new npc_icc_skybreaker_hierophant();
new npc_icc_skybreaker_marksman(); new npc_icc_skybreaker_marksman();
new npc_icc_skybreaker_vicar(); new npc_icc_skybreaker_vicar();
@@ -591,17 +591,12 @@ enum ItemIds
ITEM_GOBLIN_ROCKET_PACK = 49278 ITEM_GOBLIN_ROCKET_PACK = 49278
}; };
class spell_trigger_spell_from_caster : public SpellScriptLoader class spell_trigger_spell_from_caster : public SpellScript
{ {
PrepareSpellScript(spell_trigger_spell_from_caster);
public: public:
spell_trigger_spell_from_caster(char const* scriptName, uint32 triggerId) : SpellScriptLoader(scriptName), _triggerId(triggerId) { } spell_trigger_spell_from_caster(uint32 triggerId) : SpellScript(), _triggerId(triggerId) { }
class spell_trigger_spell_from_caster_SpellScript : public SpellScript
{
PrepareSpellScript(spell_trigger_spell_from_caster_SpellScript);
public:
spell_trigger_spell_from_caster_SpellScript(uint32 triggerId) : SpellScript(), _triggerId(triggerId) { }
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -615,15 +610,7 @@ public:
void Register() override void Register() override
{ {
AfterHit += SpellHitFn(spell_trigger_spell_from_caster_SpellScript::HandleTrigger); AfterHit += SpellHitFn(spell_trigger_spell_from_caster::HandleTrigger);
}
uint32 _triggerId;
};
SpellScript* GetSpellScript() const override
{
return new spell_trigger_spell_from_caster_SpellScript(_triggerId);
} }
private: private: