diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-04-25 00:42:16 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-04-25 00:42:16 +0200 |
commit | dad976beb4f1a865e5df5d6f03da1d00d266e1fc (patch) | |
tree | 165190844b4094fd023d67f70529e0b002121647 /src/server/scripts/Kalimdor | |
parent | e0e1b6a4098badb6f48ba1d5cb1cc1739e310959 (diff) |
Core/Movement: Migrate scripts using GetMotionMaster()->MoveSmoothPath to GetMotionMaster()->MovePath and kill it (they now have the same capabilities)
Diffstat (limited to 'src/server/scripts/Kalimdor')
-rw-r--r-- | src/server/scripts/Kalimdor/zone_mulgore.cpp | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/server/scripts/Kalimdor/zone_mulgore.cpp b/src/server/scripts/Kalimdor/zone_mulgore.cpp index d1fcd7c2cd9..6d9b2c8db5e 100644 --- a/src/server/scripts/Kalimdor/zone_mulgore.cpp +++ b/src/server/scripts/Kalimdor/zone_mulgore.cpp @@ -15,9 +15,10 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "ScriptMgr.h" #include "MotionMaster.h" +#include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "WaypointDefines.h" /*###### ## npc_eagle_spirit @@ -29,17 +30,21 @@ enum EagleSpirit SPELL_SPIRIT_FORM = 69324 }; -Position const EagleSpiritflightPath[] = +WaypointPath const EagleSpiritflightPath = { - { -2884.155f, -71.08681f, 242.0678f }, - { -2720.592f, -111.0035f, 242.5955f }, - { -2683.951f, -382.9010f, 231.1792f }, - { -2619.148f, -484.9288f, 231.1792f }, - { -2543.868f, -525.3333f, 231.1792f }, - { -2465.321f, -502.4896f, 190.7347f }, - { -2343.872f, -401.8281f, -8.320873f } + 0, + { + { 0, -2884.155f, -71.08681f, 242.0678f }, + { 1, -2720.592f, -111.0035f, 242.5955f }, + { 2, -2683.951f, -382.9010f, 231.1792f }, + { 3, -2619.148f, -484.9288f, 231.1792f }, + { 4, -2543.868f, -525.3333f, 231.1792f }, + { 5, -2465.321f, -502.4896f, 190.7347f }, + { 6, -2343.872f, -401.8281f, -8.320873f } + }, + WaypointMoveType::Run, + WaypointPathFlags::FlyingPath }; -size_t const EagleSpiritflightPathSize = std::extent<decltype(EagleSpiritflightPath)>::value; class npc_eagle_spirit : public CreatureScript { @@ -55,16 +60,13 @@ public: if (!apply) return; - me->GetMotionMaster()->MoveSmoothPath(uint32(EagleSpiritflightPathSize), EagleSpiritflightPath, EagleSpiritflightPathSize, false, true); + me->GetMotionMaster()->MovePath(EagleSpiritflightPath, false); me->CastSpell(me, SPELL_SPIRIT_FORM); } - void MovementInform(uint32 type, uint32 pointId) override + void WaypointPathEnded(uint32 /*pointId*/, uint32 /*pathId*/) override { - if (type == EFFECT_MOTION_TYPE && pointId == EagleSpiritflightPathSize) - { - DoCast(SPELL_EJECT_ALL_PASSENGERS); - } + DoCast(SPELL_EJECT_ALL_PASSENGERS); } }; |