diff options
| author | Shauren <none@none> | 2010-12-23 23:25:44 +0100 |
|---|---|---|
| committer | Shauren <none@none> | 2010-12-23 23:25:44 +0100 |
| commit | 928443d8993869dfbf3adceabe4ba0b3cfe0edef (patch) | |
| tree | b30f1385e6f2dd8d95357590593aa2988b094593 /src/server/game/AI/ScriptedAI | |
| parent | 95daf7998fc3b772fdcd70087c12db80bd5a031a (diff) | |
Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/AI/ScriptedAI')
| -rw-r--r-- | src/server/game/AI/ScriptedAI/ScriptedCreature.cpp | 8 | ||||
| -rw-r--r-- | src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp | 36 | ||||
| -rw-r--r-- | src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp | 20 |
3 files changed, 32 insertions, 32 deletions
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp index 8bce6f39d66..bb21252efb0 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.cpp @@ -153,7 +153,7 @@ void ScriptedAI::DoPlaySoundToSet(WorldObject* pSource, uint32 uiSoundId) if (!GetSoundEntriesStore()->LookupEntry(uiSoundId)) { - sLog.outError("TSCR: Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", uiSoundId, pSource->GetTypeId(), pSource->GetGUIDLow()); + sLog->outError("TSCR: Invalid soundId %u used in DoPlaySoundToSet (Source: TypeId %u, GUID %u)", uiSoundId, pSource->GetTypeId(), pSource->GetGUIDLow()); return; } @@ -313,7 +313,7 @@ void ScriptedAI::DoResetThreat() { if (!me->CanHaveThreatList() || me->getThreatManager().isThreatListEmpty()) { - sLog.outError("TSCR: DoResetThreat called for creature that either cannot have threat list or has empty threat list (me entry = %d)", me->GetEntry()); + sLog->outError("TSCR: DoResetThreat called for creature that either cannot have threat list or has empty threat list (me entry = %d)", me->GetEntry()); return; } @@ -356,7 +356,7 @@ void ScriptedAI::DoTeleportPlayer(Unit* pUnit, float fX, float fY, float fZ, flo if (!pUnit || pUnit->GetTypeId() != TYPEID_PLAYER) { if (pUnit) - sLog.outError("TSCR: Creature " UI64FMTD " (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: " UI64FMTD ") to x: %f y:%f z: %f o: %f. Aborted.", me->GetGUID(), me->GetEntry(), pUnit->GetTypeId(), pUnit->GetGUID(), fX, fY, fZ, fO); + sLog->outError("TSCR: Creature " UI64FMTD " (Entry: %u) Tried to teleport non-player unit (Type: %u GUID: " UI64FMTD ") to x: %f y:%f z: %f o: %f. Aborted.", me->GetGUID(), me->GetEntry(), pUnit->GetTypeId(), pUnit->GetGUID(), fX, fY, fZ, fO); return; } @@ -493,7 +493,7 @@ bool ScriptedAI::EnterEvadeIfOutOfCombatArea(const uint32 uiDiff) return false; break; default: - sLog.outError("TSCR: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition.", me->GetEntry()); + sLog->outError("TSCR: EnterEvadeIfOutOfCombatArea used for creature entry %u, but does not have any definition.", me->GetEntry()); return false; } diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index 948415c6fcd..330c13ba01e 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp @@ -178,7 +178,7 @@ void npc_escortAI::EnterEvadeMode() { AddEscortState(STATE_ESCORT_RETURNING); ReturnToLastPoint(); - sLog.outDebug("TSCR: EscortAI has left combat and is now returning to last point"); + sLog->outDebug("TSCR: EscortAI has left combat and is now returning to last point"); } else { @@ -225,7 +225,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff) { if (DespawnAtEnd) { - sLog.outDebug("TSCR: EscortAI reached end of waypoints"); + sLog->outDebug("TSCR: EscortAI reached end of waypoints"); if (m_bCanReturnToStart) { @@ -236,7 +236,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff) m_uiWPWaitTimer = 0; - sLog.outDebug("TSCR: EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ); + sLog->outDebug("TSCR: EscortAI are returning home to spawn location: %u, %f, %f, %f", POINT_HOME, fRetX, fRetY, fRetZ); return; } @@ -252,7 +252,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff) } else { - sLog.outDebug("TSCR: EscortAI reached end of waypoints with Despawn off"); + sLog->outDebug("TSCR: EscortAI reached end of waypoints with Despawn off"); return; } @@ -261,7 +261,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff) if (!HasEscortState(STATE_ESCORT_PAUSED)) { me->GetMotionMaster()->MovePoint(CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z); - sLog.outDebug("TSCR: EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z); + sLog->outDebug("TSCR: EscortAI start waypoint %u (%f, %f, %f).", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z); WaypointStart(CurrentWP->id); @@ -279,7 +279,7 @@ void npc_escortAI::UpdateAI(const uint32 uiDiff) { if (DespawnAtFar && !IsPlayerOrGroupInRange()) { - sLog.outDebug("TSCR: EscortAI failed because player/group was to far away or not found"); + sLog->outDebug("TSCR: EscortAI failed because player/group was to far away or not found"); if (m_bCanInstantRespawn) { @@ -317,7 +317,7 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) //Combat start position reached, continue waypoint movement if (uiPointId == POINT_LAST_POINT) { - sLog.outDebug("TSCR: EscortAI has returned to original position before combat"); + sLog->outDebug("TSCR: EscortAI has returned to original position before combat"); if (m_bIsRunning && me->HasUnitMovementFlag(MOVEMENTFLAG_WALKING)) me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING); @@ -331,7 +331,7 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) } else if (uiPointId == POINT_HOME) { - sLog.outDebug("TSCR: EscortAI has returned to original home location and will continue from beginning of waypoint list."); + sLog->outDebug("TSCR: EscortAI has returned to original home location and will continue from beginning of waypoint list."); CurrentWP = WaypointList.begin(); m_uiWPWaitTimer = 1; @@ -341,11 +341,11 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) //Make sure that we are still on the right waypoint if (CurrentWP->id != uiPointId) { - sLog.outError("TSCR ERROR: EscortAI reached waypoint out of order %u, expected %u, creature entry %u", uiPointId, CurrentWP->id, me->GetEntry()); + sLog->outError("TSCR ERROR: EscortAI reached waypoint out of order %u, expected %u, creature entry %u", uiPointId, CurrentWP->id, me->GetEntry()); return; } - sLog.outDebug("TSCR: EscortAI Waypoint %u reached", CurrentWP->id); + sLog->outDebug("TSCR: EscortAI Waypoint %u reached", CurrentWP->id); //Call WP function WaypointReached(CurrentWP->id); @@ -416,14 +416,14 @@ void npc_escortAI::SetRun(bool bRun) if (!m_bIsRunning) me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING); else - sLog.outDebug("TSCR: EscortAI attempt to set run mode, but is already running."); + sLog->outDebug("TSCR: EscortAI attempt to set run mode, but is already running."); } else { if (m_bIsRunning) me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING); else - sLog.outDebug("TSCR: EscortAI attempt to set walk mode, but is already walking."); + sLog->outDebug("TSCR: EscortAI attempt to set walk mode, but is already walking."); } m_bIsRunning = bRun; } @@ -433,13 +433,13 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID, { if (me->getVictim()) { - sLog.outError("TSCR ERROR: EscortAI attempt to Start while in combat. Scriptname: %s, creature entry: %u", me->GetScriptName().c_str(), me->GetEntry()); + sLog->outError("TSCR ERROR: EscortAI attempt to Start while in combat. Scriptname: %s, creature entry: %u", me->GetScriptName().c_str(), me->GetEntry()); return; } if (HasEscortState(STATE_ESCORT_ESCORTING)) { - sLog.outError("TSCR: EscortAI attempt to Start while already escorting."); + sLog->outError("TSCR: EscortAI attempt to Start while already escorting."); return; } @@ -455,7 +455,7 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID, if (WaypointList.empty()) { - sLog.outErrorDb("TSCR: EscortAI Start with 0 waypoints (possible missing entry in script_waypoint. Quest: %u).", pQuest ? pQuest->GetQuestId() : 0); + sLog->outErrorDb("TSCR: EscortAI Start with 0 waypoints (possible missing entry in script_waypoint. Quest: %u).", pQuest ? pQuest->GetQuestId() : 0); return; } @@ -470,19 +470,19 @@ void npc_escortAI::Start(bool bIsActiveAttacker, bool bRun, uint64 uiPlayerGUID, m_bCanReturnToStart = bCanLoopPath; if (m_bCanReturnToStart && m_bCanInstantRespawn) - sLog.outDebug("TSCR: EscortAI is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn."); + sLog->outDebug("TSCR: EscortAI is set to return home after waypoint end and instant respawn at waypoint end. Creature will never despawn."); if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) { me->GetMotionMaster()->MovementExpired(); me->GetMotionMaster()->MoveIdle(); - sLog.outDebug("TSCR: EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle."); + sLog->outDebug("TSCR: EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle."); } //disable npcflags me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); - sLog.outDebug("TSCR: EscortAI started with " UI64FMTD " waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = " UI64FMTD "", uint64(WaypointList.size()), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID); + sLog->outDebug("TSCR: EscortAI started with " UI64FMTD " waypoints. ActiveAttacker = %d, Run = %d, PlayerGUID = " UI64FMTD "", uint64(WaypointList.size()), m_bIsActiveAttacker, m_bIsRunning, m_uiPlayerGUID); CurrentWP = WaypointList.begin(); diff --git a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp index 5dca322f8a0..415d4dcc07a 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp +++ b/src/server/game/AI/ScriptedAI/ScriptedFollowerAI.cpp @@ -165,7 +165,7 @@ void FollowerAI::EnterEvadeMode() if (HasFollowState(STATE_FOLLOW_INPROGRESS)) { - sLog.outDebug("TSCR: FollowerAI left combat, returning to CombatStartPosition."); + sLog->outDebug("TSCR: FollowerAI left combat, returning to CombatStartPosition."); if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE) { @@ -191,7 +191,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff) { if (HasFollowState(STATE_FOLLOW_COMPLETE) && !HasFollowState(STATE_FOLLOW_POSTEVENT)) { - sLog.outDebug("TSCR: FollowerAI is set completed, despawns."); + sLog->outDebug("TSCR: FollowerAI is set completed, despawns."); me->ForcedDespawn(); return; } @@ -202,7 +202,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff) { if (HasFollowState(STATE_FOLLOW_RETURNING)) { - sLog.outDebug("TSCR: FollowerAI is returning to leader."); + sLog->outDebug("TSCR: FollowerAI is returning to leader."); RemoveFollowState(STATE_FOLLOW_RETURNING); me->GetMotionMaster()->MoveFollow(pPlayer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); @@ -231,7 +231,7 @@ void FollowerAI::UpdateAI(const uint32 uiDiff) if (bIsMaxRangeExceeded) { - sLog.outDebug("TSCR: FollowerAI failed because player/group was to far away or not found"); + sLog->outDebug("TSCR: FollowerAI failed because player/group was to far away or not found"); me->ForcedDespawn(); return; } @@ -274,13 +274,13 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const { if (me->getVictim()) { - sLog.outDebug("TSCR: FollowerAI attempt to StartFollow while in combat."); + sLog->outDebug("TSCR: FollowerAI attempt to StartFollow while in combat."); return; } if (HasFollowState(STATE_FOLLOW_INPROGRESS)) { - sLog.outError("TSCR: FollowerAI attempt to StartFollow while already following."); + sLog->outError("TSCR: FollowerAI attempt to StartFollow while already following."); return; } @@ -296,7 +296,7 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const { me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveIdle(); - sLog.outDebug("TSCR: FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle."); + sLog->outDebug("TSCR: FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle."); } me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); @@ -305,7 +305,7 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const me->GetMotionMaster()->MoveFollow(pLeader, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); - sLog.outDebug("TSCR: FollowerAI start follow %s (GUID " UI64FMTD ")", pLeader->GetName(), m_uiLeaderGUID); + sLog->outDebug("TSCR: FollowerAI start follow %s (GUID " UI64FMTD ")", pLeader->GetName(), m_uiLeaderGUID); } Player* FollowerAI::GetLeaderForFollower() @@ -324,7 +324,7 @@ Player* FollowerAI::GetLeaderForFollower() if (pMember && pMember->isAlive() && me->IsWithinDistInMap(pMember, MAX_PLAYER_DISTANCE)) { - sLog.outDebug("TSCR: FollowerAI GetLeader changed and returned new leader."); + sLog->outDebug("TSCR: FollowerAI GetLeader changed and returned new leader."); m_uiLeaderGUID = pMember->GetGUID(); return pMember; break; @@ -334,7 +334,7 @@ Player* FollowerAI::GetLeaderForFollower() } } - sLog.outDebug("TSCR: FollowerAI GetLeader can not find suitable leader."); + sLog->outDebug("TSCR: FollowerAI GetLeader can not find suitable leader."); return NULL; } |
