From 0e6cc3bd1706615d460ea354f8c3ed03ec2fbdfc Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Mon, 8 Dec 2025 09:46:52 -0500 Subject: [PATCH] Scripts/Spells: Implement mage talent "Pyrotechnics" Port From (https://github.com/TrinityCore/TrinityCore/commit/e9d963760c1f4be95e655ecd50f1c6aceecdc1dd) --- Source/Scripts/Spells/Mage.cs | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/Source/Scripts/Spells/Mage.cs b/Source/Scripts/Spells/Mage.cs index 26d678191..63bf70b3c 100644 --- a/Source/Scripts/Spells/Mage.cs +++ b/Source/Scripts/Spells/Mage.cs @@ -73,6 +73,7 @@ struct SpellIds public const uint PhoenixFlames = 257541; public const uint PhoenixFlamesDamage = 257542; public const uint Pyroblast = 11366; + public const uint Pyrotechnics = 157644; public const uint RadiantSparkProcBlocker = 376105; public const uint RayOfFrostBonus = 208141; public const uint RayOfFrostFingersOfFrost = 269748; @@ -973,8 +974,8 @@ class spell_mage_hot_streak : AuraScript public override void Register() { - DoCheckProc.Add(new (CheckProc)); - OnProc.Add(new (HandleProc)); + DoCheckProc.Add(new(CheckProc)); + OnProc.Add(new(HandleProc)); } } @@ -992,7 +993,7 @@ class spell_mage_hot_streak_ignite_marker : SpellScript return castTime; } - public override void Register() { } + public override void Register() { } bool _affectedByHotStreak = false; @@ -1526,6 +1527,29 @@ class spell_mage_prismatic_barrier : AuraScript } } +[Script] // 157642 - Pyrotechnics +class spell_mage_pyrotechnics : AuraScript +{ + public override bool Validate(SpellInfo spellInfo) + { + return ValidateSpellInfo(SpellIds.Pyrotechnics); + } + + void HandleProc(AuraEffect aurEff, ProcEventInfo procInfo) + { + if (procInfo.GetHitMask().HasAnyFlag(ProcFlagsHit.Critical)) + { + PreventDefaultAction(); + procInfo.GetActor().RemoveAurasDueToSpell(SpellIds.Pyrotechnics); + } + } + + public override void Register() + { + OnEffectProc.Add(new(HandleProc, 0, AuraType.ProcTriggerSpell)); + } +} + [Script] // 376103 - Radiant Spark class spell_mage_radiant_spark : AuraScript {