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