mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 08:33:47 +00:00
refactor(Scripts/Northrend): dungeons Spell Scripts registry macros (#19134)
* instance_azjol_nerub spell:spell_azjol_nerub_fixate * instance_azjol_nerub aura:spell_azjol_nerub_web_wrap_aura * boss_hadronox aura:spell_hadronox_summon_periodic_aura * boss_hadronox aura:spell_hadronox_leech_poison_aura * boss_argent_challenge spell:spell_eadric_radiance * boss_argent_challenge spell:spell_toc5_light_rain * boss_argent_challenge aura:spell_reflective_shield_aura * fixup! boss_argent_challenge aura:spell_reflective_shield_aura * instance_drak_tharon_keep aura:spell_dtk_raise_dead_aura * instance_drak_tharon_keep spell:spell_dtk_summon_random_drakkari * boss_trollgore spell:spell_trollgore_consume * boss_trollgore aura:spell_trollgore_corpse_explode_aura * boss_trollgore spell:spell_trollgore_invader_taunt * boss_novos spell:spell_novos_despawn_crystal_handler * boss_novos aura:spell_novos_crystal_handler_death_aura * boss_novos spell:spell_novos_summon_minions * boss_tharon_ja aura:spell_tharon_ja_curse_of_life_aura * boss_tharon_ja aura:spell_tharon_ja_dummy_aura * boss_tharon_ja spell:spell_tharon_ja_clear_gift_of_tharon_ja * boss_dred aura:spell_dred_grievious_bite_aura * boss_dred spell:spell_dred_raptor_call * boss_moorabi aura:spell_moorabi_mojo_frenzy_aura * boss_slad_ran aura:spell_sladran_grip_of_sladran_aura * boss_drakkari_colossus spell:spell_drakkari_colossus_emerge * boss_drakkari_colossus spell:spell_drakkari_colossus_surge * boss_drakkari_colossus spell:spell_drakkari_colossus_face_me * boss_gal_darah spell:spell_galdarah_impaling_charge * boss_gal_darah spell:spell_galdarah_transform * boss_malygos spell:spell_eoe_ph3_surge_of_power * oculus aura:spell_oculus_stop_time_aura * oculus aura:spell_oculus_evasive_maneuvers_aura * oculus spell:spell_oculus_shock_lance * oculus aura:spell_oculus_temporal_rift_aura * oculus spell:spell_oculus_touch_the_nightmare * oculus aura:spell_oculus_dream_funnel_aura * oculus spell:spell_oculus_call_ruby_emerald_amber_drake * oculus aura:spell_oculus_ride_ruby_emerald_amber_drake_que_aura * oculus aura:spell_oculus_evasive_charges_aura * oculus aura:spell_oculus_soar_aura * oculus aura:spell_oculus_rider_aura * oculus aura:spell_oculus_drake_flag_aura * boss_magus_telestra aura:spell_boss_magus_telestra_summon_telestra_clones_aura * boss_magus_telestra spell:spell_boss_magus_telestra_gravity_well * utgarde_keep aura:spell_ticking_time_bomb_aura * boss_keleseth aura:spell_frost_tomb_aura * boss_svala pair:spell_svala_ritual_strike * boss_moragg aura:spell_optic_link_aura * violet_hold aura:spell_destroy_door_seal_aura * forge_of_souls aura:spell_shield_of_bones_aura * boss_devourer_of_souls aura:spell_wailing_souls_periodic_aura * boss_bronjahm spell:spell_bronjahm_magic_bane * boss_bronjahm aura:spell_bronjahm_soulstorm_channel_ooc_aura * boss_bronjahm aura:spell_bronjahm_soulstorm_visual_aura * boss_bronjahm spell:spell_bronjahm_soulstorm_targeting * boss_krickandick aura:spell_krick_explosive_barrage_aura * boss_krickandick aura:spell_exploding_orb_auto_grow_aura * pit_of_saron aura:spell_pos_empowered_blizzard_aura * pit_of_saron spell:spell_pos_slave_trigger_closest * pit_of_saron spell:spell_pos_rimefang_frost_nova * pit_of_saron aura:spell_pos_blight_aura * pit_of_saron aura:spell_pos_glacial_strike_aura * boss_forgemaster_garfrost spell:spell_garfrost_permafrost * halls_of_reflection aura:spell_hor_gunship_cannon_fire_aura * boss_marwyn aura:spell_hor_shared_suffering_aura * fixup! forge_of_souls aura:spell_shield_of_bones_aura * fixup! boss_bronjahm aura:spell_bronjahm_soulstorm_channel_ooc_aura * fixup! boss_bronjahm aura:spell_bronjahm_soulstorm_visual_aura * fixup! pit_of_saron aura:spell_pos_empowered_blizzard_aura * fixup! halls_of_reflection aura:spell_hor_gunship_cannon_fire_aura * fixup! boss_marwyn aura:spell_hor_shared_suffering_aura
This commit is contained in:
@@ -132,38 +132,27 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class spell_optic_link : public SpellScriptLoader
|
||||
class spell_optic_link_aura : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_optic_link() : SpellScriptLoader("spell_optic_link") { }
|
||||
PrepareAuraScript(spell_optic_link_aura);
|
||||
|
||||
class spell_optic_linkAuraScript : public AuraScript
|
||||
void HandleEffectPeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
PrepareAuraScript(spell_optic_linkAuraScript)
|
||||
if (Unit* target = GetTarget())
|
||||
if (Unit* caster = GetCaster())
|
||||
if (GetAura() && GetAura()->GetEffect(0))
|
||||
GetAura()->GetEffect(0)->SetAmount(aurEff->GetSpellInfo()->Effects[EFFECT_0].BasePoints + (((int32)target->GetExactDist(caster)) * 25) + (aurEff->GetTickNumber() * 100));
|
||||
}
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
if (Unit* target = GetTarget())
|
||||
if (Unit* caster = GetCaster())
|
||||
if (GetAura() && GetAura()->GetEffect(0))
|
||||
GetAura()->GetEffect(0)->SetAmount(aurEff->GetSpellInfo()->Effects[EFFECT_0].BasePoints + (((int32)target->GetExactDist(caster)) * 25) + (aurEff->GetTickNumber() * 100));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_optic_linkAuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
void Register() override
|
||||
{
|
||||
return new spell_optic_linkAuraScript();
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_optic_link_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_moragg()
|
||||
{
|
||||
new boss_moragg();
|
||||
new spell_optic_link();
|
||||
RegisterSpellScript(spell_optic_link_aura);
|
||||
}
|
||||
|
||||
|
||||
@@ -1157,32 +1157,21 @@ public:
|
||||
** DESTROY DOOR SEAL SPELL SCRIPT
|
||||
***********/
|
||||
|
||||
class spell_destroy_door_seal : public SpellScriptLoader
|
||||
class spell_destroy_door_seal_aura : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_destroy_door_seal() : SpellScriptLoader("spell_destroy_door_seal") { }
|
||||
PrepareAuraScript(spell_destroy_door_seal_aura);
|
||||
|
||||
class spell_destroy_door_sealAuraScript : public AuraScript
|
||||
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
PrepareAuraScript(spell_destroy_door_sealAuraScript)
|
||||
PreventDefaultAction();
|
||||
if (Unit* target = GetTarget())
|
||||
if (InstanceScript* pInstance = target->GetInstanceScript())
|
||||
pInstance->SetData(DATA_DECRASE_DOOR_HEALTH, 0);
|
||||
}
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (Unit* target = GetTarget())
|
||||
if (InstanceScript* pInstance = target->GetInstanceScript())
|
||||
pInstance->SetData(DATA_DECRASE_DOOR_HEALTH, 0);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_destroy_door_sealAuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
void Register() override
|
||||
{
|
||||
return new spell_destroy_door_sealAuraScript();
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_destroy_door_seal_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1232,6 +1221,6 @@ void AddSC_violet_hold()
|
||||
new npc_azure_raider();
|
||||
new npc_azure_stalker();
|
||||
|
||||
new spell_destroy_door_seal();
|
||||
RegisterSpellScript(spell_destroy_door_seal_aura);
|
||||
RegisterCreatureAI(npc_violet_hold_defense_system);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user