mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Spells/Evoker: Implemented Azure Strike (#28656)
This commit is contained in:
3
sql/updates/world/master/2023_01_26_04_world.sql
Normal file
3
sql/updates/world/master/2023_01_26_04_world.sql
Normal file
@@ -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');
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user