From b686c3939db5b2ae9c03007760d08a15562b3abf Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 30 Jan 2023 08:25:37 -0500 Subject: [PATCH] Spells/Evoker: Implemented Azure Strike Port From (https://github.com/TrinityCore/TrinityCore/commit/eebacbc86e989bba8068dc07fc76ff3c64da3309) --- Source/Scripts/Spells/Evoker.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Source/Scripts/Spells/Evoker.cs b/Source/Scripts/Spells/Evoker.cs index 6211f7d1c..d92cb9ab5 100644 --- a/Source/Scripts/Spells/Evoker.cs +++ b/Source/Scripts/Spells/Evoker.cs @@ -6,6 +6,7 @@ using Game.Entities; using Game.Scripting; using Game.Spells; using System; +using System.Collections.Generic; namespace Scripts.Spells.Evoker { @@ -16,6 +17,22 @@ namespace Scripts.Spells.Evoker public const uint SoarRacial = 369536; } + [Script] // 362969 - Azure Strike (blue) + class spell_evo_azure_strike : SpellScript + { + void FilterTargets(List targets) + { + targets.Remove(GetExplTargetUnit()); + targets.RandomResize((uint)GetEffectInfo(0).CalcValue(GetCaster()) - 1); + targets.Add(GetExplTargetUnit()); + } + + public override void Register() + { + OnObjectAreaTargetSelect.Add(new ObjectAreaTargetSelectHandler(FilterTargets, 1, Targets.UnitDestAreaEnemy)); + } + } + [Script] // 358733 - Glide (Racial) class spell_evo_glide : SpellScript {