aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/ScriptedAI
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/AI/ScriptedAI')
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedCreature.h6
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp5
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedEscortAI.h6
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp1
-rw-r--r--src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h2
5 files changed, 9 insertions, 11 deletions
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h
index f11769f1d1d..b5b24174d8d 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h
@@ -40,7 +40,7 @@ class InstanceScript;
class SummonList
{
public:
- typedef std::list<uint64> StorageType;
+ typedef GuidList StorageType;
typedef StorageType::iterator iterator;
typedef StorageType::const_iterator const_iterator;
typedef StorageType::size_type size_type;
@@ -126,7 +126,7 @@ class EntryCheckPredicate
{
public:
EntryCheckPredicate(uint32 entry) : _entry(entry) { }
- bool operator()(uint64 guid) { return GUID_ENPART(guid) == _entry; }
+ bool operator()(ObjectGuid guid) { return guid.GetEntry() == _entry; }
private:
uint32 _entry;
@@ -135,7 +135,7 @@ class EntryCheckPredicate
class DummyEntryCheckPredicate
{
public:
- bool operator()(uint64) { return true; }
+ bool operator()(ObjectGuid) { return true; }
};
struct ScriptedAI : public CreatureAI
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
index d06f90c1aeb..38b3d2d882d 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -35,7 +35,6 @@ enum Points
};
npc_escortAI::npc_escortAI(Creature* creature) : ScriptedAI(creature),
- m_uiPlayerGUID(0),
m_uiWPWaitTimer(2500),
m_uiPlayerCheckTimer(1000),
m_uiEscortState(STATE_ESCORT_NONE),
@@ -430,7 +429,7 @@ void npc_escortAI::SetRun(bool on)
}
/// @todo get rid of this many variables passed in function.
-void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false */, uint64 playerGUID /* = 0 */, Quest const* quest /* = NULL */, bool instantRespawn /* = false */, bool canLoopPath /* = false */, bool resetWaypoints /* = true */)
+void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false */, ObjectGuid playerGUID /* = 0 */, Quest const* quest /* = NULL */, bool instantRespawn /* = false */, bool canLoopPath /* = false */, bool resetWaypoints /* = true */)
{
if (me->GetVictim())
{
@@ -486,7 +485,7 @@ void npc_escortAI::Start(bool isActiveAttacker /* = true*/, bool run /* = false
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC);
}
- TC_LOG_DEBUG("scripts", "EscortAI started with " UI64FMTD " waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = " UI64FMTD "", uint64(WaypointList.size()), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID);
+ TC_LOG_DEBUG("scripts", "EscortAI started with " UI64FMTD " waypoints. ActiveAttacker = %d, Run = %d, %s", uint64(WaypointList.size()), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID.ToString().c_str());
CurrentWP = WaypointList.begin();
diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h
index b8c9ee57aeb..22280ee3575 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.h
@@ -88,7 +88,7 @@ struct npc_escortAI : public ScriptedAI
virtual void WaypointReached(uint32 pointId) = 0;
virtual void WaypointStart(uint32 /*pointId*/) { }
- void Start(bool isActiveAttacker = true, bool run = false, uint64 playerGUID = 0, Quest const* quest = NULL, bool instantRespawn = false, bool canLoopPath = false, bool resetWaypoints = true);
+ 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);
void SetRun(bool on = true);
void SetEscortPaused(bool on);
@@ -103,7 +103,7 @@ struct npc_escortAI : public ScriptedAI
void SetDespawnAtFar(bool despawn) { DespawnAtFar = despawn; }
bool GetAttack() { return m_bIsActiveAttacker; }//used in EnterEvadeMode override
void SetCanAttack(bool attack) { m_bIsActiveAttacker = attack; }
- uint64 GetEventStarterGUID() { return m_uiPlayerGUID; }
+ ObjectGuid GetEventStarterGUID() { return m_uiPlayerGUID; }
protected:
Player* GetPlayerForEscort() { return ObjectAccessor::GetPlayer(*me, m_uiPlayerGUID); }
@@ -116,7 +116,7 @@ struct npc_escortAI : public ScriptedAI
void AddEscortState(uint32 escortState) { m_uiEscortState |= escortState; }
void RemoveEscortState(uint32 escortState) { m_uiEscortState &= ~escortState; }
- uint64 m_uiPlayerGUID;
+ ObjectGuid m_uiPlayerGUID;
uint32 m_uiWPWaitTimer;
uint32 m_uiPlayerCheckTimer;
uint32 m_uiEscortState;
diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
index a106c98c786..3fab506e3b2 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp
@@ -36,7 +36,6 @@ enum Points
};
FollowerAI::FollowerAI(Creature* creature) : ScriptedAI(creature),
- m_uiLeaderGUID(0),
m_uiUpdateFollowTimer(2500),
m_uiFollowState(STATE_FOLLOW_NONE),
m_pQuestForFollow(NULL)
diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h
index adb17ef76b1..88b3ccd6a64 100644
--- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h
+++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.h
@@ -71,7 +71,7 @@ class FollowerAI : public ScriptedAI
bool AssistPlayerInCombat(Unit* who);
- uint64 m_uiLeaderGUID;
+ ObjectGuid m_uiLeaderGUID;
uint32 m_uiUpdateFollowTimer;
uint32 m_uiFollowState;