refactor(Scripts/Spells): convert spell_warrior into new system (#9068)

This commit is contained in:
Kitzunu
2021-11-09 11:45:50 +01:00
committed by GitHub
parent 7c1fb0b088
commit 834cfecc4f
+110 -373
View File
@@ -75,15 +75,9 @@ enum MiscSpells
SPELL_GEN_DAMAGE_REDUCTION_AURA = 68066,
};
// Ours
class spell_warr_mocking_blow : public SpellScriptLoader
class spell_warr_mocking_blow : public SpellScript
{
public:
spell_warr_mocking_blow() : SpellScriptLoader("spell_warr_mocking_blow") { }
class spell_warr_mocking_blow_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_mocking_blow_SpellScript);
PrepareSpellScript(spell_warr_mocking_blow);
void HandleOnHit()
{
@@ -94,13 +88,7 @@ public:
void Register() override
{
OnHit += SpellHitFn(spell_warr_mocking_blow_SpellScript::HandleOnHit);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_mocking_blow_SpellScript();
OnHit += SpellHitFn(spell_warr_mocking_blow::HandleOnHit);
}
};
@@ -109,14 +97,9 @@ enum VictoryRushEnum
SPELL_VICTORIOUS = 32216
};
class spell_warr_victory_rush : public SpellScriptLoader
class spell_warr_victory_rush : public SpellScript
{
public:
spell_warr_victory_rush() : SpellScriptLoader("spell_warr_victory_rush") { }
class spell_warr_victory_rush_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_victory_rush_SpellScript);
PrepareSpellScript(spell_warr_victory_rush);
void VictoryRushHit()
{
@@ -134,24 +117,13 @@ public:
void Register() override
{
AfterHit += SpellHitFn(spell_warr_victory_rush_SpellScript::VictoryRushHit);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_victory_rush_SpellScript();
AfterHit += SpellHitFn(spell_warr_victory_rush::VictoryRushHit);
}
};
class spell_warr_intervene : public SpellScriptLoader
class spell_warr_intervene : public SpellScript
{
public:
spell_warr_intervene() : SpellScriptLoader("spell_warr_intervene") { }
class spell_warr_intervene_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_intervene_SpellScript);
PrepareSpellScript(spell_warr_intervene);
void HandleApplyAura(SpellEffIndex /*effIndex*/)
{
@@ -161,24 +133,13 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_warr_intervene_SpellScript::HandleApplyAura, EFFECT_1, SPELL_EFFECT_APPLY_AURA);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_intervene_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_warr_intervene::HandleApplyAura, EFFECT_1, SPELL_EFFECT_APPLY_AURA);
}
};
class spell_warr_improved_spell_reflection : public SpellScriptLoader
class spell_warr_improved_spell_reflection : public AuraScript
{
public:
spell_warr_improved_spell_reflection() : SpellScriptLoader("spell_warr_improved_spell_reflection") { }
class spell_warr_improved_spell_reflection_AuraScript : public AuraScript
{
PrepareAuraScript(spell_warr_improved_spell_reflection_AuraScript);
PrepareAuraScript(spell_warr_improved_spell_reflection);
bool CheckProc(ProcEventInfo& eventInfo)
{
@@ -196,25 +157,14 @@ public:
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_warr_improved_spell_reflection_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_warr_improved_spell_reflection_AuraScript::OnProc, EFFECT_1, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_warr_improved_spell_reflection_AuraScript();
DoCheckProc += AuraCheckProcFn(spell_warr_improved_spell_reflection::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_warr_improved_spell_reflection::OnProc, EFFECT_1, SPELL_AURA_DUMMY);
}
};
class spell_warr_improved_spell_reflection_trigger : public SpellScriptLoader
class spell_warr_improved_spell_reflection_trigger : public SpellScript
{
public:
spell_warr_improved_spell_reflection_trigger() : SpellScriptLoader("spell_warr_improved_spell_reflection_trigger") { }
class spell_warr_improved_spell_reflection_trigger_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_improved_spell_reflection_trigger_SpellScript);
PrepareSpellScript(spell_warr_improved_spell_reflection_trigger);
void FilterTargets(std::list<WorldObject*>& unitList)
{
@@ -226,18 +176,13 @@ public:
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_warr_improved_spell_reflection_trigger_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_PARTY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_warr_improved_spell_reflection_trigger::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_PARTY);
}
};
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_improved_spell_reflection_trigger_SpellScript();
}
class spell_warr_improved_spell_reflection_trigger_AuraScript : public AuraScript
{
PrepareAuraScript(spell_warr_improved_spell_reflection_trigger_AuraScript);
class spell_warr_improved_spell_reflection_trigger_aura : public AuraScript
{
PrepareAuraScript(spell_warr_improved_spell_reflection_trigger_aura);
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -260,26 +205,14 @@ public:
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_warr_improved_spell_reflection_trigger_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_REFLECT_SPELLS, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_warr_improved_spell_reflection_trigger_AuraScript();
AfterEffectRemove += AuraEffectRemoveFn(spell_warr_improved_spell_reflection_trigger_aura::HandleRemove, EFFECT_0, SPELL_AURA_REFLECT_SPELLS, AURA_EFFECT_HANDLE_REAL);
}
};
// Theirs
// 12975 - Last Stand
class spell_warr_last_stand : public SpellScriptLoader
class spell_warr_last_stand : public SpellScript
{
public:
spell_warr_last_stand() : SpellScriptLoader("spell_warr_last_stand") { }
class spell_warr_last_stand_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_last_stand_SpellScript);
PrepareSpellScript(spell_warr_last_stand);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -295,25 +228,14 @@ public:
void Register() override
{
OnEffectHit += SpellEffectFn(spell_warr_last_stand_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_last_stand_SpellScript();
OnEffectHit += SpellEffectFn(spell_warr_last_stand::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
// -12162 - Deep Wounds
class spell_warr_deep_wounds : public SpellScriptLoader
class spell_warr_deep_wounds : public SpellScript
{
public:
spell_warr_deep_wounds() : SpellScriptLoader("spell_warr_deep_wounds") { }
class spell_warr_deep_wounds_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_deep_wounds_SpellScript);
PrepareSpellScript(spell_warr_deep_wounds);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -343,25 +265,14 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_warr_deep_wounds_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_deep_wounds_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_warr_deep_wounds::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
// -100 - Charge
class spell_warr_charge : public SpellScriptLoader
class spell_warr_charge : public SpellScript
{
public:
spell_warr_charge() : SpellScriptLoader("spell_warr_charge") { }
class spell_warr_charge_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_charge_SpellScript);
PrepareSpellScript(spell_warr_charge);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -386,25 +297,14 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_warr_charge_SpellScript::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_charge_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_warr_charge::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
}
};
// -1464 - Slam
class spell_warr_slam : public SpellScriptLoader
class spell_warr_slam : public SpellScript
{
public:
spell_warr_slam() : SpellScriptLoader("spell_warr_slam") { }
class spell_warr_slam_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_slam_SpellScript);
PrepareSpellScript(spell_warr_slam);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -433,26 +333,15 @@ public:
void Register() override
{
BeforeHit += BeforeSpellHitFn(spell_warr_slam_SpellScript::SendMiss);
OnEffectHitTarget += SpellEffectFn(spell_warr_slam_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_slam_SpellScript();
BeforeHit += BeforeSpellHitFn(spell_warr_slam::SendMiss);
OnEffectHitTarget += SpellEffectFn(spell_warr_slam::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
// -58872 - Damage Shield
class spell_warr_damage_shield : public SpellScriptLoader
class spell_warr_damage_shield : public AuraScript
{
public:
spell_warr_damage_shield() : SpellScriptLoader("spell_warr_damage_shield") { }
class spell_warr_damage_shield_AuraScript : public AuraScript
{
PrepareAuraScript(spell_warr_damage_shield_AuraScript);
PrepareAuraScript(spell_warr_damage_shield);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -470,25 +359,14 @@ public:
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_warr_damage_shield_AuraScript::OnProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_warr_damage_shield_AuraScript();
OnEffectProc += AuraEffectProcFn(spell_warr_damage_shield::OnProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
// -5308 - Execute
class spell_warr_execute : public SpellScriptLoader
class spell_warr_execute : public SpellScript
{
public:
spell_warr_execute() : SpellScriptLoader("spell_warr_execute") { }
class spell_warr_execute_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_execute_SpellScript);
PrepareSpellScript(spell_warr_execute);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -537,26 +415,15 @@ public:
void Register() override
{
BeforeHit += BeforeSpellHitFn(spell_warr_execute_SpellScript::SendMiss);
OnEffectHitTarget += SpellEffectFn(spell_warr_execute_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_execute_SpellScript();
BeforeHit += BeforeSpellHitFn(spell_warr_execute::SendMiss);
OnEffectHitTarget += SpellEffectFn(spell_warr_execute::HandleEffect, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
// 12809 - Concussion Blow
class spell_warr_concussion_blow : public SpellScriptLoader
class spell_warr_concussion_blow : public SpellScript
{
public:
spell_warr_concussion_blow() : SpellScriptLoader("spell_warr_concussion_blow") { }
class spell_warr_concussion_blow_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_concussion_blow_SpellScript);
PrepareSpellScript(spell_warr_concussion_blow);
void HandleDummy(SpellEffIndex /*effIndex*/)
{
@@ -565,25 +432,14 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_warr_concussion_blow_SpellScript::HandleDummy, EFFECT_2, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_concussion_blow_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_warr_concussion_blow::HandleDummy, EFFECT_2, SPELL_EFFECT_DUMMY);
}
};
// 23881 - Bloodthirst
class spell_warr_bloodthirst : public SpellScriptLoader
class spell_warr_bloodthirst : public SpellScript
{
public:
spell_warr_bloodthirst() : SpellScriptLoader("spell_warr_bloodthirst") { }
class spell_warr_bloodthirst_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_bloodthirst_SpellScript);
PrepareSpellScript(spell_warr_bloodthirst);
void HandleDamage(SpellEffIndex /*effIndex*/)
{
@@ -606,26 +462,15 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_warr_bloodthirst_SpellScript::HandleDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
OnEffectHit += SpellEffectFn(spell_warr_bloodthirst_SpellScript::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_bloodthirst_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_warr_bloodthirst::HandleDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
OnEffectHit += SpellEffectFn(spell_warr_bloodthirst::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
}
};
// 23880 - Bloodthirst (Heal)
class spell_warr_bloodthirst_heal : public SpellScriptLoader
class spell_warr_bloodthirst_heal : public SpellScript
{
public:
spell_warr_bloodthirst_heal() : SpellScriptLoader("spell_warr_bloodthirst_heal") { }
class spell_warr_bloodthirst_heal_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_bloodthirst_heal_SpellScript);
PrepareSpellScript(spell_warr_bloodthirst_heal);
void HandleHeal(SpellEffIndex /*effIndex*/)
{
@@ -635,25 +480,14 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_warr_bloodthirst_heal_SpellScript::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_bloodthirst_heal_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_warr_bloodthirst_heal::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL);
}
};
// 7384, 7887, 11584, 11585 - Overpower
class spell_warr_overpower : public SpellScriptLoader
class spell_warr_overpower : public SpellScript
{
public:
spell_warr_overpower() : SpellScriptLoader("spell_warr_overpower") { }
class spell_warr_overpower_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_overpower_SpellScript);
PrepareSpellScript(spell_warr_overpower);
void HandleEffect(SpellEffIndex /*effIndex*/)
{
@@ -673,25 +507,14 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_warr_overpower_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_ANY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_overpower_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_warr_overpower::HandleEffect, EFFECT_0, SPELL_EFFECT_ANY);
}
};
// 5246 - Intimidating Shout
class spell_warr_intimidating_shout : public SpellScriptLoader
class spell_warr_intimidating_shout : public SpellScript
{
public:
spell_warr_intimidating_shout() : SpellScriptLoader("spell_warr_intimidating_shout") { }
class spell_warr_intimidating_shout_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_intimidating_shout_SpellScript);
PrepareSpellScript(spell_warr_intimidating_shout);
void FilterTargets(std::list<WorldObject*>& unitList)
{
@@ -700,26 +523,15 @@ public:
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_warr_intimidating_shout_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_warr_intimidating_shout_SpellScript::FilterTargets, EFFECT_2, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_intimidating_shout_SpellScript();
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_warr_intimidating_shout::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENEMY);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_warr_intimidating_shout::FilterTargets, EFFECT_2, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
// -772 - Rend
class spell_warr_rend : public SpellScriptLoader
class spell_warr_rend : public AuraScript
{
public:
spell_warr_rend() : SpellScriptLoader("spell_warr_rend") { }
class spell_warr_rend_AuraScript : public AuraScript
{
PrepareAuraScript(spell_warr_rend_AuraScript);
PrepareAuraScript(spell_warr_rend);
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& canBeRecalculated)
{
@@ -747,25 +559,14 @@ public:
void Register() override
{
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warr_rend_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_warr_rend_AuraScript();
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warr_rend::CalculateAmount, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
}
};
// 64380, 65941 - Shattering Throw
class spell_warr_shattering_throw : public SpellScriptLoader
class spell_warr_shattering_throw : public SpellScript
{
public:
spell_warr_shattering_throw() : SpellScriptLoader("spell_warr_shattering_throw") { }
class spell_warr_shattering_throw_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_shattering_throw_SpellScript);
PrepareSpellScript(spell_warr_shattering_throw);
void HandleScript(SpellEffIndex effIndex)
{
@@ -778,25 +579,14 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_warr_shattering_throw_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_shattering_throw_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_warr_shattering_throw::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
// 12328, 18765, 35429 - Sweeping Strikes
class spell_warr_sweeping_strikes : public SpellScriptLoader
class spell_warr_sweeping_strikes : public AuraScript
{
public:
spell_warr_sweeping_strikes() : SpellScriptLoader("spell_warr_sweeping_strikes") { }
class spell_warr_sweeping_strikes_AuraScript : public AuraScript
{
PrepareAuraScript(spell_warr_sweeping_strikes_AuraScript);
PrepareAuraScript(spell_warr_sweeping_strikes);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -835,29 +625,18 @@ public:
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_warr_sweeping_strikes_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_warr_sweeping_strikes_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
DoCheckProc += AuraCheckProcFn(spell_warr_sweeping_strikes::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_warr_sweeping_strikes::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
private:
private:
Unit* _procTarget;
};
AuraScript* GetAuraScript() const override
{
return new spell_warr_sweeping_strikes_AuraScript();
}
};
// 50720 - Vigilance
class spell_warr_vigilance : public SpellScriptLoader
class spell_warr_vigilance : public AuraScript
{
public:
spell_warr_vigilance() : SpellScriptLoader("spell_warr_vigilance") { }
class spell_warr_vigilance_AuraScript : public AuraScript
{
PrepareAuraScript(spell_warr_vigilance_AuraScript);
PrepareAuraScript(spell_warr_vigilance);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -924,32 +703,21 @@ public:
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_warr_vigilance_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
AfterEffectApply += AuraEffectApplyFn(spell_warr_vigilance_AuraScript::HandleAfterApply, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
OnEffectRemove += AuraEffectRemoveFn(spell_warr_vigilance_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
DoCheckProc += AuraCheckProcFn(spell_warr_vigilance_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_warr_vigilance_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
OnEffectApply += AuraEffectApplyFn(spell_warr_vigilance::HandleApply, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
AfterEffectApply += AuraEffectApplyFn(spell_warr_vigilance::HandleAfterApply, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
OnEffectRemove += AuraEffectRemoveFn(spell_warr_vigilance::HandleRemove, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
DoCheckProc += AuraCheckProcFn(spell_warr_vigilance::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_warr_vigilance::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
private:
private:
Unit* _procTarget;
};
AuraScript* GetAuraScript() const override
{
return new spell_warr_vigilance_AuraScript();
}
};
// 50725 - Vigilance
class spell_warr_vigilance_trigger : public SpellScriptLoader
class spell_warr_vigilance_trigger : public SpellScript
{
public:
spell_warr_vigilance_trigger() : SpellScriptLoader("spell_warr_vigilance_trigger") { }
class spell_warr_vigilance_trigger_SpellScript : public SpellScript
{
PrepareSpellScript(spell_warr_vigilance_trigger_SpellScript);
PrepareSpellScript(spell_warr_vigilance_trigger);
void HandleScript(SpellEffIndex effIndex)
{
@@ -962,25 +730,14 @@ public:
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_warr_vigilance_trigger_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_warr_vigilance_trigger_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_warr_vigilance_trigger::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
// 58387 - Glyph of Sunder Armor
class spell_warr_glyph_of_sunder_armor : public SpellScriptLoader
class spell_warr_glyph_of_sunder_armor : public AuraScript
{
public:
spell_warr_glyph_of_sunder_armor() : SpellScriptLoader("spell_warr_glyph_of_sunder_armor") { }
class spell_warr_glyph_of_sunder_armor_AuraScript : public AuraScript
{
PrepareAuraScript(spell_warr_glyph_of_sunder_armor_AuraScript);
PrepareAuraScript(spell_warr_glyph_of_sunder_armor);
void HandleEffectCalcSpellMod(AuraEffect const* aurEff, SpellModifier*& spellMod)
{
@@ -998,25 +755,14 @@ public:
void Register() override
{
DoEffectCalcSpellMod += AuraEffectCalcSpellModFn(spell_warr_glyph_of_sunder_armor_AuraScript::HandleEffectCalcSpellMod, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_warr_glyph_of_sunder_armor_AuraScript();
DoEffectCalcSpellMod += AuraEffectCalcSpellModFn(spell_warr_glyph_of_sunder_armor::HandleEffectCalcSpellMod, EFFECT_0, SPELL_AURA_DUMMY);
}
};
// 20230 - Retaliation
class spell_warr_retaliation : public SpellScriptLoader
class spell_warr_retaliation : public AuraScript
{
public:
spell_warr_retaliation() : SpellScriptLoader("spell_warr_retaliation") { }
class spell_warr_retaliation_AuraScript : public AuraScript
{
PrepareAuraScript(spell_warr_retaliation_AuraScript);
PrepareAuraScript(spell_warr_retaliation);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -1037,43 +783,34 @@ public:
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_warr_retaliation_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_warr_retaliation_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_warr_retaliation_AuraScript();
DoCheckProc += AuraCheckProcFn(spell_warr_retaliation::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_warr_retaliation::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
void AddSC_warrior_spell_scripts()
{
// Ours
new spell_warr_mocking_blow();
new spell_warr_intervene();
new spell_warr_improved_spell_reflection();
new spell_warr_improved_spell_reflection_trigger();
new spell_warr_victory_rush();
// Theirs
new spell_warr_bloodthirst();
new spell_warr_bloodthirst_heal();
new spell_warr_charge();
new spell_warr_concussion_blow();
new spell_warr_damage_shield();
new spell_warr_deep_wounds();
new spell_warr_execute();
new spell_warr_glyph_of_sunder_armor();
new spell_warr_intimidating_shout();
new spell_warr_last_stand();
new spell_warr_overpower();
new spell_warr_rend();
new spell_warr_retaliation();
new spell_warr_shattering_throw();
new spell_warr_slam();
new spell_warr_sweeping_strikes();
new spell_warr_vigilance();
new spell_warr_vigilance_trigger();
RegisterSpellScript(spell_warr_mocking_blow);
RegisterSpellScript(spell_warr_intervene);
RegisterSpellScript(spell_warr_improved_spell_reflection);
RegisterSpellAndAuraScriptPair(spell_warr_improved_spell_reflection_trigger, spell_warr_improved_spell_reflection_trigger_aura);
RegisterSpellScript(spell_warr_victory_rush);
RegisterSpellScript(spell_warr_bloodthirst);
RegisterSpellScript(spell_warr_bloodthirst_heal);
RegisterSpellScript(spell_warr_charge);
RegisterSpellScript(spell_warr_concussion_blow);
RegisterSpellScript(spell_warr_damage_shield);
RegisterSpellScript(spell_warr_deep_wounds);
RegisterSpellScript(spell_warr_execute);
RegisterSpellScript(spell_warr_glyph_of_sunder_armor);
RegisterSpellScript(spell_warr_intimidating_shout);
RegisterSpellScript(spell_warr_last_stand);
RegisterSpellScript(spell_warr_overpower);
RegisterSpellScript(spell_warr_rend);
RegisterSpellScript(spell_warr_retaliation);
RegisterSpellScript(spell_warr_shattering_throw);
RegisterSpellScript(spell_warr_slam);
RegisterSpellScript(spell_warr_sweeping_strikes);
RegisterSpellScript(spell_warr_vigilance);
RegisterSpellScript(spell_warr_vigilance_trigger);
}