aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2023_01_26_04_world.sql3
-rw-r--r--src/server/scripts/Spells/spell_evoker.cpp22
2 files changed, 25 insertions, 0 deletions
diff --git a/sql/updates/world/master/2023_01_26_04_world.sql b/sql/updates/world/master/2023_01_26_04_world.sql
new file mode 100644
index 00000000000..2fee95a5b12
--- /dev/null
+++ b/sql/updates/world/master/2023_01_26_04_world.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=362969 AND `ScriptName`='spell_evo_azure_strike';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(362969, 'spell_evo_azure_strike');
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);
}