aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/base/escortAI.cpp16
-rw-r--r--src/bindings/scripts/base/escortAI.h3
2 files changed, 18 insertions, 1 deletions
diff --git a/src/bindings/scripts/base/escortAI.cpp b/src/bindings/scripts/base/escortAI.cpp
index 52b398cd59c..2c9b968d281 100644
--- a/src/bindings/scripts/base/escortAI.cpp
+++ b/src/bindings/scripts/base/escortAI.cpp
@@ -293,6 +293,17 @@ void npc_escortAI::AddWaypoint(uint32 id, float x, float y, float z, uint32 Wait
Escort_Waypoint t(id, x, y, z, WaitTimeMs);
WaypointList.push_back(t);
+
+ // i think SD2 no longer uses this function
+ ScriptWP = true;
+ /*PointMovement wp;
+ wp.m_uiCreatureEntry = me->GetEntry();
+ wp.m_uiPointId = id;
+ wp.m_fX = x;
+ wp.m_fY = y;
+ wp.m_fZ = z;
+ wp.m_uiWaitTime = WaitTimeMs;
+ PointMovementMap[wp.m_uiCreatureEntry].push_back(wp);*/
}
void npc_escortAI::FillPointMovementListForCreature()
@@ -345,11 +356,16 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID,
return;
}
+ if(!ScriptWP) // sd2 never adds wp in script, but tc does
+ {
+
if (!WaypointList.empty())
WaypointList.clear();
FillPointMovementListForCreature();
+ }
+
if (WaypointList.empty())
{
error_db_log("TSCR: EscortAI Start with 0 waypoints (possible missing entry in script_waypoint)");
diff --git a/src/bindings/scripts/base/escortAI.h b/src/bindings/scripts/base/escortAI.h
index 90a99152b68..8ce82eb370a 100644
--- a/src/bindings/scripts/base/escortAI.h
+++ b/src/bindings/scripts/base/escortAI.h
@@ -31,7 +31,7 @@ struct TRINITY_DLL_DECL npc_escortAI : public ScriptedAI
{
public:
explicit npc_escortAI(Creature* pCreature) : ScriptedAI(pCreature),
- IsBeingEscorted(false), IsOnHold(false), PlayerGUID(0), MaxPlayerDistance(DEFAULT_MAX_PLAYER_DISTANCE), CanMelee(true), m_uiPlayerCheckTimer(1000), m_uiWPWaitTimer(2500), m_bIsReturning(false), m_bIsActiveAttacker(true), m_bIsRunning(false), DespawnAtEnd(true), DespawnAtFar(true), m_pQuestForEscort(NULL), m_bCanInstantRespawn(false), m_bCanReturnToStart(false) {}
+ IsBeingEscorted(false), IsOnHold(false), PlayerGUID(0), MaxPlayerDistance(DEFAULT_MAX_PLAYER_DISTANCE), CanMelee(true), m_uiPlayerCheckTimer(1000), m_uiWPWaitTimer(2500), m_bIsReturning(false), m_bIsActiveAttacker(true), m_bIsRunning(false), DespawnAtEnd(true), DespawnAtFar(true), m_pQuestForEscort(NULL), m_bCanInstantRespawn(false), m_bCanReturnToStart(false), ScriptWP(false) {}
~npc_escortAI() {}
// Pure Virtual Functions
@@ -101,6 +101,7 @@ struct TRINITY_DLL_DECL npc_escortAI : public ScriptedAI
bool CanMelee;
bool DespawnAtEnd;
bool DespawnAtFar;
+ bool ScriptWP;
};
#endif