mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Scripts/BRC: corrected run state setting for Raz the Crazed and reverted escort ai changes
This commit is contained in:
@@ -314,7 +314,7 @@ void EscortAI::OnCharmed(bool apply)
|
||||
}
|
||||
*/
|
||||
|
||||
void EscortAI::AddWaypoint(uint32 id, float x, float y, float z, float orientation /*= 0.f*/, uint32 waitTime /*= 0*/, bool run /*= false*/)
|
||||
void EscortAI::AddWaypoint(uint32 id, float x, float y, float z, float orientation/* = 0*/, uint32 waitTime/* = 0*/)
|
||||
{
|
||||
Trinity::NormalizeMapCoord(x);
|
||||
Trinity::NormalizeMapCoord(y);
|
||||
@@ -325,7 +325,7 @@ void EscortAI::AddWaypoint(uint32 id, float x, float y, float z, float orientati
|
||||
waypoint.y = y;
|
||||
waypoint.z = z;
|
||||
waypoint.orientation = orientation;
|
||||
waypoint.moveType = run ? WAYPOINT_MOVE_TYPE_RUN : WAYPOINT_MOVE_TYPE_WALK;
|
||||
waypoint.moveType = _running ? WAYPOINT_MOVE_TYPE_RUN : WAYPOINT_MOVE_TYPE_WALK;
|
||||
waypoint.delay = waitTime;
|
||||
waypoint.eventId = 0;
|
||||
waypoint.eventChance = 100;
|
||||
|
||||
@@ -49,7 +49,7 @@ struct TC_GAME_API EscortAI : public ScriptedAI
|
||||
|
||||
virtual void UpdateEscortAI(uint32 diff); // used when it's needed to add code in update (abilities, scripted events, etc)
|
||||
|
||||
void AddWaypoint(uint32 id, float x, float y, float z, float orientation = 0.f, uint32 waitTime = 0, bool run = false); // waitTime is in ms
|
||||
void AddWaypoint(uint32 id, float x, float y, float z, float orientation = 0.f, uint32 waitTime = 0); // waitTime is in ms
|
||||
void Start(bool isActiveAttacker = true, bool run = false, ObjectGuid playerGUID = ObjectGuid::Empty, Quest const* quest = nullptr, bool instantRespawn = false, bool canLoopPath = false, bool resetWaypoints = true);
|
||||
|
||||
void SetRun(bool on = true);
|
||||
|
||||
@@ -588,6 +588,7 @@ struct npc_raz_the_crazed : public EscortAI
|
||||
|
||||
void JustAppeared() override
|
||||
{
|
||||
SetRun(true);
|
||||
if (_instance->GetData(DATA_RAZ_LAST_AREA_INDEX) == RAZ_AREA_INDEX_ROMOGG)
|
||||
{
|
||||
me->SetDisableGravity(true);
|
||||
@@ -635,13 +636,13 @@ struct npc_raz_the_crazed : public EscortAI
|
||||
void BuildRomoggPath()
|
||||
{
|
||||
for (uint8 i = 0; i < 12; i++)
|
||||
AddWaypoint(i, RazPathRomogg[i].GetPositionX(), RazPathRomogg[i].GetPositionY(), RazPathRomogg[i].GetPositionZ(), 0.f, 0, true);
|
||||
AddWaypoint(i, RazPathRomogg[i].GetPositionX(), RazPathRomogg[i].GetPositionY(), RazPathRomogg[i].GetPositionZ());
|
||||
}
|
||||
|
||||
void BuildCorlaPath()
|
||||
{
|
||||
for (uint8 i = 0; i < 2; i++)
|
||||
AddWaypoint(i, RazPathCorla[i].GetPositionX(), RazPathCorla[i].GetPositionY(), RazPathCorla[i].GetPositionZ(), 0.f, 0, true);
|
||||
AddWaypoint(i, RazPathCorla[i].GetPositionX(), RazPathCorla[i].GetPositionY(), RazPathCorla[i].GetPositionZ());
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 id, uint32 /*pathId*/) override
|
||||
|
||||
Reference in New Issue
Block a user