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