aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/master/2021_12_15_07_world_2019_07_12_01_world.sql2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp24
2 files changed, 24 insertions, 2 deletions
diff --git a/sql/updates/world/master/2021_12_15_07_world_2019_07_12_01_world.sql b/sql/updates/world/master/2021_12_15_07_world_2019_07_12_01_world.sql
new file mode 100644
index 00000000000..cdf2aefaf81
--- /dev/null
+++ b/sql/updates/world/master/2021_12_15_07_world_2019_07_12_01_world.sql
@@ -0,0 +1,2 @@
+--
+DELETE FROM `waypoint_data` WHERE `id`=2851100;
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
index 48ecfbe34cc..c7839057c3b 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp
@@ -33,6 +33,7 @@
#include "SpellInfo.h"
#include "TemporarySummon.h"
#include "Vehicle.h"
+#include <G3D/Vector3.h>
/*######
##Quest 12848
@@ -420,6 +421,15 @@ enum EyeOfAcherus
Position const EyeOFAcherusFallPoint = { 2361.21f, -5660.45f, 496.7444f, 0.0f };
+Position const EyeOfAcherusPath[] =
+{
+ { 2361.21f, -5660.45f, 496.744f },
+ { 2341.57f, -5672.8f, 538.394f },
+ { 1957.4f, -5844.1f, 273.867f },
+ { 1758.01f, -5876.79f, 166.867f }
+};
+std::size_t const EyeOfAcherusPathSize = std::extent<decltype(EyeOfAcherusPath)>::value;
+
class npc_eye_of_acherus : public CreatureScript
{
public:
@@ -467,7 +477,17 @@ class npc_eye_of_acherus : public CreatureScript
me->SetSpeedRate(UnitMoveType(i), owner->GetSpeedRate(UnitMoveType(i)));
Talk(TALK_MOVE_START, owner);
}
- me->GetMotionMaster()->MovePath(me->GetEntry() * 100, false);
+
+ Movement::PointsArray path;
+ path.reserve(EyeOfAcherusPathSize);
+ std::transform(std::begin(EyeOfAcherusPath), std::end(EyeOfAcherusPath), std::back_inserter(path), [](Position const& pos)
+ {
+ return G3D::Vector3(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ());
+ });
+
+ Movement::MoveSplineInit init(me);
+ init.MovebyPath(path);
+ me->GetMotionMaster()->LaunchMoveSpline(std::move(init), POINT_EYE_MOVE_END, MOTION_PRIORITY_NORMAL, POINT_MOTION_TYPE);
break;
}
default:
@@ -478,7 +498,7 @@ class npc_eye_of_acherus : public CreatureScript
void MovementInform(uint32 movementType, uint32 pointId) override
{
- if (movementType == WAYPOINT_MOTION_TYPE && pointId == POINT_EYE_MOVE_END - 1)
+ if (movementType == POINT_MOTION_TYPE && pointId == POINT_EYE_MOVE_END)
{
me->RemoveAllAuras();