Core/Spells: moved Fingers of Frost charge dropping to AuraScript since it's actually stacks and not charges

This commit is contained in:
Ovahlord
2019-02-12 22:57:18 +01:00
parent 190a3258f3
commit 0c4da99fbf
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
UPDATE `spell_proc` SET `Charges`= 0 WHERE `SpellId`=44544;
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_mage_fingers_of_frost_charges';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(44544, 'spell_mage_fingers_of_frost_charges');

View File

@@ -2140,6 +2140,25 @@ class spell_mage_deep_freeze : public SpellScript
}
};
class spell_mage_fingers_of_frost_charges : public AuraScript
{
PrepareAuraScript(spell_mage_fingers_of_frost_charges);
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
if (GetStackAmount() > 1)
SetStackAmount(GetStackAmount() - 1);
else
Remove();
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_mage_fingers_of_frost_charges::HandleProc, EFFECT_0, SPELL_AURA_ABILITY_IGNORE_AURASTATE);
}
};
void AddSC_mage_spell_scripts()
{
new spell_mage_arcane_potency();
@@ -2156,6 +2175,7 @@ void AddSC_mage_spell_scripts()
new spell_mage_flame_orb();
new spell_mage_flame_orb_aoe_dummy();
new spell_mage_focus_magic();
RegisterAuraScript(spell_mage_fingers_of_frost_charges);
RegisterSpellScript(spell_mage_frostbolt);
new spell_mage_hot_streak();
new spell_mage_ice_barrier();