diff options
Diffstat (limited to 'src/server/game/Movement/MotionMaster.cpp')
-rwxr-xr-x | src/server/game/Movement/MotionMaster.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index 58e4fa1b804..c747c5aa3d7 100755 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -189,7 +189,7 @@ MotionMaster::MoveRandom(float spawndist) { if (i_owner->GetTypeId() == TYPEID_UNIT) { - sLog.outStaticDebug("Creature (GUID: %u) start moving random", i_owner->GetGUIDLow()); + sLog->outStaticDebug("Creature (GUID: %u) start moving random", i_owner->GetGUIDLow()); Mutate(new RandomMovementGenerator<Creature>(spawndist), MOTION_SLOT_IDLE); } } @@ -204,12 +204,12 @@ MotionMaster::MoveTargetedHome() if (i_owner->GetTypeId() == TYPEID_UNIT) { - sLog.outStaticDebug("Creature (Entry: %u GUID: %u) targeted home", i_owner->GetEntry(), i_owner->GetGUIDLow()); + sLog->outStaticDebug("Creature (Entry: %u GUID: %u) targeted home", i_owner->GetEntry(), i_owner->GetGUIDLow()); Mutate(new HomeMovementGenerator<Creature>(), MOTION_SLOT_ACTIVE); } else { - sLog.outError("Player (GUID: %u) attempt targeted home", i_owner->GetGUIDLow()); + sLog->outError("Player (GUID: %u) attempt targeted home", i_owner->GetGUIDLow()); } } @@ -218,12 +218,12 @@ MotionMaster::MoveConfused() { if (i_owner->GetTypeId() == TYPEID_PLAYER) { - sLog.outStaticDebug("Player (GUID: %u) move confused", i_owner->GetGUIDLow()); + sLog->outStaticDebug("Player (GUID: %u) move confused", i_owner->GetGUIDLow()); Mutate(new ConfusedMovementGenerator<Player>(), MOTION_SLOT_CONTROLLED); } else { - sLog.outStaticDebug("Creature (Entry: %u GUID: %u) move confused", + sLog->outStaticDebug("Creature (Entry: %u GUID: %u) move confused", i_owner->GetEntry(), i_owner->GetGUIDLow()); Mutate(new ConfusedMovementGenerator<Creature>(), MOTION_SLOT_CONTROLLED); } @@ -239,7 +239,7 @@ MotionMaster::MoveChase(Unit* target, float dist, float angle) i_owner->ClearUnitState(UNIT_STAT_FOLLOW); if (i_owner->GetTypeId() == TYPEID_PLAYER) { - sLog.outStaticDebug("Player (GUID: %u) chase to %s (GUID: %u)", + sLog->outStaticDebug("Player (GUID: %u) chase to %s (GUID: %u)", i_owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); @@ -247,7 +247,7 @@ MotionMaster::MoveChase(Unit* target, float dist, float angle) } else { - sLog.outStaticDebug("Creature (Entry: %u GUID: %u) chase to %s (GUID: %u)", + sLog->outStaticDebug("Creature (Entry: %u GUID: %u) chase to %s (GUID: %u)", i_owner->GetEntry(), i_owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); @@ -265,14 +265,14 @@ MotionMaster::MoveFollow(Unit* target, float dist, float angle, MovementSlot slo i_owner->AddUnitState(UNIT_STAT_FOLLOW); if (i_owner->GetTypeId() == TYPEID_PLAYER) { - sLog.outStaticDebug("Player (GUID: %u) follow to %s (GUID: %u)", i_owner->GetGUIDLow(), + sLog->outStaticDebug("Player (GUID: %u) follow to %s (GUID: %u)", i_owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); Mutate(new TargetedMovementGenerator<Player>(*target,dist,angle), slot); } else { - sLog.outStaticDebug("Creature (Entry: %u GUID: %u) follow to %s (GUID: %u)", + sLog->outStaticDebug("Creature (Entry: %u GUID: %u) follow to %s (GUID: %u)", i_owner->GetEntry(), i_owner->GetGUIDLow(), target->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", target->GetTypeId() == TYPEID_PLAYER ? target->GetGUIDLow() : target->ToCreature()->GetDBTableGUIDLow()); @@ -285,12 +285,12 @@ MotionMaster::MovePoint(uint32 id, float x, float y, float z) { if (i_owner->GetTypeId() == TYPEID_PLAYER) { - sLog.outStaticDebug("Player (GUID: %u) targeted point (Id: %u X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), id, x, y, z); + sLog->outStaticDebug("Player (GUID: %u) targeted point (Id: %u X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), id, x, y, z); Mutate(new PointMovementGenerator<Player>(id,x,y,z), MOTION_SLOT_ACTIVE); } else { - sLog.outStaticDebug("Creature (Entry: %u GUID: %u) targeted point (ID: %u X: %f Y: %f Z: %f)", + sLog->outStaticDebug("Creature (Entry: %u GUID: %u) targeted point (ID: %u X: %f Y: %f Z: %f)", i_owner->GetEntry(), i_owner->GetGUIDLow(), id, x, y, z); Mutate(new PointMovementGenerator<Creature>(id,x,y,z), MOTION_SLOT_ACTIVE); } @@ -333,12 +333,12 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee i_owner->m_TempSpeed = speedXY; if (i_owner->GetTypeId() == TYPEID_PLAYER) { - sLog.outStaticDebug("Player (GUID: %u) jump to point (X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), x, y, z); + sLog->outStaticDebug("Player (GUID: %u) jump to point (X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), x, y, z); Mutate(new PointMovementGenerator<Player>(0,x,y,z), MOTION_SLOT_CONTROLLED); } else { - sLog.outStaticDebug("Creature (Entry: %u GUID: %u) jump to point (X: %f Y: %f Z: %f)", + sLog->outStaticDebug("Creature (Entry: %u GUID: %u) jump to point (X: %f Y: %f Z: %f)", i_owner->GetEntry(), i_owner->GetGUIDLow(), x, y, z); Mutate(new PointMovementGenerator<Creature>(0,x,y,z), MOTION_SLOT_CONTROLLED); } @@ -356,12 +356,12 @@ MotionMaster::MoveCharge(float x, float y, float z, float speed, uint32 id) i_owner->m_TempSpeed = speed; if (i_owner->GetTypeId() == TYPEID_PLAYER) { - sLog.outStaticDebug("Player (GUID: %u) charge point (X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), x, y, z); + sLog->outStaticDebug("Player (GUID: %u) charge point (X: %f Y: %f Z: %f)", i_owner->GetGUIDLow(), x, y, z); Mutate(new PointMovementGenerator<Player>(id,x,y,z), MOTION_SLOT_CONTROLLED); } else { - sLog.outStaticDebug("Creature (Entry: %u GUID: %u) charge point (X: %f Y: %f Z: %f)", + sLog->outStaticDebug("Creature (Entry: %u GUID: %u) charge point (X: %f Y: %f Z: %f)", i_owner->GetEntry(), i_owner->GetGUIDLow(), x, y, z); Mutate(new PointMovementGenerator<Creature>(id,x,y,z), MOTION_SLOT_CONTROLLED); } @@ -380,11 +380,11 @@ MotionMaster::MoveSeekAssistance(float x, float y, float z) { if (i_owner->GetTypeId() == TYPEID_PLAYER) { - sLog.outError("Player (GUID: %u) attempt to seek assistance",i_owner->GetGUIDLow()); + sLog->outError("Player (GUID: %u) attempt to seek assistance",i_owner->GetGUIDLow()); } else { - sLog.outStaticDebug("Creature (Entry: %u GUID: %u) seek assistance (X: %f Y: %f Z: %f)", + sLog->outStaticDebug("Creature (Entry: %u GUID: %u) seek assistance (X: %f Y: %f Z: %f)", i_owner->GetEntry(), i_owner->GetGUIDLow(), x, y, z); i_owner->AttackStop(); i_owner->ToCreature()->SetReactState(REACT_PASSIVE); @@ -397,11 +397,11 @@ MotionMaster::MoveSeekAssistanceDistract(uint32 time) { if (i_owner->GetTypeId() == TYPEID_PLAYER) { - sLog.outError("Player (GUID: %u) attempt to call distract after assistance",i_owner->GetGUIDLow()); + sLog->outError("Player (GUID: %u) attempt to call distract after assistance",i_owner->GetGUIDLow()); } else { - sLog.outStaticDebug("Creature (Entry: %u GUID: %u) is distracted after assistance call (Time: %u)", + sLog->outStaticDebug("Creature (Entry: %u GUID: %u) is distracted after assistance call (Time: %u)", i_owner->GetEntry(), i_owner->GetGUIDLow(), time); Mutate(new AssistanceDistractMovementGenerator(time), MOTION_SLOT_ACTIVE); } @@ -418,14 +418,14 @@ MotionMaster::MoveFleeing(Unit* enemy, uint32 time) if (i_owner->GetTypeId() == TYPEID_PLAYER) { - sLog.outStaticDebug("Player (GUID: %u) flee from %s (GUID: %u)", i_owner->GetGUIDLow(), + sLog->outStaticDebug("Player (GUID: %u) flee from %s (GUID: %u)", i_owner->GetGUIDLow(), enemy->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", enemy->GetTypeId() == TYPEID_PLAYER ? enemy->GetGUIDLow() : enemy->ToCreature()->GetDBTableGUIDLow()); Mutate(new FleeingMovementGenerator<Player>(enemy->GetGUID()), MOTION_SLOT_CONTROLLED); } else { - sLog.outStaticDebug("Creature (Entry: %u GUID: %u) flee from %s (GUID: %u)%s", + sLog->outStaticDebug("Creature (Entry: %u GUID: %u) flee from %s (GUID: %u)%s", i_owner->GetEntry(), i_owner->GetGUIDLow(), enemy->GetTypeId() == TYPEID_PLAYER ? "player" : "creature", enemy->GetTypeId() == TYPEID_PLAYER ? enemy->GetGUIDLow() : enemy->ToCreature()->GetDBTableGUIDLow(), @@ -444,19 +444,19 @@ MotionMaster::MoveTaxiFlight(uint32 path, uint32 pathnode) { if (path < sTaxiPathNodesByPath.size()) { - sLog.outStaticDebug("%s taxi to (Path %u node %u)", i_owner->GetName(), path, pathnode); + sLog->outStaticDebug("%s taxi to (Path %u node %u)", i_owner->GetName(), path, pathnode); FlightPathMovementGenerator* mgen = new FlightPathMovementGenerator(sTaxiPathNodesByPath[path],pathnode); Mutate(mgen, MOTION_SLOT_CONTROLLED); } else { - sLog.outError("%s attempt taxi to (not existed Path %u node %u)", + sLog->outError("%s attempt taxi to (not existed Path %u node %u)", i_owner->GetName(), path, pathnode); } } else { - sLog.outError("Creature (Entry: %u GUID: %u) attempt taxi to (Path %u node %u)", + sLog->outError("Creature (Entry: %u GUID: %u) attempt taxi to (Path %u node %u)", i_owner->GetEntry(), i_owner->GetGUIDLow(), path, pathnode); } } @@ -469,11 +469,11 @@ MotionMaster::MoveDistract(uint32 timer) if (i_owner->GetTypeId() == TYPEID_PLAYER) { - sLog.outStaticDebug("Player (GUID: %u) distracted (timer: %u)", i_owner->GetGUIDLow(), timer); + sLog->outStaticDebug("Player (GUID: %u) distracted (timer: %u)", i_owner->GetGUIDLow(), timer); } else { - sLog.outStaticDebug("Creature (Entry: %u GUID: %u) (timer: %u)", + sLog->outStaticDebug("Creature (Entry: %u GUID: %u) (timer: %u)", i_owner->GetEntry(), i_owner->GetGUIDLow(), timer); } @@ -525,7 +525,7 @@ void MotionMaster::MovePath(uint32 path_id, bool repeatable) //Mutate(new WaypointMovementGenerator<Player>(path_id, repeatable)): Mutate(new WaypointMovementGenerator<Creature>(path_id, repeatable), MOTION_SLOT_IDLE); - sLog.outStaticDebug("%s (GUID: %u) start moving over path(Id:%u, repeatable: %s)", + sLog->outStaticDebug("%s (GUID: %u) start moving over path(Id:%u, repeatable: %s)", i_owner->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature", i_owner->GetGUIDLow(), path_id, repeatable ? "YES" : "NO"); } @@ -584,7 +584,7 @@ void MotionMaster::DirectDelete(_Ty curr) void MotionMaster::DelayedDelete(_Ty curr) { - sLog.outCrash("Unit (Entry %u) is trying to delete its updating MG (Type %u)!", i_owner->GetEntry(), curr->GetMovementGeneratorType()); + sLog->outCrash("Unit (Entry %u) is trying to delete its updating MG (Type %u)!", i_owner->GetEntry(), curr->GetMovementGeneratorType()); if (isStatic(curr)) return; if (!m_expList) |