diff options
author | Rothend <67004168+Rothend@users.noreply.github.com> | 2020-06-24 22:02:44 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-01-18 00:27:18 +0100 |
commit | 77e1304a5aada6df095f9c60c09ede296c8bc28a (patch) | |
tree | 57a41be47f331cd630dc9ca8d078f39544204bb9 /src | |
parent | abc490f677607cbe488557ea859da970686c4c3d (diff) |
Script/Creature: script Terokk's encounter (#24871)
* Script/Creature: script Terokk's encounter.
Closes #2029
* Apply suggested changes.
* Fix nopch build.
* Rename 9999_99_99_99_world_terokk.sql to 2020_06_24_02_world.sql
* Update 2020_06_24_02_world.sql
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
Co-authored-by: Eridium <6587064+Killyana@users.noreply.github.com>
(cherry picked from commit 3227ed94bc7e8a6833fe67a2edb63debcca90a60)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Outland/zone_terokkar_forest.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/server/scripts/Outland/zone_terokkar_forest.cpp b/src/server/scripts/Outland/zone_terokkar_forest.cpp index e1cab1ce464..d22118232aa 100644 --- a/src/server/scripts/Outland/zone_terokkar_forest.cpp +++ b/src/server/scripts/Outland/zone_terokkar_forest.cpp @@ -30,8 +30,11 @@ EndContentData */ #include "ScriptMgr.h" #include "GameObject.h" #include "Group.h" +#include "Map.h" #include "Player.h" #include "ScriptedEscortAI.h" +#include "Spell.h" +#include "SpellScript.h" #include "WorldSession.h" /*###### @@ -255,8 +258,25 @@ public: } }; +// 40655 - Skyguard Flare +class spell_skyguard_flare : public SpellScript +{ + PrepareSpellScript(spell_skyguard_flare); + + void ModDestHeight(SpellDestination& dest) + { + dest._position.m_positionZ = GetCaster()->GetMap()->GetHeight(GetCaster()->GetPhaseShift(), dest._position.GetPositionX(), dest._position.GetPositionY(), MAX_HEIGHT); + } + + void Register() override + { + OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_skyguard_flare::ModDestHeight, EFFECT_0, TARGET_DEST_TARGET_RANDOM); + } +}; + void AddSC_terokkar_forest() { new npc_unkor_the_ruthless(); new npc_isla_starmane(); + RegisterSpellScript(spell_skyguard_flare); } |