aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Movement
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/Movement
parent1bea52fd4649b6a1761aa157f9e74f01e19872e7 (diff)
Core/Entities: First batch of removing implicit conversions of ObjectGuid to uint64
Diffstat (limited to 'src/server/game/Movement')
-rw-r--r--src/server/game/Movement/MotionMaster.cpp2
-rw-r--r--src/server/game/Movement/Spline/MoveSplineInit.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp
index 39261908ae6..7c19e60ccd2 100644
--- a/src/server/game/Movement/MotionMaster.cpp
+++ b/src/server/game/Movement/MotionMaster.cpp
@@ -208,7 +208,7 @@ void MotionMaster::MoveTargetedHome()
TC_LOG_DEBUG("misc", "Creature (Entry: %u GUID: %u) targeted home", _owner->GetEntry(), _owner->GetGUIDLow());
Mutate(new HomeMovementGenerator<Creature>(), MOTION_SLOT_ACTIVE);
}
- else if (_owner->GetTypeId() == TYPEID_UNIT && _owner->ToCreature()->GetCharmerOrOwnerGUID())
+ else if (_owner->GetTypeId() == TYPEID_UNIT && !_owner->ToCreature()->GetCharmerOrOwnerGUID().IsEmpty())
{
TC_LOG_DEBUG("misc", "Pet or controlled creature (Entry: %u GUID: %u) targeting home", _owner->GetEntry(), _owner->GetGUIDLow());
Unit* target = _owner->ToCreature()->GetCharmerOrOwner();
diff --git a/src/server/game/Movement/Spline/MoveSplineInit.cpp b/src/server/game/Movement/Spline/MoveSplineInit.cpp
index 937ce90b23b..c715f609789 100644
--- a/src/server/game/Movement/Spline/MoveSplineInit.cpp
+++ b/src/server/game/Movement/Spline/MoveSplineInit.cpp
@@ -60,7 +60,7 @@ namespace Movement
{
MoveSpline& move_spline = *unit->movespline;
- bool transport = unit->GetTransGUID() != 0;
+ bool transport = !unit->GetTransGUID().IsEmpty();
Location real_position;
// there is a big chance that current position is unknown if current state is not finalized, need compute it
// this also allows calculate spline position and update map position in much greater intervals
@@ -88,7 +88,7 @@ namespace Movement
// correct first vertex
args.path[0] = real_position;
args.initialOrientation = real_position.orientation;
- move_spline.onTransport = (unit->GetTransGUID() != 0);
+ move_spline.onTransport = !unit->GetTransGUID().IsEmpty();
uint32 moveFlags = unit->m_movementInfo.GetMovementFlags();
moveFlags |= MOVEMENTFLAG_FORWARD;
@@ -138,7 +138,7 @@ namespace Movement
if (move_spline.Finalized())
return;
- bool transport = unit->GetTransGUID() != 0;
+ bool transport = !unit->GetTransGUID().IsEmpty();
Location loc;
if (move_spline.onTransport == transport)
loc = move_spline.ComputePosition();
@@ -178,7 +178,7 @@ namespace Movement
{
args.splineId = splineIdGen.NewId();
// Elevators also use MOVEMENTFLAG_ONTRANSPORT but we do not keep track of their position changes
- args.TransformForTransport = unit->GetTransGUID() != 0;
+ args.TransformForTransport = !unit->GetTransGUID().IsEmpty();
// mix existing state into new
args.flags.walkmode = unit->m_movementInfo.HasMovementFlag(MOVEMENTFLAG_WALKING);
args.flags.flying = unit->m_movementInfo.HasMovementFlag(MovementFlags(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_DISABLE_GRAVITY));