From 35041c9d475bf362b741b04526ea0c4ff8c07a8a Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Mon, 27 Jul 2020 13:32:00 +0200 Subject: [PATCH] Scripts/BRC: corrected run state setting for Raz the Crazed and reverted escort ai changes --- src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp | 4 ++-- src/server/game/AI/ScriptedAI/ScriptedEscortAI.h | 2 +- .../BlackrockMountain/BlackrockCaverns/blackrock_caverns.cpp | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index d99f4d91925..f1f59505e73 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -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; diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h index db93840343a..79e9698b8ae 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h @@ -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); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.cpp index d887892991f..cb8fa8a40a6 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.cpp @@ -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