refactor(Scripts/Spells): convert spell_shaman into new system (#9065)

This commit is contained in:
Kitzunu
2021-11-09 11:45:35 +01:00
committed by GitHub
parent 2dc126b0df
commit 9b72a0a0e1
+138 -465
View File
@@ -30,10 +30,7 @@
enum ShamanSpells enum ShamanSpells
{ {
// Ours
SPELL_SHAMAN_GLYPH_OF_FERAL_SPIRIT = 63271, SPELL_SHAMAN_GLYPH_OF_FERAL_SPIRIT = 63271,
// Theirs
SPELL_SHAMAN_ANCESTRAL_AWAKENING_PROC = 52752, SPELL_SHAMAN_ANCESTRAL_AWAKENING_PROC = 52752,
SPELL_SHAMAN_BIND_SIGHT = 6277, SPELL_SHAMAN_BIND_SIGHT = 6277,
SPELL_SHAMAN_CLEANSING_TOTEM_EFFECT = 52025, SPELL_SHAMAN_CLEANSING_TOTEM_EFFECT = 52025,
@@ -70,15 +67,9 @@ enum ShamanSpellIcons
SHAMAN_ICON_ID_SHAMAN_LAVA_FLOW = 3087 SHAMAN_ICON_ID_SHAMAN_LAVA_FLOW = 3087
}; };
// Ours class spell_sha_totem_of_wrath : public SpellScript
class spell_sha_totem_of_wrath : public SpellScriptLoader
{ {
public: PrepareSpellScript(spell_sha_totem_of_wrath);
spell_sha_totem_of_wrath() : SpellScriptLoader("spell_sha_totem_of_wrath") { }
class spell_sha_totem_of_wrath_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sha_totem_of_wrath_SpellScript);
void HandleAfterCast() void HandleAfterCast()
{ {
@@ -94,24 +85,13 @@ public:
void Register() override void Register() override
{ {
AfterCast += SpellCastFn(spell_sha_totem_of_wrath_SpellScript::HandleAfterCast); AfterCast += SpellCastFn(spell_sha_totem_of_wrath::HandleAfterCast);
} }
}; };
SpellScript* GetSpellScript() const override class spell_sha_spirit_walk : public SpellScript
{ {
return new spell_sha_totem_of_wrath_SpellScript(); PrepareSpellScript(spell_sha_spirit_walk);
}
};
class spell_sha_spirit_walk : public SpellScriptLoader
{
public:
spell_sha_spirit_walk() : SpellScriptLoader("spell_sha_spirit_walk") { }
class spell_sha_spirit_walk_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sha_spirit_walk_SpellScript);
SpellCastResult CheckCast() SpellCastResult CheckCast()
{ {
@@ -124,24 +104,13 @@ public:
void Register() override void Register() override
{ {
OnCheckCast += SpellCheckCastFn(spell_sha_spirit_walk_SpellScript::CheckCast); OnCheckCast += SpellCheckCastFn(spell_sha_spirit_walk::CheckCast);
} }
}; };
SpellScript* GetSpellScript() const override class spell_sha_t10_restoration_4p_bonus : public AuraScript
{ {
return new spell_sha_spirit_walk_SpellScript(); PrepareAuraScript(spell_sha_t10_restoration_4p_bonus);
}
};
class spell_sha_t10_restoration_4p_bonus : public SpellScriptLoader
{
public:
spell_sha_t10_restoration_4p_bonus() : SpellScriptLoader("spell_sha_t10_restoration_4p_bonus") { }
class spell_sha_t10_restoration_4p_bonus_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_t10_restoration_4p_bonus_AuraScript);
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
@@ -168,25 +137,14 @@ public:
void Register() override void Register() override
{ {
DoCheckProc += AuraCheckProcFn(spell_sha_t10_restoration_4p_bonus_AuraScript::CheckProc); DoCheckProc += AuraCheckProcFn(spell_sha_t10_restoration_4p_bonus::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_sha_t10_restoration_4p_bonus_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); OnEffectProc += AuraEffectProcFn(spell_sha_t10_restoration_4p_bonus::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
} }
}; };
AuraScript* GetAuraScript() const override class spell_sha_totemic_mastery : public AuraScript
{ {
return new spell_sha_t10_restoration_4p_bonus_AuraScript(); PrepareAuraScript(spell_sha_totemic_mastery);
}
};
class spell_sha_totemic_mastery : public SpellScriptLoader
{
public:
spell_sha_totemic_mastery() : SpellScriptLoader("spell_sha_totemic_mastery") { }
class spell_sha_totemic_mastery_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_totemic_mastery_AuraScript);
void HandlePeriodic(AuraEffect const* /*aurEff*/) void HandlePeriodic(AuraEffect const* /*aurEff*/)
{ {
@@ -201,24 +159,13 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_sha_totemic_mastery_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_sha_totemic_mastery::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
} }
}; };
AuraScript* GetAuraScript() const override class spell_sha_feral_spirit_scaling : public AuraScript
{ {
return new spell_sha_totemic_mastery_AuraScript(); PrepareAuraScript(spell_sha_feral_spirit_scaling);
}
};
class spell_sha_feral_spirit_scaling : public SpellScriptLoader
{
public:
spell_sha_feral_spirit_scaling() : SpellScriptLoader("spell_sha_feral_spirit_scaling") { }
class spell_sha_feral_spirit_scaling_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_feral_spirit_scaling_AuraScript);
void CalculateResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/) void CalculateResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
{ {
@@ -316,35 +263,24 @@ public:
void Register() override void Register() override
{ {
if (m_scriptSpellId == 35675) if (m_scriptSpellId == 35675)
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_feral_spirit_scaling_AuraScript::CalculateResistanceAmount, EFFECT_ALL, SPELL_AURA_MOD_RESISTANCE); DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_feral_spirit_scaling::CalculateResistanceAmount, EFFECT_ALL, SPELL_AURA_MOD_RESISTANCE);
if (m_scriptSpellId == 35674) if (m_scriptSpellId == 35674)
{ {
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_feral_spirit_scaling_AuraScript::CalculateStatAmount, EFFECT_ALL, SPELL_AURA_MOD_STAT); DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_feral_spirit_scaling::CalculateStatAmount, EFFECT_ALL, SPELL_AURA_MOD_STAT);
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_feral_spirit_scaling_AuraScript::CalculateAPAmount, EFFECT_ALL, SPELL_AURA_MOD_ATTACK_POWER); DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_feral_spirit_scaling::CalculateAPAmount, EFFECT_ALL, SPELL_AURA_MOD_ATTACK_POWER);
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_feral_spirit_scaling_AuraScript::CalculateSPAmount, EFFECT_ALL, SPELL_AURA_MOD_DAMAGE_DONE); DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_feral_spirit_scaling::CalculateSPAmount, EFFECT_ALL, SPELL_AURA_MOD_DAMAGE_DONE);
} }
OnEffectApply += AuraEffectApplyFn(spell_sha_feral_spirit_scaling_AuraScript::HandleEffectApply, EFFECT_ALL, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL); OnEffectApply += AuraEffectApplyFn(spell_sha_feral_spirit_scaling::HandleEffectApply, EFFECT_ALL, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL);
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_sha_feral_spirit_scaling_AuraScript::CalcPeriodic, EFFECT_ALL, SPELL_AURA_ANY); DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_sha_feral_spirit_scaling::CalcPeriodic, EFFECT_ALL, SPELL_AURA_ANY);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_sha_feral_spirit_scaling_AuraScript::HandlePeriodic, EFFECT_ALL, SPELL_AURA_ANY); OnEffectPeriodic += AuraEffectPeriodicFn(spell_sha_feral_spirit_scaling::HandlePeriodic, EFFECT_ALL, SPELL_AURA_ANY);
} }
}; };
AuraScript* GetAuraScript() const override class spell_sha_fire_elemental_scaling : public AuraScript
{ {
return new spell_sha_feral_spirit_scaling_AuraScript(); PrepareAuraScript(spell_sha_fire_elemental_scaling);
}
};
class spell_sha_fire_elemental_scaling : public SpellScriptLoader
{
public:
spell_sha_fire_elemental_scaling() : SpellScriptLoader("spell_sha_fire_elemental_scaling") { }
class spell_sha_fire_elemental_scaling_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_fire_elemental_scaling_AuraScript);
void CalculateResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/) void CalculateResistanceAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
{ {
@@ -403,37 +339,25 @@ public:
void Register() override void Register() override
{ {
if (m_scriptSpellId != 35665 && m_scriptSpellId != 65225) if (m_scriptSpellId != 35665 && m_scriptSpellId != 65225)
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_fire_elemental_scaling_AuraScript::CalculateResistanceAmount, EFFECT_ALL, SPELL_AURA_MOD_RESISTANCE); DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_fire_elemental_scaling::CalculateResistanceAmount, EFFECT_ALL, SPELL_AURA_MOD_RESISTANCE);
if (m_scriptSpellId == 35666 || m_scriptSpellId == 65226) if (m_scriptSpellId == 35666 || m_scriptSpellId == 65226)
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_fire_elemental_scaling_AuraScript::CalculateStatAmount, EFFECT_ALL, SPELL_AURA_MOD_STAT); DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_fire_elemental_scaling::CalculateStatAmount, EFFECT_ALL, SPELL_AURA_MOD_STAT);
if (m_scriptSpellId == 35665 || m_scriptSpellId == 65225) if (m_scriptSpellId == 35665 || m_scriptSpellId == 65225)
{ {
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_fire_elemental_scaling_AuraScript::CalculateAPAmount, EFFECT_ALL, SPELL_AURA_MOD_ATTACK_POWER); DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_fire_elemental_scaling::CalculateAPAmount, EFFECT_ALL, SPELL_AURA_MOD_ATTACK_POWER);
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_fire_elemental_scaling_AuraScript::CalculateSPAmount, EFFECT_ALL, SPELL_AURA_MOD_DAMAGE_DONE); DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_fire_elemental_scaling::CalculateSPAmount, EFFECT_ALL, SPELL_AURA_MOD_DAMAGE_DONE);
} }
OnEffectApply += AuraEffectApplyFn(spell_sha_fire_elemental_scaling_AuraScript::HandleEffectApply, EFFECT_ALL, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL); OnEffectApply += AuraEffectApplyFn(spell_sha_fire_elemental_scaling::HandleEffectApply, EFFECT_ALL, SPELL_AURA_ANY, AURA_EFFECT_HANDLE_REAL);
} }
}; };
AuraScript* GetAuraScript() const override
{
return new spell_sha_fire_elemental_scaling_AuraScript();
}
};
// Theirs
// 52759 - Ancestral Awakening (Proc) // 52759 - Ancestral Awakening (Proc)
class spell_sha_ancestral_awakening_proc : public SpellScriptLoader class spell_sha_ancestral_awakening_proc : public SpellScript
{ {
public: PrepareSpellScript(spell_sha_ancestral_awakening_proc);
spell_sha_ancestral_awakening_proc() : SpellScriptLoader("spell_sha_ancestral_awakening_proc") { }
class spell_sha_ancestral_awakening_proc_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sha_ancestral_awakening_proc_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -461,26 +385,15 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sha_ancestral_awakening_proc_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_RAID); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sha_ancestral_awakening_proc::FilterTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_RAID);
OnEffectHitTarget += SpellEffectFn(spell_sha_ancestral_awakening_proc_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); OnEffectHitTarget += SpellEffectFn(spell_sha_ancestral_awakening_proc::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sha_ancestral_awakening_proc_SpellScript();
} }
}; };
// 51474 - Astral Shift // 51474 - Astral Shift
class spell_sha_astral_shift : public SpellScriptLoader class spell_sha_astral_shift : public AuraScript
{ {
public: PrepareAuraScript(spell_sha_astral_shift);
spell_sha_astral_shift() : SpellScriptLoader("spell_sha_astral_shift") { }
class spell_sha_astral_shift_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_astral_shift_AuraScript);
uint32 absorbPct; uint32 absorbPct;
@@ -505,26 +418,15 @@ public:
void Register() override void Register() override
{ {
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_astral_shift_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB); DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_astral_shift::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
OnEffectAbsorb += AuraEffectAbsorbFn(spell_sha_astral_shift_AuraScript::Absorb, EFFECT_0); OnEffectAbsorb += AuraEffectAbsorbFn(spell_sha_astral_shift::Absorb, EFFECT_0);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sha_astral_shift_AuraScript();
} }
}; };
// 2825 - Bloodlust // 2825 - Bloodlust
class spell_sha_bloodlust : public SpellScriptLoader class spell_sha_bloodlust : public SpellScript
{ {
public: PrepareSpellScript(spell_sha_bloodlust);
spell_sha_bloodlust() : SpellScriptLoader("spell_sha_bloodlust") { }
class spell_sha_bloodlust_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sha_bloodlust_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -545,26 +447,15 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sha_bloodlust_SpellScript::RemoveInvalidTargets, EFFECT_ALL, TARGET_UNIT_CASTER_AREA_RAID); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sha_bloodlust::RemoveInvalidTargets, EFFECT_ALL, TARGET_UNIT_CASTER_AREA_RAID);
AfterHit += SpellHitFn(spell_sha_bloodlust_SpellScript::ApplyDebuff); AfterHit += SpellHitFn(spell_sha_bloodlust::ApplyDebuff);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sha_bloodlust_SpellScript();
} }
}; };
// -1064 - Chain Heal // -1064 - Chain Heal
class spell_sha_chain_heal : public SpellScriptLoader class spell_sha_chain_heal : public SpellScript
{ {
public: PrepareSpellScript(spell_sha_chain_heal);
spell_sha_chain_heal() : SpellScriptLoader("spell_sha_chain_heal") { }
class spell_sha_chain_heal_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sha_chain_heal_SpellScript);
bool Load() override bool Load() override
{ {
@@ -593,28 +484,17 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_sha_chain_heal_SpellScript::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL); OnEffectHitTarget += SpellEffectFn(spell_sha_chain_heal::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL);
} }
bool firstHeal; bool firstHeal;
bool riptide; bool riptide;
}; };
SpellScript* GetSpellScript() const override
{
return new spell_sha_chain_heal_SpellScript();
}
};
// 8171 - Cleansing Totem (Pulse) // 8171 - Cleansing Totem (Pulse)
class spell_sha_cleansing_totem_pulse : public SpellScriptLoader class spell_sha_cleansing_totem_pulse : public SpellScript
{ {
public: PrepareSpellScript(spell_sha_cleansing_totem_pulse);
spell_sha_cleansing_totem_pulse() : SpellScriptLoader("spell_sha_cleansing_totem_pulse") { }
class spell_sha_cleansing_totem_pulse_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sha_cleansing_totem_pulse_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -630,25 +510,14 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_sha_cleansing_totem_pulse_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); OnEffectHitTarget += SpellEffectFn(spell_sha_cleansing_totem_pulse::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sha_cleansing_totem_pulse_SpellScript();
} }
}; };
// -974 - Earth Shield // -974 - Earth Shield
class spell_sha_earth_shield : public SpellScriptLoader class spell_sha_earth_shield : public AuraScript
{ {
public: PrepareAuraScript(spell_sha_earth_shield);
spell_sha_earth_shield() : SpellScriptLoader("spell_sha_earth_shield") { }
class spell_sha_earth_shield_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_earth_shield_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -694,27 +563,16 @@ public:
void Register() override void Register() override
{ {
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_earth_shield_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_DUMMY); DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_sha_earth_shield::CalculateAmount, EFFECT_0, SPELL_AURA_DUMMY);
DoCheckProc += AuraCheckProcFn(spell_sha_earth_shield_AuraScript::CheckProc); DoCheckProc += AuraCheckProcFn(spell_sha_earth_shield::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_sha_earth_shield_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); OnEffectProc += AuraEffectProcFn(spell_sha_earth_shield::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sha_earth_shield_AuraScript();
} }
}; };
// 6474 - Earthbind Totem - Fix Talent: Earthen Power // 6474 - Earthbind Totem - Fix Talent: Earthen Power
class spell_sha_earthbind_totem : public SpellScriptLoader class spell_sha_earthbind_totem : public AuraScript
{ {
public: PrepareAuraScript(spell_sha_earthbind_totem);
spell_sha_earthbind_totem() : SpellScriptLoader("spell_sha_earthbind_totem") { }
class spell_sha_earthbind_totem_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_earthbind_totem_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -748,14 +606,8 @@ public:
void Register() override void Register() override
{ {
OnEffectPeriodic += AuraEffectPeriodicFn(spell_sha_earthbind_totem_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); OnEffectPeriodic += AuraEffectPeriodicFn(spell_sha_earthbind_totem::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
OnEffectApply += AuraEffectApplyFn(spell_sha_earthbind_totem_AuraScript::Apply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); OnEffectApply += AuraEffectApplyFn(spell_sha_earthbind_totem::Apply, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sha_earthbind_totem_AuraScript();
} }
}; };
@@ -777,14 +629,9 @@ public:
}; };
// 59566 - Earthen Power // 59566 - Earthen Power
class spell_sha_earthen_power : public SpellScriptLoader class spell_sha_earthen_power : public SpellScript
{ {
public: PrepareSpellScript(spell_sha_earthen_power);
spell_sha_earthen_power() : SpellScriptLoader("spell_sha_earthen_power") { }
class spell_sha_earthen_power_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sha_earthen_power_SpellScript);
void FilterTargets(std::list<WorldObject*>& unitList) void FilterTargets(std::list<WorldObject*>& unitList)
{ {
@@ -793,25 +640,14 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sha_earthen_power_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sha_earthen_power::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sha_earthen_power_SpellScript();
} }
}; };
// -51940 - Earthliving Weapon (Passive) // -51940 - Earthliving Weapon (Passive)
class spell_sha_earthliving_weapon : public SpellScriptLoader class spell_sha_earthliving_weapon : public AuraScript
{ {
public: PrepareAuraScript(spell_sha_earthliving_weapon);
spell_sha_earthliving_weapon() : SpellScriptLoader("spell_sha_earthliving_weapon") { }
class spell_sha_earthliving_weapon_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_earthliving_weapon_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -835,25 +671,14 @@ public:
void Register() override void Register() override
{ {
DoCheckProc += AuraCheckProcFn(spell_sha_earthliving_weapon_AuraScript::CheckProc); DoCheckProc += AuraCheckProcFn(spell_sha_earthliving_weapon::CheckProc);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sha_earthliving_weapon_AuraScript();
} }
}; };
// -1535 - Fire Nova // -1535 - Fire Nova
class spell_sha_fire_nova : public SpellScriptLoader class spell_sha_fire_nova : public SpellScript
{ {
public: PrepareSpellScript(spell_sha_fire_nova);
spell_sha_fire_nova() : SpellScriptLoader("spell_sha_fire_nova") { }
class spell_sha_fire_nova_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sha_fire_nova_SpellScript);
bool Validate(SpellInfo const* spellInfo) override bool Validate(SpellInfo const* spellInfo) override
{ {
@@ -897,26 +722,15 @@ public:
void Register() override void Register() override
{ {
OnCheckCast += SpellCheckCastFn(spell_sha_fire_nova_SpellScript::CheckFireTotem); OnCheckCast += SpellCheckCastFn(spell_sha_fire_nova::CheckFireTotem);
OnEffectHitTarget += SpellEffectFn(spell_sha_fire_nova_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); OnEffectHitTarget += SpellEffectFn(spell_sha_fire_nova::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sha_fire_nova_SpellScript();
} }
}; };
// -8050 - Flame Shock // -8050 - Flame Shock
class spell_sha_flame_shock : public SpellScriptLoader class spell_sha_flame_shock : public AuraScript
{ {
public: PrepareAuraScript(spell_sha_flame_shock);
spell_sha_flame_shock() : SpellScriptLoader("spell_sha_flame_shock") { }
class spell_sha_flame_shock_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_flame_shock_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -940,25 +754,14 @@ public:
void Register() override void Register() override
{ {
AfterDispel += AuraDispelFn(spell_sha_flame_shock_AuraScript::HandleDispel); AfterDispel += AuraDispelFn(spell_sha_flame_shock::HandleDispel);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sha_flame_shock_AuraScript();
} }
}; };
// 52041, 52046, 52047, 52048, 52049, 52050, 58759, 58760, 58761 - Healing Stream Totem // 52041, 52046, 52047, 52048, 52049, 52050, 58759, 58760, 58761 - Healing Stream Totem
class spell_sha_healing_stream_totem : public SpellScriptLoader class spell_sha_healing_stream_totem : public SpellScript
{ {
public: PrepareSpellScript(spell_sha_healing_stream_totem);
spell_sha_healing_stream_totem() : SpellScriptLoader("spell_sha_healing_stream_totem") { }
class spell_sha_healing_stream_totem_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sha_healing_stream_totem_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -993,25 +796,14 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_sha_healing_stream_totem_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); OnEffectHitTarget += SpellEffectFn(spell_sha_healing_stream_totem::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sha_healing_stream_totem_SpellScript();
} }
}; };
// 32182 - Heroism // 32182 - Heroism
class spell_sha_heroism : public SpellScriptLoader class spell_sha_heroism : public SpellScript
{ {
public: PrepareSpellScript(spell_sha_heroism);
spell_sha_heroism() : SpellScriptLoader("spell_sha_heroism") { }
class spell_sha_heroism_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sha_heroism_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -1032,28 +824,17 @@ public:
void Register() override void Register() override
{ {
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sha_heroism_SpellScript::RemoveInvalidTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_RAID); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sha_heroism::RemoveInvalidTargets, EFFECT_0, TARGET_UNIT_CASTER_AREA_RAID);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sha_heroism_SpellScript::RemoveInvalidTargets, EFFECT_1, TARGET_UNIT_CASTER_AREA_RAID); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sha_heroism::RemoveInvalidTargets, EFFECT_1, TARGET_UNIT_CASTER_AREA_RAID);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sha_heroism_SpellScript::RemoveInvalidTargets, EFFECT_2, TARGET_UNIT_CASTER_AREA_RAID); OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_sha_heroism::RemoveInvalidTargets, EFFECT_2, TARGET_UNIT_CASTER_AREA_RAID);
AfterHit += SpellHitFn(spell_sha_heroism_SpellScript::ApplyDebuff); AfterHit += SpellHitFn(spell_sha_heroism::ApplyDebuff);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sha_heroism_SpellScript();
} }
}; };
// 23551 - Lightning Shield // 23551 - Lightning Shield
class spell_sha_item_lightning_shield : public SpellScriptLoader class spell_sha_item_lightning_shield : public AuraScript
{ {
public: PrepareAuraScript(spell_sha_item_lightning_shield);
spell_sha_item_lightning_shield() : SpellScriptLoader("spell_sha_item_lightning_shield") { }
class spell_sha_item_lightning_shield_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_item_lightning_shield_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -1068,25 +849,14 @@ public:
void Register() override void Register() override
{ {
OnEffectProc += AuraEffectProcFn(spell_sha_item_lightning_shield_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); OnEffectProc += AuraEffectProcFn(spell_sha_item_lightning_shield::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sha_item_lightning_shield_AuraScript();
} }
}; };
// 23552 - Lightning Shield // 23552 - Lightning Shield
class spell_sha_item_lightning_shield_trigger : public SpellScriptLoader class spell_sha_item_lightning_shield_trigger : public AuraScript
{ {
public: PrepareAuraScript(spell_sha_item_lightning_shield_trigger);
spell_sha_item_lightning_shield_trigger() : SpellScriptLoader("spell_sha_item_lightning_shield_trigger") { }
class spell_sha_item_lightning_shield_trigger_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_item_lightning_shield_trigger_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -1101,25 +871,14 @@ public:
void Register() override void Register() override
{ {
OnEffectProc += AuraEffectProcFn(spell_sha_item_lightning_shield_trigger_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); OnEffectProc += AuraEffectProcFn(spell_sha_item_lightning_shield_trigger::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sha_item_lightning_shield_trigger_AuraScript();
} }
}; };
// 23572 - Mana Surge // 23572 - Mana Surge
class spell_sha_item_mana_surge : public SpellScriptLoader class spell_sha_item_mana_surge : public AuraScript
{ {
public: PrepareAuraScript(spell_sha_item_mana_surge);
spell_sha_item_mana_surge() : SpellScriptLoader("spell_sha_item_mana_surge") { }
class spell_sha_item_mana_surge_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_item_mana_surge_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -1142,26 +901,15 @@ public:
void Register() override void Register() override
{ {
DoCheckProc += AuraCheckProcFn(spell_sha_item_mana_surge_AuraScript::CheckProc); DoCheckProc += AuraCheckProcFn(spell_sha_item_mana_surge::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_sha_item_mana_surge_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); OnEffectProc += AuraEffectProcFn(spell_sha_item_mana_surge::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sha_item_mana_surge_AuraScript();
} }
}; };
// 70811 - Item - Shaman T10 Elemental 2P Bonus // 70811 - Item - Shaman T10 Elemental 2P Bonus
class spell_sha_item_t10_elemental_2p_bonus : public SpellScriptLoader class spell_sha_item_t10_elemental_2p_bonus : public AuraScript
{ {
public: PrepareAuraScript(spell_sha_item_t10_elemental_2p_bonus);
spell_sha_item_t10_elemental_2p_bonus() : SpellScriptLoader("spell_sha_item_t10_elemental_2p_bonus") { }
class spell_sha_item_t10_elemental_2p_bonus_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_item_t10_elemental_2p_bonus_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -1177,25 +925,14 @@ public:
void Register() override void Register() override
{ {
OnEffectProc += AuraEffectProcFn(spell_sha_item_t10_elemental_2p_bonus_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY); OnEffectProc += AuraEffectProcFn(spell_sha_item_t10_elemental_2p_bonus::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sha_item_t10_elemental_2p_bonus_AuraScript();
} }
}; };
// 60103 - Lava Lash // 60103 - Lava Lash
class spell_sha_lava_lash : public SpellScriptLoader class spell_sha_lava_lash : public SpellScript
{ {
public: PrepareSpellScript(spell_sha_lava_lash)
spell_sha_lava_lash() : SpellScriptLoader("spell_sha_lava_lash") { }
class spell_sha_lava_lash_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sha_lava_lash_SpellScript)
bool Load() override bool Load() override
{ {
@@ -1220,25 +957,14 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_sha_lava_lash_SpellScript::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY); OnEffectHitTarget += SpellEffectFn(spell_sha_lava_lash::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sha_lava_lash_SpellScript();
} }
}; };
// 52031, 52033, 52034, 52035, 52036, 58778, 58779, 58780 - Mana Spring Totem // 52031, 52033, 52034, 52035, 52036, 58778, 58779, 58780 - Mana Spring Totem
class spell_sha_mana_spring_totem : public SpellScriptLoader class spell_sha_mana_spring_totem : public SpellScript
{ {
public: PrepareSpellScript(spell_sha_mana_spring_totem);
spell_sha_mana_spring_totem() : SpellScriptLoader("spell_sha_mana_spring_totem") { }
class spell_sha_mana_spring_totem_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sha_mana_spring_totem_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -1256,25 +982,14 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_sha_mana_spring_totem_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); OnEffectHitTarget += SpellEffectFn(spell_sha_mana_spring_totem::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sha_mana_spring_totem_SpellScript();
} }
}; };
// 39610 - Mana Tide Totem // 39610 - Mana Tide Totem
class spell_sha_mana_tide_totem : public SpellScriptLoader class spell_sha_mana_tide_totem : public SpellScript
{ {
public: PrepareSpellScript(spell_sha_mana_tide_totem);
spell_sha_mana_tide_totem() : SpellScriptLoader("spell_sha_mana_tide_totem") { }
class spell_sha_mana_tide_totem_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sha_mana_tide_totem_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override bool Validate(SpellInfo const* /*spellInfo*/) override
{ {
@@ -1302,25 +1017,14 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_sha_mana_tide_totem_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); OnEffectHitTarget += SpellEffectFn(spell_sha_mana_tide_totem::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sha_mana_tide_totem_SpellScript();
} }
}; };
// 6495 - Sentry Totem // 6495 - Sentry Totem
class spell_sha_sentry_totem : public SpellScriptLoader class spell_sha_sentry_totem : public AuraScript
{ {
public: PrepareAuraScript(spell_sha_sentry_totem);
spell_sha_sentry_totem() : SpellScriptLoader("spell_sha_sentry_totem") { }
class spell_sha_sentry_totem_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_sentry_totem_AuraScript);
bool Validate(SpellInfo const* /*spell*/) override bool Validate(SpellInfo const* /*spell*/) override
{ {
@@ -1336,25 +1040,14 @@ public:
void Register() override void Register() override
{ {
AfterEffectRemove += AuraEffectRemoveFn(spell_sha_sentry_totem_AuraScript::AfterRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); AfterEffectRemove += AuraEffectRemoveFn(spell_sha_sentry_totem::AfterRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sha_sentry_totem_AuraScript();
} }
}; };
// -51490 - Thunderstorm // -51490 - Thunderstorm
class spell_sha_thunderstorm : public SpellScriptLoader class spell_sha_thunderstorm : public SpellScript
{ {
public: PrepareSpellScript(spell_sha_thunderstorm);
spell_sha_thunderstorm() : SpellScriptLoader("spell_sha_thunderstorm") { }
class spell_sha_thunderstorm_SpellScript : public SpellScript
{
PrepareSpellScript(spell_sha_thunderstorm_SpellScript);
void HandleKnockBack(SpellEffIndex effIndex) void HandleKnockBack(SpellEffIndex effIndex)
{ {
@@ -1365,25 +1058,14 @@ public:
void Register() override void Register() override
{ {
OnEffectHitTarget += SpellEffectFn(spell_sha_thunderstorm_SpellScript::HandleKnockBack, EFFECT_2, SPELL_EFFECT_KNOCK_BACK); OnEffectHitTarget += SpellEffectFn(spell_sha_thunderstorm::HandleKnockBack, EFFECT_2, SPELL_EFFECT_KNOCK_BACK);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_sha_thunderstorm_SpellScript();
} }
}; };
// -16257 - SpellName // -16257 - SpellName
class spell_sha_flurry_proc : public SpellScriptLoader class spell_sha_flurry_proc : public AuraScript
{ {
public: PrepareAuraScript(spell_sha_flurry_proc);
spell_sha_flurry_proc() : SpellScriptLoader("spell_sha_flurry_proc") {}
class spell_sha_flurry_proc_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_flurry_proc_AuraScript);
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
@@ -1404,48 +1086,39 @@ public:
void Register() override void Register() override
{ {
DoCheckProc += AuraCheckProcFn(spell_sha_flurry_proc_AuraScript::CheckProc); DoCheckProc += AuraCheckProcFn(spell_sha_flurry_proc::CheckProc);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sha_flurry_proc_AuraScript();
} }
}; };
void AddSC_shaman_spell_scripts() void AddSC_shaman_spell_scripts()
{ {
// ours RegisterSpellScript(spell_sha_totem_of_wrath);
new spell_sha_totem_of_wrath(); RegisterSpellScript(spell_sha_spirit_walk);
new spell_sha_spirit_walk(); RegisterSpellScript(spell_sha_t10_restoration_4p_bonus);
new spell_sha_t10_restoration_4p_bonus(); RegisterSpellScript(spell_sha_totemic_mastery);
new spell_sha_totemic_mastery(); RegisterSpellScript(spell_sha_feral_spirit_scaling);
new spell_sha_feral_spirit_scaling(); RegisterSpellScript(spell_sha_fire_elemental_scaling);
new spell_sha_fire_elemental_scaling(); RegisterSpellScript(spell_sha_ancestral_awakening_proc);
RegisterSpellScript(spell_sha_astral_shift);
// theirs RegisterSpellScript(spell_sha_bloodlust);
new spell_sha_ancestral_awakening_proc(); RegisterSpellScript(spell_sha_chain_heal);
new spell_sha_astral_shift(); RegisterSpellScript(spell_sha_cleansing_totem_pulse);
new spell_sha_bloodlust(); RegisterSpellScript(spell_sha_earth_shield);
new spell_sha_chain_heal(); RegisterSpellScript(spell_sha_earthbind_totem);
new spell_sha_cleansing_totem_pulse(); RegisterSpellScript(spell_sha_earthen_power);
new spell_sha_earth_shield(); RegisterSpellScript(spell_sha_earthliving_weapon);
new spell_sha_earthbind_totem(); RegisterSpellScript(spell_sha_fire_nova);
new spell_sha_earthen_power(); RegisterSpellScript(spell_sha_flame_shock);
new spell_sha_earthliving_weapon(); RegisterSpellScript(spell_sha_healing_stream_totem);
new spell_sha_fire_nova(); RegisterSpellScript(spell_sha_heroism);
new spell_sha_flame_shock(); RegisterSpellScript(spell_sha_item_lightning_shield);
new spell_sha_healing_stream_totem(); RegisterSpellScript(spell_sha_item_lightning_shield_trigger);
new spell_sha_heroism(); RegisterSpellScript(spell_sha_item_mana_surge);
new spell_sha_item_lightning_shield(); RegisterSpellScript(spell_sha_item_t10_elemental_2p_bonus);
new spell_sha_item_lightning_shield_trigger(); RegisterSpellScript(spell_sha_lava_lash);
new spell_sha_item_mana_surge(); RegisterSpellScript(spell_sha_mana_spring_totem);
new spell_sha_item_t10_elemental_2p_bonus(); RegisterSpellScript(spell_sha_mana_tide_totem);
new spell_sha_lava_lash(); RegisterSpellScript(spell_sha_sentry_totem);
new spell_sha_mana_spring_totem(); RegisterSpellScript(spell_sha_thunderstorm);
new spell_sha_mana_tide_totem(); RegisterSpellScript(spell_sha_flurry_proc);
new spell_sha_sentry_totem();
new spell_sha_thunderstorm();
new spell_sha_flurry_proc();
} }