mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
fix(Scripts/OldHilsbradFoothills): Corrected spawn position and waypo… (#15099)
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
--
|
||||
DELETE FROM `waypoints` WHERE `entry`=17848;
|
||||
|
||||
DELETE FROM `waypoint_data` WHERE `id` IN (178480,178481);
|
||||
INSERT INTO `waypoint_data` VALUES
|
||||
(178480,1,2145.6123,124.77572,76.18501,NULL,0,1,0,100,0),
|
||||
(178480,2,2146.5122,117.58604,76.04292,NULL,0,1,0,100,0),
|
||||
(178480,3,2148.4314,101.62945,73.041336,NULL,0,1,0,100,0),
|
||||
(178480,4,2151.864,88.83778,69.48506,NULL,0,1,0,100,0),
|
||||
(178480,5,2149.0708,83.53852,69.1086,NULL,0,1,0,100,0),
|
||||
(178480,6,2142.1206,79.21365,68.06233,NULL,0,1,0,100,0),
|
||||
(178480,7,2132.0854,73.20009,64.77117,NULL,0,1,0,100,0),
|
||||
(178480,8,2128.2366,71.17936,64.41205,NULL,1200,1,0,100,0),
|
||||
(178480,9,2125.2478,89.376305,54.71777,NULL,0,1,0,100,0),
|
||||
(178480,10,2119.832,93.372505,52.565914,NULL,0,1,0,100,0),
|
||||
(178480,11,2113.8572,93.34234,52.590572,NULL,0,1,0,100,0),
|
||||
|
||||
(178481,1,2113.8572,93.34234,52.590572,NULL,0,0,0,100,0),
|
||||
(178481,2,2111.2415,103.42893,52.565914,NULL,0,0,0,100,0),
|
||||
(178481,3,2109.1719,113.15994,52.90283,NULL,0,0,0,100,0),
|
||||
(178481,4,2107.6462,126.1786,52.565914,NULL,0,0,0,100,0),
|
||||
(178481,5,2107.979,138.13727,52.546013,NULL,0,0,0,100,0),
|
||||
(178481,6,2112.6594,153.49968,52.56591,NULL,0,0,0,100,0),
|
||||
(178481,7,2120.5117,168.8968,52.81591,NULL,0,0,0,100,0),
|
||||
(178481,8,2124.643,175.81912,52.92492,NULL,0,0,0,100,0),
|
||||
(178481,9,2128.9448,182.75977,53.179924,NULL,0,0,0,100,0),
|
||||
(178481,10,2138.4214,195.35818,52.565907,NULL,0,0,0,100,0),
|
||||
(178481,11,2147.3398,204.56651,52.92638,NULL,0,0,0,100,0),
|
||||
(178481,12,2160.0496,214.06728,52.56542,NULL,0,0,0,100,0),
|
||||
(178481,13,2172.4766,224.48166,52.56554,NULL,0,0,0,100,0),
|
||||
(178481,14,2179.8486,230.77225,52.565907,NULL,0,0,0,100,0),
|
||||
(178481,15,2172.4766,224.48166,52.56554,NULL,0,0,0,100,0),
|
||||
(178481,16,2160.0496,214.06728,52.56542,NULL,0,0,0,100,0),
|
||||
(178481,17,2147.3398,204.56651,52.92638,NULL,0,0,0,100,0),
|
||||
(178481,18,2138.4214,195.35818,52.565907,NULL,0,0,0,100,0),
|
||||
(178481,19,2128.9448,182.75977,53.179924,NULL,0,0,0,100,0),
|
||||
(178481,20,2124.643,175.81912,52.92492,NULL,0,0,0,100,0),
|
||||
(178481,21,2120.5117,168.8968,52.81591,NULL,0,0,0,100,0),
|
||||
(178481,22,2112.6594,153.49968,52.56591,NULL,0,0,0,100,0),
|
||||
(178481,23,2107.979,138.13727,52.546013,NULL,0,0,0,100,0),
|
||||
(178481,24,2107.6462,126.1786,52.565914,NULL,0,0,0,100,0),
|
||||
(178481,25,2109.1719,113.15994,52.90283,NULL,0,0,0,100,0),
|
||||
(178481,26,2111.2415,103.42893,52.565914,NULL,0,0,0,100,0);
|
||||
@@ -57,36 +57,13 @@ public:
|
||||
{
|
||||
boss_lieutenant_drakeAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
pathPoints.clear();
|
||||
WPPath* path = sSmartWaypointMgr->GetPath(me->GetEntry());
|
||||
if (!path || path->empty())
|
||||
return;
|
||||
|
||||
pathPoints.push_back(G3D::Vector3(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||
|
||||
uint32 wpCounter = 1;
|
||||
WPPath::const_iterator itr;
|
||||
while ((itr = path->find(wpCounter++)) != path->end())
|
||||
{
|
||||
WayPoint* wp = itr->second;
|
||||
pathPoints.push_back(G3D::Vector3(wp->x, wp->y, wp->z));
|
||||
}
|
||||
}
|
||||
|
||||
void InitializeAI() override
|
||||
{
|
||||
ScriptedAI::InitializeAI();
|
||||
//Talk(SAY_ENTER);
|
||||
JustReachedHome();
|
||||
}
|
||||
|
||||
void JustReachedHome() override
|
||||
{
|
||||
me->SetWalk(true);
|
||||
Movement::MoveSplineInit init(me);
|
||||
init.MovebyPath(pathPoints);
|
||||
init.SetCyclic();
|
||||
init.Launch();
|
||||
runSecondPath = false;
|
||||
pathId = me->GetEntry() * 10;
|
||||
me->GetMotionMaster()->MovePath(pathId, false);
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -118,8 +95,38 @@ public:
|
||||
instance->SetData(DATA_ESCORT_PROGRESS, ENCOUNTER_PROGRESS_DRAKE_KILLED);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 point) override
|
||||
{
|
||||
if (type != WAYPOINT_MOTION_TYPE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (pathId == me->GetEntry() * 10)
|
||||
{
|
||||
switch (point)
|
||||
{
|
||||
case 7:
|
||||
Talk(SAY_ENTER);
|
||||
break;
|
||||
case 10:
|
||||
pathId = (me->GetEntry() * 10) + 1;
|
||||
runSecondPath = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (runSecondPath)
|
||||
{
|
||||
runSecondPath = false;
|
||||
me->GetMotionMaster()->MovePath(pathId, true);
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
@@ -161,7 +168,8 @@ public:
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
Movement::PointsArray pathPoints;
|
||||
uint32 pathId;
|
||||
bool runSecondPath;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "old_hillsbrad.h"
|
||||
|
||||
const Position instancePositions[INSTANCE_POSITIONS_COUNT] =
|
||||
static Position const instancePositions[INSTANCE_POSITIONS_COUNT] =
|
||||
{
|
||||
{2188.18f, 228.90f, 53.025f, 1.77f}, // Orcs Gather Point 1
|
||||
{2103.23f, 93.55f, 53.096f, 3.78f}, // Orcs Gather Point 2
|
||||
{2128.43f, 71.01f, 64.42f, 1.74f} // Lieutenant Drake Summon Position
|
||||
{ 2188.18f, 228.90f, 53.025f, 1.77f }, // Orcs Gather Point 1
|
||||
{ 2103.23f, 93.550f, 53.096f, 3.78f }, // Orcs Gather Point 2
|
||||
{ 2172.76f, 149.54f, 87.981f, 4.19f } // Lieutenant Drake Summon Position
|
||||
};
|
||||
|
||||
const Position thrallPositions[THRALL_POSITIONS_COUNT] =
|
||||
@@ -248,11 +248,8 @@ public:
|
||||
case EVENT_SUMMON_LIEUTENANT:
|
||||
{
|
||||
instance->LoadGrid(instancePositions[2].GetPositionX(), instancePositions[2].GetPositionY());
|
||||
if (Creature* drake = instance->SummonCreature(NPC_LIEUTENANT_DRAKE, instancePositions[2]))
|
||||
{
|
||||
drake->AI()->Talk(0);
|
||||
}
|
||||
[[fallthrough]]; /// @todo: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
|
||||
instance->SummonCreature(NPC_LIEUTENANT_DRAKE, instancePositions[2]);
|
||||
break;
|
||||
}
|
||||
case EVENT_THRALL_REPOSITION:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user