Scripts/Spells: Fixed Fingers of Frost proc passive
Port From (https://github.com/TrinityCore/TrinityCore/commit/b94851b824f6e4d7f7a7cd01a4c99e02b1e86b97)
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
using Framework.Constants;
|
using Framework.Constants;
|
||||||
|
using Framework.Dynamic;
|
||||||
using Game.Entities;
|
using Game.Entities;
|
||||||
using Game.Groups;
|
using Game.Groups;
|
||||||
using Game.Maps;
|
using Game.Maps;
|
||||||
@@ -264,6 +265,40 @@ namespace Scripts.Spells.Mage
|
|||||||
AfterProc.Add(new AuraProcHandler(DropFingersOfFrost));
|
AfterProc.Add(new AuraProcHandler(DropFingersOfFrost));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Script] // 112965 - Fingers of Frost
|
||||||
|
class spell_mage_fingers_of_frost_AuraScript : AuraScript
|
||||||
|
{
|
||||||
|
public override bool Validate(SpellInfo spellInfo)
|
||||||
|
{
|
||||||
|
return ValidateSpellInfo(SpellIds.FingersOfFrost);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CheckFrostboltProc(AuraEffect aurEff, ProcEventInfo eventInfo)
|
||||||
|
{
|
||||||
|
return eventInfo.GetSpellInfo() != null && eventInfo.GetSpellInfo().IsAffected(SpellFamilyNames.Mage, new FlagArray128(0, 0x2000000, 0, 0))
|
||||||
|
&& RandomHelper.randChance(aurEff.GetAmount());
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CheckFrozenOrbProc(AuraEffect aurEff, ProcEventInfo eventInfo)
|
||||||
|
{
|
||||||
|
return eventInfo.GetSpellInfo() != null && eventInfo.GetSpellInfo().IsAffected(SpellFamilyNames.Mage, new FlagArray128(0, 0, 0x80, 0))
|
||||||
|
&& RandomHelper.randChance(aurEff.GetAmount());
|
||||||
|
}
|
||||||
|
|
||||||
|
void Trigger(AuraEffect aurEff, ProcEventInfo eventInfo)
|
||||||
|
{
|
||||||
|
eventInfo.GetActor().CastSpell(GetTarget(), SpellIds.FingersOfFrost, true, null, aurEff);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
DoCheckEffectProc.Add(new CheckEffectProcHandler(CheckFrostboltProc, 0, AuraType.Dummy));
|
||||||
|
DoCheckEffectProc.Add(new CheckEffectProcHandler(CheckFrozenOrbProc, 1, AuraType.Dummy));
|
||||||
|
AfterEffectProc.Add(new EffectProcHandler(Trigger, 0, AuraType.Dummy));
|
||||||
|
AfterEffectProc.Add(new EffectProcHandler(Trigger, 1, AuraType.Dummy));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Script] // 11426 - Ice Barrier
|
[Script] // 11426 - Ice Barrier
|
||||||
class spell_mage_ice_barrier : AuraScript
|
class spell_mage_ice_barrier : AuraScript
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_mage_fingers_of_frost';
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||||
|
(112965,'spell_mage_fingers_of_frost');
|
||||||
|
|
||||||
|
DELETE FROM `spell_proc` WHERE `SpellId`=112965;
|
||||||
|
INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
|
||||||
|
(112965,0,3,0,0x2000000,0x80,0,0x10000,0,0x1,0,0,0,0,100,0,0); -- Fingers of Frost, proc on launch of Frostbolt and Frozen Orb
|
||||||
Reference in New Issue
Block a user