From adc5c6f245d8d01fe58b1f90b2f9509e91c3b4e8 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Fri, 23 Nov 2018 09:36:04 +0100 Subject: [PATCH] Scripts/Gilneas: improved movement handling for Horrid Abomination --- sql/updates/world/custom/custom_2018_11_23_01_world.sql | 1 + src/server/scripts/EasternKingdoms/Gilneas/chapter2.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 sql/updates/world/custom/custom_2018_11_23_01_world.sql diff --git a/sql/updates/world/custom/custom_2018_11_23_01_world.sql b/sql/updates/world/custom/custom_2018_11_23_01_world.sql new file mode 100644 index 00000000000..c6f5d4d66bd --- /dev/null +++ b/sql/updates/world/custom/custom_2018_11_23_01_world.sql @@ -0,0 +1 @@ +UPDATE `creature` SET `MovementType`= 0, `spawndist`= 0 WHERE `ID`= 36231; diff --git a/src/server/scripts/EasternKingdoms/Gilneas/chapter2.cpp b/src/server/scripts/EasternKingdoms/Gilneas/chapter2.cpp index e9244fc4bfc..def369fc1a0 100644 --- a/src/server/scripts/EasternKingdoms/Gilneas/chapter2.cpp +++ b/src/server/scripts/EasternKingdoms/Gilneas/chapter2.cpp @@ -100,6 +100,7 @@ class npc_gilneas_horrid_abomination : public CreatureScript void Reset() override { Initialize(); + me->GetMotionMaster()->MoveRandom(6.0f); } void SpellHit(Unit* caster, SpellInfo const* spell) override @@ -110,7 +111,8 @@ class npc_gilneas_horrid_abomination : public CreatureScript Talk(SAY_KEG_PLACED); me->AttackStop(); me->SetReactState(REACT_PASSIVE); - me->GetMotionMaster()->Clear(); + me->GetMotionMaster()->MovementExpired(); + me->StopMoving(); _playerGUID = caster->GetGUID(); _allowEvents = true; _events.ScheduleEvent(EVENT_ABOMINATION_KILL_ME, Seconds(2));