mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Spells: Fixed mage talent Firestarter (#27576)
Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_mage_firestarter','spell_mage_firestarter_dots');
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(133, 'spell_mage_firestarter'),
|
||||
(11366, 'spell_mage_firestarter'),
|
||||
(321712, 'spell_mage_firestarter_dots');
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user