Core/Spells: remove PrepareSpellScript and PrepareAuraScript macros and make Hooklist use emplace behaivior (#174)

This commit is contained in:
Warpten authored and GitHub committed 2020-08-28 15:40:26 +02:00
1 parent 677990a1b8
commit 2b2fc5fb8a
252 files changed
+3275 -7394

No files matched your search

+65 -149
View File
@@ -111,8 +111,6 @@ class spell_hun_ancient_hysteria : public SpellScriptLoader
class spell_hun_ancient_hysteria_SpellScript : public SpellScript
{
PrepareSpellScript(spell_hun_ancient_hysteria_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
@@ -140,8 +138,8 @@ class spell_hun_ancient_hysteria : public SpellScriptLoader
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_ancient_hysteria_SpellScript::RemoveInvalidTargets, EFFECT_ALL, TARGET_UNIT_CASTER_AREA_RAID);
AfterHit += SpellHitFn(spell_hun_ancient_hysteria_SpellScript::ApplyDebuff);
OnObjectAreaTargetSelect.Register(&spell_hun_ancient_hysteria_SpellScript::RemoveInvalidTargets, EFFECT_ALL, TARGET_UNIT_CASTER_AREA_RAID);
AfterHit.Register(&spell_hun_ancient_hysteria_SpellScript::ApplyDebuff);
}
};
@@ -159,8 +157,6 @@ class spell_hun_chimera_shot : public SpellScriptLoader
class spell_hun_chimera_shot_SpellScript : public SpellScript
{
PrepareSpellScript(spell_hun_chimera_shot_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_CHIMERA_SHOT_HEAL, SPELL_HUNTER_SERPENT_STING });
@@ -181,7 +177,7 @@ class spell_hun_chimera_shot : public SpellScriptLoader
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_chimera_shot_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHitTarget.Register(&spell_hun_chimera_shot_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -199,8 +195,6 @@ class spell_hun_cobra_shot : public SpellScriptLoader
class spell_hun_cobra_shot_SpellScript : public SpellScript
{
PrepareSpellScript(spell_hun_cobra_shot_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
@@ -249,8 +243,8 @@ class spell_hun_cobra_shot : public SpellScriptLoader
void Register() override
{
OnEffectLaunch += SpellEffectFn(spell_hun_cobra_shot_SpellScript::HandleLaunch, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHitTarget += SpellEffectFn(spell_hun_cobra_shot_SpellScript::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectLaunch.Register(&spell_hun_cobra_shot_SpellScript::HandleLaunch, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHitTarget.Register(&spell_hun_cobra_shot_SpellScript::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -268,8 +262,6 @@ class spell_hun_disengage : public SpellScriptLoader
class spell_hun_disengage_SpellScript : public SpellScript
{
PrepareSpellScript(spell_hun_disengage_SpellScript);
SpellCastResult CheckCast()
{
Unit* caster = GetCaster();
@@ -281,7 +273,7 @@ class spell_hun_disengage : public SpellScriptLoader
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_hun_disengage_SpellScript::CheckCast);
OnCheckCast.Register(&spell_hun_disengage_SpellScript::CheckCast);
}
};
@@ -299,8 +291,6 @@ class spell_hun_fire : public SpellScriptLoader
class spell_hun_fire_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_fire_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_AIMED_SHOT_INSTANT });
@@ -327,8 +317,8 @@ class spell_hun_fire : public SpellScriptLoader
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_hun_fire_AuraScript::CheckProc);
DoEffectCalcSpellMod += AuraEffectCalcSpellModFn(spell_hun_fire_AuraScript::HandleEffectCalcSpellMod, EFFECT_0, SPELL_AURA_DUMMY);
DoCheckProc.Register(&spell_hun_fire_AuraScript::CheckProc);
DoEffectCalcSpellMod.Register(&spell_hun_fire_AuraScript::HandleEffectCalcSpellMod, EFFECT_0, SPELL_AURA_DUMMY);
}
};
@@ -346,8 +336,6 @@ class spell_hun_improved_mend_pet : public SpellScriptLoader
class spell_hun_improved_mend_pet_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_improved_mend_pet_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_IMPROVED_MEND_PET });
@@ -366,8 +354,8 @@ class spell_hun_improved_mend_pet : public SpellScriptLoader
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_hun_improved_mend_pet_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_hun_improved_mend_pet_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
DoCheckProc.Register(&spell_hun_improved_mend_pet_AuraScript::CheckProc);
OnEffectProc.Register(&spell_hun_improved_mend_pet_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
@@ -380,8 +368,6 @@ class spell_hun_improved_mend_pet : public SpellScriptLoader
// 53412 - Invigoration
class spell_hun_invigoration : public SpellScript
{
PrepareSpellScript(spell_hun_invigoration);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_INVIGORATION_TRIGGERED });
@@ -396,7 +382,7 @@ class spell_hun_invigoration : public SpellScript
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_invigoration::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHitTarget.Register(&spell_hun_invigoration::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -408,8 +394,6 @@ class spell_hun_last_stand_pet : public SpellScriptLoader
class spell_hun_last_stand_pet_SpellScript : public SpellScript
{
PrepareSpellScript(spell_hun_last_stand_pet_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_PET_LAST_STAND_TRIGGERED });
@@ -424,7 +408,7 @@ class spell_hun_last_stand_pet : public SpellScriptLoader
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_last_stand_pet_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget.Register(&spell_hun_last_stand_pet_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
@@ -442,8 +426,6 @@ class spell_hun_lock_and_load : public SpellScriptLoader
class spell_hun_lock_and_load_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_lock_and_load_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
@@ -485,10 +467,10 @@ class spell_hun_lock_and_load : public SpellScriptLoader
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_hun_lock_and_load_AuraScript::CheckProc);
DoCheckProc.Register(&spell_hun_lock_and_load_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_hun_lock_and_load_AuraScript::HandleProcs<PROC_FLAG_DONE_TRAP_ACTIVATION>, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
OnEffectProc += AuraEffectProcFn(spell_hun_lock_and_load_AuraScript::HandleProcs<PROC_FLAG_DONE_PERIODIC>, EFFECT_1, SPELL_AURA_DUMMY);
OnEffectProc.Register(&spell_hun_lock_and_load_AuraScript::HandleProcs<PROC_FLAG_DONE_TRAP_ACTIVATION>, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
OnEffectProc.Register(&spell_hun_lock_and_load_AuraScript::HandleProcs<PROC_FLAG_DONE_PERIODIC>, EFFECT_1, SPELL_AURA_DUMMY);
}
};
@@ -506,8 +488,6 @@ class spell_hun_masters_call : public SpellScriptLoader
class spell_hun_masters_call_SpellScript : public SpellScript
{
PrepareSpellScript(spell_hun_masters_call_SpellScript);
bool Validate(SpellInfo const* spellInfo) override
{
return ValidateSpellInfo({ SPELL_HUNTER_MASTERS_CALL_TRIGGERED, uint32(spellInfo->Effects[EFFECT_0].CalcValue()) });
@@ -536,8 +516,8 @@ class spell_hun_masters_call : public SpellScriptLoader
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_masters_call_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget += SpellEffectFn(spell_hun_masters_call_SpellScript::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHitTarget.Register(&spell_hun_masters_call_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget.Register(&spell_hun_masters_call_SpellScript::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -555,8 +535,6 @@ class spell_hun_misdirection : public SpellScriptLoader
class spell_hun_misdirection_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_misdirection_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_MISDIRECTION_PROC });
@@ -576,8 +554,8 @@ class spell_hun_misdirection : public SpellScriptLoader
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_hun_misdirection_AuraScript::OnRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
OnEffectProc += AuraEffectProcFn(spell_hun_misdirection_AuraScript::HandleProc, EFFECT_1, SPELL_AURA_DUMMY);
AfterEffectRemove.Register(&spell_hun_misdirection_AuraScript::OnRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
OnEffectProc.Register(&spell_hun_misdirection_AuraScript::HandleProc, EFFECT_1, SPELL_AURA_DUMMY);
}
};
@@ -595,8 +573,6 @@ class spell_hun_misdirection_proc : public SpellScriptLoader
class spell_hun_misdirection_proc_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_misdirection_proc_AuraScript);
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->GetThreatManager().UnregisterRedirectThreat(SPELL_HUNTER_MISDIRECTION);
@@ -604,7 +580,7 @@ class spell_hun_misdirection_proc : public SpellScriptLoader
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_hun_misdirection_proc_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove.Register(&spell_hun_misdirection_proc_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
@@ -622,8 +598,6 @@ class spell_hun_pet_carrion_feeder : public SpellScriptLoader
class spell_hun_pet_carrion_feeder_SpellScript : public SpellScript
{
PrepareSpellScript(spell_hun_pet_carrion_feeder_SpellScript);
bool Load() override
{
if (!GetCaster()->IsPet())
@@ -660,8 +634,8 @@ class spell_hun_pet_carrion_feeder : public SpellScriptLoader
void Register() override
{
OnEffectHit += SpellEffectFn(spell_hun_pet_carrion_feeder_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnCheckCast += SpellCheckCastFn(spell_hun_pet_carrion_feeder_SpellScript::CheckIfCorpseNear);
OnEffectHit.Register(&spell_hun_pet_carrion_feeder_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnCheckCast.Register(&spell_hun_pet_carrion_feeder_SpellScript::CheckIfCorpseNear);
}
};
@@ -679,8 +653,6 @@ class spell_hun_pet_heart_of_the_phoenix : public SpellScriptLoader
class spell_hun_pet_heart_of_the_phoenix_SpellScript : public SpellScript
{
PrepareSpellScript(spell_hun_pet_heart_of_the_phoenix_SpellScript);
bool Load() override
{
if (!GetCaster()->IsPet())
@@ -706,7 +678,7 @@ class spell_hun_pet_heart_of_the_phoenix : public SpellScriptLoader
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_pet_heart_of_the_phoenix_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHitTarget.Register(&spell_hun_pet_heart_of_the_phoenix_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -724,8 +696,6 @@ class spell_hun_rapid_recuperation : public SpellScriptLoader
class spell_hun_rapid_recuperation_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_rapid_recuperation_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_RAPID_RECUPERATION });
@@ -751,8 +721,8 @@ class spell_hun_rapid_recuperation : public SpellScriptLoader
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_hun_rapid_recuperation_AuraScript::HandleAbilityCast, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
OnEffectProc += AuraEffectProcFn(spell_hun_rapid_recuperation_AuraScript::HandleFocusRegen, EFFECT_1, SPELL_AURA_DUMMY);
OnEffectProc.Register(&spell_hun_rapid_recuperation_AuraScript::HandleAbilityCast, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
OnEffectProc.Register(&spell_hun_rapid_recuperation_AuraScript::HandleFocusRegen, EFFECT_1, SPELL_AURA_DUMMY);
}
};
@@ -770,8 +740,6 @@ class spell_hun_readiness : public SpellScriptLoader
class spell_hun_readiness_SpellScript : public SpellScript
{
PrepareSpellScript(spell_hun_readiness_SpellScript);
bool Load() override
{
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
@@ -797,7 +765,7 @@ class spell_hun_readiness : public SpellScriptLoader
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_readiness_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget.Register(&spell_hun_readiness_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
@@ -815,8 +783,6 @@ class spell_hun_ready_set_aim : public SpellScriptLoader
class spell_hun_ready_set_aim_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_ready_set_aim_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_FIRE });
@@ -833,7 +799,7 @@ class spell_hun_ready_set_aim : public SpellScriptLoader
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_hun_ready_set_aim_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
AfterEffectApply.Register(&spell_hun_ready_set_aim_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
}
};
@@ -851,8 +817,6 @@ class spell_hun_scatter_shot : public SpellScriptLoader
class spell_hun_scatter_shot_SpellScript : public SpellScript
{
PrepareSpellScript(spell_hun_scatter_shot_SpellScript);
bool Load() override
{
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
@@ -869,7 +833,7 @@ class spell_hun_scatter_shot : public SpellScriptLoader
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_scatter_shot_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget.Register(&spell_hun_scatter_shot_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
@@ -887,8 +851,6 @@ class spell_hun_sniper_training : public SpellScriptLoader
class spell_hun_sniper_training_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_sniper_training_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_SNIPER_TRAINING_R1, SPELL_HUNTER_SNIPER_TRAINING_BUFF_R1 });
@@ -926,8 +888,8 @@ class spell_hun_sniper_training : public SpellScriptLoader
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_hun_sniper_training_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_hun_sniper_training_AuraScript::HandleUpdatePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
OnEffectPeriodic.Register(&spell_hun_sniper_training_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
OnEffectUpdatePeriodic.Register(&spell_hun_sniper_training_AuraScript::HandleUpdatePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
@@ -945,8 +907,6 @@ class spell_hun_steady_shot : public SpellScriptLoader
class spell_hun_steady_shot_SpellScript : public SpellScript
{
PrepareSpellScript(spell_hun_steady_shot_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
@@ -989,7 +949,7 @@ class spell_hun_steady_shot : public SpellScriptLoader
void Register() override
{
OnEffectLaunch += SpellEffectFn(spell_hun_steady_shot_SpellScript::HandleLaunch, EFFECT_0, SPELL_EFFECT_NORMALIZED_WEAPON_DMG);
OnEffectLaunch.Register(&spell_hun_steady_shot_SpellScript::HandleLaunch, EFFECT_0, SPELL_EFFECT_NORMALIZED_WEAPON_DMG);
}
};
@@ -1007,8 +967,6 @@ class spell_hun_improved_steady_shot : public SpellScriptLoader
class spell_hun_improved_steady_shot_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_improved_steady_shot_AuraScript);
bool Load() override
{
_steadyShotCounter = 0;
@@ -1038,7 +996,7 @@ class spell_hun_improved_steady_shot : public SpellScriptLoader
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_hun_improved_steady_shot_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
OnEffectProc.Register(&spell_hun_improved_steady_shot_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
private:
@@ -1068,8 +1026,6 @@ class spell_hun_tame_beast : public SpellScriptLoader
class spell_hun_tame_beast_SpellScript : public SpellScript
{
PrepareSpellScript(spell_hun_tame_beast_SpellScript);
SpellCastResult SendTameFailResult(PetTameFailureReason reason)
{
Player* player = GetCaster()->ToPlayer();
@@ -1122,7 +1078,7 @@ class spell_hun_tame_beast : public SpellScriptLoader
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_hun_tame_beast_SpellScript::CheckCast);
OnCheckCast.Register(&spell_hun_tame_beast_SpellScript::CheckCast);
}
};
@@ -1140,8 +1096,6 @@ class spell_hun_target_only_pet_and_owner : public SpellScriptLoader
class spell_hun_target_only_pet_and_owner_SpellScript : public SpellScript
{
PrepareSpellScript(spell_hun_target_only_pet_and_owner_SpellScript);
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.clear();
@@ -1152,8 +1106,8 @@ class spell_hun_target_only_pet_and_owner : public SpellScriptLoader
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_target_only_pet_and_owner_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_PARTY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_hun_target_only_pet_and_owner_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_CASTER_AREA_PARTY);
OnObjectAreaTargetSelect.Register(&spell_hun_target_only_pet_and_owner_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_PARTY);
OnObjectAreaTargetSelect.Register(&spell_hun_target_only_pet_and_owner_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_CASTER_AREA_PARTY);
}
};
@@ -1171,8 +1125,6 @@ class spell_hun_thrill_of_the_hunt : public SpellScriptLoader
class spell_hun_thrill_of_the_hunt_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_thrill_of_the_hunt_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_THRILL_OF_THE_HUNT });
@@ -1189,7 +1141,7 @@ class spell_hun_thrill_of_the_hunt : public SpellScriptLoader
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_hun_thrill_of_the_hunt_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
OnEffectProc.Register(&spell_hun_thrill_of_the_hunt_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
@@ -1202,8 +1154,6 @@ class spell_hun_thrill_of_the_hunt : public SpellScriptLoader
// -56333 - T.N.T.
class spell_hun_tnt : public AuraScript
{
PrepareAuraScript(spell_hun_tnt);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_LOCK_AND_LOAD });
@@ -1222,8 +1172,8 @@ class spell_hun_tnt : public AuraScript
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_hun_tnt::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_hun_tnt::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
DoCheckProc.Register(&spell_hun_tnt::CheckProc);
OnEffectProc.Register(&spell_hun_tnt::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
@@ -1235,8 +1185,6 @@ class spell_hun_wild_quiver : public SpellScriptLoader
class spell_hun_wild_quiver_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_wild_quiver_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_WILD_QUIVER_DAMAGE });
@@ -1257,8 +1205,8 @@ class spell_hun_wild_quiver : public SpellScriptLoader
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_hun_wild_quiver_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_hun_wild_quiver_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
DoCheckProc.Register(&spell_hun_wild_quiver_AuraScript::CheckProc);
OnEffectProc.Register(&spell_hun_wild_quiver_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
@@ -1271,8 +1219,6 @@ class spell_hun_wild_quiver : public SpellScriptLoader
// 1978 - Serpent Sting
class spell_hun_serpent_sting : public AuraScript
{
PrepareAuraScript(spell_hun_serpent_sting);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_IMPROVED_SERPENT_STING_DAMAGE });
@@ -1293,7 +1239,7 @@ class spell_hun_serpent_sting : public AuraScript
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_hun_serpent_sting::HandleImprovedSerpentSting, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
AfterEffectApply.Register(&spell_hun_serpent_sting::HandleImprovedSerpentSting, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
}
};
@@ -1305,8 +1251,6 @@ class spell_hun_piercing_shots : public SpellScriptLoader
class spell_hun_piercing_shots_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_piercing_shots_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
@@ -1352,8 +1296,8 @@ class spell_hun_piercing_shots : public SpellScriptLoader
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_hun_piercing_shots_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_hun_piercing_shots_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
DoCheckProc.Register(&spell_hun_piercing_shots_AuraScript::CheckProc);
OnEffectProc.Register(&spell_hun_piercing_shots_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
@@ -1371,8 +1315,6 @@ class spell_hun_master_marksman : public SpellScriptLoader
class spell_hun_master_marksman_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_master_marksman_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_STEADY_SHOT });
@@ -1385,7 +1327,7 @@ class spell_hun_master_marksman : public SpellScriptLoader
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_hun_master_marksman_AuraScript::CheckProc);
DoCheckProc.Register(&spell_hun_master_marksman_AuraScript::CheckProc);
}
};
@@ -1403,8 +1345,6 @@ class spell_hun_bombardment : public SpellScriptLoader
class spell_hun_bombardment_AuraScript : public AuraScript
{
PrepareAuraScript(spell_hun_bombardment_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_MULTISHOT });
@@ -1417,7 +1357,7 @@ class spell_hun_bombardment : public SpellScriptLoader
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_hun_bombardment_AuraScript::CheckProc);
DoCheckProc.Register(&spell_hun_bombardment_AuraScript::CheckProc);
}
};
@@ -1429,8 +1369,6 @@ class spell_hun_bombardment : public SpellScriptLoader
class spell_hun_trap_launcher : public AuraScript
{
PrepareAuraScript(spell_hun_trap_launcher);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_IMPROVED_STEADY_SHOT_TRIGGERED });
@@ -1448,16 +1386,14 @@ class spell_hun_trap_launcher : public AuraScript
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_hun_trap_launcher::AfterApply, EFFECT_0, SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS_TRIGGERED, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_hun_trap_launcher::AfterRemove, EFFECT_0, SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS_TRIGGERED, AURA_EFFECT_HANDLE_REAL);
AfterEffectApply.Register(&spell_hun_trap_launcher::AfterApply, EFFECT_0, SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS_TRIGGERED, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove.Register(&spell_hun_trap_launcher::AfterRemove, EFFECT_0, SPELL_AURA_OVERRIDE_ACTIONBAR_SPELLS_TRIGGERED, AURA_EFFECT_HANDLE_REAL);
}
};
// 63067 - Glyph of Kill Shot
class spell_hun_glyph_of_kill_shot : public AuraScript
{
PrepareAuraScript(spell_hun_glyph_of_kill_shot);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_GLYPH_OF_KILL_SHOT_COOLDOWN });
@@ -1485,16 +1421,14 @@ class spell_hun_glyph_of_kill_shot : public AuraScript
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_hun_glyph_of_kill_shot::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_hun_glyph_of_kill_shot::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
DoCheckProc.Register(&spell_hun_glyph_of_kill_shot::CheckProc);
OnEffectProc.Register(&spell_hun_glyph_of_kill_shot::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
// 51753 - Camouflage
class spell_hun_camouflage : public SpellScript
{
PrepareSpellScript(spell_hun_camouflage);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_CAMOUFLAGE_DURATION });
@@ -1514,15 +1448,13 @@ class spell_hun_camouflage : public SpellScript
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_camouflage::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget.Register(&spell_hun_camouflage::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
// 51755 - Camouflage
class spell_hun_camouflage_duration : public AuraScript
{
PrepareAuraScript(spell_hun_camouflage_duration);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
@@ -1545,16 +1477,14 @@ class spell_hun_camouflage_duration : public AuraScript
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_hun_camouflage_duration::AfterApply, EFFECT_0, SPELL_AURA_INTERFERE_TARGETTING, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_hun_camouflage_duration::AfterRemove, EFFECT_0, SPELL_AURA_INTERFERE_TARGETTING, AURA_EFFECT_HANDLE_REAL);
AfterEffectApply.Register(&spell_hun_camouflage_duration::AfterApply, EFFECT_0, SPELL_AURA_INTERFERE_TARGETTING, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove.Register(&spell_hun_camouflage_duration::AfterRemove, EFFECT_0, SPELL_AURA_INTERFERE_TARGETTING, AURA_EFFECT_HANDLE_REAL);
}
};
// 80325 - Camouflage
class spell_hun_camouflage_triggered : public AuraScript
{
PrepareAuraScript(spell_hun_camouflage_triggered);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
@@ -1581,15 +1511,13 @@ class spell_hun_camouflage_triggered : public AuraScript
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_hun_camouflage_triggered::AfterRemove, EFFECT_0, SPELL_AURA_MOD_STEALTH, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove.Register(&spell_hun_camouflage_triggered::AfterRemove, EFFECT_0, SPELL_AURA_MOD_STEALTH, AURA_EFFECT_HANDLE_REAL);
}
};
// -53241 - Marked for Death
class spell_hun_marked_for_death : public AuraScript
{
PrepareAuraScript(spell_hun_marked_for_death);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_MARKED_FOR_DEATH_TRIGGERED });
@@ -1608,16 +1536,14 @@ class spell_hun_marked_for_death : public AuraScript
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_hun_marked_for_death::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_hun_marked_for_death::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
DoCheckProc.Register(&spell_hun_marked_for_death::CheckProc);
OnEffectProc.Register(&spell_hun_marked_for_death::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
// 82692 - Focus Fire
class spell_hun_focus_fire : public AuraScript
{
PrepareAuraScript(spell_hun_focus_fire);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
@@ -1659,16 +1585,14 @@ class spell_hun_focus_fire : public AuraScript
void Register() override
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_hun_focus_fire::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_RANGED_HASTE);
AfterEffectApply += AuraEffectApplyFn(spell_hun_focus_fire::AfterApply, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
DoEffectCalcAmount.Register(&spell_hun_focus_fire::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_RANGED_HASTE);
AfterEffectApply.Register(&spell_hun_focus_fire::AfterApply, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
}
};
// 19615 - Frenzy Effect
class spell_hun_frenzy_effect : public AuraScript
{
PrepareAuraScript(spell_hun_frenzy_effect);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
@@ -1694,16 +1618,14 @@ class spell_hun_frenzy_effect : public AuraScript
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_hun_frenzy_effect::AfterApply, EFFECT_0, SPELL_AURA_MOD_MELEE_HASTE_3, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
AfterEffectRemove += AuraEffectRemoveFn(spell_hun_frenzy_effect::AfterRemove, EFFECT_0, SPELL_AURA_MOD_MELEE_HASTE_3, AURA_EFFECT_HANDLE_REAL);
AfterEffectApply.Register(&spell_hun_frenzy_effect::AfterApply, EFFECT_0, SPELL_AURA_MOD_MELEE_HASTE_3, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
AfterEffectRemove.Register(&spell_hun_frenzy_effect::AfterRemove, EFFECT_0, SPELL_AURA_MOD_MELEE_HASTE_3, AURA_EFFECT_HANDLE_REAL);
}
};
// 34026 - Kill Command
class spell_hun_kill_command: public SpellScript
{
PrepareSpellScript(spell_hun_kill_command);
void HandleScriptEffect(SpellEffIndex effIndex)
{
Unit* caster = GetCaster();
@@ -1718,15 +1640,13 @@ class spell_hun_kill_command: public SpellScript
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_kill_command::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHitTarget.Register(&spell_hun_kill_command::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
// 82726 - Fervor
class spell_hun_fervor : public SpellScript
{
PrepareSpellScript(spell_hun_fervor);
bool Load() override
{
return GetCaster()->IsPlayer();
@@ -1750,7 +1670,7 @@ class spell_hun_fervor : public SpellScript
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_hun_fervor::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_ENERGIZE);
OnEffectHitTarget.Register(&spell_hun_fervor::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_ENERGIZE);
}
};
@@ -1763,8 +1683,6 @@ std::array<uint32, 2> const KillingStreakTriggerSpells =
// -82748 - Killing Streak
class spell_hun_killing_streak : public AuraScript
{
PrepareAuraScript(spell_hun_killing_streak);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
@@ -1794,7 +1712,7 @@ class spell_hun_killing_streak : public AuraScript
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_hun_killing_streak::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
OnEffectProc.Register(&spell_hun_killing_streak::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
private:
@@ -1804,8 +1722,6 @@ private:
// -82898 - Crouching Tiger, Hidden Chimera
class spell_hun_crouching_tiger_hidden_chimera : public AuraScript
{
PrepareAuraScript(spell_hun_crouching_tiger_hidden_chimera);
bool Load() override
{
return GetCaster()->IsPlayer();
@@ -1845,9 +1761,9 @@ class spell_hun_crouching_tiger_hidden_chimera : public AuraScript
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_hun_crouching_tiger_hidden_chimera::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_hun_crouching_tiger_hidden_chimera::HandleDisengageProc, EFFECT_0, SPELL_AURA_DUMMY);
OnEffectProc += AuraEffectProcFn(spell_hun_crouching_tiger_hidden_chimera::HandleDeterrenceProc, EFFECT_1, SPELL_AURA_DUMMY);
DoCheckProc.Register(&spell_hun_crouching_tiger_hidden_chimera::CheckProc);
OnEffectProc.Register(&spell_hun_crouching_tiger_hidden_chimera::HandleDisengageProc, EFFECT_0, SPELL_AURA_DUMMY);
OnEffectProc.Register(&spell_hun_crouching_tiger_hidden_chimera::HandleDeterrenceProc, EFFECT_1, SPELL_AURA_DUMMY);
}
};