aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_evoker.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_evoker.cpp b/src/server/scripts/Spells/spell_evoker.cpp
index 261f6671b0c..3ecb55c8d35 100644
--- a/src/server/scripts/Spells/spell_evoker.cpp
+++ b/src/server/scripts/Spells/spell_evoker.cpp
@@ -20,9 +20,12 @@
* Ordered alphabetically using scriptname.
* Scriptnames of files in this file should be prefixed with "spell_evo_".
*/
+
+#include "Containers.h"
#include "Player.h"
#include "ScriptMgr.h"
#include "Spell.h"
+#include "SpellAuraEffects.h"
#include "SpellHistory.h"
#include "SpellMgr.h"
#include "SpellScript.h"
@@ -34,6 +37,24 @@ enum EvokerSpells
SPELL_EVOKER_SOAR_RACIAL = 369536
};
+// 362969 - Azure Strike (blue)
+class spell_evo_azure_strike : public SpellScript
+{
+ PrepareSpellScript(spell_evo_azure_strike);
+
+ void FilterTargets(std::list<WorldObject*>& targets)
+ {
+ targets.remove(GetExplTargetUnit());
+ Trinity::Containers::RandomResize(targets, GetEffectInfo(EFFECT_0).CalcValue(GetCaster()) - 1);
+ targets.push_back(GetExplTargetUnit());
+ }
+
+ void Register() override
+ {
+ OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_evo_azure_strike::FilterTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENEMY);
+ }
+};
+
// 358733 - Glide (Racial)
class spell_evo_glide : public SpellScript
{
@@ -75,5 +96,6 @@ class spell_evo_glide : public SpellScript
void AddSC_evoker_spell_scripts()
{
+ RegisterSpellScript(spell_evo_azure_strike);
RegisterSpellScript(spell_evo_glide);
}