aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_mage.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp
index d56ee711aee..848e72d7d27 100644
--- a/src/server/scripts/Spells/spell_mage.cpp
+++ b/src/server/scripts/Spells/spell_mage.cpp
@@ -51,6 +51,7 @@ enum MageSpells
SPELL_MAGE_DRAGONHAWK_FORM = 32818,
SPELL_MAGE_EVERWARM_SOCKS = 320913,
SPELL_MAGE_FINGERS_OF_FROST = 44544,
+ SPELL_MAGE_FIRESTARTER = 205026,
SPELL_MAGE_FROST_NOVA = 122,
SPELL_MAGE_GIRAFFE_FORM = 32816,
SPELL_MAGE_ICE_BARRIER = 11426,
@@ -516,6 +517,53 @@ class spell_mage_fingers_of_frost : public AuraScript
}
};
+// 133 - Fireball
+// 11366 - Pyroblast
+class spell_mage_firestarter : public SpellScript
+{
+ PrepareSpellScript(spell_mage_firestarter);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_MAGE_FIRESTARTER });
+ }
+
+ void CalcCritChance(Unit const* victim, float& critChance)
+ {
+ if (AuraEffect const* aurEff = GetCaster()->GetAuraEffect(SPELL_MAGE_FIRESTARTER, EFFECT_0))
+ if (victim->GetHealthPct() >= aurEff->GetAmount())
+ critChance = 100.0f;
+ }
+
+ void Register() override
+ {
+ OnCalcCritChance += SpellOnCalcCritChanceFn(spell_mage_firestarter::CalcCritChance);
+ }
+};
+
+// 321712 - Pyroblast
+class spell_mage_firestarter_dots : public AuraScript
+{
+ PrepareAuraScript(spell_mage_firestarter_dots);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_MAGE_FIRESTARTER });
+ }
+
+ void CalcCritChance(AuraEffect const* aurEff, Unit const* victim, float& critChance)
+ {
+ if (AuraEffect const* aurEff = GetCaster()->GetAuraEffect(SPELL_MAGE_FIRESTARTER, EFFECT_0))
+ if (victim->GetHealthPct() >= aurEff->GetAmount())
+ critChance = 100.0f;
+ }
+
+ void Register() override
+ {
+ DoEffectCalcCritChance += AuraEffectCalcCritChanceFn(spell_mage_firestarter_dots::CalcCritChance, EFFECT_ALL, SPELL_AURA_PERIODIC_DAMAGE);
+ }
+};
+
// 11426 - Ice Barrier
class spell_mage_ice_barrier : public AuraScript
{
@@ -1155,6 +1203,8 @@ void AddSC_mage_spell_scripts()
RegisterSpellScript(spell_mage_cone_of_cold);
RegisterSpellScript(spell_mage_conjure_refreshment);
RegisterAuraScript(spell_mage_fingers_of_frost);
+ RegisterSpellScript(spell_mage_firestarter);
+ RegisterAuraScript(spell_mage_firestarter_dots);
RegisterAuraScript(spell_mage_ice_barrier);
RegisterSpellScript(spell_mage_ice_block);
RegisterSpellScript(spell_mage_ice_lance);