diff options
author | Aqua Deus <95978183+aquadeus@users.noreply.github.com> | 2023-01-26 08:16:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-26 08:16:14 +0100 |
commit | eebacbc86e989bba8068dc07fc76ff3c64da3309 (patch) | |
tree | ab8f217c9a00c64494ba54b3fa6367eb68a0ae6a /src | |
parent | e0980b2c3f4596c6fab37e13c57991fba145cd2e (diff) |
Spells/Evoker: Implemented Azure Strike (#28656)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_evoker.cpp | 22 |
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); } |