24 #define DEFAULT_MAX_PLAYER_DISTANCE 50
67 void ReturnToLastPoint();
72 virtual void UpdateEscortAI(
uint32 diff);
77 void AddWaypoint(
uint32 id,
float x,
float y,
float z,
uint32 waitTime = 0);
80 bool SetNextWaypoint(
uint32 pointId,
float x,
float y,
float z,
float orientation);
84 bool SetNextWaypoint(
uint32 pointId,
bool setPosition =
true,
bool resetWaypointsOnFail =
true);
86 bool GetWaypointPosition(
uint32 pointId,
float&
x,
float&
y,
float&
z);
88 virtual void WaypointReached(
uint32 pointId) = 0;
91 void Start(
bool isActiveAttacker =
true,
bool run =
false,
ObjectGuid playerGUID =
ObjectGuid::Empty,
Quest const* quest =
NULL,
bool instantRespawn =
false,
bool canLoopPath =
false,
bool resetWaypoints =
true);
93 void SetRun(
bool on =
true);
94 void SetEscortPaused(
bool on);
112 bool AssistPlayerInCombat(
Unit* who);
113 bool IsPlayerOrGroupInRange();
114 void FillPointMovementListForCreature();
~npc_escortAI()
Definition: ScriptedEscortAI.h:56
void SetCanAttack(bool attack)
Definition: ScriptedEscortAI.h:105
void SetDespawnAtEnd(bool despawn)
Definition: ScriptedEscortAI.h:102
uint32 m_uiEscortState
Definition: ScriptedEscortAI.h:122
bool m_bIsActiveAttacker
Definition: ScriptedEscortAI.h:130
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
Definition: ScriptedEscortAI.h:52
Definition: QuestDef.h:279
uint32 m_uiPlayerCheckTimer
Definition: ScriptedEscortAI.h:121
std::list< Escort_Waypoint > WaypointList
Definition: ScriptedEscortAI.h:127
float z
Definition: ScriptedEscortAI.h:40
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:168
Player * GetPlayerForEscort()
Definition: ScriptedEscortAI.h:109
virtual void UpdateAI(uint32 diff) override
Definition: ScriptedCreature.cpp:125
arena_t NULL
Definition: jemalloc_internal.h:624
virtual void JustRespawned()
Definition: CreatureAI.h:140
void RemoveEscortState(uint32 escortState)
Definition: ScriptedEscortAI.h:117
bool HasImmuneToNPCFlags
Definition: ScriptedEscortAI.h:137
void JustDied(Unit *) override
Definition: ScriptedCreature.h:160
Definition: Creature.h:467
Definition: ScriptedEscortAI.h:47
bool DespawnAtEnd
Definition: ScriptedEscortAI.h:134
void SetMaxPlayerDistance(float newMax)
Definition: ScriptedEscortAI.h:99
bool DespawnAtFar
Definition: ScriptedEscortAI.h:135
Escort_Waypoint(uint32 _id, float _x, float _y, float _z, uint32 _w)
Definition: ScriptedEscortAI.h:28
void AddEscortState(uint32 escortState)
Definition: ScriptedEscortAI.h:116
Definition: ScriptedEscortAI.h:26
virtual bool IsEscorted() const override
Definition: ScriptedEscortAI.h:97
Quest const * m_pQuestForEscort
Definition: ScriptedEscortAI.h:125
float MaxPlayerDistance
Definition: ScriptedEscortAI.h:123
Definition: ScriptedEscortAI.h:46
ObjectGuid GetEventStarterGUID() const
Definition: ScriptedEscortAI.h:106
bool m_bCanInstantRespawn
Definition: ScriptedEscortAI.h:132
Definition: ScriptedCreature.h:142
std::list< Escort_Waypoint >::iterator CurrentWP
Definition: ScriptedEscortAI.h:128
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:184
G3D::int16 z
Definition: Vector3int16.h:46
virtual void WaypointStart(uint32)
Definition: ScriptedEscortAI.h:89
uint32_t uint32
Definition: Define.h:150
bool ScriptWP
Definition: ScriptedEscortAI.h:136
G3D::int16 y
Definition: Vector2int16.h:38
float GetMaxPlayerDistance() const
Definition: ScriptedEscortAI.h:100
float y
Definition: ScriptedEscortAI.h:39
bool m_bIsRunning
Definition: ScriptedEscortAI.h:131
ObjectGuid m_uiPlayerGUID
Definition: ScriptedEscortAI.h:119
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:117
uint32 m_uiWPWaitTimer
Definition: ScriptedEscortAI.h:120
#define TC_GAME_API
Definition: Define.h:134
Definition: ScriptedEscortAI.h:48
uint32 id
Definition: ScriptedEscortAI.h:37
Definition: ScriptedEscortAI.h:49
virtual void MoveInLineOfSight(Unit *)
Definition: CreatureAI.cpp:128
void SetDespawnAtFar(bool despawn)
Definition: ScriptedEscortAI.h:103
eEscortState
Definition: ScriptedEscortAI.h:44
bool m_bCanReturnToStart
Definition: ScriptedEscortAI.h:133
float x
Definition: ScriptedEscortAI.h:38
Definition: ObjectGuid.h:189
G3D::int16 x
Definition: Vector2int16.h:37
virtual void MovementInform(uint32, uint32)
Definition: CreatureAI.h:143
bool HasEscortState(uint32 escortState)
Definition: ScriptedEscortAI.h:96
bool GetAttack() const
Definition: ScriptedEscortAI.h:104
uint32 WaitTimeMs
Definition: ScriptedEscortAI.h:41