aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/SmartScripts
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-10-21 19:23:32 +0200
committerShauren <shauren.trinity@gmail.com>2014-10-21 19:23:32 +0200
commit9cc7044546eaaaf4fd7a999c5e074ad0ea3d47ef (patch)
treee40c2f50a9b5b11620ee607103f0352521bdf54f /src/server/game/AI/SmartScripts
parent1bea52fd4649b6a1761aa157f9e74f01e19872e7 (diff)
Core/Entities: First batch of removing implicit conversions of ObjectGuid to uint64
Diffstat (limited to 'src/server/game/AI/SmartScripts')
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp6
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 92f02583915..037a82713e1 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -333,7 +333,7 @@ void SmartAI::UpdateAI(uint32 diff)
UpdateDespawn(diff);
/// @todo move to void
- if (mFollowGuid)
+ if (!mFollowGuid.IsEmpty())
{
if (mFollowArrivedTimer < diff)
{
@@ -435,7 +435,7 @@ void SmartAI::EnterEvadeMode()
AddEscortState(SMART_ESCORT_RETURNING);
ReturnToLastOOCPos();
}
- else if (mFollowGuid)
+ else if (!mFollowGuid.IsEmpty())
{
if (Unit* target = ObjectAccessor::GetUnit(*me, mFollowGuid))
me->GetMotionMaster()->MoveFollow(target, mFollowDist, mFollowAngle);
@@ -674,7 +674,7 @@ void SmartAI::OnCharmed(bool apply)
{
GetScript()->ProcessEventsFor(SMART_EVENT_CHARMED, NULL, 0, 0, apply);
- if (!apply && !me->IsInEvadeMode() && me->GetCharmerGUID())
+ if (!apply && !me->IsInEvadeMode() && !me->GetCharmerGUID().IsEmpty())
if (Unit* charmer = ObjectAccessor::GetUnit(*me, me->GetCharmerGUID()))
AttackStart(charmer);
}
diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h
index b59b62c5697..02e91af032b 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.h
+++ b/src/server/game/AI/SmartScripts/SmartScript.h
@@ -181,7 +181,7 @@ class SmartScript
void OnReset();
void ResetBaseObject()
{
- if (meOrigGUID)
+ if (!meOrigGUID.IsEmpty())
{
if (Creature* m = HashMapHolder<Creature>::Find(meOrigGUID))
{
@@ -189,7 +189,7 @@ class SmartScript
go = NULL;
}
}
- if (goOrigGUID)
+ if (!goOrigGUID.IsEmpty())
{
if (GameObject* o = HashMapHolder<GameObject>::Find(goOrigGUID))
{