diff options
author | Yehonal <yehonal.azeroth@gmail.com> | 2017-08-20 04:59:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-20 04:59:52 +0200 |
commit | c854b658828f66f69b13eb62c6a984de8e345b45 (patch) | |
tree | 0118efcdd8898db4857961009f8eac79ca27b4d4 /src/game/AI/ScriptedAI/ScriptedFollowerAI.cpp | |
parent | fa147d84d29b6ebd99af6f8eb9eb39476d2f0228 (diff) | |
parent | 0dd68dfbee97eb7ed2c9bd4109ba3f2aed697860 (diff) |
Merge branch 'master' into master
Diffstat (limited to 'src/game/AI/ScriptedAI/ScriptedFollowerAI.cpp')
-rw-r--r-- | src/game/AI/ScriptedAI/ScriptedFollowerAI.cpp | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/src/game/AI/ScriptedAI/ScriptedFollowerAI.cpp b/src/game/AI/ScriptedAI/ScriptedFollowerAI.cpp index 37210250ab..b44ec3ca0f 100644 --- a/src/game/AI/ScriptedAI/ScriptedFollowerAI.cpp +++ b/src/game/AI/ScriptedAI/ScriptedFollowerAI.cpp @@ -141,7 +141,9 @@ void FollowerAI::EnterEvadeMode() if (HasFollowState(STATE_FOLLOW_INPROGRESS)) { - ;//sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI left combat, returning to CombatStartPosition."); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI left combat, returning to CombatStartPosition."); +#endif if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE) { @@ -167,7 +169,9 @@ void FollowerAI::UpdateAI(uint32 uiDiff) { if (HasFollowState(STATE_FOLLOW_COMPLETE) && !HasFollowState(STATE_FOLLOW_POSTEVENT)) { - ;//sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI is set completed, despawns."); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI is set completed, despawns."); +#endif me->DespawnOrUnsummon(); return; } @@ -178,7 +182,9 @@ void FollowerAI::UpdateAI(uint32 uiDiff) { if (HasFollowState(STATE_FOLLOW_RETURNING)) { - ;//sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI is returning to leader."); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI is returning to leader."); +#endif RemoveFollowState(STATE_FOLLOW_RETURNING); me->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); @@ -207,7 +213,9 @@ void FollowerAI::UpdateAI(uint32 uiDiff) if (bIsMaxRangeExceeded) { - ;//sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI failed because player/group was to far away or not found"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI failed because player/group was to far away or not found"); +#endif me->DespawnOrUnsummon(); return; } @@ -250,7 +258,9 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu { if (me->GetVictim()) { - ;//sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI attempt to StartFollow while in combat."); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI attempt to StartFollow while in combat."); +#endif return; } @@ -272,7 +282,9 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu { me->GetMotionMaster()->Clear(); me->GetMotionMaster()->MoveIdle(); - ;//sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle."); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI start with WAYPOINT_MOTION_TYPE, set to MoveIdle."); +#endif } me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); @@ -281,7 +293,9 @@ void FollowerAI::StartFollow(Player* player, uint32 factionForFollower, const Qu me->GetMotionMaster()->MoveFollow(player, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE); - ;//sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI start follow %s (GUID " UI64FMTD ")", player->GetName().c_str(), m_uiLeaderGUID); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI start follow %s (GUID " UI64FMTD ")", player->GetName().c_str(), m_uiLeaderGUID); +#endif } Player* FollowerAI::GetLeaderForFollower() @@ -300,7 +314,9 @@ Player* FollowerAI::GetLeaderForFollower() if (member && me->IsWithinDistInMap(member, MAX_PLAYER_DISTANCE) && member->IsAlive()) { - ;//sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI GetLeader changed and returned new leader."); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI GetLeader changed and returned new leader."); +#endif m_uiLeaderGUID = member->GetGUID(); return member; } @@ -309,7 +325,9 @@ Player* FollowerAI::GetLeaderForFollower() } } - ;//sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI GetLeader can not find suitable leader."); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI GetLeader can not find suitable leader."); +#endif return NULL; } |