refactor(Scripts/Northrend): spell scripts registry macros (#19346)

* zone_sholazar_basin spell:spell_q12726_song_of_wind_and_water

* zone_sholazar_basin spell:spell_q12620_the_lifewarden_wrath

* zone_sholazar_basin spell:spell_q12589_shoot_rjr

* zone_sholazar_basin spell:spell_shango_tracks

* zone_borean_tundra aura:spell_q11919_q11940_drake_hunt_aura

* zone_borean_tundra spell:spell_arcane_chains_character_force_cast

* zone_borean_tundra spell:spell_q11719_bloodspore_ruination_45997

* isle_of_conquest aura:spell_ioc_repair_turret_aura

* isle_of_conquest spell:spell_ioc_bomb_blast_criteria

* isle_of_conquest spell:spell_ioc_gunship_portal

* isle_of_conquest aura:spell_ioc_parachute_ic_aura

* isle_of_conquest spell:spell_ioc_launch

* zone_dragonblight spell:spell_q12478_frostmourne_cavern

* zone_dragonblight aura:spell_q12243_fire_upon_the_waters_aura

* zone_dragonblight spell:spell_q24545_aod_special

* zone_dragonblight spell:spell_q12096_q12092_dummy

* zone_dragonblight spell:spell_q12096_q12092_bark

* zone_storm_peaks aura:spell_q13003_thursting_hodirs_spear_aura

* zone_storm_peaks spell:spell_q13007_iron_colossus

* zone_storm_peaks aura:spell_close_rift_aura

* zone_wintergrasp spell:spell_wintergrasp_force_building

* zone_wintergrasp spell:spell_wintergrasp_create_vehicle

* zone_wintergrasp spell:spell_wintergrasp_rp_gg

* zone_wintergrasp spell:spell_wintergrasp_portal

* zone_wintergrasp spell:spell_wintergrasp_water

* zone_wintergrasp aura:spell_wintergrasp_hide_small_elementals_aura

* zone_wintergrasp spell:spell_wg_reduce_damage_by_distance

* zone_icecrown spell:spell_switch_infragreen_bomber_station

* zone_icecrown pair:spell_charge_shield_bomber

* zone_icecrown spell:spell_fight_fire_bomber

* zone_icecrown spell:spell_anti_air_rocket_bomber

* zone_icecrown spell:spell_onslaught_or_call_bone_gryphon

* zone_grizzly_hills spell:spell_shredder_delivery

* zone_grizzly_hills aura:spell_infected_worgen_bite_aura

* zone_grizzly_hills spell:spell_vehicle_warhead_fuse

* zone_grizzly_hills spell:spell_warhead_detonate

* zone_grizzly_hills aura:spell_z_check_aura

* zone_grizzly_hills aura:spell_warhead_fuse_aura

* fixup! zone_icecrown pair:spell_charge_shield_bomber
This commit is contained in:
Jelle Meeus
2024-07-09 18:07:41 +02:00
committed by GitHub
parent 11e908bfa4
commit 2763625498
9 changed files with 871 additions and 1216 deletions
@@ -0,0 +1,11 @@
--
UPDATE `spell_script_names` SET `ScriptName`='spell_q11919_q11940_drake_hunt_aura' WHERE `spell_id`=46620 AND `ScriptName`='spell_q11919_q11940_drake_hunt';
UPDATE `spell_script_names` SET `ScriptName`='spell_ioc_repair_turret_aura' WHERE `spell_id`=68077 AND `ScriptName`='spell_ioc_repair_turret';
UPDATE `spell_script_names` SET `ScriptName`='spell_ioc_parachute_ic_aura' WHERE `spell_id`=66656 AND `ScriptName`='spell_ioc_parachute_ic';
UPDATE `spell_script_names` SET `ScriptName`='spell_q12243_fire_upon_the_waters_aura' WHERE `spell_id`=48522 AND `ScriptName`='spell_q12243_fire_upon_the_waters';
UPDATE `spell_script_names` SET `ScriptName`='spell_q13003_thursting_hodirs_spear_aura' WHERE `spell_id`=56689 AND `ScriptName`='spell_q13003_thursting_hodirs_spear';
UPDATE `spell_script_names` SET `ScriptName`='spell_close_rift_aura' WHERE `spell_id`=56763 AND `ScriptName`='spell_close_rift';
UPDATE `spell_script_names` SET `ScriptName`='spell_wintergrasp_hide_small_elementals_aura' WHERE `spell_id`=52107 AND `ScriptName`='spell_wintergrasp_hide_small_elementals';
UPDATE `spell_script_names` SET `ScriptName`='spell_infected_worgen_bite_aura' WHERE `spell_id`=53094 AND `ScriptName`='spell_infected_worgen_bite';
UPDATE `spell_script_names` SET `ScriptName`='spell_z_check_aura' WHERE `spell_id`=61678 AND `ScriptName`='spell_z_check';
UPDATE `spell_script_names` SET `ScriptName`='spell_warhead_fuse_aura' WHERE `spell_id`=49181 AND `ScriptName`='spell_warhead_fuse';
@@ -308,14 +308,14 @@ public:
}
};
class spell_ioc_repair_turret : public SpellScriptLoader
class spell_ioc_repair_turret_aura : public AuraScript
{
public:
spell_ioc_repair_turret() : SpellScriptLoader("spell_ioc_repair_turret") { }
PrepareAuraScript(spell_ioc_repair_turret_aura);
class spell_ioc_repair_turret_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_ioc_repair_turret_AuraScript);
return ValidateSpellInfo({ SPELL_REPAIR_TURRET_DUMMY });
}
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -325,13 +325,7 @@ public:
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_ioc_repair_turret_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_ioc_repair_turret_AuraScript();
AfterEffectRemove += AuraEffectRemoveFn(spell_ioc_repair_turret_aura::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
@@ -344,14 +338,14 @@ enum blastCriteria
SPELL_BOMB_INATION_CREDIT = 68367,
};
class spell_ioc_bomb_blast_criteria : public SpellScriptLoader
class spell_ioc_bomb_blast_criteria : public SpellScript
{
public:
spell_ioc_bomb_blast_criteria() : SpellScriptLoader("spell_ioc_bomb_blast_criteria") { }
PrepareSpellScript(spell_ioc_bomb_blast_criteria);
class spell_ioc_bomb_blast_criteria_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_ioc_bomb_blast_criteria_SpellScript);
return ValidateSpellInfo({ SPELL_BOMB_INABLE_CREDIT, SPELL_BOMB_INATION_CREDIT });
}
void HandleGameObjectDamage(SpellEffIndex /*effIndex*/)
{
@@ -367,24 +361,13 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_ioc_bomb_blast_criteria_SpellScript::HandleGameObjectDamage, EFFECT_1, SPELL_EFFECT_GAMEOBJECT_DAMAGE);
OnEffectHitTarget += SpellEffectFn(spell_ioc_bomb_blast_criteria::HandleGameObjectDamage, EFFECT_1, SPELL_EFFECT_GAMEOBJECT_DAMAGE);
}
};
SpellScript* GetSpellScript() const override
class spell_ioc_gunship_portal : public SpellScript
{
return new spell_ioc_bomb_blast_criteria_SpellScript();
}
};
class spell_ioc_gunship_portal : public SpellScriptLoader
{
public:
spell_ioc_gunship_portal() : SpellScriptLoader("spell_ioc_gunship_portal") { }
class spell_ioc_gunship_portal_SpellScript : public SpellScript
{
PrepareSpellScript(spell_ioc_gunship_portal_SpellScript);
PrepareSpellScript(spell_ioc_gunship_portal);
bool Load() override
{
@@ -417,25 +400,19 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_ioc_gunship_portal_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHitTarget += SpellEffectFn(spell_ioc_gunship_portal_SpellScript::HandleScript2, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHitTarget += SpellEffectFn(spell_ioc_gunship_portal::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHitTarget += SpellEffectFn(spell_ioc_gunship_portal::HandleScript2, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
class spell_ioc_parachute_ic_aura : public AuraScript
{
return new spell_ioc_gunship_portal_SpellScript();
PrepareAuraScript(spell_ioc_parachute_ic_aura);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_PARACHUTE_IC });
}
};
class spell_ioc_parachute_ic : public SpellScriptLoader
{
public:
spell_ioc_parachute_ic() : SpellScriptLoader("spell_ioc_parachute_ic") { }
class spell_ioc_parachute_ic_AuraScript : public AuraScript
{
PrepareAuraScript(spell_ioc_parachute_ic_AuraScript)
void HandleTriggerSpell(AuraEffect const* /*aurEff*/)
{
@@ -446,24 +423,13 @@ public:
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_ioc_parachute_ic_AuraScript::HandleTriggerSpell, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_ioc_parachute_ic_aura::HandleTriggerSpell, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
class spell_ioc_launch : public SpellScript
{
return new spell_ioc_parachute_ic_AuraScript();
}
};
class spell_ioc_launch : public SpellScriptLoader
{
public:
spell_ioc_launch() : SpellScriptLoader("spell_ioc_launch") { }
class spell_ioc_launch_SpellScript : public SpellScript
{
PrepareSpellScript(spell_ioc_launch_SpellScript);
PrepareSpellScript(spell_ioc_launch);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -492,14 +458,8 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_ioc_launch_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_FORCE_CAST);
AfterHit += SpellHitFn(spell_ioc_launch_SpellScript::Launch);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_ioc_launch_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_ioc_launch::HandleScript, EFFECT_1, SPELL_EFFECT_FORCE_CAST);
AfterHit += SpellHitFn(spell_ioc_launch::Launch);
}
};
@@ -509,10 +469,10 @@ void AddSC_isle_of_conquest()
new npc_four_car_garage();
new npc_ioc_gunship_captain();
new boss_isle_of_conquest();
new spell_ioc_repair_turret();
new spell_ioc_bomb_blast_criteria();
new spell_ioc_gunship_portal();
new spell_ioc_parachute_ic();
new spell_ioc_launch();
RegisterSpellScript(spell_ioc_repair_turret_aura);
RegisterSpellScript(spell_ioc_bomb_blast_criteria);
RegisterSpellScript(spell_ioc_gunship_portal);
RegisterSpellScript(spell_ioc_parachute_ic_aura);
RegisterSpellScript(spell_ioc_launch);
}
@@ -34,14 +34,14 @@ enum eDrakeHunt
SPELL_SUBDUED = 46675
};
class spell_q11919_q11940_drake_hunt : public SpellScriptLoader
class spell_q11919_q11940_drake_hunt_aura : public AuraScript
{
public:
spell_q11919_q11940_drake_hunt() : SpellScriptLoader("spell_q11919_q11940_drake_hunt") { }
PrepareAuraScript(spell_q11919_q11940_drake_hunt_aura);
class spell_q11919_q11940_drake_hunt_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_q11919_q11940_drake_hunt_AuraScript)
return ValidateSpellInfo({ SPELL_SUBDUED, SPELL_DRAKE_HATCHLING_SUBDUED });
}
bool Load() override
{
@@ -68,13 +68,7 @@ public:
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_q11919_q11940_drake_hunt_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_q11919_q11940_drake_hunt_AuraScript();
AfterEffectRemove += AuraEffectRemoveFn(spell_q11919_q11940_drake_hunt_aura::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
@@ -667,14 +661,14 @@ public:
};
// Spell 45625: - Arcane Chains: Character Force Cast
class spell_arcane_chains_character_force_cast : public SpellScriptLoader
class spell_arcane_chains_character_force_cast : public SpellScript
{
public:
spell_arcane_chains_character_force_cast() : SpellScriptLoader("spell_arcane_chains_character_force_cast") {}
PrepareSpellScript(spell_arcane_chains_character_force_cast);
class spell_arcane_chains_character_force_cast_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_arcane_chains_character_force_cast_SpellScript);
return ValidateSpellInfo({ SPELL_ARCANE_CHAINS_SUMMON_CHAINED_MAGE_HUNTER, 45626 });
}
void HandleScriptEffect(SpellEffIndex /* effIndex */)
{
@@ -683,13 +677,7 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_arcane_chains_character_force_cast_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_arcane_chains_character_force_cast_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_arcane_chains_character_force_cast::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -1309,14 +1297,9 @@ enum BloodsporeRuination
EVENT_RESET_ORIENTATION
};
class spell_q11719_bloodspore_ruination_45997 : public SpellScriptLoader
class spell_q11719_bloodspore_ruination_45997 : public SpellScript
{
public:
spell_q11719_bloodspore_ruination_45997() : SpellScriptLoader("spell_q11719_bloodspore_ruination_45997") { }
class spell_q11719_bloodspore_ruination_45997_SpellScript : public SpellScript
{
PrepareSpellScript(spell_q11719_bloodspore_ruination_45997_SpellScript);
PrepareSpellScript(spell_q11719_bloodspore_ruination_45997);
void HandleEffect(SpellEffIndex /*effIndex*/)
{
@@ -1327,13 +1310,7 @@ public:
void Register() override
{
OnEffectHit += SpellEffectFn(spell_q11719_bloodspore_ruination_45997_SpellScript::HandleEffect, EFFECT_1, SPELL_EFFECT_SEND_EVENT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_q11719_bloodspore_ruination_45997_SpellScript();
OnEffectHit += SpellEffectFn(spell_q11719_bloodspore_ruination_45997::HandleEffect, EFFECT_1, SPELL_EFFECT_SEND_EVENT);
}
};
@@ -2059,7 +2036,7 @@ public:
void AddSC_borean_tundra()
{
// Ours
new spell_q11919_q11940_drake_hunt();
RegisterSpellScript(spell_q11919_q11940_drake_hunt_aura);
new npc_thassarian();
new npc_thassarian2();
new npc_leryssa();
@@ -2073,14 +2050,14 @@ void AddSC_borean_tundra()
new npc_lurgglbr();
new npc_beryl_sorcerer();
new npc_captured_beryl_sorcerer();
new spell_arcane_chains_character_force_cast();
RegisterSpellScript(spell_arcane_chains_character_force_cast);
new npc_imprisoned_beryl_sorcerer();
new npc_mootoo_the_younger();
new npc_bonker_togglevolt();
new npc_valiance_keep_cannoneer();
new npc_warmage_coldarra();
new npc_hidden_cultist();
new spell_q11719_bloodspore_ruination_45997();
RegisterSpellScript(spell_q11719_bloodspore_ruination_45997);
new npc_bloodmage_laurith();
}
@@ -931,14 +931,9 @@ enum eFrostmourneCavern
NPC_PRINCE_ARTHAS = 27455,
};
class spell_q12478_frostmourne_cavern : public SpellScriptLoader
class spell_q12478_frostmourne_cavern : public SpellScript
{
public:
spell_q12478_frostmourne_cavern() : SpellScriptLoader("spell_q12478_frostmourne_cavern") { }
class spell_q12478_frostmourne_cavern_SpellScript : public SpellScript
{
PrepareSpellScript(spell_q12478_frostmourne_cavern_SpellScript);
PrepareSpellScript(spell_q12478_frostmourne_cavern);
void HandleSendEvent(SpellEffIndex effIndex)
{
@@ -948,24 +943,13 @@ public:
void Register() override
{
OnEffectHit += SpellEffectFn(spell_q12478_frostmourne_cavern_SpellScript::HandleSendEvent, EFFECT_0, SPELL_EFFECT_SEND_EVENT);
OnEffectHit += SpellEffectFn(spell_q12478_frostmourne_cavern::HandleSendEvent, EFFECT_0, SPELL_EFFECT_SEND_EVENT);
}
};
SpellScript* GetSpellScript() const override
class spell_q12243_fire_upon_the_waters_aura : public AuraScript
{
return new spell_q12478_frostmourne_cavern_SpellScript();
}
};
class spell_q12243_fire_upon_the_waters : public SpellScriptLoader
{
public:
spell_q12243_fire_upon_the_waters() : SpellScriptLoader("spell_q12243_fire_upon_the_waters") { }
class spell_q12243_fire_upon_the_waters_AuraScript : public AuraScript
{
PrepareAuraScript(spell_q12243_fire_upon_the_waters_AuraScript);
PrepareAuraScript(spell_q12243_fire_upon_the_waters_aura);
void HandleApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -988,14 +972,8 @@ public:
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_q12243_fire_upon_the_waters_AuraScript::HandleApplyEffect, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_q12243_fire_upon_the_waters_AuraScript::HandleRemoveEffect, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_q12243_fire_upon_the_waters_AuraScript();
OnEffectApply += AuraEffectApplyFn(spell_q12243_fire_upon_the_waters_aura::HandleApplyEffect, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_q12243_fire_upon_the_waters_aura::HandleRemoveEffect, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
@@ -1497,14 +1475,9 @@ private:
bool _alive;
};
class spell_q24545_aod_special : public SpellScriptLoader
class spell_q24545_aod_special : public SpellScript
{
public:
spell_q24545_aod_special() : SpellScriptLoader("spell_q24545_aod_special") { }
class spell_q24545_aod_special_SpellScript : public SpellScript
{
PrepareSpellScript(spell_q24545_aod_special_SpellScript);
PrepareSpellScript(spell_q24545_aod_special);
void FilterTargets(std::list<WorldObject*>& targets)
{
@@ -1522,14 +1495,8 @@ public:
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_q24545_aod_special_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
OnEffectHitTarget += SpellEffectFn(spell_q24545_aod_special_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_q24545_aod_special_SpellScript();
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_q24545_aod_special::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
OnEffectHitTarget += SpellEffectFn(spell_q24545_aod_special::HandleScript, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
@@ -2077,14 +2044,14 @@ enum StrengthenAncientsMisc
NPC_LOTHALOR = 26321
};
class spell_q12096_q12092_dummy : public SpellScriptLoader // Strengthen the Ancients: On Interact Dummy to Woodlands Walker
class spell_q12096_q12092_dummy : public SpellScript
{
public:
spell_q12096_q12092_dummy() : SpellScriptLoader("spell_q12096_q12092_dummy") { }
PrepareSpellScript(spell_q12096_q12092_dummy);
class spell_q12096_q12092_dummy_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_q12096_q12092_dummy_SpellScript);
return ValidateSpellInfo({ SPELL_CREATE_ITEM_BARK });
}
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -2114,24 +2081,13 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_q12096_q12092_dummy_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget += SpellEffectFn(spell_q12096_q12092_dummy::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
class spell_q12096_q12092_bark : public SpellScript
{
return new spell_q12096_q12092_dummy_SpellScript();
}
};
class spell_q12096_q12092_bark : public SpellScriptLoader // Bark of the Walkers
{
public:
spell_q12096_q12092_bark() : SpellScriptLoader("spell_q12096_q12092_bark") { }
class spell_q12096_q12092_bark_SpellScript : public SpellScript
{
PrepareSpellScript(spell_q12096_q12092_bark_SpellScript);
PrepareSpellScript(spell_q12096_q12092_bark);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -2146,13 +2102,7 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_q12096_q12092_bark_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_q12096_q12092_bark_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_q12096_q12092_bark::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
@@ -2306,20 +2256,20 @@ void AddSC_dragonblight()
RegisterSpellScript(spell_q12237_drop_off_villager);
RegisterSpellScript(spell_call_wintergarde_gryphon);
new npc_heated_battle();
new spell_q12478_frostmourne_cavern();
new spell_q12243_fire_upon_the_waters();
RegisterSpellScript(spell_q12478_frostmourne_cavern);
RegisterSpellScript(spell_q12243_fire_upon_the_waters_aura);
new npc_q24545_lich_king();
new at_q24545_frostmourne_cavern();
new npc_q24545_wretched_ghoul();
new spell_q24545_aod_special();
RegisterSpellScript(spell_q24545_aod_special);
new npc_q24545_vegard_dummy();
new npc_q24545_vegard();
new npc_spiritual_insight();
// Theirs
new npc_commander_eligor_dawnbringer();
new spell_q12096_q12092_dummy();
new spell_q12096_q12092_bark();
RegisterSpellScript(spell_q12096_q12092_dummy);
RegisterSpellScript(spell_q12096_q12092_bark);
new npc_torturer_lecraft();
RegisterSpellScript(spell_dragonblight_corrosive_spit);
@@ -961,14 +961,9 @@ enum ShredderDelivery
NPC_BROKEN_DOWN_SHREDDER = 27354
};
class spell_shredder_delivery : public SpellScriptLoader
class spell_shredder_delivery : public SpellScript
{
public:
spell_shredder_delivery() : SpellScriptLoader("spell_shredder_delivery") { }
class spell_shredder_delivery_SpellScript : public SpellScript
{
PrepareSpellScript(spell_shredder_delivery_SpellScript);
PrepareSpellScript(spell_shredder_delivery);
bool Load() override
{
@@ -983,13 +978,7 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_shredder_delivery_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_shredder_delivery_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_shredder_delivery::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -999,14 +988,14 @@ enum InfectedWorgenBite
SPELL_WORGENS_CALL = 53095
};
class spell_infected_worgen_bite : public SpellScriptLoader
class spell_infected_worgen_bite_aura : public AuraScript
{
public:
spell_infected_worgen_bite() : SpellScriptLoader("spell_infected_worgen_bite") { }
PrepareAuraScript(spell_infected_worgen_bite_aura);
class spell_infected_worgen_bite_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_infected_worgen_bite_AuraScript);
return ValidateSpellInfo({ SPELL_WORGENS_CALL });
}
void HandleAfterEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -1021,13 +1010,7 @@ public:
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_infected_worgen_bite_AuraScript::HandleAfterEffectApply, EFFECT_1, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAPPLY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_infected_worgen_bite_AuraScript();
AfterEffectApply += AuraEffectApplyFn(spell_infected_worgen_bite_aura::HandleAfterEffectApply, EFFECT_1, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAPPLY);
}
};
@@ -1123,14 +1106,9 @@ enum WarheadSpells
SPELL_WARHEAD_FUSE = 49181
};
// 49107 - Vehicle: Warhead Fuse
class spell_vehicle_warhead_fuse : public SpellScriptLoader
class spell_vehicle_warhead_fuse : public SpellScript
{
public:
spell_vehicle_warhead_fuse() : SpellScriptLoader("spell_vehicle_warhead_fuse") { }
class spell_vehicle_warhead_fuse_SpellScript : public SpellScript
{
PrepareSpellScript(spell_vehicle_warhead_fuse_SpellScript);
PrepareSpellScript(spell_vehicle_warhead_fuse);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1154,13 +1132,7 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_vehicle_warhead_fuse_SpellScript::HandleDummy, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_vehicle_warhead_fuse_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_vehicle_warhead_fuse::HandleDummy, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -1171,14 +1143,9 @@ enum WarheadDenonate
NPC_ALLIANCE_LUMBERBOAT_EXPLOSIONS = 27689
};
// 49250 - Detonate
class spell_warhead_detonate : public SpellScriptLoader
class spell_warhead_detonate : public SpellScript
{
public:
spell_warhead_detonate() : SpellScriptLoader("spell_warhead_detonate") { }
class spell_warhead_detonate_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warhead_detonate_SpellScript);
PrepareSpellScript(spell_warhead_detonate);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1210,28 +1177,14 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_warhead_detonate_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warhead_detonate_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_warhead_detonate::HandleDummy, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
// 61678 - Z Check
class spell_z_check : public SpellScriptLoader
class spell_z_check_aura : public AuraScript
{
public:
spell_z_check() : SpellScriptLoader("spell_z_check") { }
class spell_z_check_AuraScript : public AuraScript
{
public:
spell_z_check_AuraScript() : AuraScript(), _posZ(0) {}
PrepareAuraScript(spell_z_check_AuraScript);
PrepareAuraScript(spell_z_check_aura);
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -1256,26 +1209,15 @@ public:
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_z_check_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_z_check_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_z_check_AuraScript();
OnEffectApply += AuraEffectApplyFn(spell_z_check_aura::HandleEffectApply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_z_check_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
// 49181 - Warhead Fuse
class spell_warhead_fuse : public SpellScriptLoader
class spell_warhead_fuse_aura : public AuraScript
{
public:
spell_warhead_fuse() : SpellScriptLoader("spell_warhead_fuse") { }
class spell_warhead_fuse_AuraScript : public AuraScript
{
PrepareAuraScript(spell_warhead_fuse_AuraScript);
PrepareAuraScript(spell_warhead_fuse_aura);
void HandleOnEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -1290,13 +1232,7 @@ public:
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_warhead_fuse_AuraScript::HandleOnEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_warhead_fuse_AuraScript();
OnEffectRemove += AuraEffectRemoveFn(spell_warhead_fuse_aura::HandleOnEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
@@ -1336,13 +1272,13 @@ void AddSC_grizzly_hills()
RegisterSpellScript(spell_renew_skirmisher);
new npc_venture_co_straggler();
new npc_lake_frog();
new spell_shredder_delivery();
new spell_infected_worgen_bite();
RegisterSpellScript(spell_shredder_delivery);
RegisterSpellScript(spell_infected_worgen_bite_aura);
new npc_rocket_propelled_warhead();
new spell_z_check();
new spell_warhead_detonate();
new spell_vehicle_warhead_fuse();
new spell_warhead_fuse();
RegisterSpellScript(spell_z_check_aura);
RegisterSpellScript(spell_warhead_detonate);
RegisterSpellScript(spell_vehicle_warhead_fuse);
RegisterSpellScript(spell_warhead_fuse_aura);
RegisterSpellScript(spell_q12227_outhouse_groans);
RegisterSpellScript(spell_q12227_camera_shake);
RegisterSpellScript(spell_frog_kiss);
+32 -82
View File
@@ -1063,14 +1063,9 @@ enum infraGreenBomberQuests
SEAT_ENGINEERING = 2
};
class spell_switch_infragreen_bomber_station : public SpellScriptLoader
class spell_switch_infragreen_bomber_station : public SpellScript
{
public:
spell_switch_infragreen_bomber_station() : SpellScriptLoader("spell_switch_infragreen_bomber_station") { }
class spell_switch_infragreen_bomber_station_SpellScript : public SpellScript
{
PrepareSpellScript(spell_switch_infragreen_bomber_station_SpellScript)
PrepareSpellScript(spell_switch_infragreen_bomber_station);
uint8 GetSeatNumber(uint32 spellId)
{
@@ -1105,24 +1100,18 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_switch_infragreen_bomber_station_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget += SpellEffectFn(spell_switch_infragreen_bomber_station::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
class spell_charge_shield_bomber : public SpellScript
{
return new spell_switch_infragreen_bomber_station_SpellScript();
PrepareSpellScript(spell_charge_shield_bomber);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_INFRA_GREEN_SHIELD });
}
};
class spell_charge_shield_bomber : public SpellScriptLoader
{
public:
spell_charge_shield_bomber() : SpellScriptLoader("spell_charge_shield_bomber") { }
class spell_charge_shield_bomber_SpellScript : public SpellScript
{
PrepareSpellScript(spell_charge_shield_bomber_SpellScript)
void HandleDummy(SpellEffIndex effIndex)
{
@@ -1142,18 +1131,13 @@ public:
void Register() override
{
if (m_scriptSpellId == SPELL_CHARGE_SHIELD)
OnEffectHitTarget += SpellEffectFn(spell_charge_shield_bomber_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget += SpellEffectFn(spell_charge_shield_bomber::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
class spell_charge_shield_bomber_aura : public AuraScript
{
return new spell_charge_shield_bomber_SpellScript();
}
class spell_charge_shield_bomber_AuraScript : public AuraScript
{
PrepareAuraScript(spell_charge_shield_bomber_AuraScript);
PrepareAuraScript(spell_charge_shield_bomber_aura);
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
@@ -1172,26 +1156,20 @@ public:
{
if (m_scriptSpellId == SPELL_INFRA_GREEN_SHIELD)
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_charge_shield_bomber_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
OnEffectAbsorb += AuraEffectAbsorbFn(spell_charge_shield_bomber_AuraScript::Absorb, EFFECT_0);
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_charge_shield_bomber_aura::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
OnEffectAbsorb += AuraEffectAbsorbFn(spell_charge_shield_bomber_aura::Absorb, EFFECT_0);
}
}
};
AuraScript* GetAuraScript() const override
class spell_fight_fire_bomber : public SpellScript
{
return new spell_charge_shield_bomber_AuraScript();
PrepareSpellScript(spell_fight_fire_bomber);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_COSMETIC_FIRE, SPELL_EXTINGUISH_FIRE, SPELL_BURNING });
}
};
class spell_fight_fire_bomber : public SpellScriptLoader
{
public:
spell_fight_fire_bomber() : SpellScriptLoader("spell_fight_fire_bomber") { }
class spell_fight_fire_bomber_SpellScript : public SpellScript
{
PrepareSpellScript(spell_fight_fire_bomber_SpellScript)
void HandleDummy(SpellEffIndex effIndex)
{
@@ -1225,24 +1203,13 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_fight_fire_bomber_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget += SpellEffectFn(spell_fight_fire_bomber::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
class spell_anti_air_rocket_bomber : public SpellScript
{
return new spell_fight_fire_bomber_SpellScript();
}
};
class spell_anti_air_rocket_bomber : public SpellScriptLoader
{
public:
spell_anti_air_rocket_bomber() : SpellScriptLoader("spell_anti_air_rocket_bomber") { }
class spell_anti_air_rocket_bomber_SpellScript : public SpellScript
{
PrepareSpellScript(spell_anti_air_rocket_bomber_SpellScript)
PrepareSpellScript(spell_anti_air_rocket_bomber);
void HandleDummy(SpellEffIndex effIndex)
{
@@ -1253,13 +1220,7 @@ public:
void Register() override
{
OnEffectLaunch += SpellEffectFn(spell_anti_air_rocket_bomber_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_anti_air_rocket_bomber_SpellScript();
OnEffectLaunch += SpellEffectFn(spell_anti_air_rocket_bomber::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
@@ -1439,14 +1400,9 @@ public:
}
};
class spell_onslaught_or_call_bone_gryphon : public SpellScriptLoader
class spell_onslaught_or_call_bone_gryphon : public SpellScript
{
public:
spell_onslaught_or_call_bone_gryphon() : SpellScriptLoader("spell_onslaught_or_call_bone_gryphon") { }
class spell_onslaught_or_call_bone_gryphon_SpellScript : public SpellScript
{
PrepareSpellScript(spell_onslaught_or_call_bone_gryphon_SpellScript);
PrepareSpellScript(spell_onslaught_or_call_bone_gryphon);
void ChangeSummonPos(SpellEffIndex /*effIndex*/)
{
@@ -1459,13 +1415,7 @@ public:
void Register() override
{
OnEffectHit += SpellEffectFn(spell_onslaught_or_call_bone_gryphon_SpellScript::ChangeSummonPos, EFFECT_0, SPELL_EFFECT_SUMMON);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_onslaught_or_call_bone_gryphon_SpellScript();
OnEffectHit += SpellEffectFn(spell_onslaught_or_call_bone_gryphon::ChangeSummonPos, EFFECT_0, SPELL_EFFECT_SUMMON);
}
};
@@ -2192,12 +2142,12 @@ void AddSC_icecrown()
new npc_lord_arete();
new npc_boneguard_footman();
new npc_tirions_gambit_tirion();
new spell_switch_infragreen_bomber_station();
new spell_charge_shield_bomber();
new spell_fight_fire_bomber();
new spell_anti_air_rocket_bomber();
RegisterSpellScript(spell_switch_infragreen_bomber_station);
RegisterSpellAndAuraScriptPair(spell_charge_shield_bomber, spell_charge_shield_bomber_aura);
RegisterSpellScript(spell_fight_fire_bomber);
RegisterSpellScript(spell_anti_air_rocket_bomber);
new npc_infra_green_bomber_generic();
new spell_onslaught_or_call_bone_gryphon();
RegisterSpellScript(spell_onslaught_or_call_bone_gryphon);
RegisterSpellScript(spell_deliver_gryphon);
// Theirs
@@ -38,14 +38,9 @@ enum songOfWindandWater
NPC_SOWAW_WATER_MODEL = 20076,
};
class spell_q12726_song_of_wind_and_water : public SpellScriptLoader
class spell_q12726_song_of_wind_and_water : public SpellScript
{
public:
spell_q12726_song_of_wind_and_water() : SpellScriptLoader("spell_q12726_song_of_wind_and_water") { }
class spell_q12726_song_of_wind_and_water_SpellScript : public SpellScript
{
PrepareSpellScript(spell_q12726_song_of_wind_and_water_SpellScript);
PrepareSpellScript(spell_q12726_song_of_wind_and_water);
void HandleHealPct(SpellEffIndex /*effIndex*/)
{
@@ -67,13 +62,7 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_q12726_song_of_wind_and_water_SpellScript::HandleHealPct, EFFECT_2, SPELL_EFFECT_HEAL_PCT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_q12726_song_of_wind_and_water_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_q12726_song_of_wind_and_water::HandleHealPct, EFFECT_2, SPELL_EFFECT_HEAL_PCT);
}
};
@@ -1140,14 +1129,14 @@ enum MiscLifewarden
SPELL_WILD_GROWTH = 52948,
};
class spell_q12620_the_lifewarden_wrath : public SpellScriptLoader
class spell_q12620_the_lifewarden_wrath : public SpellScript
{
public:
spell_q12620_the_lifewarden_wrath() : SpellScriptLoader("spell_q12620_the_lifewarden_wrath") { }
PrepareSpellScript(spell_q12620_the_lifewarden_wrath);
class spell_q12620_the_lifewarden_wrath_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_q12620_the_lifewarden_wrath_SpellScript);
return ValidateSpellInfo({ SPELL_FREYA_DUMMY, SPELL_FREYA_DUMMY_TRIGGER, SPELL_LASHER_EMERGE, SPELL_WILD_GROWTH, SPELL_LIFEFORCE });
}
void HandleSendEvent(SpellEffIndex effIndex)
{
@@ -1191,13 +1180,7 @@ public:
void Register() override
{
OnEffectHit += SpellEffectFn(spell_q12620_the_lifewarden_wrath_SpellScript::HandleSendEvent, EFFECT_0, SPELL_EFFECT_SEND_EVENT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_q12620_the_lifewarden_wrath_SpellScript();
OnEffectHit += SpellEffectFn(spell_q12620_the_lifewarden_wrath::HandleSendEvent, EFFECT_0, SPELL_EFFECT_SEND_EVENT);
}
};
@@ -1228,14 +1211,14 @@ enum KickWhatKick
SAY_DROSTAN_REPLY_MISS = 0,
};
class spell_q12589_shoot_rjr : public SpellScriptLoader
class spell_q12589_shoot_rjr : public SpellScript
{
public:
spell_q12589_shoot_rjr() : SpellScriptLoader("spell_q12589_shoot_rjr") { }
PrepareSpellScript(spell_q12589_shoot_rjr);
class spell_q12589_shoot_rjr_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_q12589_shoot_rjr_SpellScript);
return ValidateSpellInfo({ SPELL_MISS_BIRD_APPLE, SPELL_BIRD_FALL, SPELL_MISS_APPLE, SPELL_HIT_APPLE, SPELL_APPLE_FALL });
}
SpellCastResult CheckCast()
{
@@ -1315,14 +1298,8 @@ public:
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_q12589_shoot_rjr_SpellScript::CheckCast);
OnEffectHitTarget += SpellEffectFn(spell_q12589_shoot_rjr_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_q12589_shoot_rjr_SpellScript();
OnCheckCast += SpellCheckCastFn(spell_q12589_shoot_rjr::CheckCast);
OnEffectHitTarget += SpellEffectFn(spell_q12589_shoot_rjr::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
@@ -1450,14 +1427,9 @@ enum ShangoTracks
SAY_INCORRECT_TRACKS = 28635
};
class spell_shango_tracks : public SpellScriptLoader
class spell_shango_tracks : public SpellScript
{
public:
spell_shango_tracks() : SpellScriptLoader("spell_shango_tracks") { }
class spell_shango_tracks_SpellScript : public SpellScript
{
PrepareSpellScript(spell_shango_tracks_SpellScript);
PrepareSpellScript(spell_shango_tracks);
void HandleScript(SpellEffIndex /*effIndex*/)
{
@@ -1479,13 +1451,7 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_shango_tracks_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_shango_tracks_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_shango_tracks::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -1524,7 +1490,7 @@ class spell_q12611_deathbolt : public SpellScript
void AddSC_sholazar_basin()
{
// Ours
new spell_q12726_song_of_wind_and_water();
RegisterSpellScript(spell_q12726_song_of_wind_and_water);
new npc_artruis_the_hearthless();
new npc_still_at_it_trigger();
new npc_mcmanus();
@@ -1538,10 +1504,10 @@ void AddSC_sholazar_basin()
new npc_engineer_helice();
new npc_adventurous_dwarf();
new npc_jungle_punch_target();
new spell_q12620_the_lifewarden_wrath();
new spell_q12589_shoot_rjr();
RegisterSpellScript(spell_q12620_the_lifewarden_wrath);
RegisterSpellScript(spell_q12589_shoot_rjr);
new npc_vics_flying_machine();
new spell_shango_tracks();
RegisterSpellScript(spell_shango_tracks);
RegisterSpellScript(spell_q12611_deathbolt);
}
@@ -586,14 +586,9 @@ public:
}
};
class spell_q13003_thursting_hodirs_spear : public SpellScriptLoader
class spell_q13003_thursting_hodirs_spear_aura : public AuraScript
{
public:
spell_q13003_thursting_hodirs_spear() : SpellScriptLoader("spell_q13003_thursting_hodirs_spear") { }
class spell_q13003_thursting_hodirs_spear_AuraScript : public AuraScript
{
PrepareAuraScript(spell_q13003_thursting_hodirs_spear_AuraScript);
PrepareAuraScript(spell_q13003_thursting_hodirs_spear_aura);
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -619,15 +614,9 @@ public:
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_q13003_thursting_hodirs_spear_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
OnEffectApply += AuraEffectApplyFn(spell_q13003_thursting_hodirs_spear_AuraScript::OnApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_q13003_thursting_hodirs_spear_AuraScript::AfterRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_q13003_thursting_hodirs_spear_AuraScript();
OnEffectPeriodic += AuraEffectPeriodicFn(spell_q13003_thursting_hodirs_spear_aura::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
OnEffectApply += AuraEffectApplyFn(spell_q13003_thursting_hodirs_spear_aura::OnApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_q13003_thursting_hodirs_spear_aura::AfterRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
@@ -639,14 +628,14 @@ enum q13007IronColossus
SPELL_COLOSSUS_GROUND_SLAM = 61673
};
class spell_q13007_iron_colossus : public SpellScriptLoader
class spell_q13007_iron_colossus : public SpellScript
{
public:
spell_q13007_iron_colossus() : SpellScriptLoader("spell_q13007_iron_colossus") { }
PrepareSpellScript(spell_q13007_iron_colossus);
class spell_q13007_iron_colossus_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_q13007_iron_colossus_SpellScript);
return ValidateSpellInfo({ SPELL_JORMUNGAR_SUBMERGE_VISUAL, SPELL_COLOSSUS_GROUND_SLAM });
}
void HandleDummy(SpellEffIndex effIndex)
{
@@ -684,16 +673,10 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_q13007_iron_colossus_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget += SpellEffectFn(spell_q13007_iron_colossus::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_q13007_iron_colossus_SpellScript();
};
};
// Theirs
/*######
## npc_roxi_ramrocket
@@ -1026,14 +1009,9 @@ enum CloseRift
SPELL_DESPAWN_RIFT = 61665
};
class spell_close_rift : public SpellScriptLoader
class spell_close_rift_aura : public AuraScript
{
public:
spell_close_rift() : SpellScriptLoader("spell_close_rift") { }
class spell_close_rift_AuraScript : public AuraScript
{
PrepareAuraScript(spell_close_rift_AuraScript);
PrepareAuraScript(spell_close_rift_aura);
bool Load() override
{
@@ -1054,19 +1032,13 @@ public:
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_close_rift_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_close_rift_aura::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
private:
uint8 _counter;
};
AuraScript* GetAuraScript() const override
{
return new spell_close_rift_AuraScript();
}
};
enum CollapsingCave
{
SPELL_COLLAPSING_CAVE = 55486
@@ -1204,14 +1176,14 @@ void AddSC_storm_peaks()
new npc_iron_watcher();
new npc_time_lost_proto_drake();
new npc_wild_wyrm();
new spell_q13003_thursting_hodirs_spear();
new spell_q13007_iron_colossus();
RegisterSpellScript(spell_q13003_thursting_hodirs_spear_aura);
RegisterSpellScript(spell_q13007_iron_colossus);
new npc_roxi_ramrocket();
new npc_brunnhildar_prisoner();
new npc_freed_protodrake();
new npc_icefang();
new npc_hyldsmeet_protodrake();
new spell_close_rift();
RegisterSpellScript(spell_close_rift_aura);
new npc_vehicle_d16_propelled_delivery();
RegisterSpellScript(spell_q12823_remove_collapsing_cave_aura);
}
+34 -101
View File
@@ -904,14 +904,9 @@ public:
/* 56662, 61409 - Build Siege Vehicle (Force)
56664 - Build Catapult (Force)
56659 - Build Demolisher (Force) */
class spell_wintergrasp_force_building : public SpellScriptLoader
class spell_wintergrasp_force_building : public SpellScript
{
public:
spell_wintergrasp_force_building() : SpellScriptLoader("spell_wintergrasp_force_building") { }
class spell_wintergrasp_force_building_SpellScript : public SpellScript
{
PrepareSpellScript(spell_wintergrasp_force_building_SpellScript);
PrepareSpellScript(spell_wintergrasp_force_building);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -933,27 +928,16 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_wintergrasp_force_building_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_wintergrasp_force_building_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_wintergrasp_force_building::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
/* 56661, 61408 - Build Siege Engine
56663 - Build Catapult
56575 - Build Demolisher */
class spell_wintergrasp_create_vehicle : public SpellScriptLoader
class spell_wintergrasp_create_vehicle : public SpellScript
{
public:
spell_wintergrasp_create_vehicle() : SpellScriptLoader("spell_wintergrasp_create_vehicle") { }
class spell_wintergrasp_create_vehicle_SpellScript : public SpellScript
{
PrepareSpellScript(spell_wintergrasp_create_vehicle_SpellScript);
PrepareSpellScript(spell_wintergrasp_create_vehicle);
void HandleSummon(SpellEffIndex effIndex)
{
@@ -988,25 +972,19 @@ public:
void Register() override
{
OnEffectHit += SpellEffectFn(spell_wintergrasp_create_vehicle_SpellScript::HandleSummon, EFFECT_1, SPELL_EFFECT_SUMMON);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_wintergrasp_create_vehicle_SpellScript;
OnEffectHit += SpellEffectFn(spell_wintergrasp_create_vehicle::HandleSummon, EFFECT_1, SPELL_EFFECT_SUMMON);
}
};
// 49761 - Rocket-Propelled Goblin Grenade
class spell_wintergrasp_rp_gg : public SpellScriptLoader
class spell_wintergrasp_rp_gg : public SpellScript
{
public:
spell_wintergrasp_rp_gg() : SpellScriptLoader("spell_wintergrasp_rp_gg") { }
PrepareSpellScript(spell_wintergrasp_rp_gg);
class spell_wintergrasp_rp_gg_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_wintergrasp_rp_gg_SpellScript);
return ValidateSpellInfo({ SPELL_RP_GG_TRIGGER_MISSILE });
}
bool handled;
bool Load() override
@@ -1025,25 +1003,19 @@ public:
void Register() override
{
AfterCast += SpellCastFn(spell_wintergrasp_rp_gg_SpellScript::HandleFinish);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_wintergrasp_rp_gg_SpellScript();
AfterCast += SpellCastFn(spell_wintergrasp_rp_gg::HandleFinish);
}
};
// 58622 - Teleport to Lake Wintergrasp
class spell_wintergrasp_portal : public SpellScriptLoader
class spell_wintergrasp_portal : public SpellScript
{
public:
spell_wintergrasp_portal() : SpellScriptLoader("spell_wintergrasp_portal") { }
PrepareSpellScript(spell_wintergrasp_portal);
class spell_wintergrasp_portal_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_wintergrasp_portal_SpellScript);
return ValidateSpellInfo({ SPELL_TELEPORT_TO_FORTRESS });
}
void HandleScript(SpellEffIndex effIndex)
{
@@ -1058,25 +1030,14 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_wintergrasp_portal_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_wintergrasp_portal_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_wintergrasp_portal::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
// 36444 - Wintergrasp Water
class spell_wintergrasp_water : public SpellScriptLoader
class spell_wintergrasp_water : public SpellScript
{
public:
spell_wintergrasp_water() : SpellScriptLoader("spell_wintergrasp_water") { }
class spell_wintergrasp_water_SpellScript : public SpellScript
{
PrepareSpellScript(spell_wintergrasp_water_SpellScript);
PrepareSpellScript(spell_wintergrasp_water);
SpellCastResult CheckCast()
{
@@ -1089,25 +1050,14 @@ public:
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_wintergrasp_water_SpellScript::CheckCast);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_wintergrasp_water_SpellScript();
OnCheckCast += SpellCheckCastFn(spell_wintergrasp_water::CheckCast);
}
};
// 52107 - (Spell not exist in DBC)
class spell_wintergrasp_hide_small_elementals : public SpellScriptLoader
class spell_wintergrasp_hide_small_elementals_aura : public AuraScript
{
public:
spell_wintergrasp_hide_small_elementals() : SpellScriptLoader("spell_wintergrasp_hide_small_elementals") { }
class spell_wintergrasp_hide_small_elementals_AuraScript : public AuraScript
{
PrepareAuraScript(spell_wintergrasp_hide_small_elementals_AuraScript);
PrepareAuraScript(spell_wintergrasp_hide_small_elementals_aura);
void HandlePeriodicDummy(AuraEffect const* /*aurEff*/)
{
@@ -1120,27 +1070,16 @@ public:
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_wintergrasp_hide_small_elementals_AuraScript::HandlePeriodicDummy, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_wintergrasp_hide_small_elementals_AuraScript();
OnEffectPeriodic += AuraEffectPeriodicFn(spell_wintergrasp_hide_small_elementals_aura::HandlePeriodicDummy, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
/* 57610, 51422 - Cannon
50999 - Boulder
57607 - Plague Slime */
class spell_wg_reduce_damage_by_distance : public SpellScriptLoader
class spell_wg_reduce_damage_by_distance : public SpellScript
{
public:
spell_wg_reduce_damage_by_distance() : SpellScriptLoader("spell_wg_reduce_damage_by_distance") { }
class spell_wg_reduce_damage_by_distance_SpellScript : public SpellScript
{
PrepareSpellScript(spell_wg_reduce_damage_by_distance_SpellScript);
PrepareSpellScript(spell_wg_reduce_damage_by_distance);
void RecalculateDamage()
{
@@ -1156,13 +1095,7 @@ public:
void Register() override
{
OnHit += SpellHitFn(spell_wg_reduce_damage_by_distance_SpellScript::RecalculateDamage);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_wg_reduce_damage_by_distance_SpellScript();
OnHit += SpellHitFn(spell_wg_reduce_damage_by_distance::RecalculateDamage);
}
};
@@ -1242,13 +1175,13 @@ void AddSC_wintergrasp()
new go_wg_vehicle_teleporter();
// SPELLs
new spell_wintergrasp_force_building();
new spell_wintergrasp_create_vehicle();
new spell_wintergrasp_rp_gg();
new spell_wintergrasp_portal();
new spell_wintergrasp_water();
new spell_wintergrasp_hide_small_elementals();
new spell_wg_reduce_damage_by_distance();
RegisterSpellScript(spell_wintergrasp_force_building);
RegisterSpellScript(spell_wintergrasp_create_vehicle);
RegisterSpellScript(spell_wintergrasp_rp_gg);
RegisterSpellScript(spell_wintergrasp_portal);
RegisterSpellScript(spell_wintergrasp_water);
RegisterSpellScript(spell_wintergrasp_hide_small_elementals_aura);
RegisterSpellScript(spell_wg_reduce_damage_by_distance);
// ACHIEVEMENTs
new achievement_wg_didnt_stand_a_chance();