diff options
author | Machiavelli <machiavelli.trinity@gmail.com> | 2011-02-20 20:16:34 +0100 |
---|---|---|
committer | Machiavelli <machiavelli.trinity@gmail.com> | 2011-02-20 20:16:34 +0100 |
commit | e07e20ffcaf6911d4dd47e0895fbdc52c5a52f05 (patch) | |
tree | fcc0c8865a387c67b925df174e22f49820a985a0 /src | |
parent | 45db1591a4959ca9d58fc40ea2294936bcf4bd10 (diff) |
Core/Log: Implement log masks for debug log level, to allow selective debug output. Update your worldserver.conf.
Diffstat (limited to 'src')
99 files changed, 1047 insertions, 1093 deletions
diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp index 0b7a49fe74a..7fa8bbd76e3 100755 --- a/src/server/authserver/Server/AuthSocket.cpp +++ b/src/server/authserver/Server/AuthSocket.cpp @@ -213,7 +213,7 @@ void AuthSocket::OnAccept(void) void AuthSocket::OnClose(void) { - sLog->outDebug("AuthSocket::OnClose"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "AuthSocket::OnClose"); } // Read the packet from the client @@ -420,7 +420,7 @@ bool AuthSocket::_HandleLogonChallenge() std::string databaseV = fields[5].GetString(); std::string databaseS = fields[6].GetString(); - sLog->outDebug("database authentication values: v='%s' s='%s'", databaseV.c_str(), databaseS.c_str()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "database authentication values: v='%s' s='%s'", databaseV.c_str(), databaseS.c_str()); // multiply with 2 since bytes are stored as hexstring if (databaseV.size() != s_BYTE_SIZE * 2 || databaseS.size() != s_BYTE_SIZE * 2) @@ -505,7 +505,7 @@ bool AuthSocket::_HandleLogonProof() if (_expversion == NO_VALID_EXP_FLAG) { // Check if we have the appropriate patch on the disk - sLog->outDebug("Client with invalid version, patching is not implemented"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Client with invalid version, patching is not implemented"); socket().shutdown(); return true; } @@ -1017,7 +1017,7 @@ void Patcher::LoadPatchMD5(char *szFileName) std::string path = "./patches/"; path += szFileName; FILE *pPatch = fopen(path.c_str(), "rb"); - sLog->outDebug("Loading patch info from %s\n", path.c_str()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Loading patch info from %s\n", path.c_str()); if (!pPatch) { diff --git a/src/server/collision/Management/VMapManager2.cpp b/src/server/collision/Management/VMapManager2.cpp index ffcb6e838b5..b318b91b29e 100644 --- a/src/server/collision/Management/VMapManager2.cpp +++ b/src/server/collision/Management/VMapManager2.cpp @@ -274,7 +274,7 @@ namespace VMAP delete worldmodel; return NULL; } - sLog->outDebug("VMapManager2: loading file '%s%s'", basepath.c_str(), filename.c_str()); + sLog->outDebug(LOG_FILTER_MAPS, "VMapManager2: loading file '%s%s'", basepath.c_str(), filename.c_str()); model = iLoadedModelFiles.insert(std::pair<std::string, ManagedModel>(filename, ManagedModel())).first; model->second.setModel(worldmodel); } @@ -292,7 +292,7 @@ namespace VMAP } if( model->second.decRefCount() == 0) { - sLog->outDebug("VMapManager2: unloading file '%s'", filename.c_str()); + sLog->outDebug(LOG_FILTER_MAPS, "VMapManager2: unloading file '%s'", filename.c_str()); delete model->second.getModel(); iLoadedModelFiles.erase(model); } diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp index de4c044b616..4c9598ce242 100644 --- a/src/server/collision/Maps/MapTree.cpp +++ b/src/server/collision/Maps/MapTree.cpp @@ -62,7 +62,7 @@ namespace VMAP void operator()(const Vector3& point, uint32 entry) { #ifdef VMAP_DEBUG - sLog->outDebug("AreaInfoCallback: trying to intersect '%s'", prims[entry].name.c_str()); + sLog->outDebug(LOG_FILTER_MAPS, "AreaInfoCallback: trying to intersect '%s'", prims[entry].name.c_str()); #endif prims[entry].intersectPoint(point, aInfo); } @@ -78,7 +78,7 @@ namespace VMAP void operator()(const Vector3& point, uint32 entry) { #ifdef VMAP_DEBUG - sLog->outDebug("LocationInfoCallback: trying to intersect '%s'", prims[entry].name.c_str()); + sLog->outDebug(LOG_FILTER_MAPS, "LocationInfoCallback: trying to intersect '%s'", prims[entry].name.c_str()); #endif if (prims[entry].GetLocationInfo(point, locInfo)) result = true; @@ -278,7 +278,7 @@ namespace VMAP bool StaticMapTree::InitMap(const std::string &fname, VMapManager2 *vm) { - sLog->outDebug("StaticMapTree::InitMap() : initializing StaticMapTree '%s'", fname.c_str()); + sLog->outDebug(LOG_FILTER_MAPS, "StaticMapTree::InitMap() : initializing StaticMapTree '%s'", fname.c_str()); bool success = true; std::string fullname = iBasePath + fname; FILE *rf = fopen(fullname.c_str(), "rb"); @@ -306,12 +306,12 @@ namespace VMAP // only non-tiled maps have them, and if so exactly one (so far at least...) ModelSpawn spawn; #ifdef VMAP_DEBUG - sLog->outDebug("StaticMapTree::InitMap() : map isTiled: %u", static_cast<uint32>(iIsTiled)); + sLog->outDebug(LOG_FILTER_MAPS, "StaticMapTree::InitMap() : map isTiled: %u", static_cast<uint32>(iIsTiled)); #endif if (!iIsTiled && ModelSpawn::readFromFile(rf, spawn)) { WorldModel *model = vm->acquireModelInstance(iBasePath, spawn.name); - sLog->outDebug("StaticMapTree::InitMap() : loading %s", spawn.name.c_str()); + sLog->outDebug(LOG_FILTER_MAPS, "StaticMapTree::InitMap() : loading %s", spawn.name.c_str()); if (model) { // assume that global model always is the first and only tree value (could be improved...) @@ -395,7 +395,7 @@ namespace VMAP #ifdef VMAP_DEBUG if (referencedVal > iNTreeValues) { - sLog->outDebug("StaticMapTree::LoadMapTile() : invalid tree element (%u/%u)", referencedVal, iNTreeValues); + sLog->outDebug(LOG_FILTER_MAPS, "StaticMapTree::LoadMapTile() : invalid tree element (%u/%u)", referencedVal, iNTreeValues); continue; } #endif @@ -407,9 +407,9 @@ namespace VMAP ++iLoadedSpawns[referencedVal]; #ifdef VMAP_DEBUG if (iTreeValues[referencedVal].ID != spawn.ID) - sLog->outDebug("StaticMapTree::LoadMapTile() : trying to load wrong spawn in node"); + sLog->outDebug(LOG_FILTER_MAPS, "StaticMapTree::LoadMapTile() : trying to load wrong spawn in node"); else if (iTreeValues[referencedVal].name != spawn.name) - sLog->outDebug("StaticMapTree::LoadMapTile() : name collision on GUID=%u", spawn.ID); + sLog->outDebug(LOG_FILTER_MAPS, "StaticMapTree::LoadMapTile() : name collision on GUID=%u", spawn.ID); #endif } } diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp index 1aedf41cd47..d1c30a76932 100755 --- a/src/server/game/AI/CoreAI/CombatAI.cpp +++ b/src/server/game/AI/CoreAI/CombatAI.cpp @@ -340,9 +340,7 @@ void VehicleAI::LoadConditions() { conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_CREATURE_TEMPLATE_VEHICLE, me->GetEntry()); if (!conditions.empty()) - { - sLog->outDebug("VehicleAI::LoadConditions: loaded %u conditions", uint32(conditions.size())); - } + sLog->outDebug(LOG_FILTER_CONDITIONSYS, "VehicleAI::LoadConditions: loaded %u conditions", uint32(conditions.size())); } void VehicleAI::CheckConditions(const uint32 diff) diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index afa928e52e8..be4cbc4f56b 100755 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -140,7 +140,7 @@ void CreatureAI::EnterEvadeMode() if (!_EnterEvadeMode()) return; - sLog->outDebug("Creature %u enters evade mode.", me->GetEntry()); + sLog->outDebug(LOG_FILTER_UNITS, "Creature %u enters evade mode.", me->GetEntry()); if (!me->GetVehicle()) // otherwise me will be in evade mode forever { diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp index ba7ed560589..8a7f20e8687 100755 --- a/src/server/game/AI/EventAI/CreatureEventAI.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp @@ -1256,7 +1256,7 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* pSource, Unit* return; } - sLog->outDebug("CreatureEventAI: DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u",textEntry,(*i).second.SoundId,(*i).second.Type,(*i).second.Language,(*i).second.Emote); + sLog->outDebug(LOG_FILTER_DATABASE_AI, "CreatureEventAI: DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u",textEntry,(*i).second.SoundId,(*i).second.Type,(*i).second.Language,(*i).second.Emote); if ((*i).second.SoundId) { @@ -1356,7 +1356,7 @@ void CreatureEventAI::ReceiveEmote(Player* pPlayer, uint32 text_emote) if (cond.Meets(pPlayer)) { - sLog->outDebug("CreatureEventAI: ReceiveEmote CreatureEventAI: Condition ok, processing"); + sLog->outDebug(LOG_FILTER_DATABASE_AI, "CreatureEventAI: ReceiveEmote CreatureEventAI: Condition ok, processing"); ProcessEvent(*itr, pPlayer); } } diff --git a/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp b/src/server/game/AI/ScriptedAI/ScriptedEscortAI.cpp index fb97feb8ab4..780b07b6352 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(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "TSCR: EscortAI has returned to original home location and will continue from beginning of waypoint list."); CurrentWP = WaypointList.begin(); m_uiWPWaitTimer = 1; @@ -345,7 +345,7 @@ void npc_escortAI::MovementInform(uint32 uiMoveType, uint32 uiPointId) return; } - sLog->outDebug("TSCR: EscortAI Waypoint %u reached", CurrentWP->id); + sLog->outDebug(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "TSCR: EscortAI attempt to set walk mode, but is already walking."); } m_bIsRunning = bRun; } @@ -468,19 +468,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(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "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 06fb3bc667a..8b2eef48d56 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(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "TSCR: FollowerAI is set completed, despawns."); me->DespawnOrUnsummon(); 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(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "TSCR: FollowerAI failed because player/group was to far away or not found"); me->DespawnOrUnsummon(); return; } @@ -274,7 +274,7 @@ void FollowerAI::StartFollow(Player* pLeader, uint32 uiFactionForFollower, const { if (me->getVictim()) { - sLog->outDebug("TSCR: FollowerAI attempt to StartFollow while in combat."); + sLog->outDebug(LOG_FILTER_TSCR, "TSCR: FollowerAI attempt to StartFollow while in combat."); 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(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "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(LOG_FILTER_TSCR, "TSCR: FollowerAI GetLeader can not find suitable leader."); return NULL; } diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index dbd58b06a5f..422096b3798 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -845,7 +845,7 @@ void SmartGameObjectAI::Reset() // Called when a player opens a gossip dialog with the gameobject. bool SmartGameObjectAI::GossipHello(Player* player) { - sLog->outDebug("SmartGameObjectAI::GossipHello"); + sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartGameObjectAI::GossipHello"); GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_HELLO, player, 0 ,0 , false, NULL, go); return false; } @@ -909,7 +909,7 @@ class SmartTrigger : public AreaTriggerScript bool OnTrigger(Player* player, AreaTriggerEntry const* trigger) { - sLog->outDebug("AreaTrigger %u is using SmartTrigger script", trigger->id); + sLog->outDebug(LOG_FILTER_DATABASE_AI, "AreaTrigger %u is using SmartTrigger script", trigger->id); SmartScript script; script.OnInitialize(NULL, trigger); script.ProcessEventsFor(SMART_EVENT_AREATRIGGER_ONTRIGGER, player, trigger->id); diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index e8610ff94b5..f9371979a77 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -115,11 +115,9 @@ void SmartScript::ProcessAction(SmartScriptHolder &e, Unit* unit, uint32 var0, u { SmartScriptHolder linked = FindLinkedEvent(e.link); if (linked.GetActionType() && linked.GetEventType() == SMART_EVENT_LINK) - { ProcessEvent(linked, unit, var0, var1, bvar, spell, gob); - }else{ + else sLog->outErrorDb("SmartScript::ProcessAction: Entry %d SourceType %u, Event %u, Link Event %u not found or invalid, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.link); - } } switch (e.GetActionType()) @@ -2150,9 +2148,9 @@ void SmartScript::FillScript(SmartAIEventList e, WorldObject* obj, AreaTriggerEn if (e.empty()) { if (obj) - sLog->outDebug("SmartScript: EventMap for Entry %u is empty but is using SmartScript.", obj->GetEntry()); + sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript: EventMap for Entry %u is empty but is using SmartScript.", obj->GetEntry()); if (at) - sLog->outDebug("SmartScript: EventMap for AreaTrigger %u is empty but is using SmartScript.", at->id); + sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript: EventMap for AreaTrigger %u is empty but is using SmartScript.", at->id); return; } for (SmartAIEventList::iterator i = e.begin(); i != e.end(); ++i) @@ -2214,12 +2212,12 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTriggerEntry const* at) case TYPEID_UNIT: mScriptType = SMART_SCRIPT_TYPE_CREATURE; me = obj->ToCreature(); - sLog->outDebug("SmartScript::OnInitialize: source is Creature %u", me->GetEntry()); + sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::OnInitialize: source is Creature %u", me->GetEntry()); break; case TYPEID_GAMEOBJECT: mScriptType = SMART_SCRIPT_TYPE_GAMEOBJECT; go = obj->ToGameObject(); - sLog->outDebug("SmartScript::OnInitialize: source is GameObject %u", go->GetEntry()); + sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::OnInitialize: source is GameObject %u", go->GetEntry()); break; default: sLog->outError("SmartScript::OnInitialize: Unhandled TypeID !WARNING!"); @@ -2229,7 +2227,7 @@ void SmartScript::OnInitialize(WorldObject* obj, AreaTriggerEntry const* at) { mScriptType = SMART_SCRIPT_TYPE_AREATRIGGER; trigger = at; - sLog->outDebug("SmartScript::OnInitialize: source is AreaTrigger %u", trigger->id); + sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::OnInitialize: source is AreaTrigger %u", trigger->id); } else { diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 0dcb166070f..51f31e401ad 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -1203,7 +1203,7 @@ class SmartAIMgr else { if(entry > 0)//first search is for guid (negative), do not drop error if not found - sLog->outDebug("SmartAIMgr::GetScript: Could not load Script for Entry %d ScriptType %u.", entry, uint32(type)); + sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartAIMgr::GetScript: Could not load Script for Entry %d ScriptType %u.", entry, uint32(type)); return temp; } } diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 228af5838df..0dc4b977fbe 100755 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -422,8 +422,7 @@ void AchievementMgr::Reset() void AchievementMgr::ResetAchievementCriteria(AchievementCriteriaTypes type, uint32 miscvalue1, uint32 miscvalue2, bool evenIfCriteriaComplete) { - if ((sLog->getLogFilter() & LOG_FILTER_ACHIEVEMENT_UPDATES) == 0) - sLog->outDetail("AchievementMgr::ResetAchievementCriteria(%u, %u, %u)", type, miscvalue1, miscvalue2); + sLog->outDebug(LOG_FILTER_ACHIEVEMENTSYS, "AchievementMgr::ResetAchievementCriteria(%u, %u, %u)", type, miscvalue1, miscvalue2); if (!sWorld->getBoolConfig(CONFIG_GM_ALLOW_ACHIEVEMENT_GAINS) && m_player->GetSession()->GetSecurity() > SEC_PLAYER) return; @@ -633,8 +632,7 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement) return; #ifdef TRINITY_DEBUG - if ((sLog->getLogFilter() & LOG_FILTER_ACHIEVEMENT_UPDATES) == 0) - sLog->outDebug("AchievementMgr::SendAchievementEarned(%u)", achievement->ID); + sLog->outDebug(LOG_FILTER_ACHIEVEMENTSYS, "AchievementMgr::SendAchievementEarned(%u)", achievement->ID); #endif if (Guild* guild = sObjectMgr->GetGuildById(GetPlayer()->GetGuildId())) @@ -724,8 +722,7 @@ static const uint32 achievIdForDangeon[][4] = */ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscvalue1, uint32 miscvalue2, Unit *unit, uint32 time) { - if ((sLog->getLogFilter() & LOG_FILTER_ACHIEVEMENT_UPDATES) == 0) - sLog->outDetail("AchievementMgr::UpdateAchievementCriteria(%u, %u, %u, %u)", type, miscvalue1, miscvalue2, time); + sLog->outDebug(LOG_FILTER_ACHIEVEMENTSYS, "AchievementMgr::UpdateAchievementCriteria(%u, %u, %u, %u)", type, miscvalue1, miscvalue2, time); if (!sWorld->getBoolConfig(CONFIG_GM_ALLOW_ACHIEVEMENT_GAINS) && m_player->GetSession()->GetSecurity() > SEC_PLAYER) return; @@ -1816,8 +1813,7 @@ void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entry, if (entry->timeLimit && timedIter == m_timedAchievements.end()) return; - if ((sLog->getLogFilter() & LOG_FILTER_ACHIEVEMENT_UPDATES) == 0) - sLog->outDetail("AchievementMgr::SetCriteriaProgress(%u, %u) for (GUID:%u)", entry->ID, changeValue, m_player->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_ACHIEVEMENTSYS, "AchievementMgr::SetCriteriaProgress(%u, %u) for (GUID:%u)", entry->ID, changeValue, m_player->GetGUIDLow()); CriteriaProgress* progress = GetCriteriaProgress(entry); if (!progress) diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 8a04b75434c..fff0509935a 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -76,10 +76,10 @@ uint32 AuctionHouseMgr::GetAuctionDeposit(AuctionHouseEntry const* entry, uint32 uint32 timeHr = (((time / 60) / 60) / 12); uint32 deposit = uint32(((multiplier * MSV * count / 3) * timeHr * 3) * sWorld->getRate(RATE_AUCTION_DEPOSIT)); - sLog->outDebug("MSV: %u", MSV); - sLog->outDebug("Items: %u", count); - sLog->outDebug("Multiplier: %f", multiplier); - sLog->outDebug("Deposit: %u", deposit); + sLog->outDebug(LOG_FILTER_AUCTIONHOUSE, "MSV: %u", MSV); + sLog->outDebug(LOG_FILTER_AUCTIONHOUSE, "Items: %u", count); + sLog->outDebug(LOG_FILTER_AUCTIONHOUSE, "Multiplier: %f", multiplier); + sLog->outDebug(LOG_FILTER_AUCTIONHOUSE, "Deposit: %u", deposit); if (deposit < AH_MINIMUM_DEPOSIT) return AH_MINIMUM_DEPOSIT; @@ -142,7 +142,7 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry *auction, SQLTransaction& msgAuctionWonBody.width(16); msgAuctionWonBody << std::right << std::hex << auction->owner; msgAuctionWonBody << std::dec << ":" << auction->bid << ":" << auction->buyout; - sLog->outDebug("AuctionWon body string : %s", msgAuctionWonBody.str().c_str()); + sLog->outDebug(LOG_FILTER_AUCTIONHOUSE, "AuctionWon body string : %s", msgAuctionWonBody.str().c_str()); // set owner to bidder (to prevent delete item with sender char deleting) // owner in `data` will set at mail receive and item extracting @@ -186,7 +186,7 @@ void AuctionHouseMgr::SendAuctionSalePendingMail(AuctionEntry * auction, SQLTran msgAuctionSalePendingBody << ":" << auction->deposit << ":" << auctionCut << ":0:"; msgAuctionSalePendingBody << secsToTimeBitFields(distrTime); - sLog->outDebug("AuctionSalePending body string : %s", msgAuctionSalePendingBody.str().c_str()); + sLog->outDebug(LOG_FILTER_AUCTIONHOUSE, "AuctionSalePending body string : %s", msgAuctionSalePendingBody.str().c_str()); MailDraft(msgAuctionSalePendingSubject.str(), msgAuctionSalePendingBody.str()) .SendMailTo(trans, MailReceiver(owner,auction->owner), auction, MAIL_CHECK_MASK_COPIED); @@ -213,7 +213,7 @@ void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry * auction, SQLTrans auctionSuccessfulBody << std::dec << ":" << auction->bid << ":" << auction->buyout; auctionSuccessfulBody << ":" << auction->deposit << ":" << auctionCut; - sLog->outDebug("AuctionSuccessful body string : %s", auctionSuccessfulBody.str().c_str()); + sLog->outDebug(LOG_FILTER_AUCTIONHOUSE, "AuctionSuccessful body string : %s", auctionSuccessfulBody.str().c_str()); uint32 profit = auction->bid + auction->deposit - auctionCut; diff --git a/src/server/game/Battlegrounds/ArenaTeam.cpp b/src/server/game/Battlegrounds/ArenaTeam.cpp index 7b559198cff..f0d354384ba 100755 --- a/src/server/game/Battlegrounds/ArenaTeam.cpp +++ b/src/server/game/Battlegrounds/ArenaTeam.cpp @@ -72,7 +72,7 @@ bool ArenaTeam::Create(uint64 captainGuid, uint32 type, std::string ArenaTeamNam return false; uint32 captainLowGuid = GUID_LOPART(captainGuid); - sLog->outDebug("GUILD: creating arena team %s to leader: %u", ArenaTeamName.c_str(), captainLowGuid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Creating arena team %s to leader: %u", ArenaTeamName.c_str(), captainLowGuid); m_CaptainGuid = captainGuid; m_Name = ArenaTeamName; @@ -388,7 +388,7 @@ void ArenaTeam::Roster(WorldSession *session) } session->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_ARENA_TEAM_ROSTER"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_ARENA_TEAM_ROSTER"); } void ArenaTeam::Query(WorldSession *session) @@ -403,7 +403,7 @@ void ArenaTeam::Query(WorldSession *session) data << uint32(m_BorderStyle); // border style data << uint32(m_BorderColor); // border color session->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_ARENA_TEAM_QUERY_RESPONSE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_ARENA_TEAM_QUERY_RESPONSE"); } void ArenaTeam::Stats(WorldSession *session) @@ -489,7 +489,7 @@ void ArenaTeam::SetStats(uint32 stat_type, uint32 value) CharacterDatabase.PExecute("UPDATE arena_team_stats SET rank = '%u' WHERE arenateamid = '%u'", value, GetId()); break; default: - sLog->outDebug("unknown stat type in ArenaTeam::SetStats() %u", stat_type); + sLog->outError("unknown stat type in ArenaTeam::SetStats() %u", stat_type); break; } } @@ -532,7 +532,7 @@ void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, uint64 guid, uint8 strCoun BroadcastPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_ARENA_TEAM_EVENT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_ARENA_TEAM_EVENT"); } uint8 ArenaTeam::GetSlotByType(uint32 type) diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 9a4a23b6878..658846c881c 100755 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -768,7 +768,7 @@ void Battleground::EndBattleground(uint32 winner) winner_matchmaker_rating = GetArenaMatchmakerRating(winner); winner_change = winner_arena_team->WonAgainst(loser_matchmaker_rating); loser_change = loser_arena_team->LostAgainst(winner_matchmaker_rating); - sLog->outDebug("--- Winner rating: %u, Loser rating: %u, Winner MMR: %u, Loser MMR: %u, Winner change: %u, Losser change: %u ---", winner_team_rating, loser_team_rating, + sLog->outArena("--- Winner rating: %u, Loser rating: %u, Winner MMR: %u, Loser MMR: %u, Winner change: %u, Loser change: %u ---", winner_team_rating, loser_team_rating, winner_matchmaker_rating, loser_matchmaker_rating, winner_change, loser_change); SetArenaTeamRatingChangeForTeam(winner, winner_change); SetArenaTeamRatingChangeForTeam(GetOtherTeam(winner), loser_change); diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index 284702de012..ce5a60e9aba 100755 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -144,7 +144,7 @@ void BattlegroundMgr::Update(uint32 diff) if (m_NextRatingDiscardUpdate < diff) { // forced update for rated arenas (scan all, but skipped non rated) - sLog->outDebug("BattlegroundMgr: UPDATING ARENA QUEUES"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BattlegroundMgr: UPDATING ARENA QUEUES"); for (int qtype = BATTLEGROUND_QUEUE_2v2; qtype <= BATTLEGROUND_QUEUE_5v5; ++qtype) for (int bracket = BG_BRACKET_ID_FIRST; bracket < MAX_BATTLEGROUND_BRACKETS; ++bracket) m_BattlegroundQueues[qtype].Update( @@ -189,7 +189,7 @@ void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket *data, Battlegro *data << uint32(QueueSlot); // queue id (0...1) - player can be in 2 queues in time // The following segment is read as uint64 in client but can be appended as their original type. *data << uint8(arenatype); - sLog->outDebug("BattlegroundMgr::BuildBattlegroundStatusPacket: arenatype = %u for bg instanceID %u, TypeID %u.", arenatype, bg->GetClientInstanceID(), bg->GetTypeID()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "BattlegroundMgr::BuildBattlegroundStatusPacket: arenatype = %u for bg instanceID %u, TypeID %u.", arenatype, bg->GetClientInstanceID(), bg->GetTypeID()); *data << uint8(bg->isArena() ? 0xC : 0x2); *data << uint32(bg->GetTypeID()); *data << uint16(0x1F90); @@ -245,7 +245,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg) *data << uint32(pointsLost); // Rating Lost *data << uint32(pointsGained); // Rating gained *data << uint32(MatchmakerRating); // Matchmaking Value - sLog->outDebug("rating change: %d", bg->m_ArenaTeamRatingChanges[i]); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "rating change: %d", bg->m_ArenaTeamRatingChanges[i]); } for (int8 i = 1; i >= 0; --i) { @@ -380,7 +380,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg) *data << uint32(0); break; default: - sLog->outDebug("Unhandled MSG_PVP_LOG_DATA for BG id %u", bg->GetTypeID()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Unhandled MSG_PVP_LOG_DATA for BG id %u", bg->GetTypeID()); *data << uint32(0); break; } @@ -801,15 +801,15 @@ void BattlegroundMgr::InitAutomaticArenaPointDistribution() time_t wstime = time_t(sWorld->getWorldState(WS_ARENA_DISTRIBUTION_TIME)); time_t curtime = time(NULL); - sLog->outDebug("Initializing Automatic Arena Point Distribution"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Initializing Automatic Arena Point Distribution"); if (wstime < curtime) { m_NextAutoDistributionTime = curtime; // reset will be called in the next update - sLog->outDebug("Battleground: Next arena point distribution time in the past, reseting it now."); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: Next arena point distribution time in the past, reseting it now."); } else m_NextAutoDistributionTime = wstime; - sLog->outDebug("Automatic Arena Point Distribution initialized."); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Automatic Arena Point Distribution initialized."); } void BattlegroundMgr::DistributeArenaPoints() diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index 65d256bd5e4..67e8f8f907b 100755 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -151,7 +151,7 @@ GroupQueueInfo * BattlegroundQueue::AddGroup(Player *leader, Group* grp, Battleg index += BG_TEAMS_COUNT; if (ginfo->Team == HORDE) index++; - sLog->outDebug("Adding Group to BattlegroundQueue bgTypeId : %u, bracket_id : %u, index : %u", BgTypeId, bracketId, index); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Adding Group to BattlegroundQueue bgTypeId : %u, bracket_id : %u, index : %u", BgTypeId, bracketId, index); uint32 lastOnlineTime = getMSTime(); @@ -327,7 +327,7 @@ void BattlegroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCou sLog->outError("BattlegroundQueue: ERROR Cannot find groupinfo for player GUID: %u", GUID_LOPART(guid)); return; } - sLog->outDebug("BattlegroundQueue: Removing player GUID %u, from bracket_id %u", GUID_LOPART(guid), (uint32)bracket_id); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BattlegroundQueue: Removing player GUID %u, from bracket_id %u", GUID_LOPART(guid), (uint32)bracket_id); // ALL variables are correctly set // We can ignore leveling up in queue - it should not cause crash @@ -364,7 +364,7 @@ void BattlegroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCou ArenaTeam * at = sObjectMgr->GetArenaTeamById(group->ArenaTeamId); if (at) { - sLog->outDebug("UPDATING memberLost's personal arena rating for %u by opponents rating: %u", GUID_LOPART(guid), group->OpponentsTeamRating); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "UPDATING memberLost's personal arena rating for %u by opponents rating: %u", GUID_LOPART(guid), group->OpponentsTeamRating); Player *plr = sObjectMgr->GetPlayer(guid); if (plr) at->MemberLost(plr, group->OpponentsMatchmakerRating); @@ -471,7 +471,7 @@ bool BattlegroundQueue::InviteGroupToBG(GroupQueueInfo * ginfo, Battleground * b uint32 queueSlot = plr->GetBattlegroundQueueIndex(bgQueueTypeId); - sLog->outDebug("Battleground: invited plr %s (%u) to BG instance %u queueindex %u bgtype %u, I can't help it if they don't press the enter battle button.",plr->GetName(),plr->GetGUIDLow(),bg->GetInstanceID(),queueSlot,bg->GetTypeID()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: invited plr %s (%u) to BG instance %u queueindex %u bgtype %u, I can't help it if they don't press the enter battle button.",plr->GetName(),plr->GetGUIDLow(),bg->GetInstanceID(),queueSlot,bg->GetTypeID()); // send status packet sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_JOIN, INVITE_ACCEPT_WAIT_TIME, 0, ginfo->ArenaType); @@ -983,10 +983,10 @@ void BattlegroundQueue::Update(BattlegroundTypeId bgTypeId, BattlegroundBracketI (*(itr_team[BG_TEAM_ALLIANCE]))->OpponentsTeamRating = (*(itr_team[BG_TEAM_HORDE]))->ArenaTeamRating; (*(itr_team[BG_TEAM_ALLIANCE]))->OpponentsMatchmakerRating = (*(itr_team[BG_TEAM_HORDE]))->ArenaMatchmakerRating; - sLog->outDebug("setting oposite teamrating for team %u to %u", (*(itr_team[BG_TEAM_ALLIANCE]))->ArenaTeamId, (*(itr_team[BG_TEAM_ALLIANCE]))->OpponentsTeamRating); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "setting oposite teamrating for team %u to %u", (*(itr_team[BG_TEAM_ALLIANCE]))->ArenaTeamId, (*(itr_team[BG_TEAM_ALLIANCE]))->OpponentsTeamRating); (*(itr_team[BG_TEAM_HORDE]))->OpponentsTeamRating = (*(itr_team[BG_TEAM_ALLIANCE]))->ArenaTeamRating; (*(itr_team[BG_TEAM_HORDE]))->OpponentsMatchmakerRating = (*(itr_team[BG_TEAM_ALLIANCE]))->ArenaMatchmakerRating; - sLog->outDebug("setting oposite teamrating for team %u to %u", (*(itr_team[BG_TEAM_HORDE]))->ArenaTeamId, (*(itr_team[BG_TEAM_HORDE]))->OpponentsTeamRating); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "setting oposite teamrating for team %u to %u", (*(itr_team[BG_TEAM_HORDE]))->ArenaTeamId, (*(itr_team[BG_TEAM_HORDE]))->OpponentsTeamRating); // now we must move team if we changed its faction to another faction queue, because then we will spam log by errors in Queue::RemovePlayer if ((*(itr_team[BG_TEAM_ALLIANCE]))->Team != ALLIANCE) { @@ -1008,7 +1008,7 @@ void BattlegroundQueue::Update(BattlegroundTypeId bgTypeId, BattlegroundBracketI InviteGroupToBG(*(itr_team[BG_TEAM_ALLIANCE]), arena, ALLIANCE); InviteGroupToBG(*(itr_team[BG_TEAM_HORDE]), arena, HORDE); - sLog->outDebug("Starting rated arena match!"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Starting rated arena match!"); arena->StartBattleground(); } @@ -1080,7 +1080,7 @@ bool BGQueueRemoveEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/) BattlegroundQueue &bgQueue = sBattlegroundMgr->m_BattlegroundQueues[m_BgQueueTypeId]; if (bgQueue.IsPlayerInvited(m_PlayerGuid, m_BgInstanceGUID, m_RemoveTime)) { - sLog->outDebug("Battleground: removing player %u from bg queue for instance %u because of not pressing enter battle in time.",plr->GetGUIDLow(),m_BgInstanceGUID); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: removing player %u from bg queue for instance %u because of not pressing enter battle in time.",plr->GetGUIDLow(),m_BgInstanceGUID); plr->RemoveBattlegroundQueueId(m_BgQueueTypeId); bgQueue.RemovePlayer(m_PlayerGuid, true); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index 55be8441643..ae6ad0bce45 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -58,7 +58,7 @@ void BattlegroundAV::HandleKillPlayer(Player *player, Player *killer) void BattlegroundAV::HandleKillUnit(Creature *unit, Player *killer) { - sLog->outDebug("bg_av HandleKillUnit %i",unit->GetEntry()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "bg_av HandleKillUnit %i",unit->GetEntry()); if (GetStatus() != STATUS_IN_PROGRESS) return; uint32 entry = unit->GetEntry(); @@ -139,7 +139,7 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player *player) return;//maybe we should log this, cause this must be a cheater or a big bug uint8 team = GetTeamIndexByTeamId(player->GetTeam()); //TODO add reputation, events (including quest not available anymore, next quest availabe, go/npc de/spawning)and maybe honor - sLog->outDebug("BG_AV Quest %i completed",questid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed",questid); switch(questid) { case AV_QUEST_A_SCRAPS1: @@ -149,7 +149,7 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player *player) m_Team_QuestStatus[team][0]+=20; if (m_Team_QuestStatus[team][0] == 500 || m_Team_QuestStatus[team][0] == 1000 || m_Team_QuestStatus[team][0] == 1500) //25,50,75 turn ins { - sLog->outDebug("BG_AV Quest %i completed starting with unit upgrading..",questid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed starting with unit upgrading..",questid); for (BG_AV_Nodes i = BG_AV_NODES_FIRSTAID_STATION; i <= BG_AV_NODES_FROSTWOLF_HUT; ++i) if (m_Nodes[i].Owner == player->GetTeam() && m_Nodes[i].State == POINT_CONTROLED) { @@ -164,21 +164,21 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player *player) m_Team_QuestStatus[team][1]++; RewardReputationToTeam(team,1,player->GetTeam()); if (m_Team_QuestStatus[team][1] == 30) - sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here",questid); break; case AV_QUEST_A_COMMANDER2: case AV_QUEST_H_COMMANDER2: m_Team_QuestStatus[team][2]++; RewardReputationToTeam(team,1,player->GetTeam()); if (m_Team_QuestStatus[team][2] == 60) - sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here",questid); break; case AV_QUEST_A_COMMANDER3: case AV_QUEST_H_COMMANDER3: m_Team_QuestStatus[team][3]++; RewardReputationToTeam(team,1,player->GetTeam()); if (m_Team_QuestStatus[team][1] == 120) - sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here",questid); break; case AV_QUEST_A_BOSS1: case AV_QUEST_H_BOSS1: @@ -187,16 +187,16 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player *player) case AV_QUEST_H_BOSS2: m_Team_QuestStatus[team][4]++; if (m_Team_QuestStatus[team][4] >= 200) - sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here",questid); break; case AV_QUEST_A_NEAR_MINE: case AV_QUEST_H_NEAR_MINE: m_Team_QuestStatus[team][5]++; if (m_Team_QuestStatus[team][5] == 28) { - sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here",questid); if (m_Team_QuestStatus[team][6] == 7) - sLog->outDebug("BG_AV Quest %i completed (need to implement some events here - ground assault ready",questid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here - ground assault ready",questid); } break; case AV_QUEST_A_OTHER_MINE: @@ -204,9 +204,9 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player *player) m_Team_QuestStatus[team][6]++; if (m_Team_QuestStatus[team][6] == 7) { - sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here",questid); if (m_Team_QuestStatus[team][5] == 20) - sLog->outDebug("BG_AV Quest %i completed (need to implement some events here - ground assault ready",questid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here - ground assault ready",questid); } break; case AV_QUEST_A_RIDER_HIDE: @@ -214,9 +214,9 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player *player) m_Team_QuestStatus[team][7]++; if (m_Team_QuestStatus[team][7] == 25) { - sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here",questid); if (m_Team_QuestStatus[team][8] == 25) - sLog->outDebug("BG_AV Quest %i completed (need to implement some events here - rider assault ready",questid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here - rider assault ready",questid); } break; case AV_QUEST_A_RIDER_TAME: @@ -224,13 +224,13 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player *player) m_Team_QuestStatus[team][8]++; if (m_Team_QuestStatus[team][8] == 25) { - sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here",questid); if (m_Team_QuestStatus[team][7] == 25) - sLog->outDebug("BG_AV Quest %i completed (need to implement some events here - rider assault ready",questid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed (need to implement some events here - rider assault ready",questid); } break; default: - sLog->outDebug("BG_AV Quest %i completed but is not interesting at all",questid); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV Quest %i completed but is not interesting at all",questid); return; //was no interesting quest at all break; } @@ -409,7 +409,7 @@ void BattlegroundAV::StartingEventCloseDoors() void BattlegroundAV::StartingEventOpenDoors() { - sLog->outDebug("BG_AV: start spawning mine stuff"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV: start spawning mine stuff"); for (uint16 i= BG_AV_OBJECT_MINE_SUPPLY_N_MIN; i <= BG_AV_OBJECT_MINE_SUPPLY_N_MAX; i++) SpawnBGObject(i,RESPAWN_IMMEDIATELY); for (uint16 i= BG_AV_OBJECT_MINE_SUPPLY_S_MIN; i <= BG_AV_OBJECT_MINE_SUPPLY_S_MAX; i++) @@ -519,7 +519,7 @@ void BattlegroundAV::HandleAreaTrigger(Player *Source, uint32 Trigger) //Source->Unmount(); break; default: - sLog->outDebug("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger); // Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger); break; } @@ -572,7 +572,7 @@ void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node) { uint32 object = GetObjectThroughNode(node); - sLog->outDebug("bg_av: player destroyed point node %i object %i",node,object); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "bg_av: player destroyed point node %i object %i",node,object); //despawn banner SpawnBGObject(object, RESPAWN_ONE_DAY); @@ -645,7 +645,7 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial) if (!initial) { - sLog->outDebug("bg_av depopulating mine %i (0=north,1=south)",mine); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "bg_av depopulating mine %i (0=north,1=south)",mine); if (mine == AV_SOUTH_MINE) for (uint16 i=AV_CPLACE_MINE_S_S_MIN; i <= AV_CPLACE_MINE_S_S_MAX; i++) if (m_BgCreatures[i]) @@ -656,7 +656,7 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial) } SendMineWorldStates(mine); - sLog->outDebug("bg_av populating mine %i (0=north,1=south)",mine); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "bg_av populating mine %i (0=north,1=south)",mine); uint16 miner; //also neutral team exists.. after a big time, the neutral team tries to conquer the mine if (mine == AV_NORTH_MINE) @@ -678,7 +678,7 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial) else miner = AV_NPC_S_MINE_N_1; //vermin - sLog->outDebug("spawning vermin"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "spawning vermin"); if (team == ALLIANCE) cinfo = AV_NPC_S_MINE_A_3; else if (team == HORDE) @@ -795,7 +795,7 @@ void BattlegroundAV::DePopulateNode(BG_AV_Nodes node) BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object) { - sLog->outDebug("bg_AV getnodethroughobject %i",object); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "bg_AV getnodethroughobject %i",object); if (object <= BG_AV_OBJECT_FLAG_A_STONEHEART_BUNKER) return BG_AV_Nodes(object); if (object <= BG_AV_OBJECT_FLAG_C_A_FROSTWOLF_HUT) @@ -817,7 +817,7 @@ BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object) uint32 BattlegroundAV::GetObjectThroughNode(BG_AV_Nodes node) { //this function is the counterpart to GetNodeThroughObject() - sLog->outDebug("bg_AV GetObjectThroughNode %i",node); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "bg_AV GetObjectThroughNode %i",node); if (m_Nodes[node].Owner == ALLIANCE) { if (m_Nodes[node].State == POINT_ASSAULTED) @@ -860,7 +860,7 @@ void BattlegroundAV::EventPlayerClickedOnFlag(Player *source, GameObject* target if (GetStatus() != STATUS_IN_PROGRESS) return; int32 object = GetObjectType(target_obj->GetGUID()); - sLog->outDebug("BG_AV using gameobject %i with type %i",target_obj->GetEntry(),object); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV using gameobject %i with type %i",target_obj->GetEntry(),object); if (object < 0) return; switch(target_obj->GetEntry()) @@ -899,7 +899,7 @@ void BattlegroundAV::EventPlayerDefendsPoint(Player* player, uint32 object) EventPlayerAssaultsPoint(player,object); return; } - sLog->outDebug("player defends point object: %i node: %i",object,node); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "player defends point object: %i node: %i",object,node); if (m_Nodes[node].PrevOwner != team) { sLog->outError("BG_AV: player defends point which doesn't belong to his team %i",node); @@ -961,7 +961,7 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object) BG_AV_Nodes node = GetNodeThroughObject(object); uint32 owner = m_Nodes[node].Owner; //maybe name it prevowner uint32 team = player->GetTeam(); - sLog->outDebug("bg_av: player assaults point object %i node %i",object,node); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "bg_av: player assaults point object %i node %i",object,node); if (owner == team || team == m_Nodes[node].TotalOwner) return; //surely a gm used this object @@ -1314,7 +1314,7 @@ bool BattlegroundAV::SetupBattleground() } uint16 i; - sLog->outDebug("Alterac Valley: entering state STATUS_WAIT_JOIN ..."); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Alterac Valley: entering state STATUS_WAIT_JOIN ..."); // Initial Nodes for (i = 0; i < BG_AV_OBJECT_MAX; i++) SpawnBGObject(i, RESPAWN_ONE_DAY); @@ -1345,22 +1345,22 @@ bool BattlegroundAV::SetupBattleground() SpawnBGObject(BG_AV_OBJECT_AURA_N_SNOWFALL_GRAVE,RESPAWN_IMMEDIATELY); //creatures - sLog->outDebug("BG_AV start poputlating nodes"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV start poputlating nodes"); for (BG_AV_Nodes i= BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i) { if (m_Nodes[i].Owner) PopulateNode(i); } //all creatures which don't get despawned through the script are static - sLog->outDebug("BG_AV: start spawning static creatures"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV: start spawning static creatures"); for (i=0; i < AV_STATICCPLACE_MAX; i++) AddAVCreature(0,i+AV_CPLACE_MAX); //mainspiritguides: - sLog->outDebug("BG_AV: start spawning spiritguides creatures"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV: start spawning spiritguides creatures"); AddSpiritGuide(7, BG_AV_CreaturePos[7][0], BG_AV_CreaturePos[7][1], BG_AV_CreaturePos[7][2], BG_AV_CreaturePos[7][3], ALLIANCE); AddSpiritGuide(8, BG_AV_CreaturePos[8][0], BG_AV_CreaturePos[8][1], BG_AV_CreaturePos[8][2], BG_AV_CreaturePos[8][3], HORDE); //spawn the marshals (those who get deleted, if a tower gets destroyed) - sLog->outDebug("BG_AV: start spawning marshal creatures"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BG_AV: start spawning marshal creatures"); for (i=AV_NPC_A_MARSHAL_SOUTH; i <= AV_NPC_H_MARSHAL_WTOWER; i++) AddAVCreature(i,AV_CPLACE_A_MARSHAL_SOUTH+(i-AV_NPC_A_MARSHAL_SOUTH)); AddAVCreature(AV_NPC_HERALD,AV_CPLACE_HERALD); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp index c52a4cf32d2..8d66ecc7059 100755 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp @@ -217,12 +217,12 @@ void BattlegroundWS::RespawnFlag(uint32 Team, bool captured) { if (Team == ALLIANCE) { - sLog->outDebug("Respawn Alliance flag"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Respawn Alliance flag"); m_FlagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_BASE; } else { - sLog->outDebug("Respawn Horde flag"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Respawn Horde flag"); m_FlagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_BASE; } @@ -699,7 +699,7 @@ bool BattlegroundWS::SetupBattleground() return false; } - sLog->outDebug("BatteGroundWS: BG objects and spirit guides spawned"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "BatteGroundWS: BG objects and spirit guides spawned"); return true; } diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp index 4d85e2a6e73..24fb18349ef 100755 --- a/src/server/game/Chat/Channels/Channel.cpp +++ b/src/server/game/Chat/Channels/Channel.cpp @@ -76,7 +76,7 @@ Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team) uint64 banned_guid = atol(*iter); if (banned_guid) { - sLog->outDebug("Channel(%s) loaded banned guid:" UI64FMTD "",name.c_str(), banned_guid); + sLog->outDebug(LOG_FILTER_CHATSYS,"Channel(%s) loaded banned guid:" UI64FMTD "",name.c_str(), banned_guid); banned.insert(banned_guid); } } @@ -88,7 +88,7 @@ Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team) stmt->setString(0, name); stmt->setUInt32(1, m_Team); CharacterDatabase.Execute(stmt); - sLog->outDebug("Channel(%s) saved in database", name.c_str()); + sLog->outDebug(LOG_FILTER_CHATSYS,"Channel(%s) saved in database", name.c_str()); } m_IsSaved = true; @@ -116,7 +116,7 @@ void Channel::UpdateChannelInDB() const stmt->setUInt32(5, m_Team); CharacterDatabase.Execute(stmt); - sLog->outDebug("Channel(%s) updated in database", m_name.c_str()); + sLog->outDebug(LOG_FILTER_CHATSYS,"Channel(%s) updated in database", m_name.c_str()); } } @@ -137,7 +137,7 @@ void Channel::CleanOldChannelsInDB() stmt->setUInt32(0, sWorld->getIntConfig(CONFIG_PRESERVE_CUSTOM_CHANNEL_DURATION)*DAY); CharacterDatabase.Execute(stmt); - sLog->outDebug("Cleaned out unused custom chat channels."); + sLog->outDebug(LOG_FILTER_CHATSYS,"Cleaned out unused custom chat channels."); } } diff --git a/src/server/game/Chat/Commands/Level1.cpp b/src/server/game/Chat/Commands/Level1.cpp index d5acf4bd850..1fa6ba0e0eb 100755 --- a/src/server/game/Chat/Commands/Level1.cpp +++ b/src/server/game/Chat/Commands/Level1.cpp @@ -187,19 +187,6 @@ bool ChatHandler::HandleGPSCommand(const char* args) cell.GridX(), cell.GridY(), cell.CellX(), cell.CellY(), obj->GetInstanceId(), zone_x, zone_y, ground_z, floor_z, have_map, have_vmap); - sLog->outDebug("Player %s GPS call for %s '%s' (%s: %u):", - m_session ? GetNameLink().c_str() : GetTrinityString(LANG_CONSOLE_COMMAND), - (obj->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), obj->GetName(), - (obj->GetTypeId() == TYPEID_PLAYER ? "GUID" : "Entry"), (obj->GetTypeId() == TYPEID_PLAYER ? obj->GetGUIDLow(): obj->GetEntry())); - sLog->outDebug(GetTrinityString(LANG_MAP_POSITION), - obj->GetMapId(), (mapEntry ? mapEntry->name[sWorld->GetDefaultDbcLocale()] : "<unknown>"), - zone_id, (zoneEntry ? zoneEntry->area_name[sWorld->GetDefaultDbcLocale()] : "<unknown>"), - area_id, (areaEntry ? areaEntry->area_name[sWorld->GetDefaultDbcLocale()] : "<unknown>"), - obj->GetPhaseMask(), - obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), obj->GetOrientation(), - cell.GridX(), cell.GridY(), cell.CellX(), cell.CellY(), obj->GetInstanceId(), - zone_x, zone_y, ground_z, floor_z, have_map, have_vmap); - LiquidData liquid_status; ZLiquidStatus res = map->getLiquidStatus(obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), MAP_ALL_LIQUIDS, &liquid_status); if (res) diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp index 6e65590581f..8b7385d8d89 100755 --- a/src/server/game/Conditions/ConditionMgr.cpp +++ b/src/server/game/Conditions/ConditionMgr.cpp @@ -34,7 +34,7 @@ bool Condition::Meets(Player * player, Unit* invoker) { if (!player) { - sLog->outDebug("Condition player not found"); + sLog->outDebug(LOG_FILTER_CONDITIONSYS, "Condition player not found"); return false; // player not present, return false } uint32 refId = mConditionValue3;//value 3 can be a 'quick' reference @@ -255,7 +255,7 @@ bool ConditionMgr::IsPlayerMeetToConditionList(Player* player,const ConditionLis std::map<uint32, bool>ElseGroupMap; for (ConditionList::const_iterator i = conditions.begin(); i != conditions.end(); ++i) { - sLog->outDebug("ConditionMgr::IsPlayerMeetToConditionList condType: %u val1: %u",(*i)->mConditionType,(*i)->mConditionValue1); + sLog->outDebug(LOG_FILTER_CONDITIONSYS, "ConditionMgr::IsPlayerMeetToConditionList condType: %u val1: %u",(*i)->mConditionType,(*i)->mConditionValue1); if ((*i)->isLoaded()) { std::map<uint32, bool>::const_iterator itr = ElseGroupMap.find((*i)->mElseGroup); @@ -274,7 +274,7 @@ bool ConditionMgr::IsPlayerMeetToConditionList(Player* player,const ConditionLis } else { - sLog->outDebug("IsPlayerMeetToConditionList: Reference template -%u not found", + sLog->outDebug(LOG_FILTER_CONDITIONSYS, "IsPlayerMeetToConditionList: Reference template -%u not found", (*i)->mReferenceId);//checked at loading, should never happen } @@ -301,7 +301,7 @@ bool ConditionMgr::IsPlayerMeetToConditions(Player* player, ConditionList condit if(player) player->m_ConditionErrorMsgId = 0; - sLog->outDebug("ConditionMgr::IsPlayerMeetToConditions"); + sLog->outDebug(LOG_FILTER_CONDITIONSYS, "ConditionMgr::IsPlayerMeetToConditions"); bool result = IsPlayerMeetToConditionList(player, conditions, invoker); if (player && player->m_ConditionErrorMsgId && player->GetSession() && !result) @@ -322,7 +322,7 @@ ConditionList ConditionMgr::GetConditionsForNotGroupedEntry(ConditionSourceType if (i != (*itr).second.end()) { spellCond = (*i).second; - sLog->outDebug("GetConditionsForNotGroupedEntry: found conditions for type %u and entry %u", uint32(sType), uEntry); + sLog->outDebug(LOG_FILTER_CONDITIONSYS, "GetConditionsForNotGroupedEntry: found conditions for type %u and entry %u", uint32(sType), uEntry); } } } @@ -339,7 +339,7 @@ ConditionList ConditionMgr::GetConditionsForVehicleSpell(uint32 creatureID, uint if (i != (*itr).second.end()) { cond = (*i).second; - sLog->outDebug("GetConditionsForVehicleSpell: found conditions for Vehicle entry %u spell %u", creatureID, spellID); + sLog->outDebug(LOG_FILTER_CONDITIONSYS, "GetConditionsForVehicleSpell: found conditions for Vehicle entry %u spell %u", creatureID, spellID); } } return cond; diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index f38a35602fd..ab584515dcf 100755 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -205,7 +205,7 @@ void LFGMgr::Update(uint32 diff) while (!newToQueue.empty()) { uint64 frontguid = newToQueue.front(); - sLog->outDebug("LFGMgr::Update: QueueId %u: checking [" UI64FMTD "] newToQueue(%u), currentQueue(%u)", queueId, frontguid, uint32(newToQueue.size()), uint32(currentQueue.size())); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::Update: QueueId %u: checking [" UI64FMTD "] newToQueue(%u), currentQueue(%u)", queueId, frontguid, uint32(newToQueue.size()), uint32(currentQueue.size())); firstNew.push_back(frontguid); newToQueue.pop_front(); @@ -314,11 +314,11 @@ void LFGMgr::AddToQueue(const uint64& guid, uint8 queueId) LfgGuidList& list = m_newToQueue[queueId]; if (std::find(list.begin(), list.end(), guid) != list.end()) - sLog->outDebug("LFGMgr::AddToQueue: [" UI64FMTD "] already in new queue. ignoring", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::AddToQueue: [" UI64FMTD "] already in new queue. ignoring", guid); else { list.push_back(guid); - sLog->outDebug("LFGMgr::AddToQueue: [" UI64FMTD "] added to m_newToQueue (size: %u)", guid, uint32(list.size())); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::AddToQueue: [" UI64FMTD "] added to m_newToQueue (size: %u)", guid, uint32(list.size())); } } @@ -343,12 +343,12 @@ bool LFGMgr::RemoveFromQueue(const uint64& guid) { delete it->second; m_QueueInfoMap.erase(it); - sLog->outDebug("LFGMgr::RemoveFromQueue: [" UI64FMTD "] removed", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemoveFromQueue: [" UI64FMTD "] removed", guid); return true; } else { - sLog->outDebug("LFGMgr::RemoveFromQueue: [" UI64FMTD "] not in queue", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemoveFromQueue: [" UI64FMTD "] not in queue", guid); return false; } @@ -551,7 +551,7 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon // Can't join. Send result if (joinData.result != LFG_JOIN_OK) { - sLog->outDebug("LFGMgr::Join: [" UI64FMTD "] joining with %u members. result: %u", guid, grp ? grp->GetMembersCount() : 1, joinData.result); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::Join: [" UI64FMTD "] joining with %u members. result: %u", guid, grp ? grp->GetMembersCount() : 1, joinData.result); if (!dungeons.empty()) // Only should show lockmap when have no dungeons available joinData.lockmap.clear(); plr->GetSession()->SendLfgJoinResult(joinData); @@ -561,7 +561,7 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon // FIXME - Raid browser not supported yet if (isRaid) { - sLog->outDebug("LFGMgr::Join: [" UI64FMTD "] trying to join raid browser and it's disabled.", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::Join: [" UI64FMTD "] trying to join raid browser and it's disabled.", guid); return; } @@ -633,7 +633,7 @@ void LFGMgr::Join(Player* plr, uint8 roles, const LfgDungeonSet& selectedDungeon } AddToQueue(guid, uint8(plr->GetTeam())); } - sLog->outDebug("LFGMgr::Join: [" UI64FMTD "] joined with %u members. dungeons: %u", guid, grp ? grp->GetMembersCount() : 1, uint8(dungeons.size())); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::Join: [" UI64FMTD "] joined with %u members. dungeons: %u", guid, grp ? grp->GetMembersCount() : 1, uint8(dungeons.size())); } /** @@ -651,7 +651,7 @@ void LFGMgr::Leave(Player* plr, Group* grp /* = NULL*/) uint64 guid = grp ? grp->GetGUID() : plr->GetGUID(); LfgState state = GetState(guid); - sLog->outDebug("LFGMgr::Leave: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::Leave: [" UI64FMTD "]", guid); switch(state) { case LFG_STATE_QUEUED: @@ -731,7 +731,7 @@ void LFGMgr::OfferContinue(Group* grp) */ LfgProposal* LFGMgr::FindNewGroups(LfgGuidList& check, LfgGuidList& all) { - sLog->outDebug("LFGMgr::FindNewGroup: (%s) - all(%s)", ConcatenateGuids(check).c_str(), ConcatenateGuids(all).c_str()); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::FindNewGroup: (%s) - all(%s)", ConcatenateGuids(check).c_str(), ConcatenateGuids(all).c_str()); LfgProposal* pProposal = NULL; if (!check.size() || check.size() > MAXGROUPSIZE || !CheckCompatibility(check, pProposal)) @@ -764,7 +764,7 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal) if (check.size() > MAXGROUPSIZE || !check.size()) { - sLog->outDebug("LFGMgr::CheckCompatibility: (%s): Size wrong - Not compatibles", strGuids.c_str()); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: (%s): Size wrong - Not compatibles", strGuids.c_str()); return false; } @@ -775,7 +775,7 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal) LfgAnswer answer = GetCompatibles(strGuids); if (answer != LFG_ANSWER_PENDING) { - sLog->outDebug("LFGMgr::CheckCompatibility: (%s) compatibles (cached): %d", strGuids.c_str(), answer); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: (%s) compatibles (cached): %d", strGuids.c_str(), answer); return bool(answer); } @@ -788,7 +788,7 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal) // Check all-but-new compatibilities (New,A,B,C,D) --> check(A,B,C,D) if (!CheckCompatibility(check, pProposal)) // Group not compatible { - sLog->outDebug("LFGMgr::CheckCompatibility: (%s) not compatibles (%s not compatibles)", strGuids.c_str(), ConcatenateGuids(check).c_str()); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: (%s) not compatibles (%s not compatibles)", strGuids.c_str(), ConcatenateGuids(check).c_str()); SetCompatibles(strGuids, false); return false; } @@ -834,9 +834,9 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal) { SetCompatibles(strGuids, false); if (numLfgGroups > 1) - sLog->outDebug("LFGMgr::CheckCompatibility: (%s) More than one Lfggroup (%u)", strGuids.c_str(), numLfgGroups); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: (%s) More than one Lfggroup (%u)", strGuids.c_str(), numLfgGroups); else - sLog->outDebug("LFGMgr::CheckCompatibility: (%s) Too much players (%u)", strGuids.c_str(), numPlayers); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: (%s) Too much players (%u)", strGuids.c_str(), numPlayers); return false; } @@ -863,7 +863,7 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal) { Player* plr = sObjectMgr->GetPlayer(it->first); if (!plr) - sLog->outDebug("LFGMgr::CheckCompatibility: (%s) Warning! [" UI64FMTD "] offline! Marking as not compatibles!", strGuids.c_str(), it->first); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: (%s) Warning! [" UI64FMTD "] offline! Marking as not compatibles!", strGuids.c_str(), it->first); else { for (PlayerSet::const_iterator itPlayer = players.begin(); itPlayer != players.end() && plr; ++itPlayer) @@ -871,7 +871,7 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal) // Do not form a group with ignoring candidates if (plr->GetSocial()->HasIgnore((*itPlayer)->GetGUIDLow()) || (*itPlayer)->GetSocial()->HasIgnore(plr->GetGUIDLow())) { - sLog->outDebug("LFGMgr::CheckCompatibility: (%s) Players [" UI64FMTD "] and [" UI64FMTD "] ignoring", strGuids.c_str(), (*itPlayer)->GetGUID(), plr->GetGUID()); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: (%s) Players [" UI64FMTD "] and [" UI64FMTD "] ignoring", strGuids.c_str(), (*itPlayer)->GetGUID(), plr->GetGUID()); plr = NULL; } } @@ -885,7 +885,7 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal) if (players.size() != numPlayers || !CheckGroupRoles(rolesMap)) { if (players.size() == numPlayers) - sLog->outDebug("LFGMgr::CheckCompatibility: (%s) Roles not compatible", strGuids.c_str()); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: (%s) Roles not compatible", strGuids.c_str()); SetCompatibles(strGuids, false); return false; } @@ -918,10 +918,10 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal) // ----- Group is compatible, if we have MAXGROUPSIZE members then match is found if (numPlayers != MAXGROUPSIZE) { - sLog->outDebug("LFGMgr::CheckCompatibility: (%s) Compatibles but not match. Players(%u)", strGuids.c_str(), numPlayers); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: (%s) Compatibles but not match. Players(%u)", strGuids.c_str(), numPlayers); return true; } - sLog->outDebug("LFGMgr::CheckCompatibility: (%s) MATCH! Group formed", strGuids.c_str()); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::CheckCompatibility: (%s) MATCH! Group formed", strGuids.c_str()); // GROUP FORMED! // TODO - Improve algorithm to select proper group based on Item Level @@ -1101,7 +1101,7 @@ void LFGMgr::RemoveFromCompatibles(uint64 guid) out << guid; std::string strGuid = out.str(); - sLog->outDebug("LFGMgr::RemoveFromCompatibles: Removing [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemoveFromCompatibles: Removing [" UI64FMTD "]", guid); for (LfgCompatibleMap::iterator itNext = m_CompatibleMap.begin(); itNext != m_CompatibleMap.end();) { LfgCompatibleMap::iterator it = itNext++; @@ -1261,7 +1261,7 @@ void LFGMgr::UpdateProposal(uint32 proposalId, const uint64& guid, bool accept) LfgProposalPlayer* ppPlayer = itProposalPlayer->second; ppPlayer->accept = LfgAnswer(accept); - sLog->outDebug("LFGMgr::UpdateProposal: Player [" UI64FMTD "] of proposal %u selected: %u", guid, proposalId, accept); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::UpdateProposal: Player [" UI64FMTD "] of proposal %u selected: %u", guid, proposalId, accept); if (!accept) { RemoveProposal(itProposal, LFG_UPDATETYPE_PROPOSAL_DECLINED); @@ -1414,7 +1414,7 @@ void LFGMgr::RemoveProposal(LfgProposalMap::iterator itProposal, LfgUpdateType t LfgProposal* pProposal = itProposal->second; pProposal->state = LFG_PROPOSAL_FAILED; - sLog->outDebug("LFGMgr::RemoveProposal: Proposal %u, state FAILED, UpdateType %u", itProposal->first, type); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemoveProposal: Proposal %u, state FAILED, UpdateType %u", itProposal->first, type); // Mark all people that didn't answered as no accept if (type == LFG_UPDATETYPE_PROPOSAL_FAILED) for (LfgProposalPlayerMap::const_iterator it = pProposal->players.begin(); it != pProposal->players.end(); ++it) @@ -1458,12 +1458,12 @@ void LFGMgr::RemoveProposal(LfgProposalMap::iterator itProposal, LfgUpdateType t if (it->second->accept == LFG_ANSWER_DENY) { updateData.updateType = type; - sLog->outDebug("LFGMgr::RemoveProposal: [" UI64FMTD "] didn't accept. Removing from queue and compatible cache", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemoveProposal: [" UI64FMTD "] didn't accept. Removing from queue and compatible cache", guid); } else { updateData.updateType = LFG_UPDATETYPE_REMOVED_FROM_QUEUE; - sLog->outDebug("LFGMgr::RemoveProposal: [" UI64FMTD "] in same group that someone that didn't accept. Removing from queue and compatible cache", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemoveProposal: [" UI64FMTD "] in same group that someone that didn't accept. Removing from queue and compatible cache", guid); } ClearState(guid); if (grp) @@ -1476,7 +1476,7 @@ void LFGMgr::RemoveProposal(LfgProposalMap::iterator itProposal, LfgUpdateType t } else { - sLog->outDebug("LFGMgr::RemoveProposal: Readding [" UI64FMTD "] to queue.", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemoveProposal: Readding [" UI64FMTD "] to queue.", guid); SetState(guid, LFG_STATE_QUEUED); if (grp) { @@ -1640,7 +1640,7 @@ void LFGMgr::UpdateBoot(Player* plr, bool accept) */ void LFGMgr::TeleportPlayer(Player* plr, bool out, bool fromOpcode /*= false*/) { - sLog->outDebug("LFGMgr::TeleportPlayer: [" UI64FMTD "] is being teleported %s", plr->GetGUID(), out ? "out" : "in"); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::TeleportPlayer: [" UI64FMTD "] is being teleported %s", plr->GetGUID(), out ? "out" : "in"); if (out) { plr->RemoveAurasDueToSpell(LFG_SPELL_LUCK_OF_THE_DRAW); @@ -1746,7 +1746,7 @@ void LFGMgr::RewardDungeonDoneFor(const uint32 dungeonId, Player* player) Group* group = player->GetGroup(); if (!group || !group->isLFGGroup()) { - sLog->outDebug("LFGMgr::RewardDungeonDoneFor: [" UI64FMTD "] is not in a group or not a LFGGroup. Ignoring", player->GetGUID()); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RewardDungeonDoneFor: [" UI64FMTD "] is not in a group or not a LFGGroup. Ignoring", player->GetGUID()); return; } @@ -1755,13 +1755,13 @@ void LFGMgr::RewardDungeonDoneFor(const uint32 dungeonId, Player* player) uint32 gDungeonId = GetDungeon(gguid); if (gDungeonId != dungeonId) { - sLog->outDebug("LFGMgr::RewardDungeonDoneFor: [" UI64FMTD "] Finished dungeon %u but group queued for %u. Ignoring", guid, dungeonId, gDungeonId); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RewardDungeonDoneFor: [" UI64FMTD "] Finished dungeon %u but group queued for %u. Ignoring", guid, dungeonId, gDungeonId); return; } if (GetState(guid) == LFG_STATE_FINISHED_DUNGEON) { - sLog->outDebug("LFGMgr::RewardDungeonDoneFor: [" UI64FMTD "] Already rewarded player. Ignoring", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RewardDungeonDoneFor: [" UI64FMTD "] Already rewarded player. Ignoring", guid); return; } @@ -1777,7 +1777,7 @@ void LFGMgr::RewardDungeonDoneFor(const uint32 dungeonId, Player* player) LFGDungeonEntry const* dungeon = sLFGDungeonStore.LookupEntry(rDungeonId); if (!dungeon || dungeon->type != LFG_TYPE_RANDOM) { - sLog->outDebug("LFGMgr::RewardDungeonDoneFor: [" UI64FMTD "] dungeon %u is not random", guid, rDungeonId); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RewardDungeonDoneFor: [" UI64FMTD "] dungeon %u is not random", guid, rDungeonId); return; } @@ -1808,7 +1808,7 @@ void LFGMgr::RewardDungeonDoneFor(const uint32 dungeonId, Player* player) } // Give rewards - sLog->outDebug("LFGMgr::RewardDungeonDoneFor: [" UI64FMTD "] done dungeon %u,%s previously done.", player->GetGUID(), GetDungeon(gguid), index > 0 ? " " : " not"); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RewardDungeonDoneFor: [" UI64FMTD "] done dungeon %u,%s previously done.", player->GetGUID(), GetDungeon(gguid), index > 0 ? " " : " not"); player->GetSession()->SendLfgPlayerReward(dungeon->Entry(), GetDungeon(gguid, false), index, reward, qReward); } @@ -1888,7 +1888,7 @@ std::string LFGMgr::ConcatenateGuids(LfgGuidList check) LfgState LFGMgr::GetState(const uint64& guid) { - sLog->outDebug("LFGMgr::GetState: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetState: [" UI64FMTD "]", guid); if (IS_GROUP(guid)) return m_Groups[guid].GetState(); else @@ -1897,61 +1897,61 @@ LfgState LFGMgr::GetState(const uint64& guid) uint32 LFGMgr::GetDungeon(const uint64& guid, bool asId /*= true*/) { - sLog->outDebug("LFGMgr::GetDungeon: [" UI64FMTD "] asId: %u", guid, asId); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetDungeon: [" UI64FMTD "] asId: %u", guid, asId); return m_Groups[guid].GetDungeon(asId); } uint8 LFGMgr::GetRoles(const uint64& guid) { - sLog->outDebug("LFGMgr::GetRoles: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetRoles: [" UI64FMTD "]", guid); return m_Players[guid].GetRoles(); } const std::string& LFGMgr::GetComment(const uint64& guid) { - sLog->outDebug("LFGMgr::GetComment: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetComment: [" UI64FMTD "]", guid); return m_Players[guid].GetComment(); } const LfgDungeonSet& LFGMgr::GetSelectedDungeons(const uint64& guid) { - sLog->outDebug("LFGMgr::GetSelectedDungeons: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetSelectedDungeons: [" UI64FMTD "]", guid); return m_Players[guid].GetSelectedDungeons(); } const LfgLockMap& LFGMgr::GetLockedDungeons(const uint64& guid) { - sLog->outDebug("LFGMgr::GetLockedDungeons: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetLockedDungeons: [" UI64FMTD "]", guid); return m_Players[guid].GetLockedDungeons(); } uint8 LFGMgr::GetKicksLeft(const uint64& guid) { - sLog->outDebug("LFGMgr::GetKicksLeft: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetKicksLeft: [" UI64FMTD "]", guid); return m_Groups[guid].GetKicksLeft(); } uint8 LFGMgr::GetVotesNeeded(const uint64& guid) { - sLog->outDebug("LFGMgr::GetVotesNeeded: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetVotesNeeded: [" UI64FMTD "]", guid); return m_Groups[guid].GetVotesNeeded(); } void LFGMgr::RestoreState(const uint64& guid) { - sLog->outDebug("LFGMgr::RestoreState: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RestoreState: [" UI64FMTD "]", guid); m_Groups[guid].RestoreState(); } void LFGMgr::ClearState(const uint64& guid) { - sLog->outDebug("LFGMgr::ClearState: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::ClearState: [" UI64FMTD "]", guid); m_Players[guid].ClearState(); } void LFGMgr::SetState(const uint64& guid, LfgState state) { - sLog->outDebug("LFGMgr::SetState: [" UI64FMTD "] state %u", guid, state); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetState: [" UI64FMTD "] state %u", guid, state); if (IS_GROUP(guid)) m_Groups[guid].SetState(state); else @@ -1960,43 +1960,43 @@ void LFGMgr::SetState(const uint64& guid, LfgState state) void LFGMgr::SetDungeon(const uint64& guid, uint32 dungeon) { - sLog->outDebug("LFGMgr::SetDungeon: [" UI64FMTD "] dungeon %u", guid, dungeon); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetDungeon: [" UI64FMTD "] dungeon %u", guid, dungeon); m_Groups[guid].SetDungeon(dungeon); } void LFGMgr::SetRoles(const uint64& guid, uint8 roles) { - sLog->outDebug("LFGMgr::SetRoles: [" UI64FMTD "] roles: %u", guid, roles); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetRoles: [" UI64FMTD "] roles: %u", guid, roles); m_Players[guid].SetRoles(roles); } void LFGMgr::SetComment(const uint64& guid, const std::string& comment) { - sLog->outDebug("LFGMgr::SetComment: [" UI64FMTD "] comment: %s", guid, comment.c_str()); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetComment: [" UI64FMTD "] comment: %s", guid, comment.c_str()); m_Players[guid].SetComment(comment); } void LFGMgr::SetSelectedDungeons(const uint64& guid, const LfgDungeonSet& dungeons) { - sLog->outDebug("LFGMgr::SetSelectedDungeons: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetSelectedDungeons: [" UI64FMTD "]", guid); m_Players[guid].SetSelectedDungeons(dungeons); } void LFGMgr::SetLockedDungeons(const uint64& guid, const LfgLockMap& lock) { - sLog->outDebug("LFGMgr::SetLockedDungeons: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetLockedDungeons: [" UI64FMTD "]", guid); m_Players[guid].SetLockedDungeons(lock); } void LFGMgr::DecreaseKicksLeft(const uint64& guid) { - sLog->outDebug("LFGMgr::DecreaseKicksLeft: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::DecreaseKicksLeft: [" UI64FMTD "]", guid); m_Groups[guid].DecreaseKicksLeft(); } void LFGMgr::RemovePlayerData(const uint64& guid) { - sLog->outDebug("LFGMgr::RemovePlayerData: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemovePlayerData: [" UI64FMTD "]", guid); LfgPlayerDataMap::iterator it = m_Players.find(guid); if (it != m_Players.end()) m_Players.erase(it); @@ -2004,7 +2004,7 @@ void LFGMgr::RemovePlayerData(const uint64& guid) void LFGMgr::RemoveGroupData(const uint64& guid) { - sLog->outDebug("LFGMgr::RemoveGroupData: [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemoveGroupData: [" UI64FMTD "]", guid); LfgGroupDataMap::iterator it = m_Groups.find(guid); if (it != m_Groups.end()) m_Groups.erase(it); diff --git a/src/server/game/DungeonFinding/LFGScripts.cpp b/src/server/game/DungeonFinding/LFGScripts.cpp index f41f9469456..d80ca4cf919 100644 --- a/src/server/game/DungeonFinding/LFGScripts.cpp +++ b/src/server/game/DungeonFinding/LFGScripts.cpp @@ -35,7 +35,7 @@ void LFGScripts::OnAddMember(Group* group, uint64 guid) if (!gguid) return; - sLog->outDebug("LFGScripts::OnAddMember [" UI64FMTD "]: added [" UI64FMTD "]", gguid, guid); + sLog->outDebug(LOG_FILTER_LFG, "LFGScripts::OnAddMember [" UI64FMTD "]: added [" UI64FMTD "]", gguid, guid); LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_CLEAR_LOCK_LIST); for (GroupReference *itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { @@ -61,7 +61,7 @@ void LFGScripts::OnRemoveMember(Group* group, uint64 guid, RemoveMethod& method, if (!gguid || method == GROUP_REMOVEMETHOD_DEFAULT) return; - sLog->outDebug("LFGScripts::OnRemoveMember [" UI64FMTD "]: remove [" UI64FMTD "] Method: %d Kicker: [" UI64FMTD "] Reason: %s", gguid, guid, method, kicker, (reason ? reason : "")); + sLog->outDebug(LOG_FILTER_LFG, "LFGScripts::OnRemoveMember [" UI64FMTD "]: remove [" UI64FMTD "] Method: %d Kicker: [" UI64FMTD "] Reason: %s", gguid, guid, method, kicker, (reason ? reason : "")); if (sLFGMgr->GetState(gguid) == LFG_STATE_QUEUED) { // TODO - Do not remove, just remove the one leaving and rejoin queue with all other data @@ -104,7 +104,7 @@ void LFGScripts::OnRemoveMember(Group* group, uint64 guid, RemoveMethod& method, void LFGScripts::OnDisband(Group* group) { uint64 gguid = group->GetGUID(); - sLog->outDebug("LFGScripts::OnDisband [" UI64FMTD "]", gguid); + sLog->outDebug(LOG_FILTER_LFG, "LFGScripts::OnDisband [" UI64FMTD "]", gguid); sLFGMgr->RemoveGroupData(gguid); } @@ -115,7 +115,7 @@ void LFGScripts::OnChangeLeader(Group* group, uint64 newLeaderGuid, uint64 oldLe if (!gguid) return; - sLog->outDebug("LFGScripts::OnChangeLeader [" UI64FMTD "]: old [" UI64FMTD "] new [" UI64FMTD "]", gguid, newLeaderGuid, oldLeaderGuid); + sLog->outDebug(LOG_FILTER_LFG, "LFGScripts::OnChangeLeader [" UI64FMTD "]: old [" UI64FMTD "] new [" UI64FMTD "]", gguid, newLeaderGuid, oldLeaderGuid); Player *plr = sObjectMgr->GetPlayer(newLeaderGuid); LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_LEADER); @@ -137,7 +137,7 @@ void LFGScripts::OnInviteMember(Group* group, uint64 guid) if (!gguid) return; - sLog->outDebug("LFGScripts::OnInviteMember [" UI64FMTD "]: invite [" UI64FMTD "] leader [" UI64FMTD "]", gguid, guid, group->GetLeaderGUID()); + sLog->outDebug(LOG_FILTER_LFG, "LFGScripts::OnInviteMember [" UI64FMTD "]: invite [" UI64FMTD "] leader [" UI64FMTD "]", gguid, guid, group->GetLeaderGUID()); sLFGMgr->Leave(NULL, group); } diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 9a21f57f120..0fd48f47ae6 100755 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -708,7 +708,7 @@ bool Creature::AIM_Initialize(CreatureAI* ai) // make sure nothing can change the AI during AI update if (m_AI_locked) { - sLog->outDebug("AIM_Initialize: failed to init, locked."); + sLog->outDebug(LOG_FILTER_TSCR, "AIM_Initialize: failed to init, locked."); return false; } @@ -1389,7 +1389,7 @@ void Creature::DeleteFromDB() { if (!m_DBTableGuid) { - sLog->outDebug("Trying to delete not saved creature!"); + sLog->outError("Trying to delete not saved creature! LowGUID: %u, Entry: %u", GetGUIDLow(), GetEntry()); return; } @@ -1853,7 +1853,7 @@ void Creature::SendAIReaction(AiReaction reactionType) ((WorldObject*)this)->SendMessageToSet(&data, true); - sLog->outDebug("WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType); } void Creature::CallAssistance() @@ -2106,7 +2106,7 @@ bool Creature::LoadCreaturesAddon(bool reload) } AddAura(AdditionalSpellInfo, cAura->effectMask, this); - sLog->outDebug("Spell: %u with AuraEffectMask %u added to creature (GUID: %u Entry: %u)", cAura->spell_id, cAura->effectMask,GetGUIDLow(),GetEntry()); + sLog->outDebug(LOG_FILTER_UNITS, "Spell: %u with AuraEffectMask %u added to creature (GUID: %u Entry: %u)", cAura->spell_id, cAura->effectMask,GetGUIDLow(),GetEntry()); } } return true; diff --git a/src/server/game/Entities/Creature/CreatureGroups.cpp b/src/server/game/Entities/Creature/CreatureGroups.cpp index 63f3be8d430..4dd9ce885f9 100755 --- a/src/server/game/Entities/Creature/CreatureGroups.cpp +++ b/src/server/game/Entities/Creature/CreatureGroups.cpp @@ -37,13 +37,13 @@ void CreatureGroupManager::AddCreatureToGroup(uint32 groupId, Creature *member) //Add member to an existing group if (itr != map->CreatureGroupHolder.end()) { - sLog->outDebug("Group found: %u, inserting creature GUID: %u, Group InstanceID %u", groupId, member->GetGUIDLow(), member->GetInstanceId()); + sLog->outDebug(LOG_FILTER_UNITS, "Group found: %u, inserting creature GUID: %u, Group InstanceID %u", groupId, member->GetGUIDLow(), member->GetInstanceId()); itr->second->AddMember(member); } //Create new group else { - sLog->outDebug("Group not found: %u. Creating new group.", groupId); + sLog->outDebug(LOG_FILTER_UNITS, "Group not found: %u. Creating new group.", groupId); CreatureGroup* group = new CreatureGroup(groupId); map->CreatureGroupHolder[groupId] = group; group->AddMember(member); @@ -52,7 +52,7 @@ void CreatureGroupManager::AddCreatureToGroup(uint32 groupId, Creature *member) void CreatureGroupManager::RemoveCreatureFromGroup(CreatureGroup *group, Creature *member) { - sLog->outDebug("Deleting member pointer to GUID: %u from group %u", group->GetId(), member->GetDBTableGUIDLow()); + sLog->outDebug(LOG_FILTER_UNITS, "Deleting member pointer to GUID: %u from group %u", group->GetId(), member->GetDBTableGUIDLow()); group->RemoveMember(member); if (group->isEmpty()) @@ -61,7 +61,7 @@ void CreatureGroupManager::RemoveCreatureFromGroup(CreatureGroup *group, Creatur if (!map) return; - sLog->outDebug("Deleting group with InstanceID %u", member->GetInstanceId()); + sLog->outDebug(LOG_FILTER_UNITS, "Deleting group with InstanceID %u", member->GetInstanceId()); map->CreatureGroupHolder.erase(group->GetId()); delete group; } @@ -153,12 +153,12 @@ void CreatureGroupManager::LoadCreatureFormations() void CreatureGroup::AddMember(Creature *member) { - sLog->outDebug("CreatureGroup::AddMember: Adding unit GUID: %u.", member->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_UNITS, "CreatureGroup::AddMember: Adding unit GUID: %u.", member->GetGUIDLow()); //Check if it is a leader if (member->GetDBTableGUIDLow() == m_groupID) { - sLog->outDebug("Unit GUID: %u is formation leader. Adding group.", member->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_UNITS, "Unit GUID: %u is formation leader. Adding group.", member->GetGUIDLow()); m_leader = member; } @@ -187,7 +187,7 @@ void CreatureGroup::MemberAttackStart(Creature *member, Unit *target) for (CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr) { if (m_leader) // avoid crash if leader was killed and reset. - sLog->outDebug("GROUP ATTACK: group instance id %u calls member instid %u", m_leader->GetInstanceId(), member->GetInstanceId()); + sLog->outDebug(LOG_FILTER_UNITS, "GROUP ATTACK: group instance id %u calls member instid %u", m_leader->GetInstanceId(), member->GetInstanceId()); //Skip one check if (itr->first == member) @@ -214,7 +214,7 @@ void CreatureGroup::FormationReset(bool dismiss) itr->first->GetMotionMaster()->Initialize(); else itr->first->GetMotionMaster()->MoveIdle(MOTION_SLOT_IDLE); - sLog->outDebug("Set %s movement for member GUID: %u", dismiss ? "default" : "idle", itr->first->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_UNITS, "Set %s movement for member GUID: %u", dismiss ? "default" : "idle", itr->first->GetGUIDLow()); } } m_Formed = !dismiss; diff --git a/src/server/game/Entities/Creature/CreatureGroups.h b/src/server/game/Entities/Creature/CreatureGroups.h index ff35ee05ed1..5f1863f83c3 100755 --- a/src/server/game/Entities/Creature/CreatureGroups.h +++ b/src/server/game/Entities/Creature/CreatureGroups.h @@ -59,7 +59,7 @@ class CreatureGroup public: //Group cannot be created empty explicit CreatureGroup(uint32 id) : m_leader(NULL), m_groupID(id), m_Formed(false) {} - ~CreatureGroup() { sLog->outDebug("Destroying group"); } + ~CreatureGroup() { sLog->outDebug(LOG_FILTER_UNITS, "Destroying group"); } Creature* getLeader() const { return m_leader; } uint32 GetId() const { return m_groupID; } diff --git a/src/server/game/Entities/Creature/GossipDef.cpp b/src/server/game/Entities/Creature/GossipDef.cpp index 5dd0b9a5347..4a801f5607c 100755 --- a/src/server/game/Entities/Creature/GossipDef.cpp +++ b/src/server/game/Entities/Creature/GossipDef.cpp @@ -198,7 +198,7 @@ void PlayerMenu::SendPointOfInterest(float X, float Y, uint32 Icon, uint32 Flags data << locName; pSession->SendPacket(&data); - //sLog->outDebug("WORLD: Sent SMSG_GOSSIP_POI"); + //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Sent SMSG_GOSSIP_POI"); } void PlayerMenu::SendPointOfInterest(uint32 poi_id) @@ -226,7 +226,7 @@ void PlayerMenu::SendPointOfInterest(uint32 poi_id) data << icon_name; pSession->SendPacket(&data); - //sLog->outDebug("WORLD: Sent SMSG_GOSSIP_POI"); + //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Sent SMSG_GOSSIP_POI"); } void PlayerMenu::SendTalking(uint32 textID) @@ -297,7 +297,7 @@ void PlayerMenu::SendTalking(uint32 textID) } pSession->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_NPC_TEXT_UPDATE "); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_NPC_TEXT_UPDATE "); } void PlayerMenu::SendTalking(char const * title, char const * text) @@ -320,7 +320,7 @@ void PlayerMenu::SendTalking(char const * title, char const * text) pSession->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_NPC_TEXT_UPDATE "); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_NPC_TEXT_UPDATE "); } /*********************************************************/ @@ -406,7 +406,7 @@ void PlayerMenu::SendQuestGiverQuestList(QEmote eEmote, const std::string& Title data.put<uint8>(count_pos, count); pSession->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_LIST NPC Guid=%u", GUID_LOPART(npcGUID)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_LIST NPC Guid=%u", GUID_LOPART(npcGUID)); } void PlayerMenu::SendQuestGiverStatus(uint8 questStatus, uint64 npcGUID) @@ -416,7 +416,7 @@ void PlayerMenu::SendQuestGiverStatus(uint8 questStatus, uint64 npcGUID) data << uint8(questStatus); pSession->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u", GUID_LOPART(npcGUID), questStatus); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u", GUID_LOPART(npcGUID), questStatus); } void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, uint64 npcGUID, bool ActivateAccept) @@ -527,7 +527,7 @@ void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, uint64 npcGUID, } pSession->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId()); } void PlayerMenu::SendQuestQueryResponse(Quest const *pQuest) @@ -667,7 +667,7 @@ void PlayerMenu::SendQuestQueryResponse(Quest const *pQuest) data << ObjectiveText[iI]; pSession->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", pQuest->GetQuestId()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", pQuest->GetQuestId()); } void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID, bool EnableNext) @@ -764,7 +764,7 @@ void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, uint64 npcGUID, data << uint32(pQuest->RewRepValue[i]); pSession->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId()); } void PlayerMenu::SendQuestGiverRequestItems(Quest const *pQuest, uint64 npcGUID, bool Completable, bool CloseOnCancel) @@ -844,5 +844,5 @@ void PlayerMenu::SendQuestGiverRequestItems(Quest const *pQuest, uint64 npcGUID, data << uint32(0x10); pSession->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId()); } diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 667b2400d62..88ae3306371 100755 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -1183,7 +1183,7 @@ void GameObject::Use(Unit* user) if (info->goober.eventId) { - sLog->outDebug("Goober ScriptStart id %u for GO entry %u (GUID %u).", info->goober.eventId, GetEntry(), GetDBTableGUIDLow()); + sLog->outDebug(LOG_FILTER_MAPSCRIPTS, "Goober ScriptStart id %u for GO entry %u (GUID %u).", info->goober.eventId, GetEntry(), GetDBTableGUIDLow()); GetMap()->ScriptsStart(sEventScripts, info->goober.eventId, player, this); EventInform(info->goober.eventId); } @@ -1569,7 +1569,7 @@ void GameObject::Use(Unit* user) return; } default: - sLog->outDebug("Unknown Object Type %u", GetGoType()); + sLog->outError("Unknown Object Type %u", GetGoType()); break; } @@ -1582,7 +1582,7 @@ void GameObject::Use(Unit* user) if (user->GetTypeId() != TYPEID_PLAYER || !sOutdoorPvPMgr->HandleCustomSpell((Player*)user,spellId,this)) sLog->outError("WORLD: unknown spell id %u at use action for gameobject (Entry: %u GoType: %u)", spellId,GetEntry(),GetGoType()); else - sLog->outDebug("WORLD: %u non-dbc spell was handled by OutdoorPvP", spellId); + sLog->outDebug(LOG_FILTER_OUTDOORPVP, "WORLD: %u non-dbc spell was handled by OutdoorPvP", spellId); return; } diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index f1366a43b86..aad234141d6 100755 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -286,7 +286,7 @@ void Item::UpdateDuration(Player* owner, uint32 diff) if (!GetUInt32Value(ITEM_FIELD_DURATION)) return; - sLog->outDebug("Item::UpdateDuration Item (Entry: %u Duration %u Diff %u)",GetEntry(),GetUInt32Value(ITEM_FIELD_DURATION),diff); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item::UpdateDuration Item (Entry: %u Duration %u Diff %u)",GetEntry(),GetUInt32Value(ITEM_FIELD_DURATION),diff); if (GetUInt32Value(ITEM_FIELD_DURATION) <= diff) { @@ -680,7 +680,7 @@ void Item::AddToUpdateQueueOf(Player *player) if (player->GetGUID() != GetOwnerGUID()) { - sLog->outDebug("Item::AddToUpdateQueueOf - Owner's guid (%u) and player's guid (%u) don't match!", GUID_LOPART(GetOwnerGUID()), player->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item::AddToUpdateQueueOf - Owner's guid (%u) and player's guid (%u) don't match!", GUID_LOPART(GetOwnerGUID()), player->GetGUIDLow()); return; } @@ -700,7 +700,7 @@ void Item::RemoveFromUpdateQueueOf(Player *player) if (player->GetGUID() != GetOwnerGUID()) { - sLog->outDebug("Item::RemoveFromUpdateQueueOf - Owner's guid (%u) and player's guid (%u) don't match!", GUID_LOPART(GetOwnerGUID()), player->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item::RemoveFromUpdateQueueOf - Owner's guid (%u) and player's guid (%u) don't match!", GUID_LOPART(GetOwnerGUID()), player->GetGUIDLow()); return; } diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index fb67cb5fb0f..f1183d48c9c 100755 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -308,7 +308,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c CleanupActionBar(); // remove unknown spells from action bar after load - sLog->outDebug("New Pet has guid %u", GetGUIDLow()); + sLog->outDebug(LOG_FILTER_PETS, "New Pet has guid %u", GetGUIDLow()); owner->PetSpellInitialize(); @@ -786,7 +786,7 @@ bool Pet::CreateBaseAtCreatureInfo(CreatureInfo const* cinfo, Unit * owner) bool Pet::CreateBaseAtTamed(CreatureInfo const * cinfo, Map * map, uint32 phaseMask) { - sLog->outDebug("Pet::CreateBaseForTamed"); + sLog->outDebug(LOG_FILTER_PETS, "Pet::CreateBaseForTamed"); uint32 guid=sObjectMgr->GenerateLowGuid(HIGHGUID_PET); uint32 pet_number = sObjectMgr->GeneratePetNumber(); if (!Create(guid, map, phaseMask, cinfo->Entry, pet_number)) @@ -1125,7 +1125,7 @@ void Pet::_LoadSpellCooldowns() _AddCreatureSpellCooldown(spell_id,db_time); - sLog->outDebug("Pet (Number: %u) spell %u cooldown loaded (%u secs).", m_charmInfo->GetPetNumber(), spell_id, uint32(db_time-curTime)); + sLog->outDebug(LOG_FILTER_PETS, "Pet (Number: %u) spell %u cooldown loaded (%u secs).", m_charmInfo->GetPetNumber(), spell_id, uint32(db_time-curTime)); } while (result->NextRow()); @@ -1201,7 +1201,7 @@ void Pet::_SaveSpells(SQLTransaction& trans) void Pet::_LoadAuras(uint32 timediff) { - sLog->outDebug("Loading auras for pet %u",GetGUIDLow()); + sLog->outDebug(LOG_FILTER_PETS, "Loading auras for pet %u",GetGUIDLow()); QueryResult result = CharacterDatabase.PQuery("SELECT caster_guid,spell,effect_mask,recalculate_mask,stackcount,amount0,amount1,amount2,base_amount0,base_amount1,base_amount2,maxduration,remaintime,remaincharges FROM pet_aura WHERE guid = '%u'",m_charmInfo->GetPetNumber()); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index e49c4d4e9ff..d3d38ffa4aa 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -943,7 +943,7 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount) { - sLog->outDebug("STORAGE: Creating initial item, itemId = %u, count = %u",titem_id, titem_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: Creating initial item, itemId = %u, count = %u",titem_id, titem_amount); // attempt equip by one while (titem_amount > 0) @@ -1871,7 +1871,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati // client without expansion support if (GetSession()->Expansion() < mEntry->Expansion()) { - sLog->outDebug("Player %s using client without required expansion tried teleport to non accessible map %u", GetName(), mapid); + sLog->outDebug(LOG_FILTER_MAPS, "Player %s using client without required expansion tried teleport to non accessible map %u", GetName(), mapid); if (GetTransport()) { @@ -1888,7 +1888,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati return false; // normal client can't teleport to this map... } else - sLog->outDebug("Player %s is being teleported to map %u", GetName(), mapid); + sLog->outDebug(LOG_FILTER_MAPS, "Player %s is being teleported to map %u", GetName(), mapid); // reset movement flags at teleport, because player will continue move with these flags after teleport SetUnitMovementFlags(0); @@ -2504,7 +2504,7 @@ GameObject* Player::GetGameObjectIfCanInteractWith(uint64 guid, GameobjectTypes if (go->IsWithinDistInMap(this, maxdist)) return go; - sLog->outDebug("IsGameObjectOfTypeInRange: GameObject '%s' [GUID: %u] is too far away from player %s [GUID: %u] to be used by him (distance=%f, maximal 10 is allowed)", go->GetGOInfo()->name, + sLog->outDebug(LOG_FILTER_MAPS, "IsGameObjectOfTypeInRange: GameObject '%s' [GUID: %u] is too far away from player %s [GUID: %u] to be used by him (distance=%f, maximal 10 is allowed)", go->GetGOInfo()->name, go->GetGUIDLow(), GetName(), GetGUIDLow(), go->GetDistance(this)); } } @@ -4028,7 +4028,7 @@ void Player::_LoadSpellCooldowns(PreparedQueryResult result) AddSpellCooldown(spell_id, item_id, db_time); - sLog->outDebug("Player (GUID: %u) spell %u, item %u cooldown loaded (%u secs).", GetGUIDLow(), spell_id, item_id, uint32(db_time-curTime)); + sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Player (GUID: %u) spell %u, item %u cooldown loaded (%u secs).", GetGUIDLow(), spell_id, item_id, uint32(db_time-curTime)); } while (result->NextRow()); } @@ -5290,7 +5290,7 @@ void Player::CleanupChannels() cMgr->LeftChannel(ch->GetName()); // deleted channel if empty } - sLog->outDebug("Player: channels cleaned up!"); + sLog->outDebug(LOG_FILTER_CHATSYS, "Player: channels cleaned up!"); } void Player::UpdateLocalChannels(uint32 newZone) @@ -5822,7 +5822,7 @@ inline int SkillGainChance(uint32 SkillValue, uint32 GrayLevel, uint32 GreenLeve bool Player::UpdateCraftSkill(uint32 spellid) { - sLog->outDebug("UpdateCraftSkill spellid %d", spellid); + sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "UpdateCraftSkill spellid %d", spellid); SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellid); @@ -5854,7 +5854,7 @@ bool Player::UpdateCraftSkill(uint32 spellid) bool Player::UpdateGatherSkill(uint32 SkillId, uint32 SkillValue, uint32 RedLevel, uint32 Multiplicator) { - sLog->outDebug("UpdateGatherSkill(SkillId %d SkillLevel %d RedLevel %d)", SkillId, SkillValue, RedLevel); + sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "UpdateGatherSkill(SkillId %d SkillLevel %d RedLevel %d)", SkillId, SkillValue, RedLevel); uint32 gathering_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_GATHERING); @@ -5882,7 +5882,7 @@ bool Player::UpdateGatherSkill(uint32 SkillId, uint32 SkillValue, uint32 RedLeve bool Player::UpdateFishingSkill() { - sLog->outDebug("UpdateFishingSkill"); + sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "UpdateFishingSkill"); uint32 SkillValue = GetPureSkillValue(SKILL_FISHING); @@ -5900,13 +5900,13 @@ static uint32 bonusSkillLevels[] = {75,150,225,300,375,450}; bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step) { - sLog->outDebug("UpdateSkillPro(SkillId %d, Chance %3.1f%%)", SkillId, Chance/10.0); + sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "UpdateSkillPro(SkillId %d, Chance %3.1f%%)", SkillId, Chance/10.0); if (!SkillId) return false; if (Chance <= 0) // speedup in 0 chance case { - sLog->outDebug("Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0); + sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0); return false; } @@ -5944,11 +5944,11 @@ bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step) } UpdateSkillEnchantments(SkillId, SkillValue, new_value); GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL,SkillId); - sLog->outDebug("Player::UpdateSkillPro Chance=%3.1f%% taken", Chance/10.0); + sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "Player::UpdateSkillPro Chance=%3.1f%% taken", Chance/10.0); return true; } - sLog->outDebug("Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0); + sLog->outDebug(LOG_FILTER_PLAYER_SKILLS, "Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0); return false; } @@ -7265,7 +7265,7 @@ void Player::DuelComplete(DuelCompleteType type) if (!duel) return; - sLog->outDebug("Duel Complete %s %s", GetName(), duel->opponent->GetName()); + sLog->outDebug(LOG_FILTER_UNITS, "Duel Complete %s %s", GetName(), duel->opponent->GetName()); WorldPacket data(SMSG_DUEL_COMPLETE, (1)); data << (uint8)((type != DUEL_INTERUPTED) ? 1 : 0); @@ -7405,7 +7405,7 @@ void Player::_ApplyItemMods(Item *item, uint8 slot,bool apply) ApplyItemEquipSpell(item,apply); ApplyEnchantment(item, apply); - sLog->outDebug("_ApplyItemMods complete."); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "_ApplyItemMods complete."); } void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool apply, bool only_level_scale /*= false*/) @@ -8167,7 +8167,7 @@ void Player::CastItemUseSpell(Item *item,SpellCastTargets const& targets,uint8 c void Player::_RemoveAllItemMods() { - sLog->outDebug("_RemoveAllItemMods start."); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "_RemoveAllItemMods start."); for (uint8 i = 0; i < INVENTORY_SLOT_BAG_END; ++i) { @@ -8210,12 +8210,12 @@ void Player::_RemoveAllItemMods() } } - sLog->outDebug("_RemoveAllItemMods complete."); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "_RemoveAllItemMods complete."); } void Player::_ApplyAllItemMods() { - sLog->outDebug("_ApplyAllItemMods start."); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "_ApplyAllItemMods start."); for (uint8 i = 0; i < INVENTORY_SLOT_BAG_END; ++i) { @@ -8259,7 +8259,7 @@ void Player::_ApplyAllItemMods() } } - sLog->outDebug("_ApplyAllItemMods complete."); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "_ApplyAllItemMods complete."); } void Player::_ApplyAllLevelScaleItemMods(bool apply) @@ -8387,10 +8387,10 @@ void Player::SendLoot(uint64 guid, LootType loot_type) Loot *loot = 0; PermissionTypes permission = ALL_PERMISSION; - sLog->outDebug("Player::SendLoot"); + sLog->outDebug(LOG_FILTER_LOOT, "Player::SendLoot"); if (IS_GAMEOBJECT_GUID(guid)) { - sLog->outDebug(" IS_GAMEOBJECT_GUID(guid)"); + sLog->outDebug(LOG_FILTER_LOOT, "IS_GAMEOBJECT_GUID(guid)"); GameObject *go = GetMap()->GetGameObject(guid); // not check distance for GO in case owned GO (fishing bobber case, for example) @@ -8722,7 +8722,7 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid) uint32 mapid = GetMapId(); OutdoorPvP * pvp = sOutdoorPvPMgr->GetOutdoorPvPToZoneId(zoneid); - sLog->outDebug("Sending SMSG_INIT_WORLD_STATES to Map: %u, Zone: %u", mapid, zoneid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Sending SMSG_INIT_WORLD_STATES to Map: %u, Zone: %u", mapid, zoneid); // may be exist better way to do this... switch (zoneid) @@ -10381,7 +10381,7 @@ uint8 Player::_CanStoreItem_InInventorySlots(uint8 slot_begin, uint8 slot_end, I uint8 Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 entry, uint32 count, Item *pItem, bool swap, uint32* no_space_count) const { - sLog->outDebug("STORAGE: CanStoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, entry, count); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanStoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, entry, count); ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(entry); if (!pProto) @@ -10880,7 +10880,7 @@ uint8 Player::CanStoreItems(Item **pItems,int count) const // no item if (!pItem) continue; - sLog->outDebug("STORAGE: CanStoreItems %i. item = %u, count = %u", k+1, pItem->GetEntry(), pItem->GetCount()); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanStoreItems %i. item = %u, count = %u", k+1, pItem->GetEntry(), pItem->GetCount()); ItemPrototype const *pProto = pItem->GetProto(); // strange item @@ -11090,7 +11090,7 @@ uint8 Player::CanEquipItem(uint8 slot, uint16 &dest, Item *pItem, bool swap, boo dest = 0; if (pItem) { - sLog->outDebug("STORAGE: CanEquipItem slot = %u, item = %u, count = %u", slot, pItem->GetEntry(), pItem->GetCount()); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanEquipItem slot = %u, item = %u, count = %u", slot, pItem->GetEntry(), pItem->GetCount()); ItemPrototype const *pProto = pItem->GetProto(); if (pProto) { @@ -11241,7 +11241,7 @@ uint8 Player::CanUnequipItem(uint16 pos, bool swap) const if (!pItem) return EQUIP_ERR_OK; - sLog->outDebug("STORAGE: CanUnequipItem slot = %u, item = %u, count = %u", pos, pItem->GetEntry(), pItem->GetCount()); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanUnequipItem slot = %u, item = %u, count = %u", pos, pItem->GetEntry(), pItem->GetCount()); ItemPrototype const *pProto = pItem->GetProto(); if (!pProto) @@ -11277,7 +11277,7 @@ uint8 Player::CanBankItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *pI uint32 count = pItem->GetCount(); - sLog->outDebug("STORAGE: CanBankItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, pItem->GetEntry(), pItem->GetCount()); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanBankItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, pItem->GetEntry(), pItem->GetCount()); ItemPrototype const *pProto = pItem->GetProto(); if (!pProto) return swap ? EQUIP_ERR_ITEMS_CANT_BE_SWAPPED : EQUIP_ERR_ITEM_NOT_FOUND; @@ -11465,7 +11465,7 @@ uint8 Player::CanUseItem(Item *pItem, bool not_loading) const { if (pItem) { - sLog->outDebug("STORAGE: CanUseItem item = %u", pItem->GetEntry()); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanUseItem item = %u", pItem->GetEntry()); if (!isAlive() && not_loading) return EQUIP_ERR_YOU_ARE_DEAD; @@ -11553,7 +11553,7 @@ uint8 Player::CanUseItem(ItemPrototype const *pProto) const uint8 Player::CanUseAmmo(uint32 item) const { - sLog->outDebug("STORAGE: CanUseAmmo item = %u", item); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: CanUseAmmo item = %u", item); if (!isAlive()) return EQUIP_ERR_YOU_ARE_DEAD; //if (isStunned()) @@ -11692,7 +11692,7 @@ Item* Player::_StoreItem(uint16 pos, Item *pItem, uint32 count, bool clone, bool uint8 bag = pos >> 8; uint8 slot = pos & 255; - sLog->outDebug("STORAGE: StoreItem bag = %u, slot = %u, item = %u, count = %u, guid = %u", bag, slot, pItem->GetEntry(), count, pItem->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: StoreItem bag = %u, slot = %u, item = %u, count = %u, guid = %u", bag, slot, pItem->GetEntry(), count, pItem->GetGUIDLow()); Item *pItem2 = GetItemByPos(bag, slot); @@ -11958,7 +11958,7 @@ void Player::VisualizeItem(uint8 slot, Item *pItem) if (pItem->GetProto()->Bonding == BIND_WHEN_EQUIPED || pItem->GetProto()->Bonding == BIND_WHEN_PICKED_UP || pItem->GetProto()->Bonding == BIND_QUEST_ITEM) pItem->SetBinding(true); - sLog->outDebug("STORAGE: EquipItem slot = %u, item = %u", slot, pItem->GetEntry()); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: EquipItem slot = %u, item = %u", slot, pItem->GetEntry()); m_items[slot] = pItem; SetUInt64Value(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), pItem->GetGUID()); @@ -11983,7 +11983,7 @@ void Player::RemoveItem(uint8 bag, uint8 slot, bool update) Item *pItem = GetItemByPos(bag, slot); if (pItem) { - sLog->outDebug("STORAGE: RemoveItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry()); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: RemoveItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry()); RemoveEnchantmentDurations(pItem); RemoveItemDurations(pItem); @@ -12104,7 +12104,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update) Item *pItem = GetItemByPos(bag, slot); if (pItem) { - sLog->outDebug("STORAGE: DestroyItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry()); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry()); // Also remove all contained items if the item is a bag. // This if() prevents item saving crashes if the condition for a bag to be empty before being destroyed was bypassed somehow. if (pItem->IsBag() && !((Bag*)pItem)->IsEmpty()) @@ -12191,7 +12191,7 @@ void Player::DestroyItem(uint8 bag, uint8 slot, bool update) void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequip_check) { - sLog->outDebug("STORAGE: DestroyItemCount item = %u, count = %u", item, count); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyItemCount item = %u, count = %u", item, count); uint32 remcount = 0; // in inventory @@ -12320,7 +12320,7 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ void Player::DestroyZoneLimitedItem(bool update, uint32 new_zone) { - sLog->outDebug("STORAGE: DestroyZoneLimitedItem in map %u and area %u", GetMapId(), new_zone); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyZoneLimitedItem in map %u and area %u", GetMapId(), new_zone); // in inventory for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++) @@ -12352,7 +12352,7 @@ void Player::DestroyConjuredItems(bool update) { // used when entering arena // destroys all conjured items - sLog->outDebug("STORAGE: DestroyConjuredItems"); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyConjuredItems"); // in inventory for (uint8 i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++) @@ -12415,7 +12415,7 @@ void Player::DestroyItemCount(Item* pItem, uint32 &count, bool update) if (!pItem) return; - sLog->outDebug("STORAGE: DestroyItemCount item (GUID: %u, Entry: %u) count = %u", pItem->GetGUIDLow(),pItem->GetEntry(), count); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: DestroyItemCount item (GUID: %u, Entry: %u) count = %u", pItem->GetGUIDLow(),pItem->GetEntry(), count); if (pItem->GetCount() <= count) { @@ -12470,7 +12470,7 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count) return; } - sLog->outDebug("STORAGE: SplitItem bag = %u, slot = %u, item = %u, count = %u", dstbag, dstslot, pSrcItem->GetEntry(), count); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: SplitItem bag = %u, slot = %u, item = %u, count = %u", dstbag, dstslot, pSrcItem->GetEntry(), count); Item *pNewItem = pSrcItem->CloneItem(count, this); if (!pNewItem) { @@ -12555,7 +12555,7 @@ void Player::SwapItem(uint16 src, uint16 dst) if (!pSrcItem) return; - sLog->outDebug("STORAGE: SwapItem bag = %u, slot = %u, item = %u", dstbag, dstslot, pSrcItem->GetEntry()); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: SwapItem bag = %u, slot = %u, item = %u", dstbag, dstslot, pSrcItem->GetEntry()); if (!isAlive()) { @@ -12925,7 +12925,7 @@ void Player::AddItemToBuyBackSlot(Item *pItem) } RemoveItemFromBuyBackSlot(slot, true); - sLog->outDebug("STORAGE: AddItemToBuyBackSlot item = %u, slot = %u", pItem->GetEntry(), slot); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: AddItemToBuyBackSlot item = %u, slot = %u", pItem->GetEntry(), slot); m_items[slot] = pItem; time_t base = time(NULL); @@ -12947,7 +12947,7 @@ void Player::AddItemToBuyBackSlot(Item *pItem) Item* Player::GetItemFromBuyBackSlot(uint32 slot) { - sLog->outDebug("STORAGE: GetItemFromBuyBackSlot slot = %u", slot); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: GetItemFromBuyBackSlot slot = %u", slot); if (slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END) return m_items[slot]; return NULL; @@ -12955,7 +12955,7 @@ Item* Player::GetItemFromBuyBackSlot(uint32 slot) void Player::RemoveItemFromBuyBackSlot(uint32 slot, bool del) { - sLog->outDebug("STORAGE: RemoveItemFromBuyBackSlot slot = %u", slot); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "STORAGE: RemoveItemFromBuyBackSlot slot = %u", slot); if (slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END) { Item *pItem = m_items[slot]; @@ -12981,7 +12981,7 @@ void Player::RemoveItemFromBuyBackSlot(uint32 slot, bool del) void Player::SendEquipError(uint8 msg, Item* pItem, Item *pItem2, uint32 itemid) { - sLog->outDebug("WORLD: Sent SMSG_INVENTORY_CHANGE_FAILURE (%u)", msg); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_INVENTORY_CHANGE_FAILURE (%u)", msg); WorldPacket data(SMSG_INVENTORY_CHANGE_FAILURE, (msg == EQUIP_ERR_CANT_EQUIP_LEVEL_I ? 22 : 18)); data << uint8(msg); @@ -13024,7 +13024,7 @@ void Player::SendEquipError(uint8 msg, Item* pItem, Item *pItem2, uint32 itemid) void Player::SendBuyError(uint8 msg, Creature* pCreature, uint32 item, uint32 param) { - sLog->outDebug("WORLD: Sent SMSG_BUY_FAILED"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_BUY_FAILED"); WorldPacket data(SMSG_BUY_FAILED, (8+4+4+1)); data << uint64(pCreature ? pCreature->GetGUID() : 0); data << uint32(item); @@ -13036,7 +13036,7 @@ void Player::SendBuyError(uint8 msg, Creature* pCreature, uint32 item, uint32 pa void Player::SendSellError(uint8 msg, Creature* pCreature, uint64 guid, uint32 param) { - sLog->outDebug("WORLD: Sent SMSG_SELL_ITEM"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_SELL_ITEM"); WorldPacket data(SMSG_SELL_ITEM,(8+8+(param?4:0)+1)); // last check 2.0.10 data << uint64(pCreature ? pCreature->GetGUID() : 0); data << uint64(guid); @@ -13110,7 +13110,7 @@ void Player::UpdateItemDuration(uint32 time, bool realtimeonly) if (m_itemDuration.empty()) return; - sLog->outDebug("Player::UpdateItemDuration(%u,%u)", time, realtimeonly); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Player::UpdateItemDuration(%u,%u)", time, realtimeonly); for (ItemDurationList::const_iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end();) { @@ -13379,81 +13379,81 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool } } - sLog->outDebug("Adding %u to stat nb %u",enchant_amount,enchant_spell_id); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Adding %u to stat nb %u",enchant_amount,enchant_spell_id); switch (enchant_spell_id) { case ITEM_MOD_MANA: - sLog->outDebug("+ %u MANA",enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u MANA",enchant_amount); HandleStatModifier(UNIT_MOD_MANA, BASE_VALUE, float(enchant_amount), apply); break; case ITEM_MOD_HEALTH: - sLog->outDebug("+ %u HEALTH",enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u HEALTH",enchant_amount); HandleStatModifier(UNIT_MOD_HEALTH, BASE_VALUE, float(enchant_amount), apply); break; case ITEM_MOD_AGILITY: - sLog->outDebug("+ %u AGILITY",enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u AGILITY",enchant_amount); HandleStatModifier(UNIT_MOD_STAT_AGILITY, TOTAL_VALUE, float(enchant_amount), apply); ApplyStatBuffMod(STAT_AGILITY, (float)enchant_amount, apply); break; case ITEM_MOD_STRENGTH: - sLog->outDebug("+ %u STRENGTH",enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u STRENGTH",enchant_amount); HandleStatModifier(UNIT_MOD_STAT_STRENGTH, TOTAL_VALUE, float(enchant_amount), apply); ApplyStatBuffMod(STAT_STRENGTH, (float)enchant_amount, apply); break; case ITEM_MOD_INTELLECT: - sLog->outDebug("+ %u INTELLECT",enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u INTELLECT",enchant_amount); HandleStatModifier(UNIT_MOD_STAT_INTELLECT, TOTAL_VALUE, float(enchant_amount), apply); ApplyStatBuffMod(STAT_INTELLECT, (float)enchant_amount, apply); break; case ITEM_MOD_SPIRIT: - sLog->outDebug("+ %u SPIRIT",enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u SPIRIT",enchant_amount); HandleStatModifier(UNIT_MOD_STAT_SPIRIT, TOTAL_VALUE, float(enchant_amount), apply); ApplyStatBuffMod(STAT_SPIRIT, (float)enchant_amount, apply); break; case ITEM_MOD_STAMINA: - sLog->outDebug("+ %u STAMINA",enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u STAMINA",enchant_amount); HandleStatModifier(UNIT_MOD_STAT_STAMINA, TOTAL_VALUE, float(enchant_amount), apply); ApplyStatBuffMod(STAT_STAMINA, (float)enchant_amount, apply); break; case ITEM_MOD_DEFENSE_SKILL_RATING: ApplyRatingMod(CR_DEFENSE_SKILL, enchant_amount, apply); - sLog->outDebug("+ %u DEFENCE", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u DEFENCE", enchant_amount); break; case ITEM_MOD_DODGE_RATING: ApplyRatingMod(CR_DODGE, enchant_amount, apply); - sLog->outDebug("+ %u DODGE", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u DODGE", enchant_amount); break; case ITEM_MOD_PARRY_RATING: ApplyRatingMod(CR_PARRY, enchant_amount, apply); - sLog->outDebug("+ %u PARRY", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u PARRY", enchant_amount); break; case ITEM_MOD_BLOCK_RATING: ApplyRatingMod(CR_BLOCK, enchant_amount, apply); - sLog->outDebug("+ %u SHIELD_BLOCK", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u SHIELD_BLOCK", enchant_amount); break; case ITEM_MOD_HIT_MELEE_RATING: ApplyRatingMod(CR_HIT_MELEE, enchant_amount, apply); - sLog->outDebug("+ %u MELEE_HIT", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u MELEE_HIT", enchant_amount); break; case ITEM_MOD_HIT_RANGED_RATING: ApplyRatingMod(CR_HIT_RANGED, enchant_amount, apply); - sLog->outDebug("+ %u RANGED_HIT", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u RANGED_HIT", enchant_amount); break; case ITEM_MOD_HIT_SPELL_RATING: ApplyRatingMod(CR_HIT_SPELL, enchant_amount, apply); - sLog->outDebug("+ %u SPELL_HIT", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u SPELL_HIT", enchant_amount); break; case ITEM_MOD_CRIT_MELEE_RATING: ApplyRatingMod(CR_CRIT_MELEE, enchant_amount, apply); - sLog->outDebug("+ %u MELEE_CRIT", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u MELEE_CRIT", enchant_amount); break; case ITEM_MOD_CRIT_RANGED_RATING: ApplyRatingMod(CR_CRIT_RANGED, enchant_amount, apply); - sLog->outDebug("+ %u RANGED_CRIT", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u RANGED_CRIT", enchant_amount); break; case ITEM_MOD_CRIT_SPELL_RATING: ApplyRatingMod(CR_CRIT_SPELL, enchant_amount, apply); - sLog->outDebug("+ %u SPELL_CRIT", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u SPELL_CRIT", enchant_amount); break; // Values from ITEM_STAT_MELEE_HA_RATING to ITEM_MOD_HASTE_RANGED_RATING are never used // in Enchantments @@ -13488,13 +13488,13 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool ApplyRatingMod(CR_HIT_MELEE, enchant_amount, apply); ApplyRatingMod(CR_HIT_RANGED, enchant_amount, apply); ApplyRatingMod(CR_HIT_SPELL, enchant_amount, apply); - sLog->outDebug("+ %u HIT", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u HIT", enchant_amount); break; case ITEM_MOD_CRIT_RATING: ApplyRatingMod(CR_CRIT_MELEE, enchant_amount, apply); ApplyRatingMod(CR_CRIT_RANGED, enchant_amount, apply); ApplyRatingMod(CR_CRIT_SPELL, enchant_amount, apply); - sLog->outDebug("+ %u CRITICAL", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u CRITICAL", enchant_amount); break; // Values ITEM_MOD_HIT_TAKEN_RATING and ITEM_MOD_CRIT_TAKEN_RATING are never used in Enchantment // case ITEM_MOD_HIT_TAKEN_RATING: @@ -13511,55 +13511,55 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool ApplyRatingMod(CR_CRIT_TAKEN_MELEE, enchant_amount, apply); ApplyRatingMod(CR_CRIT_TAKEN_RANGED, enchant_amount, apply); ApplyRatingMod(CR_CRIT_TAKEN_SPELL, enchant_amount, apply); - sLog->outDebug("+ %u RESILIENCE", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u RESILIENCE", enchant_amount); break; case ITEM_MOD_HASTE_RATING: ApplyRatingMod(CR_HASTE_MELEE, enchant_amount, apply); ApplyRatingMod(CR_HASTE_RANGED, enchant_amount, apply); ApplyRatingMod(CR_HASTE_SPELL, enchant_amount, apply); - sLog->outDebug("+ %u HASTE", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u HASTE", enchant_amount); break; case ITEM_MOD_EXPERTISE_RATING: ApplyRatingMod(CR_EXPERTISE, enchant_amount, apply); - sLog->outDebug("+ %u EXPERTISE", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u EXPERTISE", enchant_amount); break; case ITEM_MOD_ATTACK_POWER: HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(enchant_amount), apply); HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply); - sLog->outDebug("+ %u ATTACK_POWER", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u ATTACK_POWER", enchant_amount); break; case ITEM_MOD_RANGED_ATTACK_POWER: HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply); - sLog->outDebug("+ %u RANGED_ATTACK_POWER", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u RANGED_ATTACK_POWER", enchant_amount); break; // case ITEM_MOD_FERAL_ATTACK_POWER: // ApplyFeralAPBonus(enchant_amount, apply); -// sLog->outDebug("+ %u FERAL_ATTACK_POWER", enchant_amount); +// sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u FERAL_ATTACK_POWER", enchant_amount); // break; case ITEM_MOD_MANA_REGENERATION: ApplyManaRegenBonus(enchant_amount, apply); - sLog->outDebug("+ %u MANA_REGENERATION", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u MANA_REGENERATION", enchant_amount); break; case ITEM_MOD_ARMOR_PENETRATION_RATING: ApplyRatingMod(CR_ARMOR_PENETRATION, enchant_amount, apply); - sLog->outDebug("+ %u ARMOR PENETRATION", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u ARMOR PENETRATION", enchant_amount); break; case ITEM_MOD_SPELL_POWER: ApplySpellPowerBonus(enchant_amount, apply); - sLog->outDebug("+ %u SPELL_POWER", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u SPELL_POWER", enchant_amount); break; case ITEM_MOD_HEALTH_REGEN: ApplyHealthRegenBonus(enchant_amount, apply); - sLog->outDebug("+ %u HEALTH_REGENERATION", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u HEALTH_REGENERATION", enchant_amount); break; case ITEM_MOD_SPELL_PENETRATION: ApplyModInt32Value(PLAYER_FIELD_MOD_TARGET_RESISTANCE, enchant_amount, apply); m_spellPenetrationItemMod += apply ? int32(enchant_amount) : -int32(enchant_amount); - sLog->outDebug("+ %u SPELL_PENETRATION", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u SPELL_PENETRATION", enchant_amount); break; case ITEM_MOD_BLOCK_VALUE: HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, float(enchant_amount), apply); - sLog->outDebug("+ %u BLOCK_VALUE", enchant_amount); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u BLOCK_VALUE", enchant_amount); break; case ITEM_MOD_SPELL_HEALING_DONE: // deprecated case ITEM_MOD_SPELL_DAMAGE_DONE: // deprecated @@ -14884,7 +14884,7 @@ bool Player::SatisfyQuestLog(bool msg) { WorldPacket data(SMSG_QUESTLOG_FULL, 0); GetSession()->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_QUESTLOG_FULL"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTLOG_FULL"); } return false; } @@ -15033,7 +15033,7 @@ bool Player::SatisfyQuestConditions(Quest const* qInfo, bool msg) { if (msg) SendCanTakeQuestResponse(INVALIDREASON_DONT_HAVE_REQ); - sLog->outDebug("Player::SatisfyQuestConditions: conditions not met for quest %u", qInfo->GetQuestId()); + sLog->outDebug(LOG_FILTER_CONDITIONSYS, "Player::SatisfyQuestConditions: conditions not met for quest %u", qInfo->GetQuestId()); return false; } return true; @@ -15835,14 +15835,14 @@ void Player::SendQuestComplete(uint32 quest_id) WorldPacket data(SMSG_QUESTUPDATE_COMPLETE, 4); data << uint32(quest_id); GetSession()->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = %u", quest_id); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = %u", quest_id); } } void Player::SendQuestReward(Quest const *pQuest, uint32 XP, Object * questGiver) { uint32 questid = pQuest->GetQuestId(); - sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid); sGameEventMgr->HandleQuestComplete(questid); WorldPacket data(SMSG_QUESTGIVER_QUEST_COMPLETE, (4+4+4+4+4)); data << uint32(questid); @@ -15875,7 +15875,7 @@ void Player::SendQuestFailed(uint32 quest_id) data << uint32(quest_id); data << uint32(0); // failed reason (4 for inventory is full) GetSession()->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED"); } } @@ -15886,7 +15886,7 @@ void Player::SendQuestTimerFailed(uint32 quest_id) WorldPacket data(SMSG_QUESTUPDATE_FAILEDTIMER, 4); data << uint32(quest_id); GetSession()->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_QUESTUPDATE_FAILEDTIMER"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTUPDATE_FAILEDTIMER"); } } @@ -15895,7 +15895,7 @@ void Player::SendCanTakeQuestResponse(uint32 msg) WorldPacket data(SMSG_QUESTGIVER_QUEST_INVALID, 4); data << uint32(msg); GetSession()->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_INVALID"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTGIVER_QUEST_INVALID"); } void Player::SendQuestConfirmAccept(const Quest* pQuest, Player* pReceiver) @@ -15915,7 +15915,7 @@ void Player::SendQuestConfirmAccept(const Quest* pQuest, Player* pReceiver) data << uint64(GetGUID()); pReceiver->GetSession()->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_QUEST_CONFIRM_ACCEPT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUEST_CONFIRM_ACCEPT"); } } @@ -15927,14 +15927,14 @@ void Player::SendPushToPartyResponse(Player *pPlayer, uint32 msg) data << uint64(pPlayer->GetGUID()); data << uint8(msg); // valid values: 0-8 GetSession()->SendPacket(&data); - sLog->outDebug("WORLD: Sent MSG_QUEST_PUSH_RESULT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent MSG_QUEST_PUSH_RESULT"); } } void Player::SendQuestUpdateAddItem(Quest const* /*pQuest*/, uint32 /*item_idx*/, uint16 /*count*/) { WorldPacket data(SMSG_QUESTUPDATE_ADD_ITEM, 0); - sLog->outDebug("WORLD: Sent SMSG_QUESTUPDATE_ADD_ITEM"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTUPDATE_ADD_ITEM"); //data << pQuest->ReqItemId[item_idx]; //data << count; GetSession()->SendPacket(&data); @@ -15950,7 +15950,7 @@ void Player::SendQuestUpdateAddCreatureOrGo(Quest const* pQuest, uint64 guid, ui entry = (-entry) | 0x80000000; WorldPacket data(SMSG_QUESTUPDATE_ADD_KILL, (4*4+8)); - sLog->outDebug("WORLD: Sent SMSG_QUESTUPDATE_ADD_KILL"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_QUESTUPDATE_ADD_KILL"); data << uint32(pQuest->GetQuestId()); data << uint32(entry); data << uint32(old_count + add_count); @@ -16254,7 +16254,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) m_items[slot] = NULL; } - sLog->outDebug("Load Basic value of player %s is: ", m_name.c_str()); + sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Load Basic value of player %s is: ", m_name.c_str()); outDebugValues(); //Need to call it to initialize m_team (m_team can be calculated from race) @@ -16468,7 +16468,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) { if (GetSession()->Expansion() < mapEntry->Expansion()) { - sLog->outDebug("Player %s using client without required expansion tried login at non accessible map %u", GetName(), mapId); + sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Player %s using client without required expansion tried login at non accessible map %u", GetName(), mapId); RelocateToHomebind(); } @@ -16723,7 +16723,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder) SetPower(Powers(i),savedPower > GetMaxPower(Powers(i)) ? GetMaxPower(Powers(i)) : savedPower); } - sLog->outDebug("The value of player %s after load item and aura is: ", m_name.c_str()); + sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "The value of player %s after load item and aura is: ", m_name.c_str()); outDebugValues(); // GM state @@ -16867,7 +16867,7 @@ void Player::_LoadActions(PreparedQueryResult result) void Player::_LoadAuras(PreparedQueryResult result, uint32 timediff) { - sLog->outDebug("Loading auras for player %u",GetGUIDLow()); + sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Loading auras for player %u",GetGUIDLow()); /* 0 1 2 3 4 5 6 7 8 9 10 QueryResult *result = CharacterDatabase.PQuery("SELECT caster_guid,spell,effect_mask,recalculate_mask,stackcount,amount0,amount1,amount2,base_amount0,base_amount1,base_amount2, @@ -17065,7 +17065,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timediff) { if (item->GetPlayedTime() > (2*HOUR)) { - sLog->outDebug("Item::LoadFromDB, Item GUID: %u: refund time expired, deleting refund data and removing refundable flag.", item->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Item::LoadFromDB, Item GUID: %u: refund time expired, deleting refund data and removing refundable flag.", item->GetGUIDLow()); trans->PAppend("DELETE FROM item_refund_instance WHERE item_guid = '%u'", item->GetGUIDLow()); item->RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE); } @@ -17077,7 +17077,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timediff) PreparedQueryResult result2 = CharacterDatabase.Query(stmt); if (!result2) { - sLog->outDebug("Item::LoadFromDB, Item GUID: %u has field flags & ITEM_FLAGS_REFUNDABLE but has no data in item_refund_instance, removing flag.", item->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Item::LoadFromDB, Item GUID: %u has field flags & ITEM_FLAGS_REFUNDABLE but has no data in item_refund_instance, removing flag.", item->GetGUIDLow()); item->RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE); } else @@ -17097,7 +17097,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timediff) PreparedQueryResult result2 = CharacterDatabase.Query(stmt); if (!result2) { - sLog->outDebug("Item::LoadFromDB, Item GUID: %u has flag ITEM_FLAG_BOP_TRADEABLE but has no data in item_soulbound_trade_data, removing flag.", item->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Item::LoadFromDB, Item GUID: %u has flag ITEM_FLAG_BOP_TRADEABLE but has no data in item_soulbound_trade_data, removing flag.", item->GetGUIDLow()); item->RemoveFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_BOP_TRADEABLE); } else @@ -17405,7 +17405,7 @@ void Player::_LoadQuestStatus(PreparedQueryResult result) ++slot; } - sLog->outDebug("Quest status is {%u} for quest {%u} for player (GUID: %u)", questStatusData.m_status, quest_id, GetGUIDLow()); + sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Quest status is {%u} for quest {%u} for player (GUID: %u)", questStatusData.m_status, quest_id, GetGUIDLow()); } } while (result->NextRow()); @@ -17495,7 +17495,7 @@ void Player::_LoadDailyQuestStatus(PreparedQueryResult result) SetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1+quest_daily_idx, quest_id); ++quest_daily_idx; - sLog->outDebug("Daily quest (%u) cooldown for player (GUID: %u)", quest_id, GetGUIDLow()); + sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Daily quest (%u) cooldown for player (GUID: %u)", quest_id, GetGUIDLow()); } while (result->NextRow()); } @@ -17517,7 +17517,7 @@ void Player::_LoadWeeklyQuestStatus(PreparedQueryResult result) continue; m_weeklyquests.insert(quest_id); - sLog->outDebug("Weekly quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow()); + sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "Weekly quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow()); } while (result->NextRow()); } @@ -17690,7 +17690,7 @@ InstancePlayerBind* Player::BindToInstance(InstanceSave *save, bool permanent, b bind.save = save; bind.perm = permanent; if (!load) - sLog->outDebug("Player::BindToInstance: %s(%d) is now bound to map %d, instance %d, difficulty %d", GetName(), GetGUIDLow(), save->GetMapId(), save->GetInstanceId(), save->GetDifficulty()); + sLog->outDebug(LOG_FILTER_MAPS, "Player::BindToInstance: %s(%d) is now bound to map %d, instance %d, difficulty %d", GetName(), GetGUIDLow(), save->GetMapId(), save->GetInstanceId(), save->GetDifficulty()); sScriptMgr->OnPlayerBindToInstance(this, save->GetDifficulty(), save->GetMapId(), permanent); return &bind; } @@ -17966,7 +17966,7 @@ void Player::SaveToDB() // first save/honor gain after midnight will also update the player's honor fields UpdateHonorFields(); - sLog->outDebug("The value of player %s at save: ", m_name.c_str()); + sLog->outDebug(LOG_FILTER_UNITS, "The value of player %s at save: ", m_name.c_str()); outDebugValues(); std::string sql_name = m_name; @@ -18592,18 +18592,18 @@ void Player::outDebugValues() const if (!sLog->IsOutDebug()) // optimize disabled debug output return; - sLog->outDebug("HP is: \t\t\t%u\t\tMP is: \t\t\t%u",GetMaxHealth(), GetMaxPower(POWER_MANA)); - sLog->outDebug("AGILITY is: \t\t%f\t\tSTRENGTH is: \t\t%f",GetStat(STAT_AGILITY), GetStat(STAT_STRENGTH)); - sLog->outDebug("INTELLECT is: \t\t%f\t\tSPIRIT is: \t\t%f",GetStat(STAT_INTELLECT), GetStat(STAT_SPIRIT)); - sLog->outDebug("STAMINA is: \t\t%f",GetStat(STAT_STAMINA)); - sLog->outDebug("Armor is: \t\t%u\t\tBlock is: \t\t%f",GetArmor(), GetFloatValue(PLAYER_BLOCK_PERCENTAGE)); - sLog->outDebug("HolyRes is: \t\t%u\t\tFireRes is: \t\t%u",GetResistance(SPELL_SCHOOL_HOLY), GetResistance(SPELL_SCHOOL_FIRE)); - sLog->outDebug("NatureRes is: \t\t%u\t\tFrostRes is: \t\t%u",GetResistance(SPELL_SCHOOL_NATURE), GetResistance(SPELL_SCHOOL_FROST)); - sLog->outDebug("ShadowRes is: \t\t%u\t\tArcaneRes is: \t\t%u",GetResistance(SPELL_SCHOOL_SHADOW), GetResistance(SPELL_SCHOOL_ARCANE)); - sLog->outDebug("MIN_DAMAGE is: \t\t%f\tMAX_DAMAGE is: \t\t%f",GetFloatValue(UNIT_FIELD_MINDAMAGE), GetFloatValue(UNIT_FIELD_MAXDAMAGE)); - sLog->outDebug("MIN_OFFHAND_DAMAGE is: \t%f\tMAX_OFFHAND_DAMAGE is: \t%f",GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE), GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE)); - sLog->outDebug("MIN_RANGED_DAMAGE is: \t%f\tMAX_RANGED_DAMAGE is: \t%f",GetFloatValue(UNIT_FIELD_MINRANGEDDAMAGE), GetFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE)); - sLog->outDebug("ATTACK_TIME is: \t%u\t\tRANGE_ATTACK_TIME is: \t%u",GetAttackTime(BASE_ATTACK), GetAttackTime(RANGED_ATTACK)); + sLog->outDebug(LOG_FILTER_UNITS, "HP is: \t\t\t%u\t\tMP is: \t\t\t%u",GetMaxHealth(), GetMaxPower(POWER_MANA)); + sLog->outDebug(LOG_FILTER_UNITS, "AGILITY is: \t\t%f\t\tSTRENGTH is: \t\t%f",GetStat(STAT_AGILITY), GetStat(STAT_STRENGTH)); + sLog->outDebug(LOG_FILTER_UNITS, "INTELLECT is: \t\t%f\t\tSPIRIT is: \t\t%f",GetStat(STAT_INTELLECT), GetStat(STAT_SPIRIT)); + sLog->outDebug(LOG_FILTER_UNITS, "STAMINA is: \t\t%f",GetStat(STAT_STAMINA)); + sLog->outDebug(LOG_FILTER_UNITS, "Armor is: \t\t%u\t\tBlock is: \t\t%f",GetArmor(), GetFloatValue(PLAYER_BLOCK_PERCENTAGE)); + sLog->outDebug(LOG_FILTER_UNITS, "HolyRes is: \t\t%u\t\tFireRes is: \t\t%u",GetResistance(SPELL_SCHOOL_HOLY), GetResistance(SPELL_SCHOOL_FIRE)); + sLog->outDebug(LOG_FILTER_UNITS, "NatureRes is: \t\t%u\t\tFrostRes is: \t\t%u",GetResistance(SPELL_SCHOOL_NATURE), GetResistance(SPELL_SCHOOL_FROST)); + sLog->outDebug(LOG_FILTER_UNITS, "ShadowRes is: \t\t%u\t\tArcaneRes is: \t\t%u",GetResistance(SPELL_SCHOOL_SHADOW), GetResistance(SPELL_SCHOOL_ARCANE)); + sLog->outDebug(LOG_FILTER_UNITS, "MIN_DAMAGE is: \t\t%f\tMAX_DAMAGE is: \t\t%f",GetFloatValue(UNIT_FIELD_MINDAMAGE), GetFloatValue(UNIT_FIELD_MAXDAMAGE)); + sLog->outDebug(LOG_FILTER_UNITS, "MIN_OFFHAND_DAMAGE is: \t%f\tMAX_OFFHAND_DAMAGE is: \t%f",GetFloatValue(UNIT_FIELD_MINOFFHANDDAMAGE), GetFloatValue(UNIT_FIELD_MAXOFFHANDDAMAGE)); + sLog->outDebug(LOG_FILTER_UNITS, "MIN_RANGED_DAMAGE is: \t%f\tMAX_RANGED_DAMAGE is: \t%f",GetFloatValue(UNIT_FIELD_MINRANGEDDAMAGE), GetFloatValue(UNIT_FIELD_MAXRANGEDDAMAGE)); + sLog->outDebug(LOG_FILTER_UNITS, "ATTACK_TIME is: \t%u\t\tRANGE_ATTACK_TIME is: \t%u",GetAttackTime(BASE_ATTACK), GetAttackTime(RANGED_ATTACK)); } /*********************************************************/ @@ -18662,7 +18662,7 @@ void Player::SavePositionInDB(uint32 mapid, float x,float y,float z,float o,uint << "',position_z='"<<z<<"',orientation='"<<o<<"',map='"<<mapid << "',zone='"<<zone<<"',trans_x='0',trans_y='0',trans_z='0'," << "transguid='0',taxi_path='' WHERE guid='"<< GUID_LOPART(guid) <<"'"; - sLog->outDebug("%s", ss.str().c_str()); + sLog->outDebug(LOG_FILTER_UNITS, "%s", ss.str().c_str()); CharacterDatabase.Execute(ss.str().c_str()); } @@ -18906,7 +18906,7 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent) if (pet) { - sLog->outDebug("RemovePet %u, %u, %u", pet->GetEntry(), mode, returnreagent); + sLog->outDebug(LOG_FILTER_PETS,"RemovePet %u, %u, %u", pet->GetEntry(), mode, returnreagent); if (pet->m_removed) return; @@ -19098,7 +19098,7 @@ void Player::PetSpellInitialize() if (!pet) return; - sLog->outDebug("Pet Spells Groups"); + sLog->outDebug(LOG_FILTER_PETS,"Pet Spells Groups"); CharmInfo *charmInfo = pet->GetCharmInfo(); @@ -19219,7 +19219,7 @@ void Player::VehicleSpellInitialize() ConditionList conditions = sConditionMgr->GetConditionsForVehicleSpell(veh->ToCreature()->GetEntry(), spellId); if (!sConditionMgr->IsPlayerMeetToConditions(this, conditions)) { - sLog->outDebug("VehicleSpellInitialize: conditions not met for Vehicle entry %u spell %u", veh->ToCreature()->GetEntry(), spellId); + sLog->outDebug(LOG_FILTER_CONDITIONSYS, "VehicleSpellInitialize: conditions not met for Vehicle entry %u spell %u", veh->ToCreature()->GetEntry(), spellId); continue; } if (IsPassiveSpell(spellId)) @@ -19318,7 +19318,7 @@ bool Player::IsAffectedBySpellmod(SpellEntry const *spellInfo, SpellModifier *mo void Player::AddSpellMod(SpellModifier* mod, bool apply) { - sLog->outDebug("Player::AddSpellMod %d", mod->spellId); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Player::AddSpellMod %d", mod->spellId); uint16 Opcode = (mod->type == SPELLMOD_FLAT) ? SMSG_SET_FLAT_SPELL_MODIFIER : SMSG_SET_PCT_SPELL_MODIFIER; int i = 0; @@ -19755,7 +19755,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4); data << uint32(ERR_TAXIOK); GetSession()->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_ACTIVATETAXIREPLY"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_ACTIVATETAXIREPLY"); GetSession()->SendDoFlight(mount_display_id, sourcepath); } return true; @@ -19790,7 +19790,7 @@ void Player::ContinueTaxiFlight() if (!sourceNode) return; - sLog->outDebug("WORLD: Restart character %u taxi flight", GetGUIDLow()); + sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Restart character %u taxi flight", GetGUIDLow()); uint32 mountDisplayId = sObjectMgr->GetTaxiMountDisplayId(sourceNode, GetTeam(),true); uint32 path = m_taxi.GetCurrentTaxiPath(); @@ -20031,7 +20031,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 Creature *pCreature = GetNPCIfCanInteractWith(vendorguid,UNIT_NPC_FLAG_VENDOR); if (!pCreature) { - sLog->outDebug("WORLD: BuyItemFromVendor - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: BuyItemFromVendor - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid))); SendBuyError(BUY_ERR_DISTANCE_TOO_FAR, NULL, item, 0); return false; } @@ -20206,7 +20206,7 @@ void Player::UpdateHomebindTime(uint32 time) data << uint32(m_HomebindTimer); data << uint32(1); GetSession()->SendPacket(&data); - sLog->outDebug("PLAYER: Player '%s' (GUID: %u) will be teleported to homebind in 60 seconds", GetName(),GetGUIDLow()); + sLog->outDebug(LOG_FILTER_MAPS, "PLAYER: Player '%s' (GUID: %u) will be teleported to homebind in 60 seconds", GetName(),GetGUIDLow()); } } @@ -20478,7 +20478,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot) } } - sLog->outDebug("Checking Condition %u, there are %u Meta Gems, %u Red Gems, %u Yellow Gems and %u Blue Gems, Activate:%s", enchantmentcondition, curcount[0], curcount[1], curcount[2], curcount[3], activate ? "yes" : "no"); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Checking Condition %u, there are %u Meta Gems, %u Red Gems, %u Yellow Gems and %u Blue Gems, Activate:%s", enchantmentcondition, curcount[0], curcount[1], curcount[2], curcount[3], activate ? "yes" : "no"); return activate; } @@ -20796,8 +20796,7 @@ void Player::UpdateVisibilityOf(WorldObject* target) m_clientGUIDs.erase(target->GetGUID()); #ifdef TRINITY_DEBUG - if ((sLog->getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES) == 0) - sLog->outDebug("Object %u (Type: %u) out of range for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),GetGUIDLow(),GetDistance(target)); + sLog->outDebug(LOG_FILTER_MAPS, "Object %u (Type: %u) out of range for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),GetGUIDLow(),GetDistance(target)); #endif } } @@ -20812,8 +20811,7 @@ void Player::UpdateVisibilityOf(WorldObject* target) m_clientGUIDs.insert(target->GetGUID()); #ifdef TRINITY_DEBUG - if ((sLog->getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES) == 0) - sLog->outDebug("Object %u (Type: %u) is visible now for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),GetGUIDLow(),GetDistance(target)); + sLog->outDebug(LOG_FILTER_MAPS, "Object %u (Type: %u) is visible now for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),GetGUIDLow(),GetDistance(target)); #endif // target aura duration for caster show only if target exist at caster client @@ -20871,8 +20869,7 @@ void Player::UpdateVisibilityOf(T* target, UpdateData& data, std::set<Unit*>& vi m_clientGUIDs.erase(target->GetGUID()); #ifdef TRINITY_DEBUG - if ((sLog->getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES) == 0) - sLog->outDebug("Object %u (Type: %u, Entry: %u) is out of range for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),target->GetEntry(),GetGUIDLow(),GetDistance(target)); + sLog->outDebug(LOG_FILTER_MAPS, "Object %u (Type: %u, Entry: %u) is out of range for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),target->GetEntry(),GetGUIDLow(),GetDistance(target)); #endif } } @@ -20887,8 +20884,7 @@ void Player::UpdateVisibilityOf(T* target, UpdateData& data, std::set<Unit*>& vi UpdateVisibilityOf_helper(m_clientGUIDs,target,visibleNow); #ifdef TRINITY_DEBUG - if ((sLog->getLogFilter() & LOG_FILTER_VISIBILITY_CHANGES) == 0) - sLog->outDebug("Object %u (Type: %u, Entry: %u) is visible now for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),target->GetEntry(),GetGUIDLow(),GetDistance(target)); + sLog->outDebug(LOG_FILTER_MAPS, "Object %u (Type: %u, Entry: %u) is visible now for player %u. Distance = %f",target->GetGUIDLow(),target->GetTypeId(),target->GetEntry(),GetGUIDLow(),GetDistance(target)); #endif } } @@ -21320,7 +21316,7 @@ void Player::learnDefaultSpells() for (PlayerCreateInfoSpells::const_iterator itr = info->spell.begin(); itr != info->spell.end(); ++itr) { uint32 tspell = *itr; - sLog->outDebug("PLAYER (Class: %u Race: %u): Adding initial spell, id = %u",uint32(getClass()),uint32(getRace()), tspell); + sLog->outDebug(LOG_FILTER_PLAYER_LOADING, "PLAYER (Class: %u Race: %u): Adding initial spell, id = %u",uint32(getClass()),uint32(getRace()), tspell); if (!IsInWorld()) // will send in INITIAL_SPELLS in list anyway at map add addSpell(tspell,true,true,true,false); else // but send in normal spell in game learn case @@ -22540,7 +22536,7 @@ void Player::SetViewpoint(WorldObject* target, bool apply) { if (apply) { - sLog->outDebug("Player::CreateViewpoint: Player %s create seer %u (TypeId: %u).", GetName(), target->GetEntry(), target->GetTypeId()); + sLog->outDebug(LOG_FILTER_MAPS, "Player::CreateViewpoint: Player %s create seer %u (TypeId: %u).", GetName(), target->GetEntry(), target->GetTypeId()); if (!AddUInt64Value(PLAYER_FARSIGHT, target->GetGUID())) { @@ -22556,7 +22552,7 @@ void Player::SetViewpoint(WorldObject* target, bool apply) } else { - sLog->outDebug("Player::CreateViewpoint: Player %s remove seer", GetName()); + sLog->outDebug(LOG_FILTER_MAPS, "Player::CreateViewpoint: Player %s remove seer", GetName()); if (!RemoveUInt64Value(PLAYER_FARSIGHT, target->GetGUID())) { @@ -24285,13 +24281,13 @@ void Player::SendRefundInfo(Item *item) if (!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE)) { - sLog->outDebug("Item refund: item not refundable!"); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item refund: item not refundable!"); return; } if (GetGUIDLow() != item->GetRefundRecipient()) // Formerly refundable item got traded { - sLog->outDebug("Item refund: item was traded!"); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item refund: item was traded!"); item->SetNotRefundable(this); return; } @@ -24299,7 +24295,7 @@ void Player::SendRefundInfo(Item *item) ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(item->GetPaidExtendedCost()); if (!iece) { - sLog->outDebug("Item refund: cannot find extendedcost data."); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item refund: cannot find extendedcost data."); return; } @@ -24345,7 +24341,7 @@ void Player::RefundItem(Item *item) { if (!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_REFUNDABLE)) { - sLog->outDebug("Item refund: item not refundable!"); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item refund: item not refundable!"); return; } @@ -24361,7 +24357,7 @@ void Player::RefundItem(Item *item) if (GetGUIDLow() != item->GetRefundRecipient()) // Formerly refundable item got traded { - sLog->outDebug("Item refund: item was traded!"); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item refund: item was traded!"); item->SetNotRefundable(this); return; } @@ -24369,7 +24365,7 @@ void Player::RefundItem(Item *item) ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(item->GetPaidExtendedCost()); if (!iece) { - sLog->outDebug("Item refund: cannot find extendedcost data."); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item refund: cannot find extendedcost data."); return; } diff --git a/src/server/game/Entities/Player/SocialMgr.cpp b/src/server/game/Entities/Player/SocialMgr.cpp index 4f7037cfbdc..dbf9e29f87a 100755 --- a/src/server/game/Entities/Player/SocialMgr.cpp +++ b/src/server/game/Entities/Player/SocialMgr.cpp @@ -144,7 +144,7 @@ void PlayerSocial::SendSocialList(Player* plr) } plr->GetSession()->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_CONTACT_LIST"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_CONTACT_LIST"); } bool PlayerSocial::HasFriend(uint32 friend_guid) diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index 11f4cebf864..7afa683d4b3 100755 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -576,11 +576,10 @@ void Transport::Update(uint32 p_diff) m_nextNodeTime = m_curr->first; - if (m_curr == m_WayPoints.begin() && (sLog->getLogFilter() & LOG_FILTER_TRANSPORT_MOVES) == 0) - sLog->outDetail(" ************ BEGIN ************** %s", m_name.c_str()); + if (m_curr == m_WayPoints.begin()) + sLog->outDebug(LOG_FILTER_TRANSPORTS," ************ BEGIN ************** %s", m_name.c_str()); - if ((sLog->getLogFilter() & LOG_FILTER_TRANSPORT_MOVES) == 0) - sLog->outDetail("%s moved to %d %f %f %f %d", m_name.c_str(), m_curr->second.id, m_curr->second.x, m_curr->second.y, m_curr->second.z, m_curr->second.mapid); + sLog->outDebug(LOG_FILTER_TRANSPORTS, "%s moved to %d %f %f %f %d", m_name.c_str(), m_curr->second.id, m_curr->second.x, m_curr->second.y, m_curr->second.z, m_curr->second.mapid); } sScriptMgr->OnTransportUpdate(this, p_diff); @@ -623,7 +622,7 @@ void Transport::DoEventIfAny(WayPointMap::value_type const& node, bool departure { if (uint32 eventid = departure ? node.second.departureEventID : node.second.arrivalEventID) { - sLog->outDebug("Taxi %s event %u of node %u of %s path", departure ? "departure" : "arrival", eventid, node.first, GetName()); + sLog->outDebug(LOG_FILTER_MAPSCRIPTS, "Taxi %s event %u of node %u of %s path", departure ? "departure" : "arrival", eventid, node.first, GetName()); GetMap()->ScriptsStart(sEventScripts, eventid, this, this); EventInform(eventid); } diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index e5684729f6e..1ad52613687 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1074,7 +1074,7 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss) SpellEntry const *spellProto = sSpellStore.LookupEntry(damageInfo->SpellID); if (spellProto == NULL) { - sLog->outDebug("Unit::DealSpellDamage have wrong damageInfo->SpellID: %u", damageInfo->SpellID); + sLog->outDebug(LOG_FILTER_UNITS, "Unit::DealSpellDamage have wrong damageInfo->SpellID: %u", damageInfo->SpellID); return; } @@ -2933,7 +2933,7 @@ void Unit::InterruptSpell(CurrentSpellTypes spellType, bool withDelayed, bool wi { ASSERT(spellType < CURRENT_MAX_SPELL); - //sLog->outDebug("Interrupt spell for unit %u.", GetEntry()); + //sLog->outDebug(LOG_FILTER_UNITS, "Interrupt spell for unit %u.", GetEntry()); Spell *spell = m_currentSpells[spellType]; if (spell && (withDelayed || spell->getState() != SPELL_STATE_DELAYED) @@ -3227,7 +3227,7 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMo ASSERT(aurApp->GetTarget() == this); aurApp->SetRemoveMode(removeMode); Aura * aura = aurApp->GetBase(); - sLog->outDebug("Aura %u now is remove mode %d", aura->GetId(), removeMode); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS,"Aura %u now is remove mode %d", aura->GetId(), removeMode); // dead loop is killing the server probably ASSERT(m_removedAurasCount < 0xFFFFFFFF); @@ -3990,7 +3990,7 @@ void Unit::DelayOwnedAuras(uint32 spellId, uint64 caster, int32 delaytime) // update for out of range group members (on 1 slot use) aura->SetNeedClientUpdateForTargets(); - sLog->outDebug("Aura %u partially interrupted on unit %u, new duration: %u ms",aura->GetId() , GetGUIDLow(), aura->GetDuration()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura %u partially interrupted on unit %u, new duration: %u ms",aura->GetId() , GetGUIDLow(), aura->GetDuration()); } } } @@ -4733,7 +4733,7 @@ void Unit::SendSpellDamageImmune(Unit * target, uint32 spellId) void Unit::SendAttackStateUpdate(CalcDamageInfo *damageInfo) { - sLog->outDebug("WORLD: Sending SMSG_ATTACKERSTATEUPDATE"); + sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Sending SMSG_ATTACKERSTATEUPDATE"); uint32 count = 1; size_t maxsize = 4+5+5+4+4+1+4+4+4+4+4+1+4+4+4+4+4*12; @@ -4974,11 +4974,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger { // return damage % to attacker but < 50% own total health basepoints0 = int32(std::min(CalculatePctN(damage, triggerAmount), CountPctFromMaxHealth(50))); - - sLog->outDebug("DEBUG LINE: Data about Eye for an Eye ID %u, damage taken %u, unit max health %u, damage done %u", dummySpell->Id, damage, GetMaxHealth(), basepoints0); - triggered_spell_id = 25997; - break; } // Sweeping Strikes @@ -9471,7 +9467,7 @@ Unit* Unit::GetCharm() const void Unit::SetMinion(Minion *minion, bool apply) { - sLog->outDebug("SetMinion %u for %u, apply %u", minion->GetEntry(), GetEntry(), apply); + sLog->outDebug(LOG_FILTER_UNITS, "SetMinion %u for %u, apply %u", minion->GetEntry(), GetEntry(), apply); if (apply) { @@ -13927,7 +13923,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag, bool handled = false; if (HandleAuraProc(pTarget, damage, i->aura, procSpell, procFlag, procExtra, cooldown, &handled)) { - sLog->outDebug("ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), Id); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), Id); takeCharges = true; } @@ -13944,7 +13940,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag, { case SPELL_AURA_PROC_TRIGGER_SPELL: { - sLog->outDebug("ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); // Don`t drop charge or add cooldown for not started trigger if (HandleProcTriggerSpell(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown)) takeCharges = true; @@ -13952,7 +13948,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag, } case SPELL_AURA_PROC_TRIGGER_DAMAGE: { - sLog->outDebug("ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", triggeredByAura->GetAmount() , spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", triggeredByAura->GetAmount() , spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); SpellNonMeleeDamage damageInfo(this, pTarget, spellInfo->Id, spellInfo->SchoolMask); uint32 damage = SpellDamageBonus(pTarget, spellInfo, triggeredByAura->GetAmount(), SPELL_DIRECT_DAMAGE); CalculateSpellDamageTaken(&damageInfo, damage, spellInfo); @@ -13965,38 +13961,38 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag, case SPELL_AURA_MANA_SHIELD: case SPELL_AURA_DUMMY: { - sLog->outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); if (HandleDummyAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown)) takeCharges = true; break; } case SPELL_AURA_OBS_MOD_POWER: - sLog->outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); if (HandleObsModEnergyAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown)) takeCharges = true; break; case SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN: - sLog->outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); if (HandleModDamagePctTakenAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown)) takeCharges = true; break; case SPELL_AURA_MOD_MELEE_HASTE: { - sLog->outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s haste aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell id %u (triggered by %s haste aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); if (HandleHasteAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown)) takeCharges = true; break; } case SPELL_AURA_OVERRIDE_CLASS_SCRIPTS: { - sLog->outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); if (HandleOverrideClassScriptAuraProc(pTarget, damage, triggeredByAura, procSpell, cooldown)) takeCharges = true; break; } case SPELL_AURA_RAID_PROC_FROM_CHARGE_WITH_VALUE: { - sLog->outDebug("ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)", + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)", (isVictim?"a victim's":"an attacker's"),triggeredByAura->GetId()); HandleAuraRaidProcFromChargeWithValue(triggeredByAura); @@ -14005,7 +14001,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag, } case SPELL_AURA_RAID_PROC_FROM_CHARGE: { - sLog->outDebug("ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)", + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)", (isVictim?"a victim's":"an attacker's"),triggeredByAura->GetId()); HandleAuraRaidProcFromCharge(triggeredByAura); @@ -14014,7 +14010,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag, } case SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE: { - sLog->outDebug("ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); if (HandleProcTriggerSpell(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown)) takeCharges = true; @@ -14054,7 +14050,7 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit * pTarget, uint32 procFlag, takeCharges = true; break; case SPELL_AURA_MOD_SPELL_CRIT_CHANCE: - sLog->outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s spell crit chance aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "ProcDamageAndSpell: casting spell id %u (triggered by %s spell crit chance aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId()); if (procSpell && HandleSpellCritChanceAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown)) takeCharges = true; break; @@ -14791,7 +14787,7 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue(AuraEffect *triggeredByAura) //Currently only Prayer of Mending if (!(spellProto->SpellFamilyName == SPELLFAMILY_PRIEST && spellProto->SpellFamilyFlags[1] & 0x20)) { - sLog->outDebug("Unit::HandleAuraRaidProcFromChargeWithValue, received not handled spell: %u", spellProto->Id); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Unit::HandleAuraRaidProcFromChargeWithValue, received not handled spell: %u", spellProto->Id); return false; } @@ -15374,7 +15370,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const * a ASSERT(type != CHARM_TYPE_POSSESS || charmer->GetTypeId() == TYPEID_PLAYER); ASSERT((type == CHARM_TYPE_VEHICLE) == IsVehicle()); - sLog->outDebug("SetCharmedBy: charmer %u (GUID %u), charmed %u (GUID %u), type %u.", charmer->GetEntry(), charmer->GetGUIDLow(), GetEntry(), GetGUIDLow(), uint32(type)); + sLog->outDebug(LOG_FILTER_UNITS, "SetCharmedBy: charmer %u (GUID %u), charmed %u (GUID %u), type %u.", charmer->GetEntry(), charmer->GetGUIDLow(), GetEntry(), GetGUIDLow(), uint32(type)); if (this == charmer) { @@ -16416,14 +16412,14 @@ void Unit::EnterVehicle(Vehicle *vehicle, int8 seatId, AuraApplication const * a { if (seatId >= 0 && seatId != GetTransSeat()) { - sLog->outDebug("EnterVehicle: %u leave vehicle %u seat %d and enter %d.", GetEntry(), m_vehicle->GetBase()->GetEntry(), GetTransSeat(), seatId); + sLog->outDebug(LOG_FILTER_VEHICLES, "EnterVehicle: %u leave vehicle %u seat %d and enter %d.", GetEntry(), m_vehicle->GetBase()->GetEntry(), GetTransSeat(), seatId); ChangeSeat(seatId); } return; } else { - sLog->outDebug("EnterVehicle: %u exit %u and enter %u.", GetEntry(), m_vehicle->GetBase()->GetEntry(), vehicle->GetBase()->GetEntry()); + sLog->outDebug(LOG_FILTER_VEHICLES, "EnterVehicle: %u exit %u and enter %u.", GetEntry(), m_vehicle->GetBase()->GetEntry(), vehicle->GetBase()->GetEntry()); ExitVehicle(); } } @@ -16643,7 +16639,7 @@ bool Unit::SetPosition(float x, float y, float z, float orientation, bool telepo // prevent crash when a bad coord is sent by the client if (!Trinity::IsValidMapCoord(x,y,z,orientation)) { - sLog->outDebug("Unit::SetPosition(%f, %f, %f) .. bad coordinates!",x,y,z); + sLog->outDebug(LOG_FILTER_UNITS, "Unit::SetPosition(%f, %f, %f) .. bad coordinates!",x,y,z); return false; } @@ -16676,7 +16672,7 @@ void Unit::SendThreatListUpdate() { if (uint32 count = getThreatManager().getThreatList().size()) { - //sLog->outDebug("WORLD: Send SMSG_THREAT_UPDATE Message"); + //sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_THREAT_UPDATE Message"); WorldPacket data(SMSG_THREAT_UPDATE, 8 + count * 8); data.append(GetPackGUID()); data << uint32(count); @@ -16694,7 +16690,7 @@ void Unit::SendChangeCurrentVictimOpcode(HostileReference* pHostileReference) { if (uint32 count = getThreatManager().getThreatList().size()) { - sLog->outDebug("WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message"); + sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message"); WorldPacket data(SMSG_HIGHEST_THREAT_UPDATE, 8 + 8 + count * 8); data.append(GetPackGUID()); data.appendPackGUID(pHostileReference->getUnitGuid()); @@ -16711,7 +16707,7 @@ void Unit::SendChangeCurrentVictimOpcode(HostileReference* pHostileReference) void Unit::SendClearThreatListOpcode() { - sLog->outDebug("WORLD: Send SMSG_THREAT_CLEAR Message"); + sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_THREAT_CLEAR Message"); WorldPacket data(SMSG_THREAT_CLEAR, 8); data.append(GetPackGUID()); SendMessageToSet(&data, false); @@ -16719,7 +16715,7 @@ void Unit::SendClearThreatListOpcode() void Unit::SendRemoveFromThreatListOpcode(HostileReference* pHostileReference) { - sLog->outDebug("WORLD: Send SMSG_THREAT_REMOVE Message"); + sLog->outDebug(LOG_FILTER_UNITS, "WORLD: Send SMSG_THREAT_REMOVE Message"); WorldPacket data(SMSG_THREAT_REMOVE, 8 + 8); data.append(GetPackGUID()); data.appendPackGUID(pHostileReference->getUnitGuid()); diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index b73db80185c..4709df49cc9 100755 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -129,7 +129,7 @@ void Vehicle::InstallAllAccessories(uint32 entry) void Vehicle::Uninstall() { - sLog->outDebug("Vehicle::Uninstall %u", me->GetEntry()); + sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Uninstall %u", me->GetEntry()); for (SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr) if (Unit *passenger = ObjectAccessor::GetUnit(*GetBase(), itr->second.passenger)) if (passenger->HasUnitTypeMask(UNIT_MASK_ACCESSORY)) @@ -143,7 +143,7 @@ void Vehicle::Uninstall() void Vehicle::Die() { - sLog->outDebug("Vehicle::Die %u", me->GetEntry()); + sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Die %u", me->GetEntry()); for (SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr) if (Unit *passenger = ObjectAccessor::GetUnit(*GetBase(), itr->second.passenger)) if (passenger->HasUnitTypeMask(UNIT_MASK_ACCESSORY)) @@ -157,7 +157,7 @@ void Vehicle::Die() void Vehicle::Reset() { - sLog->outDebug("Vehicle::Reset"); + sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Reset"); if (me->GetTypeId() == TYPEID_PLAYER) { if (m_usableSeatNum) @@ -176,7 +176,7 @@ void Vehicle::Reset() void Vehicle::RemoveAllPassengers() { - sLog->outDebug("Vehicle::RemoveAllPassengers"); + sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::RemoveAllPassengers"); for (SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr) if (Unit *passenger = ObjectAccessor::GetUnit(*GetBase(), itr->second.passenger)) { @@ -309,7 +309,7 @@ bool Vehicle::AddPassenger(Unit *unit, int8 seatId) ASSERT(!seat->second.passenger); } - sLog->outDebug("Unit %s enter vehicle entry %u id %u dbguid %u seat %d", unit->GetName(), me->GetEntry(), m_vehicleInfo->m_ID, me->GetGUIDLow(), (int32)seat->first); + sLog->outDebug(LOG_FILTER_VEHICLES, "Unit %s enter vehicle entry %u id %u dbguid %u seat %d", unit->GetName(), me->GetEntry(), m_vehicleInfo->m_ID, me->GetGUIDLow(), (int32)seat->first); seat->second.passenger = unit->GetGUID(); if (seat->second.seatInfo->CanEnterOrExit()) @@ -397,7 +397,7 @@ void Vehicle::RemovePassenger(Unit *unit) SeatMap::iterator seat = GetSeatIteratorForPassenger(unit); ASSERT(seat != m_Seats.end()); - sLog->outDebug("Unit %s exit vehicle entry %u id %u dbguid %u seat %d", unit->GetName(), me->GetEntry(), m_vehicleInfo->m_ID, me->GetGUIDLow(), (int32)seat->first); + sLog->outDebug(LOG_FILTER_VEHICLES, "Unit %s exit vehicle entry %u id %u dbguid %u seat %d", unit->GetName(), me->GetEntry(), m_vehicleInfo->m_ID, me->GetGUIDLow(), (int32)seat->first); seat->second.passenger = 0; if (seat->second.seatInfo->CanEnterOrExit()) @@ -463,7 +463,7 @@ void Vehicle::RelocatePassengers(float x, float y, float z, float ang) void Vehicle::Dismiss() { - sLog->outDebug("Vehicle::Dismiss %u", me->GetEntry()); + sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Dismiss %u", me->GetEntry()); Uninstall(); me->SendObjectDeSpawnAnim(me->GetGUID()); me->CombatStop(); @@ -486,7 +486,7 @@ uint16 Vehicle::GetExtraMovementFlagsForBase() const if (vehicleFlags & VEHICLE_FLAG_FULLSPEEDPITCHING) movementMask |= MOVEMENTFLAG2_FULL_SPEED_PITCHING; - sLog->outDebug("Vehicle::GetExtraMovementFlagsForBase() returned %u", movementMask); + sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::GetExtraMovementFlagsForBase() returned %u", movementMask); return movementMask; } diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index a24ffc5711e..41564b49a2e 100755 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -1682,7 +1682,7 @@ uint32 ObjectMgr::AddGOData(uint32 entry, uint32 mapId, float x, float y, float map->Add(go); } - sLog->outDebug("AddGOData: dbguid %u entry %u map %u x %f y %f z %f o %f", guid, entry, mapId, x, y, z, o); + sLog->outDebug(LOG_FILTER_MAPS, "AddGOData: dbguid %u entry %u map %u x %f y %f z %f o %f", guid, entry, mapId, x, y, z, o); return guid; } @@ -5757,7 +5757,7 @@ void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp) time_t curTime = time(NULL); tm* lt = localtime(&curTime); uint64 basetime(curTime); - sLog->outDebug("Returning mails current time: hour: %d, minute: %d, second: %d ", lt->tm_hour, lt->tm_min, lt->tm_sec); + sLog->outDetail("Returning mails current time: hour: %d, minute: %d, second: %d ", lt->tm_hour, lt->tm_min, lt->tm_sec); // Delete all old mails without item and without body immediately, if starting server if (!serverUp) diff --git a/src/server/game/Grids/GridStates.cpp b/src/server/game/Grids/GridStates.cpp index f5106154e70..b7f910b6059 100755 --- a/src/server/game/Grids/GridStates.cpp +++ b/src/server/game/Grids/GridStates.cpp @@ -38,7 +38,7 @@ ActiveState::Update(Map &m, NGridType &grid, GridInfo & info, const uint32 &x, c ObjectGridStoper stoper(grid); stoper.StopN(); grid.SetGridState(GRID_STATE_IDLE); - sLog->outDebug("Grid[%u,%u] on map %u moved to IDLE state", x, y, m.GetId()); + sLog->outDebug(LOG_FILTER_MAPS, "Grid[%u,%u] on map %u moved to IDLE state", x, y, m.GetId()); } else { @@ -52,7 +52,7 @@ IdleState::Update(Map &m, NGridType &grid, GridInfo &, const uint32 &x, const ui { m.ResetGridExpiry(grid); grid.SetGridState(GRID_STATE_REMOVAL); - sLog->outDebug("Grid[%u,%u] on map %u moved to REMOVAL state", x, y, m.GetId()); + sLog->outDebug(LOG_FILTER_MAPS, "Grid[%u,%u] on map %u moved to REMOVAL state", x, y, m.GetId()); } void @@ -65,7 +65,7 @@ RemovalState::Update(Map &m, NGridType &grid, GridInfo &info, const uint32 &x, c { if (!m.UnloadGrid(x, y, false)) { - sLog->outDebug("Grid[%u,%u] for map %u differed unloading due to players or active objects nearby", x, y, m.GetId()); + sLog->outDebug(LOG_FILTER_MAPS, "Grid[%u,%u] for map %u differed unloading due to players or active objects nearby", x, y, m.GetId()); m.ResetGridExpiry(grid); } } diff --git a/src/server/game/Grids/ObjectGridLoader.cpp b/src/server/game/Grids/ObjectGridLoader.cpp index 89bf39b1fe5..4a9f11d892c 100755 --- a/src/server/game/Grids/ObjectGridLoader.cpp +++ b/src/server/game/Grids/ObjectGridLoader.cpp @@ -230,7 +230,7 @@ void ObjectGridLoader::LoadN(void) loader.Load(i_grid(x, y), *this); } } - sLog->outDebug("%u GameObjects, %u Creatures, and %u Corpses/Bones loaded for grid %u on map %u", i_gameObjects, i_creatures, i_corpses,i_grid.GetGridId(), i_map->GetId()); + sLog->outDebug(LOG_FILTER_MAPS, "%u GameObjects, %u Creatures, and %u Corpses/Bones loaded for grid %u on map %u", i_gameObjects, i_creatures, i_corpses,i_grid.GetGridId(), i_map->GetId()); } void ObjectGridUnloader::MoveToRespawnN() diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index fe0592777a4..bef3904bddb 100755 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -67,7 +67,7 @@ Group::~Group() { if (m_bgGroup) { - sLog->outDebug("Group::~Group: battleground group being deleted."); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Group::~Group: battleground group being deleted."); if (m_bgGroup->GetBgRaid(ALLIANCE) == this) m_bgGroup->SetBgRaid(ALLIANCE, NULL); else if (m_bgGroup->GetBgRaid(HORDE) == this) m_bgGroup->SetBgRaid(HORDE, NULL); else sLog->outError("Group::~Group: battleground group is not linked to the correct battleground."); @@ -934,7 +934,7 @@ void Group::NeedBeforeGreed(Loot *loot, WorldObject* pLootedObject) void Group::MasterLoot(Loot* /*loot*/, WorldObject* pLootedObject) { - sLog->outDebug("Group::MasterLoot (SMSG_LOOT_MASTER_LIST, 330)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Group::MasterLoot (SMSG_LOOT_MASTER_LIST, 330)"); uint32 real_count = 0; @@ -1747,7 +1747,7 @@ InstanceGroupBind* Group::BindToInstance(InstanceSave *save, bool permanent, boo bind.save = save; bind.perm = permanent; if (!load) - sLog->outDebug("Group::BindToInstance: %d is now bound to map %d, instance %d, difficulty %d", GUID_LOPART(GetGUID()), save->GetMapId(), save->GetInstanceId(), save->GetDifficulty()); + sLog->outDebug(LOG_FILTER_MAPS, "Group::BindToInstance: %d is now bound to map %d, instance %d, difficulty %d", GUID_LOPART(GetGUID()), save->GetMapId(), save->GetInstanceId(), save->GetDifficulty()); return &bind; } diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 9e11e3507af..96c6468821f 100755 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -49,7 +49,7 @@ void Guild::SendCommandResult(WorldSession* session, GuildCommandType type, Guil data << uint32(errCode); session->SendPacket(&data); - sLog->outDebug("WORLD: Sent (SMSG_GUILD_COMMAND_RESULT)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_COMMAND_RESULT)"); } void Guild::SendSaveEmblemResult(WorldSession* session, GuildEmblemError errCode) @@ -58,7 +58,7 @@ void Guild::SendSaveEmblemResult(WorldSession* session, GuildEmblemError errCode data << uint32(errCode); session->SendPacket(&data); - sLog->outDebug("WORLD: Sent (MSG_SAVE_GUILD_EMBLEM)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (MSG_SAVE_GUILD_EMBLEM)"); } /////////////////////////////////////////////////////////////////////////////// @@ -914,7 +914,7 @@ Item* Guild::BankMoveItemData::StoreItem(SQLTransaction& trans, Item* pItem) ItemPosCount pos(*itr); ++itr; - sLog->outDebug("GUILD STORAGE: StoreItem tab = %u, slot = %u, item = %u, count = %u", + sLog->outDebug(LOG_FILTER_GUILD, "GUILD STORAGE: StoreItem tab = %u, slot = %u, item = %u, count = %u", m_container, m_slotId, pItem->GetEntry(), pItem->GetCount()); pLastItem = _StoreItem(trans, pTab, pItem, pos, itr != m_vec.end()); } @@ -1023,7 +1023,7 @@ void Guild::BankMoveItemData::_CanStoreItemInTab(Item* pItem, uint8 skipSlotId, uint8 Guild::BankMoveItemData::_CanStore(Item* pItem, bool swap) { - sLog->outDebug("GUILD STORAGE: CanStore() tab = %u, slot = %u, item = %u, count = %u", + sLog->outDebug(LOG_FILTER_GUILD, "GUILD STORAGE: CanStore() tab = %u, slot = %u, item = %u, count = %u", m_container, m_slotId, pItem->GetEntry(), pItem->GetCount()); uint32 count = pItem->GetCount(); @@ -1109,7 +1109,7 @@ bool Guild::Create(Player* pLeader, const std::string& name) m_createdDate = ::time(NULL); _CreateLogHolders(); - sLog->outDebug("GUILD: creating guild [%s] for leader %s (%u)", + sLog->outDebug(LOG_FILTER_GUILD, "GUILD: creating guild [%s] for leader %s (%u)", name.c_str(), pLeader->GetName(), GUID_LOPART(m_leaderGuid)); PreparedStatement* stmt = NULL; @@ -1219,7 +1219,7 @@ void Guild::HandleRoster(WorldSession *session /*= NULL*/) session->SendPacket(&data); else BroadcastPacket(&data); - sLog->outDebug("WORLD: Sent (SMSG_GUILD_ROSTER)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_ROSTER)"); } void Guild::HandleQuery(WorldSession *session) @@ -1241,7 +1241,7 @@ void Guild::HandleQuery(WorldSession *session) data << uint32(0); // Something new in WotLK session->SendPacket(&data); - sLog->outDebug("WORLD: Sent (SMSG_GUILD_QUERY_RESPONSE)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_QUERY_RESPONSE)"); } void Guild::HandleSetMOTD(WorldSession* session, const std::string& motd) @@ -1365,7 +1365,7 @@ void Guild::HandleSetRankInfo(WorldSession* session, uint8 rankId, const std::st SendCommandResult(session, GUILD_INVITE_S, ERR_GUILD_PERMISSIONS); else if (RankInfo* rankInfo = GetRankInfo(rankId)) { - sLog->outDebug("WORLD: Changed RankName to '%s', rights to 0x%08X", name.c_str(), rights); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Changed RankName to '%s', rights to 0x%08X", name.c_str(), rights); rankInfo->SetName(name); rankInfo->SetRights(rights); @@ -1440,7 +1440,7 @@ void Guild::HandleInviteMember(WorldSession* session, const std::string& name) return; } - sLog->outDebug("Player %s invited %s to join his Guild", player->GetName(), name.c_str()); + sLog->outDebug(LOG_FILTER_GUILD, "Player %s invited %s to join his Guild", player->GetName(), name.c_str()); pInvitee->SetGuildIdInvited(m_id); _LogEvent(GUILD_EVENT_LOG_INVITE_PLAYER, player->GetGUIDLow(), pInvitee->GetGUIDLow()); @@ -1450,7 +1450,7 @@ void Guild::HandleInviteMember(WorldSession* session, const std::string& name) data << m_name; pInvitee->GetSession()->SendPacket(&data); - sLog->outDebug("WORLD: Sent (SMSG_GUILD_INVITE)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_INVITE)"); } void Guild::HandleAcceptMember(WorldSession* session) @@ -1714,7 +1714,7 @@ void Guild::HandleDisband(WorldSession* session) else { Disband(); - sLog->outDebug("WORLD: Guild Successfully Disbanded"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Guild Successfully Disbanded"); } } @@ -1729,7 +1729,7 @@ void Guild::SendInfo(WorldSession* session) const data << m_accountsNumber; // Number of accounts session->SendPacket(&data); - sLog->outDebug("WORLD: Sent (SMSG_GUILD_INFO)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_INFO)"); } void Guild::SendEventLog(WorldSession *session) const @@ -1737,7 +1737,7 @@ void Guild::SendEventLog(WorldSession *session) const WorldPacket data(MSG_GUILD_EVENT_LOG_QUERY, 1 + m_eventLog->GetSize() * (1 + 8 + 4)); m_eventLog->WritePacket(data); session->SendPacket(&data); - sLog->outDebug("WORLD: Sent (MSG_GUILD_EVENT_LOG_QUERY)"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (MSG_GUILD_EVENT_LOG_QUERY)"); } void Guild::SendBankLog(WorldSession *session, uint8 tabId) const @@ -1750,7 +1750,7 @@ void Guild::SendBankLog(WorldSession *session, uint8 tabId) const data << uint8(tabId); pLog->WritePacket(data); session->SendPacket(&data); - sLog->outDebug("WORLD: Sent (MSG_GUILD_BANK_LOG_QUERY)"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (MSG_GUILD_BANK_LOG_QUERY)"); } } @@ -1779,7 +1779,7 @@ void Guild::SendBankTabsInfo(WorldSession *session) const data << uint8(0); // Do not send tab content session->SendPacket(&data); - sLog->outDebug("WORLD: Sent (SMSG_GUILD_BANK_LIST)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)"); } void Guild::SendBankTabText(WorldSession *session, uint8 tabId) const @@ -1805,7 +1805,7 @@ void Guild::SendPermissions(WorldSession *session) const data << uint32(_GetMemberRemainingSlots(guid, tabId)); } session->SendPacket(&data); - sLog->outDebug("WORLD: Sent (MSG_GUILD_PERMISSIONS)"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent (MSG_GUILD_PERMISSIONS)"); } void Guild::SendMoneyInfo(WorldSession *session) const @@ -1813,7 +1813,7 @@ void Guild::SendMoneyInfo(WorldSession *session) const WorldPacket data(MSG_GUILD_BANK_MONEY_WITHDRAWN, 4); data << uint32(_GetMemberRemainingMoney(session->GetPlayer()->GetGUID())); session->SendPacket(&data); - sLog->outDebug("WORLD: Sent MSG_GUILD_BANK_MONEY_WITHDRAWN"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent MSG_GUILD_BANK_MONEY_WITHDRAWN"); } void Guild::SendLoginInfo(WorldSession* session) const @@ -1823,7 +1823,7 @@ void Guild::SendLoginInfo(WorldSession* session) const data << uint8(1); data << m_motd; session->SendPacket(&data); - sLog->outDebug("WORLD: Sent guild MOTD (SMSG_GUILD_EVENT)"); + sLog->outDebug(LOG_FILTER_GUILD, "WORLD: Sent guild MOTD (SMSG_GUILD_EVENT)"); SendBankTabsInfo(session); @@ -2648,7 +2648,7 @@ void Guild::_SendBankContent(WorldSession *session, uint8 tabId) const session->SendPacket(&data); - sLog->outDebug("WORLD: Sent (SMSG_GUILD_BANK_LIST)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)"); } } @@ -2663,7 +2663,7 @@ void Guild::_SendBankMoneyUpdate(WorldSession *session) const data << uint8(0); // No items BroadcastPacket(&data); - sLog->outDebug("WORLD: Sent (SMSG_GUILD_BANK_LIST)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)"); } void Guild::_SendBankContentUpdate(MoveItemData* pSrc, MoveItemData* pDest) const @@ -2723,7 +2723,7 @@ void Guild::_SendBankContentUpdate(uint8 tabId, SlotIds slots) const player->GetSession()->SendPacket(&data); } - sLog->outDebug("WORLD: Sent (SMSG_GUILD_BANK_LIST)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_GUILD_BANK_LIST)"); } } @@ -2747,5 +2747,5 @@ void Guild::_BroadcastEvent(GuildEvents guildEvent, const uint64& guid, const ch BroadcastPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_GUILD_EVENT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_GUILD_EVENT"); } diff --git a/src/server/game/Instances/InstanceSaveMgr.cpp b/src/server/game/Instances/InstanceSaveMgr.cpp index ad385a7334d..e0a97059a2a 100755 --- a/src/server/game/Instances/InstanceSaveMgr.cpp +++ b/src/server/game/Instances/InstanceSaveMgr.cpp @@ -106,7 +106,7 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance } } - sLog->outDebug("InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d", mapId, instanceId); + sLog->outDebug(LOG_FILTER_MAPS, "InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d", mapId, instanceId); InstanceSave *save = new InstanceSave(mapId, instanceId, difficulty, resetTime, canReset); if (!load) @@ -547,7 +547,7 @@ void InstanceSaveManager::_ResetSave(InstanceSaveHashMap::iterator &itr) void InstanceSaveManager::_ResetInstance(uint32 mapid, uint32 instanceId) { - sLog->outDebug("InstanceSaveMgr::_ResetInstance %u, %u", mapid, instanceId); + sLog->outDebug(LOG_FILTER_MAPS, "InstanceSaveMgr::_ResetInstance %u, %u", mapid, instanceId); Map *map = (MapInstanced*)sMapMgr->CreateBaseMap(mapid); if (!map->Instanceable()) return; diff --git a/src/server/game/Instances/InstanceScript.cpp b/src/server/game/Instances/InstanceScript.cpp index 231d6ab6667..eb480c72bcc 100755 --- a/src/server/game/Instances/InstanceScript.cpp +++ b/src/server/game/Instances/InstanceScript.cpp @@ -46,7 +46,7 @@ void InstanceScript::HandleGameObject(uint64 GUID, bool open, GameObject *go) if (go) go->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY); else - sLog->outDebug("TSCR: InstanceScript: HandleGameObject failed"); + sLog->outDebug(LOG_FILTER_TSCR, "TSCR: InstanceScript: HandleGameObject failed"); } bool InstanceScript::IsEncounterInProgress() const @@ -67,7 +67,7 @@ void InstanceScript::LoadMinionData(const MinionData *data) ++data; } - sLog->outDebug("InstanceScript::LoadMinionData: " UI64FMTD " minions loaded.", uint64(minions.size())); + sLog->outDebug(LOG_FILTER_TSCR, "InstanceScript::LoadMinionData: " UI64FMTD " minions loaded.", uint64(minions.size())); } void InstanceScript::LoadDoorData(const DoorData *data) @@ -79,7 +79,7 @@ void InstanceScript::LoadDoorData(const DoorData *data) ++data; } - sLog->outDebug("InstanceScript::LoadDoorData: " UI64FMTD " doors loaded.", uint64(doors.size())); + sLog->outDebug(LOG_FILTER_TSCR, "InstanceScript::LoadDoorData: " UI64FMTD " doors loaded.", uint64(doors.size())); } void InstanceScript::UpdateMinionState(Creature *minion, EncounterState state) @@ -299,7 +299,7 @@ void InstanceScript::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData) pPlayer->SendUpdateWorldState(uiStateId, uiStateData); } else - sLog->outDebug("TSCR: DoUpdateWorldState attempt send data but no players in map."); + sLog->outDebug(LOG_FILTER_TSCR, "TSCR: DoUpdateWorldState attempt send data but no players in map."); } // Send Notify to all players in instance @@ -444,7 +444,7 @@ void InstanceScript::UpdateEncounterState(EncounterCreditType type, uint32 credi if ((*itr)->creditType == type && (*itr)->creditEntry == creditEntry) { completedEncounters |= 1 << (*itr)->dbcEntry->encounterIndex; - sLog->outDebug("Instance %s (instanceId %u) completed encounter %s", instance->GetMapName(), instance->GetInstanceId(), (*itr)->dbcEntry->encounterName[0]); + sLog->outDebug(LOG_FILTER_TSCR, "Instance %s (instanceId %u) completed encounter %s", instance->GetMapName(), instance->GetInstanceId(), (*itr)->dbcEntry->encounterName[0]); if (uint32 dungeonId = (*itr)->lastEncounterDungeon) { Map::PlayerList const& players = instance->GetPlayers(); diff --git a/src/server/game/Instances/InstanceScript.h b/src/server/game/Instances/InstanceScript.h index 2ba81c963a4..d04a3bef2a7 100755 --- a/src/server/game/Instances/InstanceScript.h +++ b/src/server/game/Instances/InstanceScript.h @@ -25,10 +25,10 @@ //#include "GameObject.h" //#include "Map.h" -#define OUT_SAVE_INST_DATA sLog->outDebug("TSCR: Saving Instance Data for Instance %s (Map %d, Instance Id %d)", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) -#define OUT_SAVE_INST_DATA_COMPLETE sLog->outDebug("TSCR: Saving Instance Data for Instance %s (Map %d, Instance Id %d) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) -#define OUT_LOAD_INST_DATA(a) sLog->outDebug("TSCR: Loading Instance Data for Instance %s (Map %d, Instance Id %d). Input is '%s'", instance->GetMapName(), instance->GetId(), instance->GetInstanceId(), a) -#define OUT_LOAD_INST_DATA_COMPLETE sLog->outDebug("TSCR: Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.",instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_SAVE_INST_DATA sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Saving Instance Data for Instance %s (Map %d, Instance Id %d)", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_SAVE_INST_DATA_COMPLETE sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Saving Instance Data for Instance %s (Map %d, Instance Id %d) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_LOAD_INST_DATA(a) sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Loading Instance Data for Instance %s (Map %d, Instance Id %d). Input is '%s'", instance->GetMapName(), instance->GetId(), instance->GetInstanceId(), a) +#define OUT_LOAD_INST_DATA_COMPLETE sLog->outDebug(LOG_FILTER_TSCR, "TSCR: Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.",instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) #define OUT_LOAD_INST_DATA_FAIL sLog->outError("TSCR: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).",instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) class Map; diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 1a158833072..5e7ee93a989 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -317,7 +317,7 @@ Map::EnsureGridCreated(const GridPair &p) ACE_GUARD(ACE_Thread_Mutex, Guard, Lock); if (!getNGrid(p.x_coord, p.y_coord)) { - sLog->outDebug("Creating grid[%u,%u] for map %u instance %u", p.x_coord, p.y_coord, GetId(), i_InstanceId); + sLog->outDebug(LOG_FILTER_MAPS, "Creating grid[%u,%u] for map %u instance %u", p.x_coord, p.y_coord, GetId(), i_InstanceId); setNGrid(new NGridType(p.x_coord*MAX_NUMBER_OF_GRIDS + p.y_coord, p.x_coord, p.y_coord, i_gridExpiry, sWorld->getBoolConfig(CONFIG_GRID_UNLOAD)), p.x_coord, p.y_coord); @@ -369,7 +369,7 @@ bool Map::EnsureGridLoaded(const Cell &cell) ASSERT(grid != NULL); if (!isGridObjectDataLoaded(cell.GridX(), cell.GridY())) { - sLog->outDebug("Loading grid[%u,%u] for map %u instance %u", cell.GridX(), cell.GridY(), GetId(), i_InstanceId); + sLog->outDebug(LOG_FILTER_MAPS, "Loading grid[%u,%u] for map %u instance %u", cell.GridX(), cell.GridY(), GetId(), i_InstanceId); setGridObjectDataLoaded(true,cell.GridX(), cell.GridY()); @@ -770,8 +770,7 @@ Map::CreatureRelocation(Creature *creature, float x, float y, float z, float ang if (old_cell.DiffCell(new_cell) || old_cell.DiffGrid(new_cell)) { #ifdef TRINITY_DEBUG - if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog->outDebug("Creature (GUID: %u Entry: %u) added to moving list from grid[%u,%u]cell[%u,%u] to grid[%u,%u]cell[%u,%u].", creature->GetGUIDLow(), creature->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + sLog->outDebug(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) added to moving list from grid[%u,%u]cell[%u,%u] to grid[%u,%u]cell[%u,%u].", creature->GetGUIDLow(), creature->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); #endif AddCreatureToMoveList(creature, x, y, z, ang); // in diffcell/diffgrid case notifiers called at finishing move creature in Map::MoveAllCreaturesInMoveList @@ -823,8 +822,7 @@ void Map::MoveAllCreaturesInMoveList() { // ... or unload (if respawn grid also not loaded) #ifdef TRINITY_DEBUG - if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog->outDebug("Creature (GUID: %u Entry: %u) cannot be move to unloaded respawn grid.",c->GetGUIDLow(),c->GetEntry()); + sLog->outDebug(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) cannot be move to unloaded respawn grid.",c->GetGUIDLow(),c->GetEntry()); #endif AddObjectToRemoveList(c); } @@ -841,8 +839,7 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell) if (old_cell.DiffCell(new_cell)) { #ifdef TRINITY_DEBUG - if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog->outDebug("Creature (GUID: %u Entry: %u) moved in grid[%u,%u] from cell[%u,%u] to cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY()); + sLog->outDebug(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) moved in grid[%u,%u] from cell[%u,%u] to cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.CellX(), new_cell.CellY()); #endif RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell); @@ -851,8 +848,7 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell) else { #ifdef TRINITY_DEBUG - if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog->outDebug("Creature (GUID: %u Entry: %u) moved in same grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY()); + sLog->outDebug(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) moved in same grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY()); #endif } @@ -865,8 +861,7 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell) EnsureGridLoadedAtEnter(new_cell); #ifdef TRINITY_DEBUG - if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog->outDebug("Active creature (GUID: %u Entry: %u) moved from grid[%u,%u]cell[%u,%u] to grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + sLog->outDebug(LOG_FILTER_MAPS, "Active creature (GUID: %u Entry: %u) moved from grid[%u,%u]cell[%u,%u] to grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); #endif RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell); @@ -879,8 +874,7 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell) if (loaded(GridPair(new_cell.GridX(), new_cell.GridY()))) { #ifdef TRINITY_DEBUG - if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog->outDebug("Creature (GUID: %u Entry: %u) moved from grid[%u,%u]cell[%u,%u] to grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + sLog->outDebug(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) moved from grid[%u,%u]cell[%u,%u] to grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); #endif RemoveFromGrid(c,getNGrid(old_cell.GridX(), old_cell.GridY()),old_cell); @@ -892,8 +886,7 @@ bool Map::CreatureCellRelocation(Creature *c, Cell new_cell) // fail to move: normal creature attempt move to unloaded grid #ifdef TRINITY_DEBUG - if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog->outDebug("Creature (GUID: %u Entry: %u) attempted to move from grid[%u,%u]cell[%u,%u] to unloaded grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); + sLog->outDebug(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) attempted to move from grid[%u,%u]cell[%u,%u] to unloaded grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY()); #endif return false; } @@ -910,8 +903,7 @@ bool Map::CreatureRespawnRelocation(Creature *c) c->GetMotionMaster()->Clear(); #ifdef TRINITY_DEBUG - if ((sLog->getLogFilter() & LOG_FILTER_CREATURE_MOVES) == 0) - sLog->outDebug("Creature (GUID: %u Entry: %u) moved from grid[%u,%u]cell[%u,%u] to respawn grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), c->GetCurrentCell().GridX(), c->GetCurrentCell().GridY(), c->GetCurrentCell().CellX(), c->GetCurrentCell().CellY(), resp_cell.GridX(), resp_cell.GridY(), resp_cell.CellX(), resp_cell.CellY()); + sLog->outDebug(LOG_FILTER_MAPS, "Creature (GUID: %u Entry: %u) moved from grid[%u,%u]cell[%u,%u] to respawn grid[%u,%u]cell[%u,%u].", c->GetGUIDLow(), c->GetEntry(), c->GetCurrentCell().GridX(), c->GetCurrentCell().GridY(), c->GetCurrentCell().CellX(), c->GetCurrentCell().CellY(), resp_cell.GridX(), resp_cell.GridY(), resp_cell.CellX(), resp_cell.CellY()); #endif // teleport it to respawn point (like normal respawn if player see) @@ -936,7 +928,7 @@ bool Map::UnloadGrid(const uint32 &x, const uint32 &y, bool unloadAll) if (!unloadAll && ActiveObjectsNearGrid(x, y)) return false; - sLog->outDebug("Unloading grid[%u,%u] for map %u", x,y, GetId()); + sLog->outDebug(LOG_FILTER_MAPS, "Unloading grid[%u,%u] for map %u", x,y, GetId()); ObjectGridUnloader unloader(*grid); @@ -1726,7 +1718,7 @@ ZLiquidStatus Map::getLiquidStatus(float x, float y, float z, uint8 ReqLiquidTyp uint32 liquid_type; if (vmgr->GetLiquidLevel(GetId(), x, y, z, ReqLiquidType, liquid_level, ground_level, liquid_type)) { - sLog->outDebug("getLiquidStatus(): vmap liquid level: %f ground: %f type: %u", liquid_level, ground_level, liquid_type); + sLog->outDebug(LOG_FILTER_MAPS, "getLiquidStatus(): vmap liquid level: %f ground: %f type: %u", liquid_level, ground_level, liquid_type); // Check water level and ground level if (liquid_level > ground_level && z > ground_level - 2) { @@ -1834,7 +1826,7 @@ bool Map::CheckGridIntegrity(Creature* c, bool moved) const Cell xy_cell(xy_val); if (xy_cell != cur_cell) { - sLog->outDebug("Creature (GUID: %u) X: %f Y: %f (%s) is in grid[%u,%u]cell[%u,%u] instead of grid[%u,%u]cell[%u,%u]", + sLog->outDebug(LOG_FILTER_MAPS, "Creature (GUID: %u) X: %f Y: %f (%s) is in grid[%u,%u]cell[%u,%u] instead of grid[%u,%u]cell[%u,%u]", c->GetGUIDLow(), c->GetPositionX(),c->GetPositionY(),(moved ? "final" : "original"), cur_cell.GridX(), cur_cell.GridY(), cur_cell.CellX(), cur_cell.CellY(), @@ -1992,7 +1984,7 @@ void Map::AddObjectToRemoveList(WorldObject *obj) obj->CleanupsBeforeDelete(false); // remove or simplify at least cross referenced links i_objectsToRemove.insert(obj); - //sLog->outDebug("Object (GUID: %u TypeId: %u) added to removing list.",obj->GetGUIDLow(),obj->GetTypeId()); + //sLog->outDebug(LOG_FILTER_MAPS, "Object (GUID: %u TypeId: %u) added to removing list.",obj->GetGUIDLow(),obj->GetTypeId()); } void Map::AddObjectToSwitchList(WorldObject *obj, bool on) @@ -2028,7 +2020,7 @@ void Map::RemoveAllObjectsInRemoveList() } } - //sLog->outDebug("Object remover 1 check."); + //sLog->outDebug(LOG_FILTER_MAPS, "Object remover 1 check."); while (!i_objectsToRemove.empty()) { std::set<WorldObject*>::iterator itr = i_objectsToRemove.begin(); @@ -2065,7 +2057,7 @@ void Map::RemoveAllObjectsInRemoveList() i_objectsToRemove.erase(itr); } - //sLog->outDebug("Object remover 2 check."); + //sLog->outDebug(LOG_FILTER_MAPS, "Object remover 2 check."); } uint32 Map::GetPlayersCountExceptGMs() const @@ -2433,7 +2425,7 @@ void InstanceMap::CreateInstanceData(bool load) i_data->SetCompletedEncountersMask(fields[1].GetUInt32()); if (data != "") { - sLog->outDebug("Loading instance data for `%s` with id %u", sObjectMgr->GetScriptName(i_script_id), i_InstanceId); + sLog->outDebug(LOG_FILTER_MAPS, "Loading instance data for `%s` with id %u", sObjectMgr->GetScriptName(i_script_id), i_InstanceId); i_data->Load(data.c_str()); } } diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp index ddcef2dc826..1567bcf2397 100755 --- a/src/server/game/Maps/MapInstanced.cpp +++ b/src/server/game/Maps/MapInstanced.cpp @@ -189,7 +189,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save, // some instances only have one difficulty GetDownscaledMapDifficultyData(GetId(),difficulty); - sLog->outDebug("MapInstanced::CreateInstance: %s map instance %d for %d created with difficulty %s", save?"":"new ", InstanceId, GetId(), difficulty?"heroic":"normal"); + sLog->outDebug(LOG_FILTER_MAPS, "MapInstanced::CreateInstance: %s map instance %d for %d created with difficulty %s", save?"":"new ", InstanceId, GetId(), difficulty?"heroic":"normal"); InstanceMap *map = new InstanceMap(GetId(), GetGridExpiry(), InstanceId, difficulty, this); ASSERT(map->IsDungeon()); @@ -206,7 +206,7 @@ BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battlegroun // load/create a map ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL); - sLog->outDebug("MapInstanced::CreateBattleground: map bg %d for %d created.", InstanceId, GetId()); + sLog->outDebug(LOG_FILTER_MAPS, "MapInstanced::CreateBattleground: map bg %d for %d created.", InstanceId, GetId()); PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(),bg->GetMinLevel()); diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index 2317f2296f1..fad07708a72 100755 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -187,7 +187,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck) // probably there must be special opcode, because client has this string constant in GlobalStrings.lua // TODO: this is not a good place to send the message player->GetSession()->SendAreaTriggerMessage(player->GetSession()->GetTrinityString(LANG_INSTANCE_RAID_GROUP_ONLY), mapName); - sLog->outDebug("MAP: Player '%s' must be in a raid group to enter instance '%s'", player->GetName(), mapName); + sLog->outDebug(LOG_FILTER_MAPS, "MAP: Player '%s' must be in a raid group to enter instance '%s'", player->GetName(), mapName); return false; } } @@ -211,13 +211,13 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck) { WorldPacket data(SMSG_CORPSE_NOT_IN_INSTANCE); player->GetSession()->SendPacket(&data); - sLog->outDebug("MAP: Player '%s' does not have a corpse in instance '%s' and cannot enter.", player->GetName(), mapName); + sLog->outDebug(LOG_FILTER_MAPS, "MAP: Player '%s' does not have a corpse in instance '%s' and cannot enter.", player->GetName(), mapName); return false; } - sLog->outDebug("MAP: Player '%s' has corpse in instance '%s' and can enter.", player->GetName(), mapName); + sLog->outDebug(LOG_FILTER_MAPS, "MAP: Player '%s' has corpse in instance '%s' and can enter.", player->GetName(), mapName); } else - sLog->outDebug("Map::CanPlayerEnter - player '%s' is dead but does not have a corpse!", player->GetName()); + sLog->outDebug(LOG_FILTER_MAPS, "Map::CanPlayerEnter - player '%s' is dead but does not have a corpse!", player->GetName()); } //Get instance where player's group is bound & its map diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp index efae233df29..5e5a7dc69ca 100755 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp @@ -361,7 +361,7 @@ void FlightPathMovementGenerator::DoEventIfAny(Player& player, TaxiPathNodeEntry { if (uint32 eventid = departure ? node.departureEventID : node.arrivalEventID) { - sLog->outDebug("Taxi %s event %u of node %u of path %u for player %s", departure ? "departure" : "arrival", eventid, node.index, node.path, player.GetName()); + sLog->outDebug(LOG_FILTER_MAPSCRIPTS, "Taxi %s event %u of node %u of path %u for player %s", departure ? "departure" : "arrival", eventid, node.index, node.path, player.GetName()); player.GetMap()->ScriptsStart(sEventScripts, eventid, &player, &player); } } diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index 53cf325ac37..4d5fc13ac41 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -117,7 +117,7 @@ bool OPvPCapturePoint::AddCreature(uint32 type, uint32 entry, uint32 team, uint3 bool OPvPCapturePoint::SetCapturePointData(uint32 entry, uint32 map, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3) { - sLog->outDebug("Creating capture point %u", entry); + sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Creating capture point %u", entry); // check info existence GameObjectInfo const* goinfo = ObjectMgr::GetGameObjectInfo(entry); @@ -144,7 +144,7 @@ bool OPvPCapturePoint::DelCreature(uint32 type) { if (!m_Creatures[type]) { - sLog->outDebug("opvp creature type %u was already deleted",type); + sLog->outDebug(LOG_FILTER_OUTDOORPVP, "opvp creature type %u was already deleted",type); return false; } @@ -155,7 +155,7 @@ bool OPvPCapturePoint::DelCreature(uint32 type) m_Creatures[type] = 0; return false; } - sLog->outDebug("deleting opvp creature type %u",type); + sLog->outDebug(LOG_FILTER_OUTDOORPVP, "deleting opvp creature type %u",type); uint32 guid = cr->GetDBTableGUIDLow(); // Don't save respawn time cr->SetRespawnTime(0); @@ -250,7 +250,7 @@ void OutdoorPvP::HandlePlayerLeaveZone(Player * plr, uint32 /*zone*/) if (!plr->GetSession()->PlayerLogout()) SendRemoveWorldStates(plr); m_players[plr->GetTeamId()].erase(plr); - sLog->outDebug("Player %s left an outdoorpvp zone", plr->GetName()); + sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Player %s left an outdoorpvp zone", plr->GetName()); } void OutdoorPvP::HandlePlayerResurrects(Player * /*plr*/, uint32 /*zone*/) diff --git a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp index 4ccc31a4737..ac79831a1da 100755 --- a/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvPMgr.cpp @@ -24,12 +24,12 @@ OutdoorPvPMgr::OutdoorPvPMgr() { m_UpdateTimer = 0; - //sLog->outDebug("Instantiating OutdoorPvPMgr"); + //sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Instantiating OutdoorPvPMgr"); } OutdoorPvPMgr::~OutdoorPvPMgr() { - //sLog->outDebug("Deleting OutdoorPvPMgr"); + //sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Deleting OutdoorPvPMgr"); for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr) delete *itr; @@ -125,7 +125,7 @@ void OutdoorPvPMgr::HandlePlayerEnterZone(Player *plr, uint32 zoneid) return; itr->second->HandlePlayerEnterZone(plr, zoneid); - sLog->outDebug("Player %u entered outdoorpvp id %u", plr->GetGUIDLow(), itr->second->GetTypeId()); + sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Player %u entered outdoorpvp id %u", plr->GetGUIDLow(), itr->second->GetTypeId()); } void OutdoorPvPMgr::HandlePlayerLeaveZone(Player *plr, uint32 zoneid) @@ -139,7 +139,7 @@ void OutdoorPvPMgr::HandlePlayerLeaveZone(Player *plr, uint32 zoneid) return; itr->second->HandlePlayerLeaveZone(plr, zoneid); - sLog->outDebug("Player %u left outdoorpvp id %u",plr->GetGUIDLow(), itr->second->GetTypeId()); + sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Player %u left outdoorpvp id %u",plr->GetGUIDLow(), itr->second->GetTypeId()); } OutdoorPvP * OutdoorPvPMgr::GetOutdoorPvPToZoneId(uint32 zoneid) diff --git a/src/server/game/Pools/PoolMgr.cpp b/src/server/game/Pools/PoolMgr.cpp index 519c64c9c5b..6403cc96798 100755 --- a/src/server/game/Pools/PoolMgr.cpp +++ b/src/server/game/Pools/PoolMgr.cpp @@ -364,7 +364,7 @@ void PoolGroup<Creature>::Spawn1Object(PoolObject* obj) if (!map->Instanceable() && map->IsLoaded(data->posX, data->posY)) { Creature* pCreature = new Creature; - //sLog->outDebug("Spawning creature %u",guid); + //sLog->outDebug(LOG_FILTER_POOLSYS, "Spawning creature %u",guid); if (!pCreature->LoadFromDB(obj->guid, map)) { delete pCreature; @@ -390,7 +390,7 @@ void PoolGroup<GameObject>::Spawn1Object(PoolObject* obj) if (!map->Instanceable() && map->IsLoaded(data->posX, data->posY)) { GameObject* pGameobject = new GameObject; - //sLog->outDebug("Spawning gameobject %u", guid); + //sLog->outDebug(LOG_FILTER_POOLSYS, "Spawning gameobject %u", guid); if (!pGameobject->LoadFromDB(obj->guid, map)) { delete pGameobject; @@ -421,7 +421,7 @@ void PoolGroup<Quest>::Spawn1Object(PoolObject* obj) PooledQuestRelationBoundsNC qr = sPoolMgr->mQuestCreatureRelation.equal_range(obj->guid); for (PooledQuestRelation::iterator itr = qr.first; itr != qr.second; ++itr) { - sLog->outDebug("PoolGroup<Quest>: Adding quest %u to creature %u", itr->first, itr->second); + sLog->outDebug(LOG_FILTER_POOLSYS, "PoolGroup<Quest>: Adding quest %u to creature %u", itr->first, itr->second); questMap->insert(QuestRelations::value_type(itr->second, itr->first)); } @@ -430,7 +430,7 @@ void PoolGroup<Quest>::Spawn1Object(PoolObject* obj) qr = sPoolMgr->mQuestGORelation.equal_range(obj->guid); for (PooledQuestRelation::iterator itr = qr.first; itr != qr.second; ++itr) { - sLog->outDebug("PoolGroup<Quest>: Adding quest %u to GO %u", itr->first, itr->second); + sLog->outDebug(LOG_FILTER_POOLSYS, "PoolGroup<Quest>: Adding quest %u to GO %u", itr->first, itr->second); questMap->insert(QuestRelations::value_type(itr->second, itr->first)); } } @@ -438,7 +438,7 @@ void PoolGroup<Quest>::Spawn1Object(PoolObject* obj) template <> void PoolGroup<Quest>::SpawnObject(ActivePoolData& spawns, uint32 limit, uint32 triggerFrom) { - sLog->outDebug("PoolGroup<Quest>: Spawning pool %u", poolId); + sLog->outDebug(LOG_FILTER_POOLSYS, "PoolGroup<Quest>: Spawning pool %u", poolId); // load state from db if (!triggerFrom) { diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp index 8b97aa2a03f..4219a17903f 100755 --- a/src/server/game/Scripting/ScriptMgr.cpp +++ b/src/server/game/Scripting/ScriptMgr.cpp @@ -78,7 +78,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) return; } - sLog->outDebug("TSCR: DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote); + sLog->outDebug(LOG_FILTER_TSCR, "TSCR: DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u", iTextEntry, pData->uiSoundId, pData->uiType, pData->uiLanguage, pData->uiEmote); if (pData->uiSoundId) { diff --git a/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp b/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp index 8ee110a6b52..784126d96ce 100755 --- a/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp @@ -98,7 +98,7 @@ bool AddonHandler::BuildAddonPacket(WorldPacket *Source, WorldPacket *Target) AddOnPacked >> enabled >> crc >> unk2; - sLog->outDebug("ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk2); + sLog->outDebug(LOG_FILTER_NETWORKIO, "ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk2); uint8 state = (enabled ? 2 : 1); *Target << uint8(state); @@ -131,7 +131,7 @@ bool AddonHandler::BuildAddonPacket(WorldPacket *Source, WorldPacket *Target) *Target << uint32(count); if(AddOnPacked.rpos() != AddOnPacked.size()) - sLog->outDebug("packet under read!"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "packet under read!"); } else { diff --git a/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp b/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp index d51282be41b..c0e83dd2228 100755 --- a/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp @@ -29,11 +29,11 @@ void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recv_data) { - sLog->outDebug("MSG_INSPECT_ARENA_TEAMS"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_INSPECT_ARENA_TEAMS"); uint64 guid; recv_data >> guid; - sLog->outDebug("Inspect Arena stats (GUID: %u TypeId: %u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Inspect Arena stats (GUID: %u TypeId: %u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid))); if (Player *plr = sObjectMgr->GetPlayer(guid)) { @@ -50,7 +50,7 @@ void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recv_data) void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_ARENA_TEAM_QUERY"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ARENA_TEAM_QUERY"); uint32 ArenaTeamId; recv_data >> ArenaTeamId; @@ -64,7 +64,7 @@ void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket & recv_data) void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_ARENA_TEAM_ROSTER"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ARENA_TEAM_ROSTER"); uint32 ArenaTeamId; // arena team id recv_data >> ArenaTeamId; @@ -75,7 +75,7 @@ void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket & recv_data) void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data) { - sLog->outDebug("CMSG_ARENA_TEAM_INVITE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_INVITE"); uint32 ArenaTeamId; // arena team id std::string Invitedname; @@ -139,7 +139,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data) return; } - sLog->outDebug("Player %s Invited %s to Join his ArenaTeam", GetPlayer()->GetName(), Invitedname.c_str()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Player %s Invited %s to Join his ArenaTeam", GetPlayer()->GetName(), Invitedname.c_str()); player->SetArenaTeamIdInvited(arenateam->GetId()); @@ -148,12 +148,12 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data) data << arenateam->GetName(); player->GetSession()->SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_ARENA_TEAM_INVITE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_ARENA_TEAM_INVITE"); } void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/) { - sLog->outDebug("CMSG_ARENA_TEAM_ACCEPT"); // empty opcode + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_ACCEPT"); // empty opcode ArenaTeam *at = sObjectMgr->GetArenaTeamById(_player->GetArenaTeamIdInvited()); if (!at) @@ -186,14 +186,14 @@ void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/) void WorldSession::HandleArenaTeamDeclineOpcode(WorldPacket & /*recv_data*/) { - sLog->outDebug("CMSG_ARENA_TEAM_DECLINE"); // empty opcode + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_DECLINE"); // empty opcode _player->SetArenaTeamIdInvited(0); // no more invited } void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket & recv_data) { - sLog->outDebug("CMSG_ARENA_TEAM_LEAVE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_LEAVE"); uint32 ArenaTeamId; // arena team id recv_data >> ArenaTeamId; @@ -228,7 +228,7 @@ void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket & recv_data) void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket & recv_data) { - sLog->outDebug("CMSG_ARENA_TEAM_DISBAND"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_DISBAND"); uint32 ArenaTeamId; // arena team id recv_data >> ArenaTeamId; @@ -248,7 +248,7 @@ void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket & recv_data) void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket & recv_data) { - sLog->outDebug("CMSG_ARENA_TEAM_REMOVE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_REMOVE"); uint32 ArenaTeamId; std::string name; @@ -290,7 +290,7 @@ void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket & recv_data) void WorldSession::HandleArenaTeamLeaderOpcode(WorldPacket & recv_data) { - sLog->outDebug("CMSG_ARENA_TEAM_LEADER"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_LEADER"); uint32 ArenaTeamId; std::string name; diff --git a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp index 6288fb65b26..61ff1fab095 100755 --- a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp @@ -40,7 +40,7 @@ void WorldSession::HandleAuctionHelloOpcode(WorldPacket & recv_data) Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_AUCTIONEER); if (!unit) { - sLog->outDebug("WORLD: HandleAuctionHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); return; } @@ -132,24 +132,20 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data) Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer,UNIT_NPC_FLAG_AUCTIONEER); if (!pCreature) { - sLog->outDebug("WORLD: HandleAuctionSellItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer))); return; } AuctionHouseEntry const* auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(pCreature->getFaction()); if (!auctionHouseEntry) { - sLog->outDebug("WORLD: HandleAuctionSellItem - Unit (GUID: %u) has wrong faction.", uint32(GUID_LOPART(auctioneer))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) has wrong faction.", uint32(GUID_LOPART(auctioneer))); return; } - sLog->outDebug("WORLD: HandleAuctionSellItem - ETIME: %u", etime); - // client send time in minutes, convert to common used sec time etime *= MINUTE; - sLog->outDebug("WORLD: HandleAuctionSellItem - ETIME: %u", etime); - // client understand only 3 auction time switch(etime) { @@ -268,7 +264,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data) Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER); if (!pCreature) { - sLog->outDebug("WORLD: HandleAuctionPlaceBid - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionPlaceBid - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer))); return; } @@ -386,7 +382,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data) Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer,UNIT_NPC_FLAG_AUCTIONEER); if (!pCreature) { - sLog->outDebug("WORLD: HandleAuctionRemoveItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionRemoveItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer))); return; } @@ -471,7 +467,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data) Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_AUCTIONEER); if (!pCreature) { - sLog->outDebug("WORLD: HandleAuctionListBidderItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionListBidderItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); return; } @@ -518,7 +514,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recv_data) Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_AUCTIONEER); if (!pCreature) { - sLog->outDebug("WORLD: HandleAuctionListOwnerItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionListOwnerItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); return; } @@ -571,7 +567,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recv_data) Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_AUCTIONEER); if (!pCreature) { - sLog->outDebug("WORLD: HandleAuctionListItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionListItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); return; } @@ -609,7 +605,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recv_data) void WorldSession::HandleAuctionListPendingSales(WorldPacket & recv_data) { - sLog->outDebug("CMSG_AUCTION_LIST_PENDING_SALES"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_AUCTION_LIST_PENDING_SALES"); recv_data.read_skip<uint64>(); diff --git a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp index 0641007b5c1..12f459741ef 100755 --- a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp @@ -39,7 +39,7 @@ void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recv_data) { uint64 guid; recv_data >> guid; - sLog->outDebug("WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid))); Creature *unit = GetPlayer()->GetMap()->GetCreature(guid); if (!unit) @@ -98,7 +98,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data) BattlegroundTypeId bgTypeId = BattlegroundTypeId(bgTypeId_); - sLog->outDebug("WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid))); // can do this, since it's battleground, not arena BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(bgTypeId, 0); @@ -189,7 +189,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data) // send status packet (in queue) sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, ginfo->ArenaType); SendPacket(&data); - sLog->outDebug("Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName()); } else { @@ -208,7 +208,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data) if (err > 0) { - sLog->outDebug("Battleground: the following players are joining as group:"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: the following players are joining as group:"); ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, 0, false, isPremade, 0, 0); avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId()); } @@ -235,9 +235,9 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data) member->GetSession()->SendPacket(&data); sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err); member->GetSession()->SendPacket(&data); - sLog->outDebug("Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,member->GetGUIDLow(), member->GetName()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,member->GetGUIDLow(), member->GetName()); } - sLog->outDebug("Battleground: group end"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: group end"); } sBattlegroundMgr->ScheduleQueueUpdate(0, 0, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId()); @@ -246,7 +246,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data) void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket & /*recv_data*/) { // empty opcode - sLog->outDebug("WORLD: Recvd MSG_BATTLEGROUND_PLAYER_POSITIONS Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd MSG_BATTLEGROUND_PLAYER_POSITIONS Message"); Battleground *bg = _player->GetBattleground(); if (!bg) // can't be received if player not in battleground @@ -313,7 +313,7 @@ void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket & /*recv_ void WorldSession::HandlePVPLogDataOpcode(WorldPacket & /*recv_data*/) { - sLog->outDebug("WORLD: Recvd MSG_PVP_LOG_DATA Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd MSG_PVP_LOG_DATA Message"); Battleground *bg = _player->GetBattleground(); if (!bg) @@ -323,12 +323,12 @@ void WorldSession::HandlePVPLogDataOpcode(WorldPacket & /*recv_data*/) sBattlegroundMgr->BuildPvpLogDataPacket(&data, bg); SendPacket(&data); - sLog->outDebug("WORLD: Sent MSG_PVP_LOG_DATA Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent MSG_PVP_LOG_DATA Message"); } void WorldSession::HandleBattlefieldListOpcode(WorldPacket &recv_data) { - sLog->outDebug("WORLD: Recvd CMSG_BATTLEFIELD_LIST Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEFIELD_LIST Message"); uint32 bgTypeId; recv_data >> bgTypeId; // id from DBC @@ -353,7 +353,7 @@ void WorldSession::HandleBattlefieldListOpcode(WorldPacket &recv_data) void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data) { - sLog->outDebug("WORLD: Recvd CMSG_BATTLEFIELD_PORT Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEFIELD_PORT Message"); uint8 type; // arenatype if arena uint8 unk2; // unk, can be 0x0 (may be if was invited?) and 0x1 @@ -419,7 +419,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data) sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data2, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS); _player->GetSession()->SendPacket(&data2); action = 0; - sLog->outDebug("Battleground: player %s (%u) has a deserter debuff, do not port him to battleground!", _player->GetName(), _player->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: player %s (%u) has a deserter debuff, do not port him to battleground!", _player->GetName(), _player->GetGUIDLow()); } //if player don't match battleground max level, then do not allow him to enter! (this might happen when player leveled up during his waiting in queue if (_player->getLevel() > bg->GetMaxLevel()) @@ -470,7 +470,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data) sBattlegroundMgr->SendToBattleground(_player, ginfo.IsInvitedToBGInstanceGUID, bgTypeId); // add only in HandleMoveWorldPortAck() // bg->AddPlayer(_player,team); - sLog->outDebug("Battleground: player %s (%u) joined battle for bg %u, bgtype %u, queue type %u.", _player->GetName(), _player->GetGUIDLow(), bg->GetInstanceID(), bg->GetTypeID(), bgQueueTypeId); + sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: player %s (%u) joined battle for bg %u, bgtype %u, queue type %u.", _player->GetName(), _player->GetGUIDLow(), bg->GetInstanceID(), bg->GetTypeID(), bgQueueTypeId); break; case 0: // leave queue // if player leaves rated arena match before match start, it is counted as he played but he lost @@ -479,7 +479,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data) ArenaTeam * at = sObjectMgr->GetArenaTeamById(ginfo.Team); if (at) { - sLog->outDebug("UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating); + sLog->outDebug(LOG_FILTER_BATTLEGROUND,"UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating); at->MemberLost(_player, ginfo.OpponentsMatchmakerRating); at->SaveToDB(); } @@ -491,7 +491,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data) if (!ginfo.ArenaType) sBattlegroundMgr->ScheduleQueueUpdate(ginfo.ArenaMatchmakerRating, ginfo.ArenaType, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId()); SendPacket(&data); - sLog->outDebug("Battleground: player %s (%u) left queue for bgtype %u, queue type %u.", _player->GetName(), _player->GetGUIDLow(), bg->GetTypeID(), bgQueueTypeId); + sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: player %s (%u) left queue for bgtype %u, queue type %u.", _player->GetName(), _player->GetGUIDLow(), bg->GetTypeID(), bgQueueTypeId); break; default: sLog->outError("Battleground port: unknown action %u", action); @@ -501,7 +501,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data) void WorldSession::HandleLeaveBattlefieldOpcode(WorldPacket& recv_data) { - sLog->outDebug("WORLD: Recvd CMSG_LEAVE_BATTLEFIELD Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_LEAVE_BATTLEFIELD Message"); recv_data.read_skip<uint8>(); // unk1 recv_data.read_skip<uint8>(); // unk2 @@ -520,7 +520,7 @@ void WorldSession::HandleLeaveBattlefieldOpcode(WorldPacket& recv_data) void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recv_data*/) { // empty opcode - sLog->outDebug("WORLD: Battleground status"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Battleground status"); WorldPacket data; // we must update all queues here @@ -583,7 +583,7 @@ void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recv_data*/) void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY"); Battleground *bg = _player->GetBattleground(); @@ -604,7 +604,7 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket & recv_data) void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE"); Battleground *bg = _player->GetBattleground(); @@ -625,7 +625,7 @@ void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket & recv_data) void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_BATTLEMASTER_JOIN_ARENA"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_BATTLEMASTER_JOIN_ARENA"); //recv_data.hexlike(); uint64 guid; // arena Battlemaster guid @@ -738,10 +738,10 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) if (err > 0) { - sLog->outDebug("Battleground: arena join as group start"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: arena join as group start"); if (isRated) { - sLog->outDebug("Battleground: arena team id %u, leader %s queued with matchmaker rating %u for type %u",_player->GetArenaTeamId(arenaslot),_player->GetName(),matchmakerRating,arenatype); + sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: arena team id %u, leader %s queued with matchmaker rating %u for type %u",_player->GetArenaTeamId(arenaslot),_player->GetName(),matchmakerRating,arenatype); bg->SetRated(true); } else @@ -774,7 +774,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) member->GetSession()->SendPacket(&data); sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err); member->GetSession()->SendPacket(&data); - sLog->outDebug("Battleground: player joined queue for arena as group bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,member->GetGUIDLow(), member->GetName()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: player joined queue for arena as group bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,member->GetGUIDLow(), member->GetName()); } } else @@ -787,7 +787,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data) // send status packet (in queue) sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, arenatype); SendPacket(&data); - sLog->outDebug("Battleground: player joined queue for arena, skirmish, bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: player joined queue for arena, skirmish, bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName()); } sBattlegroundMgr->ScheduleQueueUpdate(matchmakerRating, arenatype, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId()); } @@ -800,11 +800,11 @@ void WorldSession::HandleReportPvPAFK(WorldPacket & recv_data) if (!reportedPlayer) { - sLog->outDebug("WorldSession::HandleReportPvPAFK: player not found"); + sLog->outDebug(LOG_FILTER_BATTLEGROUND,"WorldSession::HandleReportPvPAFK: player not found"); return; } - sLog->outDebug("WorldSession::HandleReportPvPAFK: %s reported %s", _player->GetName(), reportedPlayer->GetName()); + sLog->outDebug(LOG_FILTER_BATTLEGROUND,"WorldSession::HandleReportPvPAFK: %s reported %s", _player->GetName(), reportedPlayer->GetName()); reportedPlayer->ReportedAfkBy(_player); } diff --git a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp b/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp index f4b97b5e8ff..6553f2b3f93 100755 --- a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp @@ -27,7 +27,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket & /*recv_data*/) { - sLog->outDebug("WORLD: CMSG_CALENDAR_GET_CALENDAR"); // empty + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_GET_CALENDAR"); // empty time_t cur_time = time(NULL); @@ -126,21 +126,21 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket & /*recv_data*/) } */ - sLog->outDebug("Sending calendar"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Sending calendar"); data.hexlike(); SendPacket(&data); } void WorldSession::HandleCalendarGetEvent(WorldPacket &recv_data) { - sLog->outDebug("WORLD: CMSG_CALENDAR_GET_EVENT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_GET_EVENT"); recv_data.hexlike(); recv_data.read_skip<uint64>(); // unk } void WorldSession::HandleCalendarGuildFilter(WorldPacket &recv_data) { - sLog->outDebug("WORLD: CMSG_CALENDAR_GUILD_FILTER"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_GUILD_FILTER"); recv_data.hexlike(); recv_data.read_skip<uint32>(); // unk1 recv_data.read_skip<uint32>(); // unk2 @@ -149,14 +149,14 @@ void WorldSession::HandleCalendarGuildFilter(WorldPacket &recv_data) void WorldSession::HandleCalendarArenaTeam(WorldPacket &recv_data) { - sLog->outDebug("WORLD: CMSG_CALENDAR_ARENA_TEAM"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_ARENA_TEAM"); recv_data.hexlike(); recv_data.read_skip<uint32>(); // unk } void WorldSession::HandleCalendarAddEvent(WorldPacket &recv_data) { - sLog->outDebug("WORLD: CMSG_CALENDAR_ADD_EVENT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_ADD_EVENT"); recv_data.hexlike(); recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam @@ -192,7 +192,7 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket &recv_data) void WorldSession::HandleCalendarUpdateEvent(WorldPacket &recv_data) { - sLog->outDebug("WORLD: CMSG_CALENDAR_UPDATE_EVENT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_UPDATE_EVENT"); recv_data.hexlike(); recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam @@ -211,7 +211,7 @@ void WorldSession::HandleCalendarUpdateEvent(WorldPacket &recv_data) void WorldSession::HandleCalendarRemoveEvent(WorldPacket &recv_data) { - sLog->outDebug("WORLD: CMSG_CALENDAR_REMOVE_EVENT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_REMOVE_EVENT"); recv_data.hexlike(); recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam @@ -223,7 +223,7 @@ void WorldSession::HandleCalendarRemoveEvent(WorldPacket &recv_data) void WorldSession::HandleCalendarCopyEvent(WorldPacket &recv_data) { - sLog->outDebug("WORLD: CMSG_CALENDAR_COPY_EVENT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_COPY_EVENT"); recv_data.hexlike(); recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam @@ -235,7 +235,7 @@ void WorldSession::HandleCalendarCopyEvent(WorldPacket &recv_data) void WorldSession::HandleCalendarEventInvite(WorldPacket &recv_data) { - sLog->outDebug("WORLD: CMSG_CALENDAR_EVENT_INVITE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_EVENT_INVITE"); recv_data.hexlike(); recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam @@ -249,7 +249,7 @@ void WorldSession::HandleCalendarEventInvite(WorldPacket &recv_data) void WorldSession::HandleCalendarEventRsvp(WorldPacket &recv_data) { - sLog->outDebug("WORLD: CMSG_CALENDAR_EVENT_RSVP"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_EVENT_RSVP"); recv_data.hexlike(); recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam @@ -261,7 +261,7 @@ void WorldSession::HandleCalendarEventRsvp(WorldPacket &recv_data) void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket &recv_data) { - sLog->outDebug("WORLD: CMSG_CALENDAR_EVENT_REMOVE_INVITE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_EVENT_REMOVE_INVITE"); recv_data.hexlike(); recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam @@ -273,7 +273,7 @@ void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket &recv_data) void WorldSession::HandleCalendarEventStatus(WorldPacket &recv_data) { - sLog->outDebug("WORLD: CMSG_CALENDAR_EVENT_STATUS"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_EVENT_STATUS"); recv_data.hexlike(); recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam @@ -286,7 +286,7 @@ void WorldSession::HandleCalendarEventStatus(WorldPacket &recv_data) void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket &recv_data) { - sLog->outDebug("WORLD: CMSG_CALENDAR_EVENT_MODERATOR_STATUS"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_EVENT_MODERATOR_STATUS"); recv_data.hexlike(); recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam @@ -299,7 +299,7 @@ void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket &recv_data) void WorldSession::HandleCalendarComplain(WorldPacket &recv_data) { - sLog->outDebug("WORLD: CMSG_CALENDAR_COMPLAIN"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_COMPLAIN"); recv_data.hexlike(); recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam @@ -310,7 +310,7 @@ void WorldSession::HandleCalendarComplain(WorldPacket &recv_data) void WorldSession::HandleCalendarGetNumPending(WorldPacket & /*recv_data*/) { - sLog->outDebug("WORLD: CMSG_CALENDAR_GET_NUM_PENDING"); // empty + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CALENDAR_GET_NUM_PENDING"); // empty WorldPacket data(SMSG_CALENDAR_SEND_NUM_PENDING, 4); data << uint32(0); // 0 - no pending invites, 1 - some pending invites diff --git a/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp b/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp index 87ba2fd9c15..0ccfce64045 100755 --- a/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp @@ -21,7 +21,7 @@ void WorldSession::HandleJoinChannel(WorldPacket& recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); uint32 channel_id; uint8 unknown1, unknown2; @@ -60,7 +60,7 @@ void WorldSession::HandleJoinChannel(WorldPacket& recvPacket) void WorldSession::HandleLeaveChannel(WorldPacket& recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); uint32 unk; @@ -81,7 +81,7 @@ void WorldSession::HandleLeaveChannel(WorldPacket& recvPacket) void WorldSession::HandleChannelList(WorldPacket& recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); std::string channelname; recvPacket >> channelname; @@ -93,7 +93,7 @@ void WorldSession::HandleChannelList(WorldPacket& recvPacket) void WorldSession::HandleChannelPassword(WorldPacket& recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); std::string channelname, pass; recvPacket >> channelname; @@ -107,7 +107,7 @@ void WorldSession::HandleChannelPassword(WorldPacket& recvPacket) void WorldSession::HandleChannelSetOwner(WorldPacket& recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); std::string channelname, newp; recvPacket >> channelname; @@ -124,7 +124,7 @@ void WorldSession::HandleChannelSetOwner(WorldPacket& recvPacket) void WorldSession::HandleChannelOwner(WorldPacket& recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); std::string channelname; recvPacket >> channelname; @@ -135,7 +135,7 @@ void WorldSession::HandleChannelOwner(WorldPacket& recvPacket) void WorldSession::HandleChannelModerator(WorldPacket& recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); std::string channelname, otp; recvPacket >> channelname; @@ -152,7 +152,7 @@ void WorldSession::HandleChannelModerator(WorldPacket& recvPacket) void WorldSession::HandleChannelUnmoderator(WorldPacket& recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); std::string channelname, otp; recvPacket >> channelname; @@ -169,7 +169,7 @@ void WorldSession::HandleChannelUnmoderator(WorldPacket& recvPacket) void WorldSession::HandleChannelMute(WorldPacket& recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); std::string channelname, otp; recvPacket >> channelname; @@ -186,7 +186,7 @@ void WorldSession::HandleChannelMute(WorldPacket& recvPacket) void WorldSession::HandleChannelUnmute(WorldPacket& recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); std::string channelname, otp; @@ -204,7 +204,7 @@ void WorldSession::HandleChannelUnmute(WorldPacket& recvPacket) void WorldSession::HandleChannelInvite(WorldPacket& recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); std::string channelname, otp; recvPacket >> channelname; @@ -221,7 +221,7 @@ void WorldSession::HandleChannelInvite(WorldPacket& recvPacket) void WorldSession::HandleChannelKick(WorldPacket& recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); std::string channelname, otp; recvPacket >> channelname; @@ -237,7 +237,7 @@ void WorldSession::HandleChannelKick(WorldPacket& recvPacket) void WorldSession::HandleChannelBan(WorldPacket& recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); std::string channelname, otp; recvPacket >> channelname; @@ -254,7 +254,7 @@ void WorldSession::HandleChannelBan(WorldPacket& recvPacket) void WorldSession::HandleChannelUnban(WorldPacket& recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); std::string channelname, otp; @@ -272,7 +272,7 @@ void WorldSession::HandleChannelUnban(WorldPacket& recvPacket) void WorldSession::HandleChannelAnnouncements(WorldPacket& recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); std::string channelname; recvPacket >> channelname; @@ -289,7 +289,7 @@ void WorldSession::HandleChannelDisplayListQuery(WorldPacket &recvPacket) void WorldSession::HandleGetChannelMemberCount(WorldPacket &recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); std::string channelname; recvPacket >> channelname; @@ -308,7 +308,7 @@ void WorldSession::HandleGetChannelMemberCount(WorldPacket &recvPacket) void WorldSession::HandleSetChannelWatch(WorldPacket &recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); //recvPacket.hexlike(); std::string channelname; recvPacket >> channelname; diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp index 7671a737233..9327906190d 100755 --- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp @@ -543,7 +543,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data) { uint8 unk; recv_data >> unk; - sLog->outDebug("Character creation %s (account %u) has unhandled tail data: [%u]", name.c_str(), GetAccountId(), unk); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Character creation %s (account %u) has unhandled tail data: [%u]", name.c_str(), GetAccountId(), unk); } Player * pNewChar = new Player(this); @@ -1171,7 +1171,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data) void WorldSession::HandleAlterAppearance(WorldPacket & recv_data) { - sLog->outDebug("CMSG_ALTER_APPEARANCE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ALTER_APPEARANCE"); uint32 Hair, Color, FacialHair, SkinColor; recv_data >> Hair >> Color >> FacialHair >> SkinColor; @@ -1231,7 +1231,7 @@ void WorldSession::HandleRemoveGlyph(WorldPacket & recv_data) if (slot >= MAX_GLYPH_SLOT_INDEX) { - sLog->outDebug("Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot); return; } @@ -1342,7 +1342,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data) void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data) { - sLog->outDebug("CMSG_EQUIPMENT_SET_SAVE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_SAVE"); uint64 setGuid; recv_data.readPackGUID(setGuid); @@ -1386,7 +1386,7 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data) void WorldSession::HandleEquipmentSetDelete(WorldPacket &recv_data) { - sLog->outDebug("CMSG_EQUIPMENT_SET_DELETE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_DELETE"); uint64 setGuid; recv_data.readPackGUID(setGuid); @@ -1396,7 +1396,7 @@ void WorldSession::HandleEquipmentSetDelete(WorldPacket &recv_data) void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data) { - sLog->outDebug("CMSG_EQUIPMENT_SET_USE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_USE"); recv_data.hexlike(); for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i) @@ -1407,7 +1407,7 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data) uint8 srcbag, srcslot; recv_data >> srcbag >> srcslot; - sLog->outDebug("Item " UI64FMTD ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot); + sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item " UI64FMTD ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot); Item *item = _player->GetItemByGuid(itemGuid); @@ -1761,7 +1761,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data) CharacterDatabase.CommitTransaction(trans); std::string IP_str = GetRemoteAddress(); - sLog->outDebug("Account: %d (IP: %s), Character guid: %u Change Race/Faction to: %s", GetAccountId(), IP_str.c_str(), lowGuid, newname.c_str()); + sLog->outDebug(LOG_FILTER_UNITS, "Account: %d (IP: %s), Character guid: %u Change Race/Faction to: %s", GetAccountId(), IP_str.c_str(), lowGuid, newname.c_str()); WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1 + 8 + (newname.size() + 1) + 1 + 1 + 1 + 1 + 1 + 1 + 1); data << uint8(RESPONSE_SUCCESS); diff --git a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp index 9981dfe2143..7695c4f4bad 100755 --- a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp @@ -112,10 +112,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data) recv_data >> msg; if (msg.empty()) - { - sLog->outDebug("Player %s send empty addon msg", GetPlayer()->GetName()); return; - } sScriptMgr->OnPlayerChat(GetPlayer(), CHAT_MSG_ADDON, lang, msg); } @@ -581,7 +578,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recv_data) { uint64 iguid; uint8 unk; - //sLog->outDebug("WORLD: Received CMSG_CHAT_IGNORED"); + //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Received CMSG_CHAT_IGNORED"); recv_data >> iguid; recv_data >> unk; // probably related to spam reporting @@ -597,7 +594,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recv_data) void WorldSession::HandleChannelDeclineInvite(WorldPacket &recvPacket) { - sLog->outDebug("Opcode %u", recvPacket.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode()); } void WorldSession::SendPlayerNotFoundNotice(std::string name) diff --git a/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp b/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp index 2b05238cca2..6ef0671b679 100755 --- a/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp @@ -65,7 +65,7 @@ void WorldSession::HandleSetSheathedOpcode(WorldPacket & recv_data) uint32 sheathed; recv_data >> sheathed; - //sLog->outDebug("WORLD: Recvd CMSG_SETSHEATHED Message guidlow:%u value1:%u", GetPlayer()->GetGUIDLow(), sheathed); + //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Recvd CMSG_SETSHEATHED Message guidlow:%u value1:%u", GetPlayer()->GetGUIDLow(), sheathed); if (sheathed >= MAX_SHEATH_STATE) { diff --git a/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp b/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp index dbdaf8f9f41..9703c3716a9 100755 --- a/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp @@ -41,7 +41,7 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket) if (pl == pl->duel->initiator || !plTarget || pl == plTarget || pl->duel->startTime != 0 || plTarget->duel->startTime != 0) return; - //sLog->outDebug("WORLD: received CMSG_DUEL_ACCEPTED"); + //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Received CMSG_DUEL_ACCEPTED"); sLog->outStaticDebug("Player 1 is: %u (%s)", pl->GetGUIDLow(),pl->GetName()); sLog->outStaticDebug("Player 2 is: %u (%s)", plTarget->GetGUIDLow(),plTarget->GetName()); @@ -55,7 +55,7 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket) void WorldSession::HandleDuelCancelledOpcode(WorldPacket& recvPacket) { - //sLog->outDebug("WORLD: received CMSG_DUEL_CANCELLED"); + //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Received CMSG_DUEL_CANCELLED"); // no duel requested if (!GetPlayer()->duel) diff --git a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp index 73eca2b947b..d3fbe4c157b 100755 --- a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp @@ -57,7 +57,7 @@ void WorldSession::SendPartyResult(PartyOperation operation, const std::string& void WorldSession::HandleGroupInviteOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_GROUP_INVITE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_INVITE"); std::string membername; recv_data >> membername; @@ -193,7 +193,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket & recv_data) void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recv_data) { - sLog->outDebug("WORLD: Received CMSG_GROUP_ACCEPT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_ACCEPT"); recv_data.read_skip<uint32>(); Group *group = GetPlayer()->GetGroupInvite(); @@ -245,7 +245,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recv_data) void WorldSession::HandleGroupDeclineOpcode(WorldPacket & /*recv_data*/) { - sLog->outDebug("WORLD: Received CMSG_GROUP_DECLINE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_DECLINE"); Group *group = GetPlayer()->GetGroupInvite(); if (!group) return; @@ -268,7 +268,7 @@ void WorldSession::HandleGroupDeclineOpcode(WorldPacket & /*recv_data*/) void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_GROUP_UNINVITE_GUID"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_UNINVITE_GUID"); uint64 guid; std::string reason; @@ -316,7 +316,7 @@ void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket & recv_data) void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_GROUP_UNINVITE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_UNINVITE"); std::string membername; recv_data >> membername; @@ -360,7 +360,7 @@ void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recv_data) void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_GROUP_SET_LEADER"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_SET_LEADER"); Group *group = GetPlayer()->GetGroup(); if (!group) @@ -384,7 +384,7 @@ void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket & recv_data) void WorldSession::HandleGroupDisbandOpcode(WorldPacket & /*recv_data*/) { - sLog->outDebug("WORLD: Received CMSG_GROUP_DISBAND"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_DISBAND"); Group *grp = GetPlayer()->GetGroup(); if (!grp) @@ -407,7 +407,7 @@ void WorldSession::HandleGroupDisbandOpcode(WorldPacket & /*recv_data*/) void WorldSession::HandleLootMethodOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_LOOT_METHOD"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_LOOT_METHOD"); Group *group = GetPlayer()->GetGroup(); if (!group) @@ -464,7 +464,7 @@ void WorldSession::HandleLootRoll(WorldPacket &recv_data) void WorldSession::HandleMinimapPingOpcode(WorldPacket& recv_data) { - sLog->outDebug("WORLD: Received MSG_MINIMAP_PING"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_MINIMAP_PING"); if (!GetPlayer()->GetGroup()) return; @@ -488,7 +488,7 @@ void WorldSession::HandleMinimapPingOpcode(WorldPacket& recv_data) void WorldSession::HandleRandomRollOpcode(WorldPacket& recv_data) { - sLog->outDebug("WORLD: Received MSG_RANDOM_ROLL"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_RANDOM_ROLL"); uint32 minimum, maximum, roll; recv_data >> minimum; @@ -517,7 +517,7 @@ void WorldSession::HandleRandomRollOpcode(WorldPacket& recv_data) void WorldSession::HandleRaidTargetUpdateOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received MSG_RAID_TARGET_UPDATE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_RAID_TARGET_UPDATE"); Group *group = GetPlayer()->GetGroup(); if (!group) @@ -547,7 +547,7 @@ void WorldSession::HandleRaidTargetUpdateOpcode(WorldPacket & recv_data) void WorldSession::HandleGroupRaidConvertOpcode(WorldPacket & /*recv_data*/) { - sLog->outDebug("WORLD: Received CMSG_GROUP_RAID_CONVERT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_RAID_CONVERT"); Group *group = GetPlayer()->GetGroup(); if (!group) @@ -568,7 +568,7 @@ void WorldSession::HandleGroupRaidConvertOpcode(WorldPacket & /*recv_data*/) void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_GROUP_CHANGE_SUB_GROUP"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_CHANGE_SUB_GROUP"); // we will get correct pointer for group here, so we don't have to check if group is BG raid Group *group = GetPlayer()->GetGroup(); @@ -607,7 +607,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data) void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_GROUP_ASSISTANT_LEADER"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_ASSISTANT_LEADER"); Group *group = GetPlayer()->GetGroup(); if (!group) @@ -628,7 +628,7 @@ void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket & recv_data) void WorldSession::HandlePartyAssignmentOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received MSG_PARTY_ASSIGNMENT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_PARTY_ASSIGNMENT"); Group *group = GetPlayer()->GetGroup(); if (!group) @@ -662,7 +662,7 @@ void WorldSession::HandlePartyAssignmentOpcode(WorldPacket & recv_data) void WorldSession::HandleRaidReadyCheckOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received MSG_RAID_READY_CHECK"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_RAID_READY_CHECK"); Group *group = GetPlayer()->GetGroup(); if (!group) @@ -879,7 +879,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player *player, WorldPacke /*this procedure handles clients CMSG_REQUEST_PARTY_MEMBER_STATS request*/ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recv_data) { - sLog->outDebug("WORLD: Received CMSG_REQUEST_PARTY_MEMBER_STATS"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_REQUEST_PARTY_MEMBER_STATS"); uint64 Guid; recv_data >> Guid; @@ -980,7 +980,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recv_data) void WorldSession::HandleOptOutOfLootOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_OPT_OUT_OF_LOOT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_OPT_OUT_OF_LOOT"); uint32 passOnLoot; recv_data >> passOnLoot; // 1 always pass, 0 do not pass diff --git a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp b/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp index 9fae9ab7b9c..625cd3f6160 100755 --- a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp @@ -41,7 +41,7 @@ inline Guild* _GetPlayerGuild(WorldSession* session, bool sendError = false) void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: Received CMSG_GUILD_QUERY"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_QUERY"); uint32 guildId; recvPacket >> guildId; @@ -54,7 +54,7 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket) void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: Received CMSG_GUILD_CREATE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_CREATE"); std::string name; recvPacket >> name; @@ -71,7 +71,7 @@ void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket) void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: Received CMSG_GUILD_INVITE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_INVITE"); std::string invitedName; recvPacket >> invitedName; @@ -83,7 +83,7 @@ void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket) void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: Received CMSG_GUILD_REMOVE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_REMOVE"); std::string playerName; recvPacket >> playerName; @@ -95,7 +95,7 @@ void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket) void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/) { - sLog->outDebug("WORLD: Received CMSG_GUILD_ACCEPT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_ACCEPT"); // Player cannot be in guild if (!GetPlayer()->GetGuildId()) // Guild where player was invited must exist @@ -105,7 +105,7 @@ void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/) void WorldSession::HandleGuildDeclineOpcode(WorldPacket& /*recvPacket*/) { - sLog->outDebug("WORLD: Received CMSG_GUILD_DECLINE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_DECLINE"); GetPlayer()->SetGuildIdInvited(0); GetPlayer()->SetInGuild(0); @@ -113,7 +113,7 @@ void WorldSession::HandleGuildDeclineOpcode(WorldPacket& /*recvPacket*/) void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/) { - sLog->outDebug("WORLD: Received CMSG_GUILD_INFO"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_INFO"); if (Guild* pGuild = _GetPlayerGuild(this, true)) pGuild->SendInfo(this); @@ -121,7 +121,7 @@ void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/) void WorldSession::HandleGuildRosterOpcode(WorldPacket& /*recvPacket*/) { - sLog->outDebug("WORLD: Received CMSG_GUILD_ROSTER"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_ROSTER"); if (Guild* pGuild = _GetPlayerGuild(this)) pGuild->HandleRoster(this); @@ -129,7 +129,7 @@ void WorldSession::HandleGuildRosterOpcode(WorldPacket& /*recvPacket*/) void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: Received CMSG_GUILD_PROMOTE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_PROMOTE"); std::string playerName; recvPacket >> playerName; @@ -141,7 +141,7 @@ void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket) void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: Received CMSG_GUILD_DEMOTE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_DEMOTE"); std::string playerName; recvPacket >> playerName; @@ -153,7 +153,7 @@ void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket) void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/) { - sLog->outDebug("WORLD: Received CMSG_GUILD_LEAVE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_LEAVE"); if (Guild* pGuild = _GetPlayerGuild(this, true)) pGuild->HandleLeaveMember(this); @@ -161,7 +161,7 @@ void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/) void WorldSession::HandleGuildDisbandOpcode(WorldPacket& /*recvPacket*/) { - sLog->outDebug("WORLD: Received CMSG_GUILD_DISBAND"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_DISBAND"); if (Guild* pGuild = _GetPlayerGuild(this, true)) pGuild->HandleDisband(this); @@ -169,7 +169,7 @@ void WorldSession::HandleGuildDisbandOpcode(WorldPacket& /*recvPacket*/) void WorldSession::HandleGuildLeaderOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: Received CMSG_GUILD_LEADER"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_LEADER"); std::string name; recvPacket >> name; @@ -181,7 +181,7 @@ void WorldSession::HandleGuildLeaderOpcode(WorldPacket& recvPacket) void WorldSession::HandleGuildMOTDOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: Received CMSG_GUILD_MOTD"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_MOTD"); std::string motd; // Empty by default if (!recvPacket.empty()) @@ -193,7 +193,7 @@ void WorldSession::HandleGuildMOTDOpcode(WorldPacket& recvPacket) void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: Received CMSG_GUILD_SET_PUBLIC_NOTE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_SET_PUBLIC_NOTE"); std::string playerName; recvPacket >> playerName; @@ -208,7 +208,7 @@ void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket) void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: Received CMSG_GUILD_SET_OFFICER_NOTE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_SET_OFFICER_NOTE"); std::string playerName; recvPacket >> playerName; @@ -223,7 +223,7 @@ void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket) void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: Received CMSG_GUILD_RANK"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_RANK"); Guild* pGuild = _GetPlayerGuild(this, true); if (!pGuild) @@ -261,7 +261,7 @@ void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket) void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: Received CMSG_GUILD_ADD_RANK"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_ADD_RANK"); std::string rankName; recvPacket >> rankName; @@ -272,7 +272,7 @@ void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket) void WorldSession::HandleGuildDelRankOpcode(WorldPacket& /*recvPacket*/) { - sLog->outDebug("WORLD: Received CMSG_GUILD_DEL_RANK"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_DEL_RANK"); if (Guild* pGuild = _GetPlayerGuild(this, true)) pGuild->HandleRemoveLowestRank(this); @@ -280,7 +280,7 @@ void WorldSession::HandleGuildDelRankOpcode(WorldPacket& /*recvPacket*/) void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: Received CMSG_GUILD_INFO_TEXT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_INFO_TEXT"); std::string info; recvPacket >> info; @@ -291,7 +291,7 @@ void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket) void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: Received MSG_SAVE_GUILD_EMBLEM"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_SAVE_GUILD_EMBLEM"); uint64 vendorGuid; recvPacket >> vendorGuid; @@ -315,13 +315,13 @@ void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket) { // "That's not an emblem vendor!" Guild::SendSaveEmblemResult(this, ERR_GUILDEMBLEM_INVALIDVENDOR); - sLog->outDebug("WORLD: HandleSaveGuildEmblemOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(vendorGuid)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleSaveGuildEmblemOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(vendorGuid)); } } void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */) { - sLog->outDebug("WORLD: Received (MSG_GUILD_EVENT_LOG_QUERY)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (MSG_GUILD_EVENT_LOG_QUERY)"); if (Guild* pGuild = _GetPlayerGuild(this)) pGuild->SendEventLog(this); @@ -329,7 +329,7 @@ void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */) void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket & /* recv_data */) { - sLog->outDebug("WORLD: Received (MSG_GUILD_BANK_MONEY_WITHDRAWN)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (MSG_GUILD_BANK_MONEY_WITHDRAWN)"); if (Guild* pGuild = _GetPlayerGuild(this)) pGuild->SendMoneyInfo(this); @@ -337,7 +337,7 @@ void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket & /* recv_data */) void WorldSession::HandleGuildPermissions(WorldPacket& /* recv_data */) { - sLog->outDebug("WORLD: Received (MSG_GUILD_PERMISSIONS)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (MSG_GUILD_PERMISSIONS)"); if (Guild* pGuild = _GetPlayerGuild(this)) pGuild->SendPermissions(this); @@ -346,7 +346,7 @@ void WorldSession::HandleGuildPermissions(WorldPacket& /* recv_data */) // Called when clicking on Guild bank gameobject void WorldSession::HandleGuildBankerActivate(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received (CMSG_GUILD_BANKER_ACTIVATE)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (CMSG_GUILD_BANKER_ACTIVATE)"); uint64 GoGuid; recv_data >> GoGuid; @@ -366,7 +366,7 @@ void WorldSession::HandleGuildBankerActivate(WorldPacket & recv_data) // Called when opening pGuild bank tab only (first one) void WorldSession::HandleGuildBankQueryTab(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received (CMSG_GUILD_BANK_QUERY_TAB)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (CMSG_GUILD_BANK_QUERY_TAB)"); uint64 GoGuid; recv_data >> GoGuid; @@ -384,7 +384,7 @@ void WorldSession::HandleGuildBankQueryTab(WorldPacket & recv_data) void WorldSession::HandleGuildBankDepositMoney(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received (CMSG_GUILD_BANK_DEPOSIT_MONEY)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (CMSG_GUILD_BANK_DEPOSIT_MONEY)"); uint64 GoGuid; recv_data >> GoGuid; @@ -400,7 +400,7 @@ void WorldSession::HandleGuildBankDepositMoney(WorldPacket & recv_data) void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received (CMSG_GUILD_BANK_WITHDRAW_MONEY)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (CMSG_GUILD_BANK_WITHDRAW_MONEY)"); uint64 GoGuid; recv_data >> GoGuid; @@ -416,7 +416,7 @@ void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket & recv_data) void WorldSession::HandleGuildBankSwapItems(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received (CMSG_GUILD_BANK_SWAP_ITEMS)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (CMSG_GUILD_BANK_SWAP_ITEMS)"); uint64 GoGuid; recv_data >> GoGuid; @@ -497,7 +497,7 @@ void WorldSession::HandleGuildBankSwapItems(WorldPacket & recv_data) void WorldSession::HandleGuildBankBuyTab(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received (CMSG_GUILD_BANK_BUY_TAB)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (CMSG_GUILD_BANK_BUY_TAB)"); uint64 GoGuid; recv_data >> GoGuid; @@ -512,7 +512,7 @@ void WorldSession::HandleGuildBankBuyTab(WorldPacket & recv_data) void WorldSession::HandleGuildBankUpdateTab(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received (CMSG_GUILD_BANK_UPDATE_TAB)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (CMSG_GUILD_BANK_UPDATE_TAB)"); uint64 GoGuid; recv_data >> GoGuid; @@ -534,7 +534,7 @@ void WorldSession::HandleGuildBankUpdateTab(WorldPacket & recv_data) void WorldSession::HandleGuildBankLogQuery(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received (MSG_GUILD_BANK_LOG_QUERY)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (MSG_GUILD_BANK_LOG_QUERY)"); uint8 tabId; recv_data >> tabId; @@ -545,7 +545,7 @@ void WorldSession::HandleGuildBankLogQuery(WorldPacket & recv_data) void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recv_data) { - sLog->outDebug("WORLD: Received MSG_QUERY_GUILD_BANK_TEXT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_QUERY_GUILD_BANK_TEXT"); uint8 tabId; recv_data >> tabId; @@ -556,7 +556,7 @@ void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recv_data) void WorldSession::HandleSetGuildBankTabText(WorldPacket &recv_data) { - sLog->outDebug("WORLD: Received CMSG_SET_GUILD_BANK_TEXT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_GUILD_BANK_TEXT"); uint8 tabId; recv_data >> tabId; diff --git a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp index 514461b5dfd..716715ecb2f 100755 --- a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp @@ -29,7 +29,7 @@ void WorldSession::HandleSplitItemOpcode(WorldPacket & recv_data) { - //sLog->outDebug("WORLD: CMSG_SPLIT_ITEM"); + //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_SPLIT_ITEM"); uint8 srcbag, srcslot, dstbag, dstslot; uint32 count; @@ -62,7 +62,7 @@ void WorldSession::HandleSplitItemOpcode(WorldPacket & recv_data) void WorldSession::HandleSwapInvItemOpcode(WorldPacket & recv_data) { - //sLog->outDebug("WORLD: CMSG_SWAP_INV_ITEM"); + //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_SWAP_INV_ITEM"); uint8 srcslot, dstslot; recv_data >> dstslot >> srcslot; @@ -111,7 +111,7 @@ void WorldSession::HandleAutoEquipItemSlotOpcode(WorldPacket & recv_data) void WorldSession::HandleSwapItem(WorldPacket & recv_data) { - //sLog->outDebug("WORLD: CMSG_SWAP_ITEM"); + //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_SWAP_ITEM"); uint8 dstbag, dstslot, srcbag, srcslot; recv_data >> dstbag >> dstslot >> srcbag >> srcslot ; @@ -141,7 +141,7 @@ void WorldSession::HandleSwapItem(WorldPacket & recv_data) void WorldSession::HandleAutoEquipItemOpcode(WorldPacket & recv_data) { - //sLog->outDebug("WORLD: CMSG_AUTOEQUIP_ITEM"); + //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_AUTOEQUIP_ITEM"); uint8 srcbag, srcslot; recv_data >> srcbag >> srcslot; @@ -235,7 +235,7 @@ void WorldSession::HandleAutoEquipItemOpcode(WorldPacket & recv_data) void WorldSession::HandleDestroyItemOpcode(WorldPacket & recv_data) { - //sLog->outDebug("WORLD: CMSG_DESTROYITEM"); + //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_DESTROYITEM"); uint8 bag, slot, count, data1, data2, data3; recv_data >> bag >> slot >> count >> data1 >> data2 >> data3; @@ -279,7 +279,7 @@ void WorldSession::HandleDestroyItemOpcode(WorldPacket & recv_data) // Only _static_ data send in this packet !!! void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data) { - //sLog->outDebug("WORLD: CMSG_ITEM_QUERY_SINGLE"); + //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_ITEM_QUERY_SINGLE"); uint32 item; recv_data >> item; @@ -429,7 +429,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data) } else { - sLog->outDebug("WORLD: CMSG_ITEM_QUERY_SINGLE - NO item INFO! (ENTRY: %u)", item); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_ITEM_QUERY_SINGLE - NO item INFO! (ENTRY: %u)", item); WorldPacket data(SMSG_ITEM_QUERY_SINGLE_RESPONSE, 4); data << uint32(item | 0x80000000); SendPacket(&data); @@ -438,7 +438,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data) void WorldSession::HandleReadItem(WorldPacket & recv_data) { - //sLog->outDebug("WORLD: CMSG_READ_ITEM"); + //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_READ_ITEM"); uint8 bag, slot; recv_data >> bag >> slot; @@ -471,7 +471,7 @@ void WorldSession::HandleReadItem(WorldPacket & recv_data) void WorldSession::HandlePageQuerySkippedOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_PAGE_TEXT_QUERY"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PAGE_TEXT_QUERY"); uint32 itemid; uint64 guid; @@ -484,7 +484,7 @@ void WorldSession::HandlePageQuerySkippedOpcode(WorldPacket & recv_data) void WorldSession::HandleSellItemOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_SELL_ITEM"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SELL_ITEM"); uint64 vendorguid, itemguid; uint32 count; @@ -496,7 +496,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket & recv_data) Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid,UNIT_NPC_FLAG_VENDOR); if (!pCreature) { - sLog->outDebug("WORLD: HandleSellItemOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleSellItemOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid))); _player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, itemguid, 0); return; } @@ -598,7 +598,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket & recv_data) void WorldSession::HandleBuybackItem(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_BUYBACK_ITEM"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUYBACK_ITEM"); uint64 vendorguid; uint32 slot; @@ -607,7 +607,7 @@ void WorldSession::HandleBuybackItem(WorldPacket & recv_data) Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid,UNIT_NPC_FLAG_VENDOR); if (!pCreature) { - sLog->outDebug("WORLD: HandleBuybackItem - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleBuybackItem - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid))); _player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0); return; } @@ -646,7 +646,7 @@ void WorldSession::HandleBuybackItem(WorldPacket & recv_data) void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_BUY_ITEM_IN_SLOT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUY_ITEM_IN_SLOT"); uint64 vendorguid, bagguid; uint32 item, slot, count; uint8 bagslot; @@ -688,7 +688,7 @@ void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket & recv_data) void WorldSession::HandleBuyItemOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_BUY_ITEM"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUY_ITEM"); uint64 vendorguid; uint32 item, slot, count; uint8 unk1; @@ -713,19 +713,19 @@ void WorldSession::HandleListInventoryOpcode(WorldPacket & recv_data) if (!GetPlayer()->isAlive()) return; - sLog->outDebug("WORLD: Recvd CMSG_LIST_INVENTORY"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_LIST_INVENTORY"); SendListInventory(guid); } void WorldSession::SendListInventory(uint64 vendorguid) { - sLog->outDebug("WORLD: Sent SMSG_LIST_INVENTORY"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_LIST_INVENTORY"); Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid,UNIT_NPC_FLAG_VENDOR); if (!pCreature) { - sLog->outDebug("WORLD: SendListInventory - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendListInventory - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid))); _player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0); return; } @@ -802,7 +802,7 @@ void WorldSession::SendListInventory(uint64 vendorguid) void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket & recv_data) { - //sLog->outDebug("WORLD: CMSG_AUTOSTORE_BAG_ITEM"); + //sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_AUTOSTORE_BAG_ITEM"); uint8 srcbag, srcslot, dstbag; recv_data >> srcbag >> srcslot >> dstbag; @@ -853,7 +853,7 @@ void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket & recv_data) void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: CMSG_BUY_BANK_SLOT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_BUY_BANK_SLOT"); uint64 guid; recvPacket >> guid; @@ -906,11 +906,11 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket) void WorldSession::HandleAutoBankItemOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: CMSG_AUTOBANK_ITEM"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AUTOBANK_ITEM"); uint8 srcbag, srcslot; recvPacket >> srcbag >> srcslot; - sLog->outDebug("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot); + sLog->outDebug(LOG_FILTER_NETWORKIO, "STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot); Item *pItem = _player->GetItemByPos(srcbag, srcslot); if (!pItem) @@ -936,11 +936,11 @@ void WorldSession::HandleAutoBankItemOpcode(WorldPacket& recvPacket) void WorldSession::HandleAutoStoreBankItemOpcode(WorldPacket& recvPacket) { - sLog->outDebug("WORLD: CMSG_AUTOSTORE_BANK_ITEM"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AUTOSTORE_BANK_ITEM"); uint8 srcbag, srcslot; recvPacket >> srcbag >> srcslot; - sLog->outDebug("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot); + sLog->outDebug(LOG_FILTER_NETWORKIO, "STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot); Item *pItem = _player->GetItemByPos(srcbag, srcslot); if (!pItem) @@ -982,7 +982,7 @@ void WorldSession::HandleSetAmmoOpcode(WorldPacket & recv_data) return; } - sLog->outDebug("WORLD: CMSG_SET_AMMO"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SET_AMMO"); uint32 item; recv_data >> item; @@ -1021,7 +1021,7 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recv_data) recv_data >> itemid; recv_data.read_skip<uint64>(); // guid - sLog->outDebug("WORLD: CMSG_ITEM_NAME_QUERY %u", itemid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_ITEM_NAME_QUERY %u", itemid); ItemSetNameEntry const *pName = sObjectMgr->GetItemSetNameEntry(itemid); if (pName) { @@ -1041,7 +1041,7 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recv_data) void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data) { - sLog->outDebug("Received opcode CMSG_WRAP_ITEM"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_WRAP_ITEM"); uint8 gift_bag, gift_slot, item_bag, item_slot; //recv_data.hexlike(); @@ -1049,7 +1049,7 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data) recv_data >> gift_bag >> gift_slot; // paper recv_data >> item_bag >> item_slot; // item - sLog->outDebug("WRAP: receive gift_bag = %u, gift_slot = %u, item_bag = %u, item_slot = %u", gift_bag, gift_slot, item_bag, item_slot); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WRAP: receive gift_bag = %u, gift_slot = %u, item_bag = %u, item_slot = %u", gift_bag, gift_slot, item_bag, item_slot); Item *gift = _player->GetItemByPos(gift_bag, gift_slot); if (!gift) @@ -1146,7 +1146,7 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data) void WorldSession::HandleSocketOpcode(WorldPacket& recv_data) { - sLog->outDebug("WORLD: CMSG_SOCKET_GEMS"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SOCKET_GEMS"); uint64 item_guid; uint64 gem_guids[MAX_GEM_SOCKETS]; @@ -1340,7 +1340,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data) void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recv_data) { - sLog->outDebug("WORLD: CMSG_CANCEL_TEMP_ENCHANTMENT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CANCEL_TEMP_ENCHANTMENT"); uint32 eslot; @@ -1364,7 +1364,7 @@ void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recv_data) void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data) { - sLog->outDebug("WORLD: CMSG_ITEM_REFUND_INFO"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_ITEM_REFUND_INFO"); uint64 guid; recv_data >> guid; // item guid @@ -1372,7 +1372,7 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data) Item *item = _player->GetItemByGuid(guid); if (!item) { - sLog->outDebug("Item refund: item not found!"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Item refund: item not found!"); return; } @@ -1381,14 +1381,14 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data) void WorldSession::HandleItemRefund(WorldPacket &recv_data) { - sLog->outDebug("WORLD: CMSG_ITEM_REFUND"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_ITEM_REFUND"); uint64 guid; recv_data >> guid; // item guid Item *item = _player->GetItemByGuid(guid); if (!item) { - sLog->outDebug("Item refund: item not found!"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Item refund: item not found!"); return; } @@ -1405,7 +1405,7 @@ void WorldSession::HandleItemTextQuery(WorldPacket & recv_data ) uint64 itemGuid; recv_data >> itemGuid; - sLog->outDebug("CMSG_ITEM_TEXT_QUERY item guid: %u", GUID_LOPART(itemGuid)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ITEM_TEXT_QUERY item guid: %u", GUID_LOPART(itemGuid)); WorldPacket data(SMSG_ITEM_TEXT_QUERY_RESPONSE, (4+10)); // guess size diff --git a/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp b/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp index ac8ce189f4b..5e8532f351b 100755 --- a/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp @@ -62,7 +62,7 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recv_data) recv_data >> numDungeons; if (!numDungeons) { - sLog->outDebug("CMSG_LFG_JOIN [" UI64FMTD "] no dungeons selected", GetPlayer()->GetGUID()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_JOIN [" UI64FMTD "] no dungeons selected", GetPlayer()->GetGUID()); recv_data.rpos(recv_data.wpos()); return; } @@ -78,7 +78,7 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recv_data) std::string comment; recv_data >> comment; - sLog->outDebug("CMSG_LFG_JOIN [" UI64FMTD "] roles: %u, Dungeons: %u, Comment: %s", GetPlayer()->GetGUID(), roles, uint8(newDungeons.size()), comment.c_str()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_JOIN [" UI64FMTD "] roles: %u, Dungeons: %u, Comment: %s", GetPlayer()->GetGUID(), roles, uint8(newDungeons.size()), comment.c_str()); sLFGMgr->Join(GetPlayer(), uint8(roles), newDungeons, comment); } @@ -86,7 +86,7 @@ void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recv_data*/) { Group* grp = GetPlayer()->GetGroup(); - sLog->outDebug("CMSG_LFG_LEAVE [" UI64FMTD "] in group: %u", GetPlayer()->GetGUID(), grp ? 1 : 0); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_LEAVE [" UI64FMTD "] in group: %u", GetPlayer()->GetGUID(), grp ? 1 : 0); // Check cheating - only leader can leave the queue if (!grp || grp->GetLeaderGUID() == GetPlayer()->GetGUID()) @@ -100,7 +100,7 @@ void WorldSession::HandleLfgProposalResultOpcode(WorldPacket& recv_data) recv_data >> lfgGroupID; recv_data >> accept; - sLog->outDebug("CMSG_LFG_PROPOSAL_RESULT [" UI64FMTD "] proposal: %u accept: %u", GetPlayer()->GetGUID(), lfgGroupID, accept ? 1 : 0); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_PROPOSAL_RESULT [" UI64FMTD "] proposal: %u accept: %u", GetPlayer()->GetGUID(), lfgGroupID, accept ? 1 : 0); sLFGMgr->UpdateProposal(lfgGroupID, GetPlayer()->GetGUID(), accept); } @@ -112,11 +112,11 @@ void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recv_data) Group* grp = GetPlayer()->GetGroup(); if (!grp) { - sLog->outDebug("CMSG_LFG_SET_ROLES [" UI64FMTD "] Not in group", guid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_SET_ROLES [" UI64FMTD "] Not in group", guid); return; } uint64 gguid = grp->GetGUID(); - sLog->outDebug("CMSG_LFG_SET_ROLES: Group [" UI64FMTD "], Player [" UI64FMTD "], Roles: %u", gguid, guid, roles); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_SET_ROLES: Group [" UI64FMTD "], Player [" UI64FMTD "], Roles: %u", gguid, guid, roles); sLFGMgr->UpdateRoleCheck(gguid, guid, roles); } @@ -125,7 +125,7 @@ void WorldSession::HandleLfgSetCommentOpcode(WorldPacket& recv_data) std::string comment; recv_data >> comment; uint64 guid = GetPlayer()->GetGUID(); - sLog->outDebug("CMSG_SET_LFG_COMMENT [" UI64FMTD "] comment: %s", guid, comment.c_str()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_SET_LFG_COMMENT [" UI64FMTD "] comment: %s", guid, comment.c_str()); sLFGMgr->SetComment(guid, comment); } @@ -135,7 +135,7 @@ void WorldSession::HandleLfgSetBootVoteOpcode(WorldPacket& recv_data) bool agree; // Agree to kick player recv_data >> agree; - sLog->outDebug("CMSG_LFG_SET_BOOT_VOTE [" UI64FMTD "] agree: %u", GetPlayer()->GetGUID(), agree ? 1 : 0); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_SET_BOOT_VOTE [" UI64FMTD "] agree: %u", GetPlayer()->GetGUID(), agree ? 1 : 0); sLFGMgr->UpdateBoot(GetPlayer(), agree); } @@ -144,14 +144,14 @@ void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recv_data) bool out; recv_data >> out; - sLog->outDebug("CMSG_LFG_TELEPORT [" UI64FMTD "] out: %u", GetPlayer()->GetGUID(), out ? 1 : 0); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_TELEPORT [" UI64FMTD "] out: %u", GetPlayer()->GetGUID(), out ? 1 : 0); sLFGMgr->TeleportPlayer(GetPlayer(), out, true); } void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recv_data*/) { uint64 guid = GetPlayer()->GetGUID(); - sLog->outDebug("CMSG_LFD_PLAYER_LOCK_INFO_REQUEST [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFD_PLAYER_LOCK_INFO_REQUEST [" UI64FMTD "]", guid); // Get Random dungeons that can be done at a certain level and expansion // FIXME - Should return seasonals (when not disabled) @@ -171,7 +171,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recv_data uint32 rsize = uint32(randomDungeons.size()); uint32 lsize = uint32(lock.size()); - sLog->outDebug("SMSG_LFG_PLAYER_INFO [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_PLAYER_INFO [" UI64FMTD "]", guid); WorldPacket data(SMSG_LFG_PLAYER_INFO, 1 + rsize * (4 + 1 + 4 + 4 + 4 + 4 + 1 + 4 + 4 + 4) + 4 + lsize * (1 + 4 + 4 + 4 + 4 + 1 + 4 + 4 + 4)); data << uint8(randomDungeons.size()); // Random Dungeon count @@ -232,7 +232,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recv_data void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recv_data*/) { uint64 guid = GetPlayer()->GetGUID(); - sLog->outDebug("CMSG_LFD_PARTY_LOCK_INFO_REQUEST [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFD_PARTY_LOCK_INFO_REQUEST [" UI64FMTD "]", guid); Group* grp = GetPlayer()->GetGroup(); if (!grp) @@ -257,7 +257,7 @@ void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recv_data for (LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it) size += 8 + 4 + uint32(it->second.size()) * (4 + 4); - sLog->outDebug("SMSG_LFG_PARTY_INFO [" UI64FMTD "]", guid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_PARTY_INFO [" UI64FMTD "]", guid); WorldPacket data(SMSG_LFG_PARTY_INFO, 1 + size); BuildPartyLockDungeonBlock(data, lockMap); SendPacket(&data); @@ -267,7 +267,7 @@ void WorldSession::HandleLfrSearchOpcode(WorldPacket& recv_data) { uint32 entry; // Raid id to search recv_data >> entry; - sLog->outDebug("CMSG_SEARCH_LFG_JOIN [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), entry); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_SEARCH_LFG_JOIN [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), entry); //SendLfrUpdateListOpcode(entry); } @@ -275,7 +275,7 @@ void WorldSession::HandleLfrLeaveOpcode(WorldPacket& recv_data) { uint32 dungeonId; // Raid id queue to leave recv_data >> dungeonId; - sLog->outDebug("CMSG_SEARCH_LFG_LEAVE [" UI64FMTD "] dungeonId: %u", GetPlayer()->GetGUID(), dungeonId); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_SEARCH_LFG_LEAVE [" UI64FMTD "] dungeonId: %u", GetPlayer()->GetGUID(), dungeonId); //sLFGMgr->LeaveLfr(GetPlayer(), dungeonId); } @@ -302,7 +302,7 @@ void WorldSession::SendLfgUpdatePlayer(const LfgUpdateData& updateData) uint64 guid = GetPlayer()->GetGUID(); uint8 size = uint8(updateData.dungeons.size()); - sLog->outDebug("SMSG_LFG_UPDATE_PLAYER [" UI64FMTD "] updatetype: %u", guid, updateData.updateType); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_UPDATE_PLAYER [" UI64FMTD "] updatetype: %u", guid, updateData.updateType); WorldPacket data(SMSG_LFG_UPDATE_PLAYER, 1 + 1 + (extrainfo ? 1 : 0) * (1 + 1 + 1 + 1 + size * 4 + updateData.comment.length())); data << uint8(updateData.updateType); // Lfg Update type data << uint8(extrainfo); // Extra info @@ -352,7 +352,7 @@ void WorldSession::SendLfgUpdateParty(const LfgUpdateData& updateData) uint64 guid = GetPlayer()->GetGUID(); uint8 size = uint8(updateData.dungeons.size()); - sLog->outDebug("SMSG_LFG_UPDATE_PARTY [" UI64FMTD "] updatetype: %u", guid, updateData.updateType); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_UPDATE_PARTY [" UI64FMTD "] updatetype: %u", guid, updateData.updateType); WorldPacket data(SMSG_LFG_UPDATE_PARTY, 1 + 1 + (extrainfo ? 1 : 0) * (1 + 1 + 1 + 1 + 1 + size * 4 + updateData.comment.length())); data << uint8(updateData.updateType); // Lfg Update type data << uint8(extrainfo); // Extra info @@ -376,7 +376,7 @@ void WorldSession::SendLfgUpdateParty(const LfgUpdateData& updateData) void WorldSession::SendLfgRoleChosen(uint64 guid, uint8 roles) { - sLog->outDebug("SMSG_LFG_ROLE_CHOSEN [" UI64FMTD "] guid: [" UI64FMTD "] roles: %u", GetPlayer()->GetGUID(), guid, roles); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_ROLE_CHOSEN [" UI64FMTD "] guid: [" UI64FMTD "] roles: %u", GetPlayer()->GetGUID(), guid, roles); WorldPacket data(SMSG_LFG_ROLE_CHOSEN, 8 + 1 + 4); data << uint64(guid); // Guid @@ -394,7 +394,7 @@ void WorldSession::SendLfgRoleCheckUpdate(const LfgRoleCheck* pRoleCheck) else dungeons = pRoleCheck->dungeons; - sLog->outDebug("SMSG_LFG_ROLE_CHECK_UPDATE [" UI64FMTD "]", GetPlayer()->GetGUID()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_ROLE_CHECK_UPDATE [" UI64FMTD "]", GetPlayer()->GetGUID()); WorldPacket data(SMSG_LFG_ROLE_CHECK_UPDATE, 4 + 1 + 1 + dungeons.size() * 4 + 1 + pRoleCheck->roles.size() * (8 + 1 + 4 + 1)); data << uint32(pRoleCheck->state); // Check result @@ -444,7 +444,7 @@ void WorldSession::SendLfgJoinResult(const LfgJoinResultData& joinData) for (LfgLockPartyMap::const_iterator it = joinData.lockmap.begin(); it != joinData.lockmap.end(); ++it) size += 8 + 4 + uint32(it->second.size()) * (4 + 4); - sLog->outDebug("SMSG_LFG_JOIN_RESULT [" UI64FMTD "] checkResult: %u checkValue: %u", GetPlayer()->GetGUID(), joinData.result, joinData.state); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_JOIN_RESULT [" UI64FMTD "] checkResult: %u checkValue: %u", GetPlayer()->GetGUID(), joinData.result, joinData.state); WorldPacket data(SMSG_LFG_JOIN_RESULT, 4 + 4 + size); data << uint32(joinData.result); // Check Result data << uint32(joinData.state); // Check Value @@ -455,7 +455,7 @@ void WorldSession::SendLfgJoinResult(const LfgJoinResultData& joinData) void WorldSession::SendLfgQueueStatus(uint32 dungeon, int32 waitTime, int32 avgWaitTime, int32 waitTimeTanks, int32 waitTimeHealer, int32 waitTimeDps, uint32 queuedTime, uint8 tanks, uint8 healers, uint8 dps) { - sLog->outDebug("SMSG_LFG_QUEUE_STATUS [" UI64FMTD "] dungeon: %u - waitTime: %d - avgWaitTime: %d - waitTimeTanks: %d - waitTimeHealer: %d - waitTimeDps: %d - queuedTime: %u - tanks: %u - healers: %u - dps: %u", GetPlayer()->GetGUID(), dungeon, waitTime, avgWaitTime, waitTimeTanks, waitTimeHealer, waitTimeDps, queuedTime, tanks, healers, dps); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_QUEUE_STATUS [" UI64FMTD "] dungeon: %u - waitTime: %d - avgWaitTime: %d - waitTimeTanks: %d - waitTimeHealer: %d - waitTimeDps: %d - queuedTime: %u - tanks: %u - healers: %u - dps: %u", GetPlayer()->GetGUID(), dungeon, waitTime, avgWaitTime, waitTimeTanks, waitTimeHealer, waitTimeDps, queuedTime, tanks, healers, dps); WorldPacket data(SMSG_LFG_QUEUE_STATUS, 4 + 4 + 4 + 4 + 4 +4 + 1 + 1 + 1 + 4); data << uint32(dungeon); // Dungeon @@ -478,7 +478,7 @@ void WorldSession::SendLfgPlayerReward(uint32 rdungeonEntry, uint32 sdungeonEntr uint8 itemNum = uint8(qRew ? qRew->GetRewItemsCount() : 0); - sLog->outDebug("SMSG_LFG_PLAYER_REWARD [" UI64FMTD "] rdungeonEntry: %u - sdungeonEntry: %u - done: %u", GetPlayer()->GetGUID(), rdungeonEntry, sdungeonEntry, done); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_PLAYER_REWARD [" UI64FMTD "] rdungeonEntry: %u - sdungeonEntry: %u - done: %u", GetPlayer()->GetGUID(), rdungeonEntry, sdungeonEntry, done); WorldPacket data(SMSG_LFG_PLAYER_REWARD, 4 + 4 + 1 + 4 + 4 + 4 + 4 + 4 + 1 + itemNum * (4 + 4 + 4)); data << uint32(rdungeonEntry); // Random Dungeon Finished data << uint32(sdungeonEntry); // Dungeon Finished @@ -523,7 +523,7 @@ void WorldSession::SendLfgBootPlayer(const LfgPlayerBoot* pBoot) ++agreeNum; } } - sLog->outDebug("SMSG_LFG_BOOT_PLAYER [" UI64FMTD "] inProgress: %u - didVote: %u - agree: %u - victim: [" UI64FMTD "] votes: %u - agrees: %u - left: %u - needed: %u - reason %s", + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_BOOT_PLAYER [" UI64FMTD "] inProgress: %u - didVote: %u - agree: %u - victim: [" UI64FMTD "] votes: %u - agrees: %u - left: %u - needed: %u - reason %s", guid, uint8(pBoot->inProgress), uint8(playerVote != LFG_ANSWER_PENDING), uint8(playerVote == LFG_ANSWER_AGREE), pBoot->victim, votesNum, agreeNum, secsleft, pBoot->votedNeeded, pBoot->reason.c_str()); WorldPacket data(SMSG_LFG_BOOT_PLAYER, 1 + 1 + 1 + 8 + 4 + 4 + 4 + 4 + pBoot->reason.length()); data << uint8(pBoot->inProgress); // Vote in progress @@ -563,7 +563,7 @@ void WorldSession::SendLfgUpdateProposal(uint32 proposalId, const LfgProposal* p isSameDungeon = GetPlayer()->GetGroup() == grp && isContinue; } - sLog->outDebug("SMSG_LFG_PROPOSAL_UPDATE [" UI64FMTD "] state: %u", GetPlayer()->GetGUID(), pProp->state); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_PROPOSAL_UPDATE [" UI64FMTD "] state: %u", GetPlayer()->GetGUID(), pProp->state); WorldPacket data(SMSG_LFG_PROPOSAL_UPDATE, 4 + 1 + 4 + 4 + 1 + 1 + pProp->players.size() * (4 + 1 + 1 + 1 + 1 +1)); if (!isContinue) // Only show proposal dungeon if it's continue @@ -623,7 +623,7 @@ void WorldSession::SendLfgUpdateProposal(uint32 proposalId, const LfgProposal* p void WorldSession::SendLfgUpdateSearch(bool update) { - sLog->outDebug("SMSG_LFG_UPDATE_SEARCH [" UI64FMTD "] update: %u", GetPlayer()->GetGUID(), update ? 1 : 0); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_UPDATE_SEARCH [" UI64FMTD "] update: %u", GetPlayer()->GetGUID(), update ? 1 : 0); WorldPacket data(SMSG_LFG_UPDATE_SEARCH, 1); data << uint8(update); // In Lfg Queue? SendPacket(&data); @@ -631,14 +631,14 @@ void WorldSession::SendLfgUpdateSearch(bool update) void WorldSession::SendLfgDisabled() { - sLog->outDebug("SMSG_LFG_DISABLED [" UI64FMTD "]", GetPlayer()->GetGUID()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_DISABLED [" UI64FMTD "]", GetPlayer()->GetGUID()); WorldPacket data(SMSG_LFG_DISABLED, 0); SendPacket(&data); } void WorldSession::SendLfgOfferContinue(uint32 dungeonEntry) { - sLog->outDebug("SMSG_LFG_OFFER_CONTINUE [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), dungeonEntry); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_OFFER_CONTINUE [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), dungeonEntry); WorldPacket data(SMSG_LFG_OFFER_CONTINUE, 4); data << uint32(dungeonEntry); SendPacket(&data); @@ -646,7 +646,7 @@ void WorldSession::SendLfgOfferContinue(uint32 dungeonEntry) void WorldSession::SendLfgTeleportError(uint8 err) { - sLog->outDebug("SMSG_LFG_TELEPORT_DENIED [" UI64FMTD "] reason: %u", GetPlayer()->GetGUID(), err); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_TELEPORT_DENIED [" UI64FMTD "] reason: %u", GetPlayer()->GetGUID(), err); WorldPacket data(SMSG_LFG_TELEPORT_DENIED, 4); data << uint32(err); // Error SendPacket(&data); @@ -655,7 +655,7 @@ void WorldSession::SendLfgTeleportError(uint8 err) /* void WorldSession::SendLfrUpdateListOpcode(uint32 dungeonEntry) { - sLog->outDebug("SMSG_UPDATE_LFG_LIST [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), dungeonEntry); + sLog->outDebug(LOG_FILTER_PACKETIO, "SMSG_UPDATE_LFG_LIST [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), dungeonEntry); WorldPacket data(SMSG_UPDATE_LFG_LIST); SendPacket(&data); } diff --git a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp b/src/server/game/Server/Protocol/Handlers/LootHandler.cpp index 222d9bbe525..916ad8579e8 100755 --- a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/LootHandler.cpp @@ -32,7 +32,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_AUTOSTORE_LOOT_ITEM"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AUTOSTORE_LOOT_ITEM"); Player* player = GetPlayer(); uint64 lguid = player->GetLootGUID(); Loot* loot = NULL; @@ -96,7 +96,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recv_data) void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recv_data*/) { - sLog->outDebug("WORLD: CMSG_LOOT_MONEY"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_LOOT_MONEY"); Player *player = GetPlayer(); uint64 guid = player->GetLootGUID(); @@ -187,7 +187,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recv_data*/) void WorldSession::HandleLootOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_LOOT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_LOOT"); uint64 guid; recv_data >> guid; @@ -205,7 +205,7 @@ void WorldSession::HandleLootOpcode(WorldPacket & recv_data) void WorldSession::HandleLootReleaseOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_LOOT_RELEASE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_LOOT_RELEASE"); // cheaters can modify lguid to prevent correct apply loot release code and re-loot // use internal stored guid @@ -426,7 +426,7 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket & recv_data) if (!target) return; - sLog->outDebug("WorldSession::HandleLootMasterGiveOpcode (CMSG_LOOT_MASTER_GIVE, 0x02A3) Target = [%s].", target->GetName()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSession::HandleLootMasterGiveOpcode (CMSG_LOOT_MASTER_GIVE, 0x02A3) Target = [%s].", target->GetName()); if (_player->GetLootGUID() != lootguid) return; @@ -455,7 +455,7 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket & recv_data) if (slotid > pLoot->items.size()) { - sLog->outDebug("MasterLootItem: Player %s might be using a hack! (slot %d, size %lu)",GetPlayer()->GetName(), slotid, (unsigned long)pLoot->items.size()); + sLog->outDebug(LOG_FILTER_LOOT, "MasterLootItem: Player %s might be using a hack! (slot %d, size %lu)",GetPlayer()->GetName(), slotid, (unsigned long)pLoot->items.size()); return; } diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp index 8b659d82c02..caab8144ff3 100755 --- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp @@ -52,7 +52,7 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Recvd CMSG_REPOP_REQUEST Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_REPOP_REQUEST Message"); recv_data.read_skip<uint8>(); @@ -66,7 +66,7 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket & recv_data) // release spirit after he's killed but before he is updated if (GetPlayer()->getDeathState() == JUST_DIED) { - sLog->outDebug("HandleRepopRequestOpcode: got request after player %s(%d) was killed and before he was updated", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleRepopRequestOpcode: got request after player %s(%d) was killed and before he was updated", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow()); GetPlayer()->KillPlayer(); } @@ -78,7 +78,7 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket & recv_data) void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_GOSSIP_SELECT_OPTION"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GOSSIP_SELECT_OPTION"); uint32 gossipListId; uint32 menuId; @@ -88,12 +88,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) recv_data >> guid >> menuId >> gossipListId; if (_player->PlayerTalkClass->GossipOptionCoded(gossipListId)) - { - // recheck - sLog->outBasic("reading string"); recv_data >> code; - sLog->outBasic("string read: %s", code.c_str()); - } Creature *unit = NULL; GameObject *go = NULL; @@ -102,7 +97,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); if (!unit) { - sLog->outDebug("WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); return; } } @@ -111,13 +106,13 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) go = _player->GetMap()->GetGameObject(guid); if (!go) { - sLog->outDebug("WORLD: HandleGossipSelectOptionOpcode - GameObject (GUID: %u) not found.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - GameObject (GUID: %u) not found.", uint32(GUID_LOPART(guid))); return; } } else { - sLog->outDebug("WORLD: HandleGossipSelectOptionOpcode - unsupported GUID type for highguid %u. lowpart %u.", uint32(GUID_HIPART(guid)), uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - unsupported GUID type for highguid %u. lowpart %u.", uint32(GUID_HIPART(guid)), uint32(GUID_LOPART(guid))); return; } @@ -127,7 +122,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) if ((unit && unit->GetCreatureInfo()->ScriptID != unit->LastUsedScriptID) || (go && go->GetGOInfo()->ScriptId != go->LastUsedScriptID)) { - sLog->outDebug("WORLD: HandleGossipSelectOptionOpcode - Script reloaded while in use, ignoring and set new scipt id"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - Script reloaded while in use, ignoring and set new scipt id"); if (unit) unit->LastUsedScriptID = unit->GetCreatureInfo()->ScriptID; if (go) @@ -167,7 +162,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) void WorldSession::HandleWhoOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Recvd CMSG_WHO Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_WHO Message"); //recv_data.hexlike(); uint32 matchcount = 0; @@ -194,7 +189,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data) uint32 temp; recv_data >> temp; // zone id, 0 if zone is unknown... zoneids[i] = temp; - sLog->outDebug("Zone %u: %u", i, zoneids[i]); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Zone %u: %u", i, zoneids[i]); } recv_data >> str_count; // user entered strings count, client limit=4 (checked on 2.0.10) @@ -202,7 +197,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data) if (str_count > 4) return; // can't be received from real client or broken packet - sLog->outDebug("Minlvl %u, maxlvl %u, name %s, guild %s, racemask %u, classmask %u, zones %u, strings %u", level_min, level_max, player_name.c_str(), guild_name.c_str(), racemask, classmask, zones_count, str_count); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Minlvl %u, maxlvl %u, name %s, guild %s, racemask %u, classmask %u, zones %u, strings %u", level_min, level_max, player_name.c_str(), guild_name.c_str(), racemask, classmask, zones_count, str_count); std::wstring str[4]; // 4 is client limit for (uint32 i = 0; i < str_count; ++i) @@ -215,7 +210,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data) wstrToLower(str[i]); - sLog->outDebug("String %u: %s", i, temp.c_str()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "String %u: %s", i, temp.c_str()); } std::wstring wplayer_name; @@ -355,12 +350,12 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data) data.put(4, matchcount); // insert right count, count of matches SendPacket(&data); - sLog->outDebug("WORLD: Send SMSG_WHO Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Send SMSG_WHO Message"); } void WorldSession::HandleLogoutRequestOpcode(WorldPacket & /*recv_data*/) { - sLog->outDebug("WORLD: Recvd CMSG_LOGOUT_REQUEST Message, security - %u", GetSecurity()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_LOGOUT_REQUEST Message, security - %u", GetSecurity()); if (uint64 lguid = GetPlayer()->GetLootGUID()) DoLootRelease(lguid); @@ -417,12 +412,12 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket & /*recv_data*/) void WorldSession::HandlePlayerLogoutOpcode(WorldPacket & /*recv_data*/) { - sLog->outDebug("WORLD: Recvd CMSG_PLAYER_LOGOUT Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_PLAYER_LOGOUT Message"); } void WorldSession::HandleLogoutCancelOpcode(WorldPacket & /*recv_data*/) { - sLog->outDebug("WORLD: Recvd CMSG_LOGOUT_CANCEL Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_LOGOUT_CANCEL Message"); LogoutRequest(0); @@ -445,7 +440,7 @@ void WorldSession::HandleLogoutCancelOpcode(WorldPacket & /*recv_data*/) GetPlayer()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); } - sLog->outDebug("WORLD: sent SMSG_LOGOUT_CANCEL_ACK Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_LOGOUT_CANCEL_ACK Message"); } void WorldSession::HandleTogglePvP(WorldPacket & recv_data) @@ -527,7 +522,7 @@ void WorldSession::HandleSetSelectionOpcode(WorldPacket & recv_data) void WorldSession::HandleStandStateChangeOpcode(WorldPacket & recv_data) { - // sLog->outDebug("WORLD: Received CMSG_STANDSTATECHANGE"); -- too many spam in log at lags/debug stop + // sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Received CMSG_STANDSTATECHANGE"); -- too many spam in log at lags/debug stop uint32 animstate; recv_data >> animstate; @@ -536,16 +531,16 @@ void WorldSession::HandleStandStateChangeOpcode(WorldPacket & recv_data) void WorldSession::HandleContactListOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_CONTACT_LIST"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_CONTACT_LIST"); uint32 unk; recv_data >> unk; - sLog->outDebug("unk value is %u", unk); + sLog->outDebug(LOG_FILTER_NETWORKIO, "unk value is %u", unk); _player->GetSocial()->SendSocialList(_player); } void WorldSession::HandleAddFriendOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_ADD_FRIEND"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ADD_FRIEND"); std::string friendName = GetTrinityString(LANG_FRIEND_IGNORE_UNKNOWN); std::string friendNote; @@ -559,7 +554,7 @@ void WorldSession::HandleAddFriendOpcode(WorldPacket & recv_data) CharacterDatabase.escape_string(friendName); // prevent SQL injection - normal name don't must changed by this call - sLog->outDebug("WORLD: %s asked to add friend : '%s'", + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: %s asked to add friend : '%s'", GetPlayer()->GetName(), friendName.c_str()); m_addFriendCallback.SetParam(friendNote); @@ -607,7 +602,7 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult result, std::string if (!GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(friendGuid), false)) { friendResult = FRIEND_LIST_FULL; - sLog->outDebug("WORLD: %s's friend list is full.", GetPlayer()->GetName()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: %s's friend list is full.", GetPlayer()->GetName()); } } GetPlayer()->GetSocial()->SetFriendNote(GUID_LOPART(friendGuid), friendNote); @@ -617,14 +612,14 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult result, std::string sSocialMgr->SendFriendStatus(GetPlayer(), friendResult, GUID_LOPART(friendGuid), false); - sLog->outDebug("WORLD: Sent (SMSG_FRIEND_STATUS)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_FRIEND_STATUS)"); } void WorldSession::HandleDelFriendOpcode(WorldPacket & recv_data) { uint64 FriendGUID; - sLog->outDebug("WORLD: Received CMSG_DEL_FRIEND"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_DEL_FRIEND"); recv_data >> FriendGUID; @@ -632,12 +627,12 @@ void WorldSession::HandleDelFriendOpcode(WorldPacket & recv_data) sSocialMgr->SendFriendStatus(GetPlayer(), FRIEND_REMOVED, GUID_LOPART(FriendGUID), false); - sLog->outDebug("WORLD: Sent motd (SMSG_FRIEND_STATUS)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent motd (SMSG_FRIEND_STATUS)"); } void WorldSession::HandleAddIgnoreOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_ADD_IGNORE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ADD_IGNORE"); std::string IgnoreName = GetTrinityString(LANG_FRIEND_IGNORE_UNKNOWN); @@ -648,7 +643,7 @@ void WorldSession::HandleAddIgnoreOpcode(WorldPacket & recv_data) CharacterDatabase.escape_string(IgnoreName); // prevent SQL injection - normal name don't must changed by this call - sLog->outDebug("WORLD: %s asked to Ignore: '%s'", + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: %s asked to Ignore: '%s'", GetPlayer()->GetName(), IgnoreName.c_str()); m_addIgnoreCallback = CharacterDatabase.AsyncPQuery("SELECT guid FROM characters WHERE name = '%s'", IgnoreName.c_str()); @@ -688,14 +683,14 @@ void WorldSession::HandleAddIgnoreOpcodeCallBack(QueryResult result) sSocialMgr->SendFriendStatus(GetPlayer(), ignoreResult, GUID_LOPART(IgnoreGuid), false); - sLog->outDebug("WORLD: Sent (SMSG_FRIEND_STATUS)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_FRIEND_STATUS)"); } void WorldSession::HandleDelIgnoreOpcode(WorldPacket & recv_data) { uint64 IgnoreGUID; - sLog->outDebug("WORLD: Received CMSG_DEL_IGNORE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_DEL_IGNORE"); recv_data >> IgnoreGUID; @@ -703,12 +698,12 @@ void WorldSession::HandleDelIgnoreOpcode(WorldPacket & recv_data) sSocialMgr->SendFriendStatus(GetPlayer(), FRIEND_IGNORE_REMOVED, GUID_LOPART(IgnoreGUID), false); - sLog->outDebug("WORLD: Sent motd (SMSG_FRIEND_STATUS)"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent motd (SMSG_FRIEND_STATUS)"); } void WorldSession::HandleSetContactNotesOpcode(WorldPacket & recv_data) { - sLog->outDebug("CMSG_SET_CONTACT_NOTES"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_SET_CONTACT_NOTES"); uint64 guid; std::string note; recv_data >> guid >> note; @@ -725,12 +720,12 @@ void WorldSession::HandleBugOpcode(WorldPacket & recv_data) recv_data >> typelen >> type; if (suggestion == 0) - sLog->outDebug("WORLD: Received CMSG_BUG [Bug Report]"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUG [Bug Report]"); else - sLog->outDebug("WORLD: Received CMSG_BUG [Suggestion]"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUG [Suggestion]"); - sLog->outDebug("%s", type.c_str()); - sLog->outDebug("%s", content.c_str()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", type.c_str()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", content.c_str()); CharacterDatabase.escape_string(type); CharacterDatabase.escape_string(content); @@ -817,29 +812,29 @@ void WorldSession::SendAreaTriggerMessage(const char* Text, ...) void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_AREATRIGGER"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AREATRIGGER"); uint32 Trigger_ID; recv_data >> Trigger_ID; - sLog->outDebug("Trigger ID:%u",Trigger_ID); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Trigger ID:%u",Trigger_ID); if (GetPlayer()->isInFlight()) { - sLog->outDebug("Player '%s' (GUID: %u) in flight, ignore Area Trigger ID:%u",GetPlayer()->GetName(),GetPlayer()->GetGUIDLow(), Trigger_ID); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) in flight, ignore Area Trigger ID:%u",GetPlayer()->GetName(),GetPlayer()->GetGUIDLow(), Trigger_ID); return; } AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID); if (!atEntry) { - sLog->outDebug("Player '%s' (GUID: %u) send unknown (by DBC) Area Trigger ID:%u",GetPlayer()->GetName(),GetPlayer()->GetGUIDLow(), Trigger_ID); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) send unknown (by DBC) Area Trigger ID:%u",GetPlayer()->GetName(),GetPlayer()->GetGUIDLow(), Trigger_ID); return; } if (GetPlayer()->GetMapId() != atEntry->mapid) { - sLog->outDebug("Player '%s' (GUID: %u) too far (trigger map: %u player map: %u), ignore Area Trigger ID: %u", GetPlayer()->GetName(), atEntry->mapid, GetPlayer()->GetMapId(), GetPlayer()->GetGUIDLow(), Trigger_ID); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) too far (trigger map: %u player map: %u), ignore Area Trigger ID: %u", GetPlayer()->GetName(), atEntry->mapid, GetPlayer()->GetMapId(), GetPlayer()->GetGUIDLow(), Trigger_ID); return; } @@ -854,7 +849,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data) float dist = pl->GetDistance(atEntry->x,atEntry->y,atEntry->z); if (dist > atEntry->radius + delta) { - sLog->outDebug("Player '%s' (GUID: %u) too far (radius: %f distance: %f), ignore Area Trigger ID: %u", + sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) too far (radius: %f distance: %f), ignore Area Trigger ID: %u", pl->GetName(), pl->GetGUIDLow(), atEntry->radius, dist, Trigger_ID); return; } @@ -885,7 +880,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data) (fabs(dy) > atEntry->box_y/2 + delta) || (fabs(dz) > atEntry->box_z/2 + delta)) { - sLog->outDebug("Player '%s' (GUID: %u) too far (1/2 box X: %f 1/2 box Y: %f 1/2 box Z: %f rotatedPlayerX: %f rotatedPlayerY: %f dZ:%f), ignore Area Trigger ID: %u", + sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) too far (1/2 box X: %f 1/2 box Y: %f 1/2 box Z: %f rotatedPlayerX: %f rotatedPlayerY: %f dZ:%f), ignore Area Trigger ID: %u", pl->GetName(), pl->GetGUIDLow(), atEntry->box_x/2, atEntry->box_y/2, atEntry->box_z/2, rotPlayerX, rotPlayerY, dz, Trigger_ID); return; } @@ -961,7 +956,7 @@ void WorldSession::HandleUpdateAccountData(WorldPacket &recv_data) uint32 type, timestamp, decompressedSize; recv_data >> type >> timestamp >> decompressedSize; - sLog->outDebug("UAD: type %u, time %u, decompressedSize %u", type, timestamp, decompressedSize); + sLog->outDebug(LOG_FILTER_NETWORKIO, "UAD: type %u, time %u, decompressedSize %u", type, timestamp, decompressedSize); if (type > NUM_ACCOUNT_DATA_TYPES) return; @@ -1016,7 +1011,7 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recv_data) uint32 type; recv_data >> type; - sLog->outDebug("RAD: type %u", type); + sLog->outDebug(LOG_FILTER_NETWORKIO, "RAD: type %u", type); if (type > NUM_ACCOUNT_DATA_TYPES) return; @@ -1032,7 +1027,7 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recv_data) if (size && compress(const_cast<uint8*>(dest.contents()), &destSize, (uint8*)adata->Data.c_str(), size) != Z_OK) { - sLog->outDebug("RAD: Failed to compress account data"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "RAD: Failed to compress account data"); return; } @@ -1049,7 +1044,7 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recv_data) void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data) { - sLog->outDebug("WORLD: Received CMSG_SET_ACTION_BUTTON"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_ACTION_BUTTON"); uint8 button; uint32 packetData; recv_data >> button >> packetData; @@ -1111,7 +1106,7 @@ void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket & recv_data) uint32 time_skipped; recv_data >> guid; recv_data >> time_skipped; - sLog->outDebug("WORLD: CMSG_MOVE_TIME_SKIPPED"); + sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_MOVE_TIME_SKIPPED"); /// TODO must be need use in Trinity @@ -1144,7 +1139,7 @@ void WorldSession::HandleMoveUnRootAck(WorldPacket& recv_data) return; } - sLog->outDebug("WORLD: CMSG_FORCE_MOVE_UNROOT_ACK"); + sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_FORCE_MOVE_UNROOT_ACK"); recv_data.read_skip<uint32>(); // unk @@ -1170,7 +1165,7 @@ void WorldSession::HandleMoveRootAck(WorldPacket& recv_data) return; } - sLog->outDebug("WORLD: CMSG_FORCE_MOVE_ROOT_ACK"); + sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_FORCE_MOVE_ROOT_ACK"); recv_data.read_skip<uint32>(); // unk @@ -1295,7 +1290,7 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recv_data) //sLog->outDebug("Received opcode CMSG_WORLD_TELEPORT"); if (GetPlayer()->isInFlight()) { - sLog->outDebug("Player '%s' (GUID: %u) in flight, ignore worldport command.",GetPlayer()->GetName(),GetPlayer()->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) in flight, ignore worldport command.",GetPlayer()->GetName(),GetPlayer()->GetGUIDLow()); return; } @@ -1305,12 +1300,12 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recv_data) GetPlayer()->TeleportTo(mapid,PositionX,PositionY,PositionZ,Orientation); else SendNotification(LANG_YOU_NOT_HAVE_PERMISSION); - sLog->outDebug("Received worldport command from player %s", GetPlayer()->GetName()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Received worldport command from player %s", GetPlayer()->GetName()); } void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data) { - sLog->outDebug("Received opcode CMSG_WHOIS"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_WHOIS"); std::string charname; recv_data >> charname; @@ -1360,12 +1355,12 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data) data << msg; _player->GetSession()->SendPacket(&data); - sLog->outDebug("Received whois command from player %s for character %s", GetPlayer()->GetName(), charname.c_str()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Received whois command from player %s for character %s", GetPlayer()->GetName(), charname.c_str()); } void WorldSession::HandleComplainOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_COMPLAIN"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_COMPLAIN"); recv_data.hexlike(); uint8 spam_type; // 0 - mail, 1 - chat @@ -1401,12 +1396,12 @@ void WorldSession::HandleComplainOpcode(WorldPacket & recv_data) data << uint8(0); SendPacket(&data); - sLog->outDebug("REPORT SPAM: type %u, guid %u, unk1 %u, unk2 %u, unk3 %u, unk4 %u, message %s", spam_type, GUID_LOPART(spammer_guid), unk1, unk2, unk3, unk4, description.c_str()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "REPORT SPAM: type %u, guid %u, unk1 %u, unk2 %u, unk3 %u, unk4 %u, message %s", spam_type, GUID_LOPART(spammer_guid), unk1, unk2, unk3, unk4, description.c_str()); } void WorldSession::HandleRealmSplitOpcode(WorldPacket & recv_data) { - sLog->outDebug("CMSG_REALM_SPLIT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_REALM_SPLIT"); uint32 unk; std::string split_date = "01/01/01"; @@ -1426,7 +1421,7 @@ void WorldSession::HandleRealmSplitOpcode(WorldPacket & recv_data) void WorldSession::HandleFarSightOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_FAR_SIGHT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_FAR_SIGHT"); //recv_data.hexlike(); uint8 apply; @@ -1435,18 +1430,18 @@ void WorldSession::HandleFarSightOpcode(WorldPacket & recv_data) switch(apply) { case 0: - sLog->outDebug("Player %u set vision to self", _player->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Player %u set vision to self", _player->GetGUIDLow()); _player->SetSeer(_player); break; case 1: - sLog->outDebug("Added FarSight " UI64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Added FarSight " UI64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow()); if (WorldObject *target = _player->GetViewpoint()) _player->SetSeer(target); else sLog->outError("Player %s requests non-existing seer", _player->GetName()); break; default: - sLog->outDebug("Unhandled mode in CMSG_FAR_SIGHT: %u", apply); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Unhandled mode in CMSG_FAR_SIGHT: %u", apply); return; } @@ -1455,7 +1450,7 @@ void WorldSession::HandleFarSightOpcode(WorldPacket & recv_data) void WorldSession::HandleSetTitleOpcode(WorldPacket & recv_data) { - sLog->outDebug("CMSG_SET_TITLE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_SET_TITLE"); int32 title; recv_data >> title; @@ -1474,27 +1469,27 @@ void WorldSession::HandleSetTitleOpcode(WorldPacket & recv_data) void WorldSession::HandleTimeSyncResp(WorldPacket & recv_data) { - sLog->outDebug("CMSG_TIME_SYNC_RESP"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_TIME_SYNC_RESP"); uint32 counter, clientTicks; recv_data >> counter >> clientTicks; if (counter != _player->m_timeSyncCounter - 1) - sLog->outDebug("Wrong time sync counter from player %s (cheater?)", _player->GetName()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Wrong time sync counter from player %s (cheater?)", _player->GetName()); - sLog->outDebug("Time sync received: counter %u, client ticks %u, time since last sync %u", counter, clientTicks, clientTicks - _player->m_timeSyncClient); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Time sync received: counter %u, client ticks %u, time since last sync %u", counter, clientTicks, clientTicks - _player->m_timeSyncClient); uint32 ourTicks = clientTicks + (getMSTime() - _player->m_timeSyncServer); // diff should be small - sLog->outDebug("Our ticks: %u, diff %u, latency %u", ourTicks, ourTicks - clientTicks, GetLatency()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Our ticks: %u, diff %u, latency %u", ourTicks, ourTicks - clientTicks, GetLatency()); _player->m_timeSyncClient = clientTicks; } void WorldSession::HandleResetInstancesOpcode(WorldPacket & /*recv_data*/) { - sLog->outDebug("WORLD: CMSG_RESET_INSTANCES"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_RESET_INSTANCES"); Group *pGroup = _player->GetGroup(); if (pGroup) { @@ -1513,7 +1508,7 @@ void WorldSession::HandleResetInstancesOpcode(WorldPacket & /*recv_data*/) void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data) { - sLog->outDebug("MSG_SET_DUNGEON_DIFFICULTY"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_SET_DUNGEON_DIFFICULTY"); uint32 mode; recv_data >> mode; @@ -1574,7 +1569,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data) void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data) { - sLog->outDebug("MSG_SET_RAID_DIFFICULTY"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_SET_RAID_DIFFICULTY"); uint32 mode; recv_data >> mode; @@ -1635,7 +1630,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data) void WorldSession::HandleCancelMountAuraOpcode(WorldPacket & /*recv_data*/) { - sLog->outDebug("WORLD: CMSG_CANCEL_MOUNT_AURA"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CANCEL_MOUNT_AURA"); //If player is not mounted, so go out :) if (!_player->IsMounted()) // not blizz like; no any messages on blizz @@ -1657,7 +1652,7 @@ void WorldSession::HandleCancelMountAuraOpcode(WorldPacket & /*recv_data*/) void WorldSession::HandleMoveSetCanFlyAckOpcode(WorldPacket & recv_data) { // fly mode on/off - sLog->outDebug("WORLD: CMSG_MOVE_SET_CAN_FLY_ACK"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_MOVE_SET_CAN_FLY_ACK"); //recv_data.hexlike(); uint64 guid; // guid - unused @@ -1678,7 +1673,7 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode(WorldPacket & recv_data) void WorldSession::HandleRequestPetInfoOpcode(WorldPacket & /*recv_data */) { /* - sLog->outDebug("WORLD: CMSG_REQUEST_PET_INFO"); + sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_REQUEST_PET_INFO"); recv_data.hexlike(); */ } @@ -1688,7 +1683,7 @@ void WorldSession::HandleSetTaxiBenchmarkOpcode(WorldPacket & recv_data) uint8 mode; recv_data >> mode; - sLog->outDebug("Client used \"/timetest %d\" command", mode); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Client used \"/timetest %d\" command", mode); } void WorldSession::HandleQueryInspectAchievements(WorldPacket & recv_data) @@ -1706,7 +1701,7 @@ void WorldSession::HandleQueryInspectAchievements(WorldPacket & recv_data) void WorldSession::HandleWorldStateUITimerUpdate(WorldPacket& /*recv_data*/) { // empty opcode - sLog->outDebug("WORLD: CMSG_WORLD_STATE_UI_TIMER_UPDATE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_WORLD_STATE_UI_TIMER_UPDATE"); WorldPacket data(SMSG_WORLD_STATE_UI_TIMER_UPDATE, 4); data << uint32(time(NULL)); @@ -1716,7 +1711,7 @@ void WorldSession::HandleWorldStateUITimerUpdate(WorldPacket& /*recv_data*/) void WorldSession::HandleReadyForAccountDataTimes(WorldPacket& /*recv_data*/) { // empty opcode - sLog->outDebug("WORLD: CMSG_READY_FOR_ACCOUNT_DATA_TIMES"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_READY_FOR_ACCOUNT_DATA_TIMES"); SendAccountDataTimes(GLOBAL_CACHE_MASK); } diff --git a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp index 1090f3c064b..3624773a9b4 100755 --- a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp @@ -34,7 +34,7 @@ void WorldSession::HandleMoveWorldportAckOpcode(WorldPacket & /*recv_data*/) { - sLog->outDebug("WORLD: got MSG_MOVE_WORLDPORT_ACK."); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: got MSG_MOVE_WORLDPORT_ACK."); HandleMoveWorldportAckOpcode(); } @@ -191,7 +191,7 @@ void WorldSession::HandleMoveWorldportAckOpcode() void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data) { - sLog->outDebug("MSG_MOVE_TELEPORT_ACK"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_MOVE_TELEPORT_ACK"); uint64 guid; recv_data.readPackGUID(guid); @@ -395,7 +395,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data) void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data) { uint32 opcode = recv_data.GetOpcode(); - sLog->outDebug("WORLD: Recvd %s (%u, 0x%X) opcode", LookupOpcodeName(opcode), opcode, opcode); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd %s (%u, 0x%X) opcode", LookupOpcodeName(opcode), opcode, opcode); /* extract packet */ uint64 guid; @@ -473,7 +473,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data) void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data) { - sLog->outDebug("WORLD: Recvd CMSG_SET_ACTIVE_MOVER"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_SET_ACTIVE_MOVER"); uint64 guid; recv_data >> guid; @@ -501,7 +501,7 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data) void WorldSession::HandleMoveNotActiveMover(WorldPacket &recv_data) { - sLog->outDebug("WORLD: Recvd CMSG_MOVE_NOT_ACTIVE_MOVER"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_MOVE_NOT_ACTIVE_MOVER"); uint64 old_mover_guid; recv_data.readPackGUID(old_mover_guid); @@ -515,7 +515,7 @@ void WorldSession::HandleMoveNotActiveMover(WorldPacket &recv_data) void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data) { - sLog->outDebug("WORLD: Recvd CMSG_DISMISS_CONTROLLED_VEHICLE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_DISMISS_CONTROLLED_VEHICLE"); recv_data.hexlike(); uint64 vehicleGUID = _player->GetCharmGUID(); @@ -541,7 +541,7 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data) void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data) { - sLog->outDebug("WORLD: Recvd CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE"); recv_data.hexlike(); Unit* vehicle_base = GetPlayer()->GetVehicleBase(); @@ -697,7 +697,7 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data) void WorldSession::HandleRequestVehicleExit(WorldPacket &recv_data) { - sLog->outDebug("WORLD: Recvd CMSG_REQUEST_VEHICLE_EXIT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_REQUEST_VEHICLE_EXIT"); recv_data.hexlike(); if (Vehicle* vehicle = GetPlayer()->GetVehicle()) @@ -723,7 +723,7 @@ void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recv_data*/) void WorldSession::HandleMoveKnockBackAck(WorldPacket & recv_data) { - sLog->outDebug("CMSG_MOVE_KNOCK_BACK_ACK"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_MOVE_KNOCK_BACK_ACK"); uint64 guid; // guid - unused recv_data.readPackGUID(guid); @@ -736,7 +736,7 @@ void WorldSession::HandleMoveKnockBackAck(WorldPacket & recv_data) void WorldSession::HandleMoveHoverAck(WorldPacket& recv_data) { - sLog->outDebug("CMSG_MOVE_HOVER_ACK"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_MOVE_HOVER_ACK"); uint64 guid; // guid - unused recv_data.readPackGUID(guid); @@ -751,7 +751,7 @@ void WorldSession::HandleMoveHoverAck(WorldPacket& recv_data) void WorldSession::HandleMoveWaterWalkAck(WorldPacket& recv_data) { - sLog->outDebug("CMSG_MOVE_WATER_WALK_ACK"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_MOVE_WATER_WALK_ACK"); uint64 guid; // guid - unused recv_data.readPackGUID(guid); diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp index 48fa099eb81..eda793d2a94 100755 --- a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp @@ -54,7 +54,7 @@ void WorldSession::HandleTabardVendorActivateOpcode(WorldPacket & recv_data) Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_TABARDDESIGNER); if (!unit) { - sLog->outDebug("WORLD: HandleTabardVendorActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleTabardVendorActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid))); return; } @@ -76,14 +76,14 @@ void WorldSession::HandleBankerActivateOpcode(WorldPacket & recv_data) { uint64 guid; - sLog->outDebug("WORLD: Received CMSG_BANKER_ACTIVATE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BANKER_ACTIVATE"); recv_data >> guid; Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_BANKER); if (!unit) { - sLog->outDebug("WORLD: HandleBankerActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleBankerActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid))); return; } @@ -117,12 +117,12 @@ void WorldSession::SendTrainerList(uint64 guid) void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle) { - sLog->outDebug("WORLD: SendTrainerList"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList"); Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_TRAINER); if (!unit) { - sLog->outDebug("WORLD: SendTrainerList - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid))); return; } @@ -138,14 +138,14 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle) if (!ci) { - sLog->outDebug("WORLD: SendTrainerList - (GUID: %u) NO CREATUREINFO!",GUID_LOPART(guid)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList - (GUID: %u) NO CREATUREINFO!",GUID_LOPART(guid)); return; } TrainerSpellData const* trainer_spells = unit->GetTrainerSpells(); if (!trainer_spells) { - sLog->outDebug("WORLD: SendTrainerList - Training spells not found for creature (GUID: %u Entry: %u)", + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList - Training spells not found for creature (GUID: %u Entry: %u)", GUID_LOPART(guid), unit->GetEntry()); return; } @@ -241,12 +241,12 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recv_data) uint32 spellId = 0; recv_data >> guid >> spellId; - sLog->outDebug("WORLD: Received CMSG_TRAINER_BUY_SPELL NpcGUID=%u, learn spell id is: %u",uint32(GUID_LOPART(guid)), spellId); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_TRAINER_BUY_SPELL NpcGUID=%u, learn spell id is: %u",uint32(GUID_LOPART(guid)), spellId); Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER); if (!unit) { - sLog->outDebug("WORLD: HandleTrainerBuySpellOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleTrainerBuySpellOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid))); return; } @@ -304,7 +304,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recv_data) void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_GOSSIP_HELLO"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GOSSIP_HELLO"); uint64 guid; recv_data >> guid; @@ -312,7 +312,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data) Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); if (!unit) { - sLog->outDebug("WORLD: HandleGossipHelloOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipHelloOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid))); return; } @@ -349,7 +349,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data) /*void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_GOSSIP_SELECT_OPTION"); + sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_GOSSIP_SELECT_OPTION"); uint32 option; uint32 unk; @@ -360,15 +360,15 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data) if (_player->PlayerTalkClass->GossipOptionCoded(option)) { - sLog->outDebug("reading string"); + sLog->outDebug(LOG_FILTER_PACKETIO, "reading string"); recv_data >> code; - sLog->outDebug("string read: %s", code.c_str()); + sLog->outDebug(LOG_FILTER_PACKETIO, "string read: %s", code.c_str()); } Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); if (!unit) { - sLog->outDebug("WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); return; } @@ -390,7 +390,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data) void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_SPIRIT_HEALER_ACTIVATE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SPIRIT_HEALER_ACTIVATE"); uint64 guid; @@ -399,7 +399,7 @@ void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket & recv_data) Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_SPIRITHEALER); if (!unit) { - sLog->outDebug("WORLD: HandleSpiritHealerActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleSpiritHealerActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid))); return; } @@ -454,7 +454,7 @@ void WorldSession::HandleBinderActivateOpcode(WorldPacket & recv_data) Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID,UNIT_NPC_FLAG_INNKEEPER); if (!unit) { - sLog->outDebug("WORLD: HandleBinderActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(npcGUID))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleBinderActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(npcGUID))); return; } @@ -495,7 +495,7 @@ void WorldSession::SendBindPoint(Creature *npc) void WorldSession::HandleListStabledPetsOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Recv MSG_LIST_STABLED_PETS"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv MSG_LIST_STABLED_PETS"); uint64 npcGUID; recv_data >> npcGUID; @@ -528,7 +528,7 @@ void WorldSession::SendStablePetCallback(QueryResult result, uint64 guid) if (!GetPlayer()) return; - sLog->outDebug("WORLD: Recv MSG_LIST_STABLED_PETS Send."); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv MSG_LIST_STABLED_PETS Send."); WorldPacket data(MSG_LIST_STABLED_PETS, 200); // guess size @@ -585,7 +585,7 @@ void WorldSession::SendStableResult(uint8 res) void WorldSession::HandleStablePet(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Recv CMSG_STABLE_PET"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_STABLE_PET"); uint64 npcGUID; recv_data >> npcGUID; @@ -656,7 +656,7 @@ void WorldSession::HandleStablePetCallback(QueryResult result) void WorldSession::HandleUnstablePet(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Recv CMSG_UNSTABLE_PET."); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_UNSTABLE_PET."); uint64 npcGUID; uint32 petnumber; @@ -733,7 +733,7 @@ void WorldSession::HandleUnstablePetCallback(QueryResult result, uint32 petnumbe void WorldSession::HandleBuyStableSlot(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Recv CMSG_BUY_STABLE_SLOT."); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_BUY_STABLE_SLOT."); uint64 npcGUID; recv_data >> npcGUID; @@ -766,12 +766,12 @@ void WorldSession::HandleBuyStableSlot(WorldPacket & recv_data) void WorldSession::HandleStableRevivePet(WorldPacket &/* recv_data */) { - sLog->outDebug("HandleStableRevivePet: Not implemented"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleStableRevivePet: Not implemented"); } void WorldSession::HandleStableSwapPet(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Recv CMSG_STABLE_SWAP_PET."); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_STABLE_SWAP_PET."); uint64 npcGUID; uint32 pet_number; @@ -854,7 +854,7 @@ void WorldSession::HandleStableSwapPetCallback(QueryResult result, uint32 petnum void WorldSession::HandleRepairItemOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_REPAIR_ITEM"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_REPAIR_ITEM"); uint64 npcGUID, itemGUID; uint8 guildBank; // new in 2.3.2, bool that means from guild bank money @@ -864,7 +864,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket & recv_data) Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_REPAIR); if (!unit) { - sLog->outDebug("WORLD: HandleRepairItemOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(npcGUID))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleRepairItemOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(npcGUID))); return; } @@ -878,7 +878,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket & recv_data) uint32 TotalCost = 0; if (itemGUID) { - sLog->outDebug("ITEM: Repair item, itemGUID = %u, npcGUID = %u", GUID_LOPART(itemGUID), GUID_LOPART(npcGUID)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "ITEM: Repair item, itemGUID = %u, npcGUID = %u", GUID_LOPART(itemGUID), GUID_LOPART(npcGUID)); Item* item = _player->GetItemByGuid(itemGUID); if (item) @@ -886,7 +886,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket & recv_data) } else { - sLog->outDebug("ITEM: Repair all items, npcGUID = %u", GUID_LOPART(npcGUID)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "ITEM: Repair all items, npcGUID = %u", GUID_LOPART(npcGUID)); TotalCost = _player->DurabilityRepairAll(true, discountMod, guildBank); } } diff --git a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp index eefb8664820..9dd53dd14dc 100755 --- a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp @@ -36,13 +36,13 @@ void WorldSession::HandleDismissCritter(WorldPacket &recv_data) uint64 guid; recv_data >> guid; - sLog->outDebug("WORLD: Received CMSG_DISMISS_CRITTER for GUID " UI64FMTD, guid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_DISMISS_CRITTER for GUID " UI64FMTD, guid); Unit* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid); if (!pet) { - sLog->outDebug("Vanitypet (guid: %u) does not exist - player '%s' (guid: %u / account: %u) attempted to dismiss it (possibly lagged out)", + sLog->outDebug(LOG_FILTER_NETWORKIO, "Vanitypet (guid: %u) does not exist - player '%s' (guid: %u / account: %u) attempted to dismiss it (possibly lagged out)", uint32(GUID_LOPART(guid)), GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), GetAccountId()); return; } @@ -114,7 +114,7 @@ void WorldSession::HandlePetStopAttack(WorldPacket &recv_data) uint64 guid; recv_data >> guid; - sLog->outDebug("WORLD: Received CMSG_PET_STOP_ATTACK for GUID " UI64FMTD "", guid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PET_STOP_ATTACK for GUID " UI64FMTD "", guid); Unit* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid); @@ -731,7 +731,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket) recvPacket >> guid >> castCount >> spellId >> castFlags; - sLog->outDebug("WORLD: CMSG_PET_CAST_SPELL, guid: " UI64FMTD ", castCount: %u, spellId %u, castFlags %u", guid, castCount, spellId, castFlags); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_PET_CAST_SPELL, guid: " UI64FMTD ", castCount: %u, spellId %u, castFlags %u", guid, castCount, spellId, castFlags); // This opcode is also sent from charmed and possessed units (players and creatures) if (!_player->GetGuardianPet() && !_player->GetCharm()) @@ -836,7 +836,7 @@ void WorldSession::SendPetNameInvalid(uint32 error, const std::string& name, Dec void WorldSession::HandlePetLearnTalent(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_PET_LEARN_TALENT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_PET_LEARN_TALENT"); uint64 guid; uint32 talent_id, requested_rank; @@ -848,7 +848,7 @@ void WorldSession::HandlePetLearnTalent(WorldPacket & recv_data) void WorldSession::HandleLearnPreviewTalentsPet(WorldPacket & recv_data) { - sLog->outDebug("CMSG_LEARN_PREVIEW_TALENTS_PET"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LEARN_PREVIEW_TALENTS_PET"); uint64 guid; recv_data >> guid; diff --git a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp index b8cf982e990..1417661fba8 100755 --- a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp @@ -56,7 +56,7 @@ enum CharterCosts void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data) { - sLog->outDebug("Received opcode CMSG_PETITION_BUY"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_BUY"); recv_data.hexlike(); uint64 guidNPC; @@ -86,13 +86,13 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data) recv_data >> clientIndex; // index recv_data.read_skip<uint32>(); // 0 - sLog->outDebug("Petitioner with GUID %u tried sell petition: name %s", GUID_LOPART(guidNPC), name.c_str()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Petitioner with GUID %u tried sell petition: name %s", GUID_LOPART(guidNPC), name.c_str()); // prevent cheating Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guidNPC,UNIT_NPC_FLAG_PETITIONER); if (!pCreature) { - sLog->outDebug("WORLD: HandlePetitionBuyOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guidNPC)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandlePetitionBuyOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guidNPC)); return; } @@ -141,7 +141,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data) type = ARENA_TEAM_CHARTER_5v5_TYPE; break; default: - sLog->outDebug("unknown selection at buy arena petition: %u", clientIndex); + sLog->outDebug(LOG_FILTER_NETWORKIO, "unknown selection at buy arena petition: %u", clientIndex); return; } @@ -230,7 +230,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data) // delete petitions with the same guid as this one ssInvalidPetitionGUIDs << "'" << charter->GetGUIDLow() << "'"; - sLog->outDebug("Invalid petition GUIDs: %s", ssInvalidPetitionGUIDs.str().c_str()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Invalid petition GUIDs: %s", ssInvalidPetitionGUIDs.str().c_str()); CharacterDatabase.escape_string(name); SQLTransaction trans = CharacterDatabase.BeginTransaction(); trans->PAppend("DELETE FROM petition WHERE petitionguid IN (%s)", ssInvalidPetitionGUIDs.str().c_str()); @@ -243,7 +243,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data) void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data) { // ok - sLog->outDebug("Received opcode CMSG_PETITION_SHOW_SIGNATURES"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_SHOW_SIGNATURES"); //recv_data.hexlike(); uint8 signs = 0; @@ -272,7 +272,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data) if (result) signs = uint8(result->GetRowCount()); - sLog->outDebug("CMSG_PETITION_SHOW_SIGNATURES petition entry: '%u'", petitionguid_low); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_PETITION_SHOW_SIGNATURES petition entry: '%u'", petitionguid_low); WorldPacket data(SMSG_PETITION_SHOW_SIGNATURES, (8+8+4+1+signs*12)); data << uint64(petitionguid); // petition guid @@ -295,14 +295,14 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data) void WorldSession::HandlePetitionQueryOpcode(WorldPacket & recv_data) { - sLog->outDebug("Received opcode CMSG_PETITION_QUERY"); // ok + sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_QUERY"); // ok //recv_data.hexlike(); uint32 guildguid; uint64 petitionguid; recv_data >> guildguid; // in Trinity always same as GUID_LOPART(petitionguid) recv_data >> petitionguid; // petition guid - sLog->outDebug("CMSG_PETITION_QUERY Petition GUID %u Guild GUID %u", GUID_LOPART(petitionguid), guildguid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_PETITION_QUERY Petition GUID %u Guild GUID %u", GUID_LOPART(petitionguid), guildguid); SendPetitionQueryOpcode(petitionguid); } @@ -330,7 +330,7 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid) } else { - sLog->outDebug("CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid)); return; } @@ -375,7 +375,7 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid) void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data) { - sLog->outDebug("Received opcode MSG_PETITION_RENAME"); // ok + sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode MSG_PETITION_RENAME"); // ok //recv_data.hexlike(); uint64 petitionguid; @@ -398,7 +398,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data) } else { - sLog->outDebug("CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid)); return; } @@ -434,7 +434,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data) CharacterDatabase.PExecute("UPDATE petition SET name = '%s' WHERE petitionguid = '%u'", db_newname.c_str(), GUID_LOPART(petitionguid)); - sLog->outDebug("Petition (GUID: %u) renamed to '%s'", GUID_LOPART(petitionguid), newname.c_str()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Petition (GUID: %u) renamed to '%s'", GUID_LOPART(petitionguid), newname.c_str()); WorldPacket data(MSG_PETITION_RENAME, (8+newname.size()+1)); data << uint64(petitionguid); data << newname; @@ -443,7 +443,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data) void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data) { - sLog->outDebug("Received opcode CMSG_PETITION_SIGN"); // ok + sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_SIGN"); // ok //recv_data.hexlike(); Field *fields; @@ -546,7 +546,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data) CharacterDatabase.PExecute("INSERT INTO petition_sign (ownerguid,petitionguid, playerguid, player_account) VALUES ('%u', '%u', '%u','%u')", GUID_LOPART(ownerguid),GUID_LOPART(petitionguid), plguidlo,GetAccountId()); - sLog->outDebug("PETITION SIGN: GUID %u by player: %s (GUID: %u Account: %u)", GUID_LOPART(petitionguid), _player->GetName(),plguidlo,GetAccountId()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "PETITION SIGN: GUID %u by player: %s (GUID: %u Account: %u)", GUID_LOPART(petitionguid), _player->GetName(),plguidlo,GetAccountId()); WorldPacket data(SMSG_PETITION_SIGN_RESULTS, (8+8+4)); data << uint64(petitionguid); @@ -568,13 +568,13 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data) void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recv_data) { - sLog->outDebug("Received opcode MSG_PETITION_DECLINE"); // ok + sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode MSG_PETITION_DECLINE"); // ok //recv_data.hexlike(); uint64 petitionguid; uint64 ownerguid; recv_data >> petitionguid; // petition guid - sLog->outDebug("Petition %u declined by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Petition %u declined by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow()); QueryResult result = CharacterDatabase.PQuery("SELECT ownerguid FROM petition WHERE petitionguid = '%u'", GUID_LOPART(petitionguid)); if (!result) @@ -594,7 +594,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recv_data) void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data) { - sLog->outDebug("Received opcode CMSG_OFFER_PETITION"); // ok + sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_OFFER_PETITION"); // ok //recv_data.hexlike(); uint8 signs = 0; @@ -616,7 +616,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data) Field *fields = result->Fetch(); type = fields[0].GetUInt8(); - sLog->outDebug("OFFER PETITION: type %u, GUID1 %u, to player id: %u", type, GUID_LOPART(petitionguid), GUID_LOPART(plguid)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "OFFER PETITION: type %u, GUID1 %u, to player id: %u", type, GUID_LOPART(petitionguid), GUID_LOPART(plguid)); if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != player->GetTeam()) { @@ -695,7 +695,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data) void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data) { - sLog->outDebug("Received opcode CMSG_TURN_IN_PETITION"); // ok + sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_TURN_IN_PETITION"); // ok //recv_data.hexlike(); WorldPacket data; @@ -707,7 +707,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data) recv_data >> petitionguid; - sLog->outDebug("Petition %u turned in by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Petition %u turned in by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow()); // data QueryResult result = CharacterDatabase.PQuery("SELECT ownerguid, name, type FROM petition WHERE petitionguid = '%u'", GUID_LOPART(petitionguid)); @@ -839,14 +839,14 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data) // register team and add captain sObjectMgr->AddArenaTeam(at); - sLog->outDebug("PetitonsHandler: arena team added to objmrg"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "PetitonsHandler: arena team added to objmrg"); // add members for (uint8 i = 0; i < signs; ++i) { Field* fields = result->Fetch(); uint64 memberGUID = fields[0].GetUInt64(); - sLog->outDebug("PetitionsHandler: adding arena member %u", GUID_LOPART(memberGUID)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "PetitionsHandler: adding arena member %u", GUID_LOPART(memberGUID)); at->AddMember(memberGUID); result->NextRow(); } @@ -858,7 +858,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data) CharacterDatabase.CommitTransaction(trans); // created - sLog->outDebug("TURN IN PETITION GUID %u", GUID_LOPART(petitionguid)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "TURN IN PETITION GUID %u", GUID_LOPART(petitionguid)); data.Initialize(SMSG_TURN_IN_PETITION_RESULTS, 4); data << (uint32)PETITION_TURN_OK; @@ -867,7 +867,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data) void WorldSession::HandlePetitionShowListOpcode(WorldPacket & recv_data) { - sLog->outDebug("Received CMSG_PETITION_SHOWLIST"); // ok + sLog->outDebug(LOG_FILTER_NETWORKIO, "Received CMSG_PETITION_SHOWLIST"); // ok //recv_data.hexlike(); uint64 guid; @@ -881,7 +881,7 @@ void WorldSession::SendPetitionShowList(uint64 guid) Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_PETITIONER); if (!pCreature) { - sLog->outDebug("WORLD: HandlePetitionShowListOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandlePetitionShowListOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); return; } @@ -941,5 +941,5 @@ void WorldSession::SendPetitionShowList(uint64 guid) // data << uint32(9); // required signs? //} SendPacket(&data); - sLog->outDebug("Sent SMSG_PETITION_SHOWLIST"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Sent SMSG_PETITION_SHOWLIST"); } diff --git a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp b/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp index 4498595f871..a9b6ef6c163 100755 --- a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp @@ -197,16 +197,16 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recv_data) data << uint32(ci->questItems[i]); // itemId[6], quest drop data << uint32(ci->movementId); // CreatureMovementInfo.dbc SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE"); } else { - sLog->outDebug("WORLD: CMSG_CREATURE_QUERY - NO CREATURE INFO! (GUID: %u, ENTRY: %u)", + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CREATURE_QUERY - NO CREATURE INFO! (GUID: %u, ENTRY: %u)", GUID_LOPART(guid), entry); WorldPacket data(SMSG_CREATURE_QUERY_RESPONSE, 4); data << uint32(entry | 0x80000000); SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE"); } } @@ -253,16 +253,16 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data) for (uint32 i = 0; i < MAX_GAMEOBJECT_QUEST_ITEMS; ++i) data << uint32(info->questItems[i]); // itemId[6], quest drop SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE"); } else { - sLog->outDebug("WORLD: CMSG_GAMEOBJECT_QUERY - Missing gameobject info for (GUID: %u, ENTRY: %u)", + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GAMEOBJECT_QUERY - Missing gameobject info for (GUID: %u, ENTRY: %u)", GUID_LOPART(guid), entryID); WorldPacket data (SMSG_GAMEOBJECT_QUERY_RESPONSE, 4); data << uint32(entryID | 0x80000000); SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE"); } } @@ -397,7 +397,7 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data) SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_NPC_TEXT_UPDATE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_NPC_TEXT_UPDATE"); } void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recv_data) @@ -437,13 +437,13 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recv_data) } SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE"); } } void WorldSession::HandleCorpseMapPositionQuery(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY"); uint32 unk; recv_data >> unk; diff --git a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp index 4eb37efdd23..aa61e618642 100755 --- a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp @@ -54,7 +54,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data) { case TYPEID_UNIT: { - sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for npc, guid = %u",uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for npc, guid = %u",uint32(GUID_LOPART(guid))); Creature* cr_questgiver=questgiver->ToCreature(); if (!cr_questgiver->IsHostileTo(_player)) // not show quest status to enemies { @@ -66,7 +66,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data) } case TYPEID_GAMEOBJECT: { - sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for GameObject guid = %u",uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for GameObject guid = %u",uint32(GUID_LOPART(guid))); GameObject* go_questgiver=(GameObject*)questgiver; questStatus = sScriptMgr->GetDialogStatus(_player, go_questgiver); if (questStatus > 6) @@ -87,12 +87,12 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recv_data) uint64 guid; recv_data >> guid; - sLog->outDebug ("WORLD: Received CMSG_QUESTGIVER_HELLO npc = %u", GUID_LOPART(guid)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_HELLO npc = %u", GUID_LOPART(guid)); Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_NONE); if (!pCreature) { - sLog->outDebug ("WORLD: HandleQuestgiverHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleQuestgiverHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guid)); return; } @@ -122,7 +122,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data) if (!GetPlayer()->isAlive()) return; - sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), quest, unk1); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), quest, unk1); Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT|TYPEMASK_ITEM|TYPEMASK_PLAYER); @@ -239,7 +239,7 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket & recv_data) uint32 quest; uint8 unk1; recv_data >> guid >> quest >> unk1; - sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), quest, unk1); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), quest, unk1); // Verify that the guid is valid and is a questgiver or involved in the requested quest Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT|TYPEMASK_ITEM); @@ -273,7 +273,7 @@ void WorldSession::HandleQuestQueryOpcode(WorldPacket & recv_data) uint32 quest; recv_data >> quest; - sLog->outDebug("WORLD: Received CMSG_QUEST_QUERY quest = %u",quest); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUEST_QUERY quest = %u",quest); Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest); if (pQuest) @@ -297,7 +297,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data) if (!GetPlayer()->isAlive()) return; - sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD npc = %u, quest = %u, reward = %u",uint32(GUID_LOPART(guid)),quest,reward); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD npc = %u, quest = %u, reward = %u",uint32(GUID_LOPART(guid)),quest,reward); Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT); if (!pObject) @@ -352,7 +352,7 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket & recv_data) if (!GetPlayer()->isAlive()) return; - sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest); Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT); if (!pObject||!pObject->hasInvolvedQuest(quest)) @@ -370,7 +370,7 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket & recv_data) void WorldSession::HandleQuestgiverCancel(WorldPacket& /*recv_data*/) { - sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_CANCEL"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_CANCEL"); _player->PlayerTalkClass->CloseGossip(); } @@ -383,7 +383,7 @@ void WorldSession::HandleQuestLogSwapQuest(WorldPacket& recv_data) if (slot1 == slot2 || slot1 >= MAX_QUEST_LOG_SIZE || slot2 >= MAX_QUEST_LOG_SIZE) return; - sLog->outDebug("WORLD: Received CMSG_QUESTLOG_SWAP_QUEST slot 1 = %u, slot 2 = %u", slot1, slot2); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTLOG_SWAP_QUEST slot 1 = %u, slot 2 = %u", slot1, slot2); GetPlayer()->SwapQuestSlot(slot1,slot2); } @@ -393,7 +393,7 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recv_data) uint8 slot; recv_data >> slot; - sLog->outDebug("WORLD: Received CMSG_QUESTLOG_REMOVE_QUEST slot = %u",slot); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTLOG_REMOVE_QUEST slot = %u",slot); if (slot < MAX_QUEST_LOG_SIZE) { @@ -426,7 +426,7 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recv_data) uint32 quest; recv_data >> quest; - sLog->outDebug("WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT quest = %u", quest); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT quest = %u", quest); if (const Quest* pQuest = sObjectMgr->GetQuestTemplate(quest)) { @@ -465,7 +465,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data) if (!_player->isAlive()) return; - sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest); Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest); if (pQuest) @@ -501,7 +501,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data) void WorldSession::HandleQuestgiverQuestAutoLaunch(WorldPacket& /*recvPacket*/) { - sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_QUEST_AUTOLAUNCH"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_QUEST_AUTOLAUNCH"); } void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket) @@ -509,7 +509,7 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket) uint32 questId; recvPacket >> questId; - sLog->outDebug("WORLD: Received CMSG_PUSHQUESTTOPARTY quest = %u", questId); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PUSHQUESTTOPARTY quest = %u", questId); if (Quest const *pQuest = sObjectMgr->GetQuestTemplate(questId)) { @@ -567,7 +567,7 @@ void WorldSession::HandleQuestPushResult(WorldPacket& recvPacket) uint8 msg; recvPacket >> guid >> msg; - sLog->outDebug("WORLD: Received MSG_QUEST_PUSH_RESULT"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_QUEST_PUSH_RESULT"); if (_player->GetDivider() != 0) { @@ -682,7 +682,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32 void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket*/) { - sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY"); uint32 count = 0; diff --git a/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp b/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp index 44bd0e8e6c9..ac98830dd2b 100755 --- a/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp @@ -37,7 +37,7 @@ void WorldSession::HandleLearnTalentOpcode(WorldPacket & recv_data) void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket) { - sLog->outDebug("CMSG_LEARN_PREVIEW_TALENTS"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LEARN_PREVIEW_TALENTS"); uint32 talentsCount; recvPacket >> talentsCount; @@ -56,14 +56,14 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket) void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket & recv_data) { - sLog->outDetail("MSG_TALENT_WIPE_CONFIRM"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_TALENT_WIPE_CONFIRM"); uint64 guid; recv_data >> guid; Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_TRAINER); if (!unit) { - sLog->outDebug("WORLD: HandleTalentWipeConfirmOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleTalentWipeConfirmOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); return; } diff --git a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp index c9122e68f01..864c5aa5146 100755 --- a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp @@ -283,7 +283,7 @@ void WorldSession::HandleGameObjectUseOpcode(WorldPacket & recv_data) recv_data >> guid; - sLog->outDebug("WORLD: Recvd CMSG_GAMEOBJ_USE Message [guid=%u]", GUID_LOPART(guid)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_GAMEOBJ_USE Message [guid=%u]", GUID_LOPART(guid)); // ignore for remote control state if (_player->m_mover != _player) @@ -302,7 +302,7 @@ void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket) uint64 guid; recvPacket >> guid; - sLog->outDebug("WORLD: Recvd CMSG_GAMEOBJ_REPORT_USE Message [in game guid: %u]", GUID_LOPART(guid)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_GAMEOBJ_REPORT_USE Message [in game guid: %u]", GUID_LOPART(guid)); // ignore for remote control state if (_player->m_mover != _player) @@ -326,7 +326,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket) uint8 castCount, castFlags; recvPacket >> castCount >> spellId >> castFlags; - sLog->outDebug("WORLD: got cast spell packet, castCount: %u, spellId: %u, castFlags: %u, data length = %u", castCount, spellId, castFlags, (uint32)recvPacket.size()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: got cast spell packet, castCount: %u, spellId: %u, castFlags: %u, data length = %u", castCount, spellId, castFlags, (uint32)recvPacket.size()); // ignore for remote control state (for player case) Unit* mover = _player->m_mover; @@ -532,7 +532,7 @@ void WorldSession::HandleTotemDestroyed(WorldPacket& recvPacket) void WorldSession::HandleSelfResOpcode(WorldPacket & /*recv_data*/) { - sLog->outDebug("WORLD: CMSG_SELF_RES"); // empty opcode + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SELF_RES"); // empty opcode if (_player->GetUInt32Value(PLAYER_SELF_RES_SPELL)) { @@ -582,7 +582,7 @@ void WorldSession::HandleSpellClick(WorldPacket & recv_data) void WorldSession::HandleMirrrorImageDataRequest(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_GET_MIRRORIMAGE_DATA"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GET_MIRRORIMAGE_DATA"); uint64 guid; recv_data >> guid; diff --git a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp b/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp index 0baca16a735..a7bc65143be 100755 --- a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp @@ -31,7 +31,7 @@ void WorldSession::HandleTaxiNodeStatusQueryOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_TAXINODE_STATUS_QUERY"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_TAXINODE_STATUS_QUERY"); uint64 guid; @@ -45,7 +45,7 @@ void WorldSession::SendTaxiStatus(uint64 guid) Creature *unit = GetPlayer()->GetMap()->GetCreature(guid); if (!unit) { - sLog->outDebug("WorldSession::SendTaxiStatus - Unit (GUID: %u) not found.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WorldSession::SendTaxiStatus - Unit (GUID: %u) not found.", uint32(GUID_LOPART(guid))); return; } @@ -55,18 +55,18 @@ void WorldSession::SendTaxiStatus(uint64 guid) if (curloc == 0) return; - sLog->outDebug("WORLD: current location %u ",curloc); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: current location %u ",curloc); WorldPacket data(SMSG_TAXINODE_STATUS, 9); data << guid; data << uint8(GetPlayer()->m_taxi.IsTaximaskNodeKnown(curloc) ? 1 : 0); SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_TAXINODE_STATUS"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_TAXINODE_STATUS"); } void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_TAXIQUERYAVAILABLENODES"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_TAXIQUERYAVAILABLENODES"); uint64 guid; recv_data >> guid; @@ -75,7 +75,7 @@ void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket & recv_data) Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER); if (!unit) { - sLog->outDebug("WORLD: HandleTaxiQueryAvailableNodes - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleTaxiQueryAvailableNodes - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); return; } @@ -102,7 +102,7 @@ void WorldSession::SendTaxiMenu(Creature* unit) bool lastTaxiCheaterState = GetPlayer()->isTaxiCheater(); if (unit->GetEntry() == 29480) GetPlayer()->SetTaxiCheater(true); // Grimwing in Ebon Hold, special case. NOTE: Not perfect, Zul'Aman should not be included according to WoWhead, and I think taxicheat includes it. - sLog->outDebug("WORLD: CMSG_TAXINODE_STATUS_QUERY %u ",curloc); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_TAXINODE_STATUS_QUERY %u ",curloc); WorldPacket data(SMSG_SHOWTAXINODES, (4+8+4+8*4)); data << uint32(1); @@ -111,7 +111,7 @@ void WorldSession::SendTaxiMenu(Creature* unit) GetPlayer()->m_taxi.AppendTaximaskTo(data,GetPlayer()->isTaxiCheater()); SendPacket(&data); - sLog->outDebug("WORLD: Sent SMSG_SHOWTAXINODES"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_SHOWTAXINODES"); GetPlayer()->SetTaxiCheater(lastTaxiCheaterState); } @@ -166,7 +166,7 @@ void WorldSession::SendDiscoverNewTaxiNode(uint32 nodeid) void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_ACTIVATETAXIEXPRESS"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXIEXPRESS"); uint64 guid; uint32 node_count; @@ -176,7 +176,7 @@ void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket & recv_data) Creature *npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER); if (!npc) { - sLog->outDebug("WORLD: HandleActivateTaxiExpressOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleActivateTaxiExpressOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid))); return; } std::vector<uint32> nodes; @@ -191,14 +191,14 @@ void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket & recv_data) if (nodes.empty()) return; - sLog->outDebug("WORLD: Received CMSG_ACTIVATETAXIEXPRESS from %d to %d" ,nodes.front(),nodes.back()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXIEXPRESS from %d to %d" ,nodes.front(),nodes.back()); GetPlayer()->ActivateTaxiPathTo(nodes, npc); } void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data) { - sLog->outDebug("WORLD: Received CMSG_MOVE_SPLINE_DONE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_MOVE_SPLINE_DONE"); uint64 guid; // used only for proper packet read recv_data.readPackGUID(guid); @@ -252,7 +252,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data) } } - sLog->outDebug("WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode); uint32 mountDisplayId = sObjectMgr->GetTaxiMountDisplayId(sourcenode, GetPlayer()->GetTeam()); @@ -276,18 +276,18 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data) void WorldSession::HandleActivateTaxiOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: Received CMSG_ACTIVATETAXI"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXI"); uint64 guid; std::vector<uint32> nodes; nodes.resize(2); recv_data >> guid >> nodes[0] >> nodes[1]; - sLog->outDebug("WORLD: Received CMSG_ACTIVATETAXI from %d to %d" ,nodes[0],nodes[1]); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXI from %d to %d" ,nodes[0],nodes[1]); Creature *npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER); if (!npc) { - sLog->outDebug("WORLD: HandleActivateTaxiOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid))); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleActivateTaxiOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid))); return; } diff --git a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp b/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp index f189085849b..ae486e1f5ac 100755 --- a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp @@ -69,13 +69,13 @@ void WorldSession::SendTradeStatus(TradeStatus status) void WorldSession::HandleIgnoreTradeOpcode(WorldPacket& /*recvPacket*/) { - sLog->outDebug("WORLD: Ignore Trade %u",_player->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Ignore Trade %u",_player->GetGUIDLow()); // recvPacket.print_storage(); } void WorldSession::HandleBusyTradeOpcode(WorldPacket& /*recvPacket*/) { - sLog->outDebug("WORLD: Busy Trade %u",_player->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Busy Trade %u",_player->GetGUIDLow()); // recvPacket.print_storage(); } @@ -150,7 +150,7 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[]) if (myItems[i]) { // logging - sLog->outDebug("partner storing: %u",myItems[i]->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "partner storing: %u",myItems[i]->GetGUIDLow()); if (_player->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE)) { sLog->outCommand(_player->GetSession()->GetAccountId(), "GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)", @@ -168,7 +168,7 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[]) if (hisItems[i]) { // logging - sLog->outDebug("player storing: %u",hisItems[i]->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "player storing: %u",hisItems[i]->GetGUIDLow()); if (trader->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE)) { sLog->outCommand(trader->GetSession()->GetAccountId(),"GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)", diff --git a/src/server/game/Server/Protocol/Handlers/VoiceChatHandler.cpp b/src/server/game/Server/Protocol/Handlers/VoiceChatHandler.cpp index 1a926ca54ae..e2b5fe96ae1 100755 --- a/src/server/game/Server/Protocol/Handlers/VoiceChatHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/VoiceChatHandler.cpp @@ -24,7 +24,7 @@ void WorldSession::HandleVoiceSessionEnableOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_VOICE_SESSION_ENABLE"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_VOICE_SESSION_ENABLE"); // uint8 isVoiceEnabled, uint8 isMicrophoneEnabled recv_data.read_skip<uint8>(); recv_data.read_skip<uint8>(); @@ -33,14 +33,14 @@ void WorldSession::HandleVoiceSessionEnableOpcode(WorldPacket & recv_data) void WorldSession::HandleChannelVoiceOnOpcode(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_CHANNEL_VOICE_ON"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CHANNEL_VOICE_ON"); // Enable Voice button in channel context menu recv_data.hexlike(); } void WorldSession::HandleSetActiveVoiceChannel(WorldPacket & recv_data) { - sLog->outDebug("WORLD: CMSG_SET_ACTIVE_VOICE_CHANNEL"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SET_ACTIVE_VOICE_CHANNEL"); recv_data.read_skip<uint32>(); recv_data.read_skip<char*>(); recv_data.hexlike(); diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index a34103efa98..e0412272688 100755 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -298,7 +298,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) LookupOpcodeName(packet->GetOpcode()), packet->GetOpcode()); break; case STATUS_UNHANDLED: - sLog->outDebug("SESSION (account: %u, guidlow: %u, char: %s): received not handled opcode %s (0x%.4X)", + sLog->outDebug(LOG_FILTER_NETWORKIO, "SESSION (account: %u, guidlow: %u, char: %s): received not handled opcode %s (0x%.4X)", GetAccountId(), m_GUIDLow, _player ? _player->GetName() : "<none>", LookupOpcodeName(packet->GetOpcode()), packet->GetOpcode()); break; @@ -310,7 +310,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater) packet->GetOpcode(), GetRemoteAddress().c_str(), GetAccountId()); if (sLog->IsOutDebug()) { - sLog->outDebug("Dumping error causing packet:"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Dumping error causing packet:"); packet->hexlike(); } } @@ -500,7 +500,7 @@ void WorldSession::LogoutPlayer(bool Save) ///- Since each account can only have one online character at any given time, ensure all characters for active account are marked as offline //No SQL injection as AccountId is uint32 CharacterDatabase.PExecute("UPDATE characters SET online = 0 WHERE account = '%u'", GetAccountId()); - sLog->outDebug("SESSION: Sent SMSG_LOGOUT_COMPLETE Message"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "SESSION: Sent SMSG_LOGOUT_COMPLETE Message"); } m_playerLogout = false; @@ -872,10 +872,10 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data) uint32 currentTime; addonInfo >> currentTime; - sLog->outDebug("ADDON: CurrentTime: %u", currentTime); + sLog->outDebug(LOG_FILTER_NETWORKIO, "ADDON: CurrentTime: %u", currentTime); if (addonInfo.rpos() != addonInfo.size()) - sLog->outDebug("packet under-read!"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "packet under-read!"); } else sLog->outError("Addon packet uncompress error!"); diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index ba119e324a2..e20430ee164 100755 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -61,7 +61,7 @@ struct ServerPktHeader uint8 headerIndex=0; if (isLargePacket()) { - sLog->outDebug("initializing large server to client packet. Size: %u, cmd: %u", size, cmd); + sLog->outDebug(LOG_FILTER_NETWORKIO, "initializing large server to client packet. Size: %u, cmd: %u", size, cmd); header[headerIndex++] = 0x80|(0xFF &(size>>16)); } header[headerIndex++] = 0xFF &(size>>8); @@ -755,7 +755,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct) opcode, GetRemoteAddress().c_str(), m_Session?m_Session->GetAccountId():-1); if (sLog->IsOutDebug()) { - sLog->outDebug("Dumping error causing packet:"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Dumping error causing packet:"); new_pct->hexlike(); } @@ -934,7 +934,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) // Check locked state for server AccountTypes allowedAccountType = sWorld->GetPlayerSecurityLimit(); - sLog->outDebug("Allowed Level: %u Player Level %u", allowedAccountType, AccountTypes(security)); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Allowed Level: %u Player Level %u", allowedAccountType, AccountTypes(security)); if (allowedAccountType > SEC_PLAYER && AccountTypes(security) < allowedAccountType) { WorldPacket Packet (SMSG_AUTH_RESPONSE, 1); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 52268a6d799..1681f6f78fd 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1516,7 +1516,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const //donator->SendSpellNonMeleeDamageLog(donator, GetId(), damage, GetSpellSchoolMask(spellProto), 0, 0, false, 0); caster->ModifyHealth(-(int32)damage); - sLog->outDebug("PeriodicTick: donator %u target %u damage %u.", target->GetEntry(), target->GetEntry(), damage); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "PeriodicTick: donator %u target %u damage %u.", target->GetEntry(), target->GetEntry(), damage); float gainMultiplier = SpellMgr::CalculateSpellEffectValueMultiplier(GetSpellProto(), GetEffIndex(), caster); @@ -2453,7 +2453,7 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const { Unit * triggerCaster = GetTriggeredSpellCaster(triggeredSpellInfo, caster, triggerTarget); triggerCaster->CastSpell(triggerTarget, triggeredSpellInfo, true, NULL, this); - sLog->outDebug("AuraEffect::TriggerSpell: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::TriggerSpell: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id); } else { diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 195dbc5f93c..970c9a9c43c 100755 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -72,10 +72,10 @@ m_effectsToApply(effMask), m_removeMode(AURA_REMOVE_NONE), m_needClientUpdate(fa m_slot = slot; GetTarget()->SetVisibleAura(slot, this); SetNeedClientUpdate(); - sLog->outDebug("Aura: %u Effect: %d put to unit visible auras slot: %u", GetBase()->GetId(), GetEffectMask(), slot); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura: %u Effect: %d put to unit visible auras slot: %u", GetBase()->GetId(), GetEffectMask(), slot); } else - sLog->outDebug("Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask()); } _InitFlags(caster, effMask); @@ -154,7 +154,7 @@ void AuraApplication::_HandleEffect(uint8 effIndex, bool apply) ASSERT(aurEff); ASSERT(HasEffect(effIndex) == (!apply)); ASSERT((1<<effIndex) & m_effectsToApply); - sLog->outDebug("AuraApplication::_HandleEffect: %u, apply: %u: amount: %u", aurEff->GetAuraType(), apply, aurEff->GetAmount()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraApplication::_HandleEffect: %u, apply: %u: amount: %u", aurEff->GetAuraType(), apply, aurEff->GetAmount()); if (apply) { @@ -190,7 +190,7 @@ void AuraApplication::ClientUpdate(bool remove) { ASSERT(!m_target->GetVisibleAura(m_slot)); data << uint32(0); - sLog->outDebug("Aura %u removed slot %u",GetBase()->GetId(), m_slot); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura %u removed slot %u",GetBase()->GetId(), m_slot); m_target->SendMessageToSet(&data, true); return; } @@ -1664,7 +1664,7 @@ void Aura::_DeleteRemovedApplications() void Aura::LoadScripts() { - sLog->outDebug("Aura::LoadScripts"); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura::LoadScripts"); sScriptMgr->CreateAuraScripts(m_spellProto->Id, m_loadedScripts); for(std::list<AuraScript *>::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end() ;) { diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index ee340965d23..95769040dde 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1565,7 +1565,7 @@ void Spell::DoTriggersOnSpellHit(Unit *unit) if (roll_chance_i(i->second)) { m_caster->CastSpell(unit, i->first, true); - sLog->outDebug("Spell %d triggered spell %d by SPELL_AURA_ADD_TARGET_TRIGGER aura", m_spellInfo->Id, i->first->Id); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell %d triggered spell %d by SPELL_AURA_ADD_TARGET_TRIGGER aura", m_spellInfo->Id, i->first->Id); } if (GetSpellDuration(i->first) == -1) { @@ -1892,7 +1892,7 @@ WorldObject* Spell::SearchNearbyTarget(float range, SpellTargets TargetType, Spe ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET, m_spellInfo->Id); if (conditions.empty()) { - sLog->outDebug("Spell (ID: %u) (caster Entry: %u) does not have record in `conditions` for spell script target (ConditionSourceType 13)", m_spellInfo->Id, m_caster->GetEntry()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell (ID: %u) (caster Entry: %u) does not have record in `conditions` for spell script target (ConditionSourceType 13)", m_spellInfo->Id, m_caster->GetEntry()); if (IsPositiveSpell(m_spellInfo->Id)) return SearchNearbyTarget(range, SPELL_TARGETS_ALLY, effIndex); else @@ -2298,7 +2298,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) } else { - sLog->outDebug("SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id); Unit *target = NULL; if (uint64 guid = m_caster->GetUInt64Value(UNIT_FIELD_TARGET)) target = ObjectAccessor::GetUnit(*m_caster, guid); @@ -2567,7 +2567,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) break; default: - sLog->outDebug("Spell (ID: %u) (caster Entry: %u) does not have type CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET record in `conditions` table.", m_spellInfo->Id, m_caster->GetEntry()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell (ID: %u) (caster Entry: %u) does not have type CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET record in `conditions` table.", m_spellInfo->Id, m_caster->GetEntry()); if (m_spellInfo->Effect[i] == SPELL_EFFECT_TELEPORT_UNITS) SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ENTRY, 0); @@ -2597,7 +2597,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) else { if (m_spellInfo->Effect[i] == SPELL_EFFECT_ACTIVATE_OBJECT) - sLog->outDebug("Spell (ID: %u) (caster Entry: %u) with SPELL_EFFECT_ACTIVATE_OBJECT does not have type CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET record in `conditions` table.", m_spellInfo->Id, m_caster->GetEntry()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell (ID: %u) (caster Entry: %u) with SPELL_EFFECT_ACTIVATE_OBJECT does not have type CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET record in `conditions` table.", m_spellInfo->Id, m_caster->GetEntry()); SearchGOAreaTarget(gobjectList, radius, pushType, SPELL_TARGETS_GO); } break; @@ -2970,7 +2970,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const * triggere // set timer base at cast time ReSetTimer(); - sLog->outDebug("Spell::prepare: spell id %u source %u caster %d triggered %u mask %u", m_spellInfo->Id, m_caster->GetEntry(), m_originalCaster ? m_originalCaster->GetEntry() : -1, m_IsTriggeredSpell ? 1 : 0, m_targets.getTargetMask()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::prepare: spell id %u source %u caster %d triggered %u mask %u", m_spellInfo->Id, m_caster->GetEntry(), m_originalCaster ? m_originalCaster->GetEntry() : -1, m_IsTriggeredSpell ? 1 : 0, m_targets.getTargetMask()); //if (m_targets.getUnitTarget()) // sLog->outError("Spell::prepare: unit target %u", m_targets.getUnitTarget()->GetEntry()); //if (m_targets.HasDst()) @@ -3554,7 +3554,7 @@ void Spell::update(uint32 difftime) if (m_targets.getUnitTargetGUID() && !m_targets.getUnitTarget()) { - sLog->outDebug("Spell %u is cancelled due to removal of target.", m_spellInfo->Id); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell %u is cancelled due to removal of target.", m_spellInfo->Id); cancel(); return; } @@ -3591,7 +3591,7 @@ void Spell::update(uint32 difftime) // check if there are alive targets left if (!UpdateChanneledTargetList()) { - sLog->outDebug("Channeled spell %d is removed due to lack of targets", m_spellInfo->Id); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Channeled spell %d is removed due to lack of targets", m_spellInfo->Id); SendChannelUpdate(0); finish(); } @@ -3683,7 +3683,7 @@ void Spell::finish(bool ok) SpellEntry const *spellInfo = sSpellStore.LookupEntry(spell); if (spellInfo && spellInfo->SpellIconID == 2056) { - sLog->outDebug("Statue %d is unsummoned in spell %d finish", m_caster->GetGUIDLow(), m_spellInfo->Id); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Statue %d is unsummoned in spell %d finish", m_caster->GetGUIDLow(), m_spellInfo->Id); m_caster->setDeathState(JUST_DIED); return; } @@ -3818,7 +3818,7 @@ void Spell::SendSpellStart() if (!IsNeedSendToClient()) return; - //sLog->outDebug("Sending SMSG_SPELL_START id=%u", m_spellInfo->Id); + //sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Sending SMSG_SPELL_START id=%u", m_spellInfo->Id); uint32 castFlags = CAST_FLAG_UNKNOWN_2; if (m_spellInfo->Attributes & SPELL_ATTR0_REQ_AMMO) @@ -3866,7 +3866,7 @@ void Spell::SendSpellGo() if (!IsNeedSendToClient()) return; - //sLog->outDebug("Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id); + //sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id); uint32 castFlags = CAST_FLAG_UNKNOWN_9; @@ -4644,7 +4644,7 @@ void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTar uint8 eff = m_spellInfo->Effect[i]; - sLog->outDebug("Spell: %u Effect : %u", m_spellInfo->Id, eff); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell: %u Effect : %u", m_spellInfo->Id, eff); //we do not need DamageMultiplier here. damage = CalculateDamage(i, NULL); @@ -6427,7 +6427,7 @@ void Spell::DelayedChannel() else m_timer -= delaytime; - sLog->outDebug("Spell %u partially interrupted for %i ms, new duration: %u ms", m_spellInfo->Id, delaytime, m_timer); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell %u partially interrupted for %i ms, new duration: %u ms", m_spellInfo->Id, delaytime, m_timer); for (std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) if ((*ihit).missCondition == SPELL_MISS_NONE) @@ -6782,7 +6782,7 @@ bool Spell::IsValidSingleTargetSpell(Unit const* target) const { if (target->GetMapId() == MAPID_INVALID) { - sLog->outDebug("Spell::IsValidSingleTargetSpell - a spell was cast on '%s' (GUIDLow: %u), but they have an invalid map id!", target->GetName(), target->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::IsValidSingleTargetSpell - a spell was cast on '%s' (GUIDLow: %u), but they have an invalid map id!", target->GetName(), target->GetGUIDLow()); return false; } for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) @@ -7190,7 +7190,7 @@ void Spell::CheckEffectExecuteData() void Spell::LoadScripts() { - sLog->outDebug("Spell::LoadScripts"); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::LoadScripts"); sScriptMgr->CreateSpellScripts(m_spellInfo->Id, m_loadedScripts); for (std::list<SpellScript *>::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end() ;) { diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 86268cfbb32..9136cf2c9cb 100755 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -233,7 +233,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]= void Spell::EffectNULL(SpellEffIndex /*effIndex*/) { - sLog->outDebug("WORLD: Spell Effect DUMMY"); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "WORLD: Spell Effect DUMMY"); } void Spell::EffectUnused(SpellEffIndex /*effIndex*/) @@ -869,7 +869,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) Creature* creatureTarget = unitTarget->ToCreature(); m_caster->SummonGameObject(179644, creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(), creatureTarget->GetOrientation(), 0, 0, 0, 0, uint32(creatureTarget->GetRespawnTime()-time(NULL))); - sLog->outDebug("SummonGameObject at SpellEfects.cpp EffectDummy for Spell 23019"); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SummonGameObject at SpellEfects.cpp EffectDummy for Spell 23019"); creatureTarget->DespawnOrUnsummon(); @@ -1550,7 +1550,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) } // normal DB scripted effect - sLog->outDebug("Spell ScriptStart spellid %u in EffectDummy(%u)", m_spellInfo->Id, effIndex); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell ScriptStart spellid %u in EffectDummy(%u)", m_spellInfo->Id, effIndex); m_caster->GetMap()->ScriptsStart(sSpellScripts, uint32(m_spellInfo->Id | (effIndex << 24)), m_caster, unitTarget); // Script based implementation. Must be used only for not good for implementation in core spell effects @@ -1983,7 +1983,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/) m_targets.m_dstPos.GetPosition(x, y, z, orientation); if (!orientation && m_targets.getUnitTarget()) orientation = m_targets.getUnitTarget()->GetOrientation(); - sLog->outDebug("Spell::EffectTeleportUnits - teleport unit to %u %f %f %f %f\n", mapid, x, y, z, orientation); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::EffectTeleportUnits - teleport unit to %u %f %f %f %f\n", mapid, x, y, z, orientation); if (mapid == unitTarget->GetMapId()) unitTarget->NearTeleportTo(x, y, z, orientation, unitTarget == m_caster); @@ -2113,7 +2113,7 @@ void Spell::EffectUnlearnSpecialization(SpellEffIndex effIndex) _player->removeSpell(spellToUnlearn); - sLog->outDebug("Spell: Player %u has unlearned spell %u from NpcGUID: %u", _player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell: Player %u has unlearned spell %u from NpcGUID: %u", _player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow()); } void Spell::EffectPowerDrain(SpellEffIndex effIndex) @@ -2155,7 +2155,7 @@ void Spell::EffectSendEvent(SpellEffIndex effIndex) /* we do not handle a flag dropping or clicking on flag in battleground by sendevent system */ - sLog->outDebug("Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->EffectMiscValue[effIndex], m_spellInfo->Id); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->EffectMiscValue[effIndex], m_spellInfo->Id); Object *pTarget; if (focusObject) @@ -2363,7 +2363,7 @@ void Spell::EffectHealthLeech(SpellEffIndex effIndex) if (!unitTarget || !unitTarget->isAlive() || damage < 0) return; - sLog->outDebug("HealthLeech :%i", damage); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "HealthLeech :%i", damage); float healMultiplier = SpellMgr::CalculateSpellEffectValueMultiplier(m_spellInfo, effIndex, m_originalCaster, this); @@ -2743,7 +2743,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype) // TODO: possible must be moved to loot release (in different from linked triggering) if (gameObjTarget->GetGOInfo()->chest.eventId) { - sLog->outDebug("Chest ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->chest.eventId,gameObjTarget->GetDBTableGUIDLow()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Chest ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->chest.eventId,gameObjTarget->GetDBTableGUIDLow()); player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->chest.eventId, player, gameObjTarget); } @@ -2765,7 +2765,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex) { if (m_caster->GetTypeId() != TYPEID_PLAYER) { - sLog->outDebug("WORLD: Open Lock - No Player Caster!"); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "WORLD: Open Lock - No Player Caster!"); return; } @@ -2820,7 +2820,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex) } else { - sLog->outDebug("WORLD: Open Lock - No GameObject/Item Target!"); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "WORLD: Open Lock - No GameObject/Item Target!"); return; } @@ -3178,7 +3178,7 @@ void Spell::EffectLearnSpell(SpellEffIndex effIndex) uint32 spellToLearn = (m_spellInfo->Id == 483 || m_spellInfo->Id == 55884) ? damage : m_spellInfo->EffectTriggerSpell[effIndex]; player->learnSpell(spellToLearn, false); - sLog->outDebug("Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow()); } typedef std::list< std::pair<uint32, uint64> > DispelList; @@ -3438,7 +3438,7 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/) if (m_CastItem) { unitTarget->ToPlayer()->RewardHonor(NULL, 1, damage/10); - sLog->outDebug("SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %u", m_spellInfo->Id, damage/10, m_CastItem->GetEntry(),unitTarget->ToPlayer()->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %u", m_spellInfo->Id, damage/10, m_CastItem->GetEntry(),unitTarget->ToPlayer()->GetGUIDLow()); return; } @@ -3447,13 +3447,13 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/) { uint32 honor_reward = Trinity::Honor::hk_honor_at_level(unitTarget->getLevel(), float(damage)); unitTarget->ToPlayer()->RewardHonor(NULL, 1, honor_reward); - sLog->outDebug("SpellEffect::AddHonor (spell_id %u) rewards %u honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, unitTarget->ToPlayer()->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, unitTarget->ToPlayer()->GetGUIDLow()); } else { //maybe we have correct honor_gain in damage already unitTarget->ToPlayer()->RewardHonor(NULL, 1, damage); - sLog->outDebug("SpellEffect::AddHonor (spell_id %u) rewards %u honor points (non scale) for player: %u", m_spellInfo->Id, damage, unitTarget->ToPlayer()->GetGUIDLow()); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (non scale) for player: %u", m_spellInfo->Id, damage, unitTarget->ToPlayer()->GetGUIDLow()); } } @@ -5419,7 +5419,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) } // normal DB scripted effect - sLog->outDebug("Spell ScriptStart spellid %u in EffectScriptEffect(%u)", m_spellInfo->Id, effIndex); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell ScriptStart spellid %u in EffectScriptEffect(%u)", m_spellInfo->Id, effIndex); m_caster->GetMap()->ScriptsStart(sSpellScripts, uint32(m_spellInfo->Id | (effIndex << 24)), m_caster, unitTarget); } @@ -5569,7 +5569,7 @@ void Spell::EffectStuck(SpellEffIndex /*effIndex*/) Player* pTarget = (Player*)unitTarget; - sLog->outDebug("Spell Effect: Stuck"); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell Effect: Stuck"); sLog->outDetail("Player %s (guid %u) used auto-unstuck future at map %u (%f, %f, %f)", pTarget->GetName(), pTarget->GetGUIDLow(), m_caster->GetMapId(), m_caster->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ()); if (pTarget->isInFlight()) @@ -6557,7 +6557,7 @@ void Spell::EffectMilling(SpellEffIndex /*effIndex*/) void Spell::EffectSkill(SpellEffIndex /*effIndex*/) { - sLog->outDebug("WORLD: SkillEFFECT"); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "WORLD: SkillEFFECT"); } /* There is currently no need for this effect. We handle it in Battleground.cpp @@ -6584,7 +6584,7 @@ void Spell::EffectSpiritHeal(SpellEffIndex /*effIndex*/) // remove insignia spell effect void Spell::EffectSkinPlayerCorpse(SpellEffIndex /*effIndex*/) { - sLog->outDebug("Effect: SkinPlayerCorpse"); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Effect: SkinPlayerCorpse"); if ((m_caster->GetTypeId() != TYPEID_PLAYER) || (unitTarget->GetTypeId() != TYPEID_PLAYER) || (unitTarget->isAlive())) return; @@ -6593,7 +6593,7 @@ void Spell::EffectSkinPlayerCorpse(SpellEffIndex /*effIndex*/) void Spell::EffectStealBeneficialBuff(SpellEffIndex effIndex) { - sLog->outDebug("Effect: StealBeneficialBuff"); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Effect: StealBeneficialBuff"); if (!unitTarget || unitTarget == m_caster) // can't steal from self return; diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index d993e1e8b0e..d0b6fefa10d 100755 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -400,7 +400,7 @@ uint32 CalculatePowerCost(SpellEntry const * spellInfo, Unit const * caster, Spe break; case POWER_RUNE: case POWER_RUNIC_POWER: - sLog->outDebug("CalculateManaCost: Not implemented yet!"); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "CalculateManaCost: Not implemented yet!"); break; default: sLog->outError("CalculateManaCost: Unknown power type '%d' in spell %d", spellInfo->powerType, spellInfo->Id); @@ -1223,7 +1223,7 @@ void SpellMgr::LoadSpellTargetPositions() if (found) { // if (!sSpellMgr->GetSpellTargetPosition(i)) -// sLog->outDebug("Spell (ID: %u) does not have record in `spell_target_position`", i); +// sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell (ID: %u) does not have record in `spell_target_position`", i); } } diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index 6a4ed30cd53..1e2e6035a7e 100755 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -1082,14 +1082,14 @@ class SpellMgr SpellDifficultyEntry const *SpellDiff = sSpellDifficultyStore.LookupEntry(SpellDiffId); if (!SpellDiff) { - sLog->outDebug("GetSpellForDifficultyFromSpell: SpellDifficultyEntry not found for spell %u. This Should never happen.", spell->Id); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "GetSpellForDifficultyFromSpell: SpellDifficultyEntry not found for spell %u. This Should never happen.", spell->Id); return spell;//return source spell } if (SpellDiff->SpellID[mode] <= 0 && mode > DUNGEON_DIFFICULTY_HEROIC) { uint8 baseMode = mode; mode -= 2; - sLog->outDebug("GetSpellForDifficultyFromSpell: spell %u mode %u spell is NULL, using mode %u", spell->Id, baseMode, mode); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "GetSpellForDifficultyFromSpell: spell %u mode %u spell is NULL, using mode %u", spell->Id, baseMode, mode); } if (SpellDiff->SpellID[mode] <= 0) { @@ -1099,10 +1099,10 @@ class SpellMgr SpellEntry const* newSpell = sSpellStore.LookupEntry(SpellDiff->SpellID[mode]); if (!newSpell) { - sLog->outDebug("GetSpellForDifficultyFromSpell: spell %u not found in SpellStore. Check spelldifficulty_dbc!", SpellDiff->SpellID[mode]); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "GetSpellForDifficultyFromSpell: spell %u not found in SpellStore. Check spelldifficulty_dbc!", SpellDiff->SpellID[mode]); return spell; } - sLog->outDebug("GetSpellForDifficultyFromSpell: spellid for spell %u in mode %u is %u ", spell->Id, mode, newSpell->Id); + sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "GetSpellForDifficultyFromSpell: spellid for spell %u in mode %u is %u ", spell->Id, mode, newSpell->Id); return newSpell; } diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 29a58d79165..079789befaa 100755 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -417,14 +417,14 @@ bool CreatureTextMgr::TextExist(uint32 sourceEntry, uint8 textGroup) CreatureTextMap::const_iterator sList = mTextMap.find(sourceEntry); if (sList == mTextMap.end()) { - sLog->outDebug("CreatureTextMgr::TextExist: Could not find Text for Creature (entry %u) in 'creature_text' table.", sourceEntry); + sLog->outDebug(LOG_FILTER_UNITS, "CreatureTextMgr::TextExist: Could not find Text for Creature (entry %u) in 'creature_text' table.", sourceEntry); return false; } CreatureTextHolder TextHolder = (*sList).second; CreatureTextHolder::const_iterator itr = TextHolder.find(textGroup); if (itr == TextHolder.end()) { - sLog->outDebug("CreatureTextMgr::TextExist: Could not find TextGroup %u for Creature (entry %u).",uint32(textGroup), sourceEntry); + sLog->outDebug(LOG_FILTER_UNITS, "CreatureTextMgr::TextExist: Could not find TextGroup %u for Creature (entry %u).",uint32(textGroup), sourceEntry); return false; } return true; diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp index b191b85d47b..d21de1c1fad 100755 --- a/src/server/game/Weather/Weather.cpp +++ b/src/server/game/Weather/Weather.cpp @@ -97,7 +97,7 @@ bool Weather::ReGenerate() static char const* seasonName[WEATHER_SEASONS] = { "spring", "summer", "fall", "winter" }; - sLog->outDebug("Generating a change in %s weather for zone %u.", seasonName[season], m_zone); + sLog->outDetail("Generating a change in %s weather for zone %u.", seasonName[season], m_zone); if ((u < 60) && (m_grade < 0.33333334f)) // Get fair { diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index b931db7a681..586a9316576 100755 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1611,7 +1611,7 @@ void World::SetInitialWorldSettings() sSmartScriptMgr->LoadSmartAIFromDB(); ///- Initialize game time and timers - sLog->outDebug("DEBUG:: Initialize game time and timers"); + sLog->outString("Initialize game time and timers"); m_gameTime = time(NULL); m_startTime=m_gameTime; @@ -1648,7 +1648,7 @@ void World::SetInitialWorldSettings() mail_timer = ((((localtime(&m_gameTime)->tm_hour + 20) % 24)* HOUR * IN_MILLISECONDS) / m_timers[WUPDATE_AUCTIONS].GetInterval()); //1440 mail_timer_expires = ((DAY * IN_MILLISECONDS) / (m_timers[WUPDATE_AUCTIONS].GetInterval())); - sLog->outDebug("Mail timer set to: " UI64FMTD ", mail return is called every " UI64FMTD " minutes", uint64(mail_timer), uint64(mail_timer_expires)); + sLog->outDetail("Mail timer set to: " UI64FMTD ", mail return is called every " UI64FMTD " minutes", uint64(mail_timer), uint64(mail_timer_expires)); ///- Initilize static helper structures AIRegistry::Initialize(); @@ -2521,7 +2521,7 @@ void World::ProcessCliCommands() CliCommandHolder* command; while (cliCmdQueue.next(command)) { - sLog->outDebug("CLI command under processing..."); + sLog->outDetail("CLI command under processing..."); zprint = command->m_print; callbackArg = command->m_callbackArg; CliHandler handler(callbackArg, zprint); @@ -2562,9 +2562,9 @@ void World::SendAutoBroadcast() WorldPacket data(SMSG_NOTIFICATION, (msg.size()+1)); data << msg; sWorld->SendGlobalMessage(&data); - } - sLog->outDebug("AutoBroadcast: '%s'",msg.c_str()); + + sLog->outDetail("AutoBroadcast: '%s'",msg.c_str()); } void World::UpdateRealmCharCount(uint32 accountId) diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index c375e2e63e5..7fdd242f561 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -391,12 +391,12 @@ public: } else { - sLog->outDebug("Sending opcode: unknown type '%s'", type.c_str()); + sLog->outError("Sending opcode: unknown type '%s'", type.c_str()); break; } } ifs.close(); - sLog->outDebug("Sending opcode %u", data.GetOpcode()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "Sending opcode %u", data.GetOpcode()); data.hexlike(); player->GetSession()->SendPacket(&data); handler->PSendSysMessage(LANG_COMMAND_OPCODESENT, data.GetOpcode(), unit->GetName()); @@ -1053,14 +1053,12 @@ public: if (isint32) { iValue = (uint32)atoi(py); - sLog->outDebug(handler->GetTrinityString(LANG_SET_UINT), GUID_LOPART(guid), Opcode, iValue); target->SetUInt32Value(Opcode , iValue); handler->PSendSysMessage(LANG_SET_UINT_FIELD, GUID_LOPART(guid), Opcode,iValue); } else { fValue = (float)atof(py); - sLog->outDebug(handler->GetTrinityString(LANG_SET_FLOAT), GUID_LOPART(guid), Opcode, fValue); target->SetFloatValue(Opcode , fValue); handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, GUID_LOPART(guid), Opcode,fValue); } @@ -1104,13 +1102,11 @@ public: if (isint32) { iValue = target->GetUInt32Value(Opcode); - sLog->outDebug(handler->GetTrinityString(LANG_GET_UINT), GUID_LOPART(guid), Opcode, iValue); handler->PSendSysMessage(LANG_GET_UINT_FIELD, GUID_LOPART(guid), Opcode, iValue); } else { fValue = target->GetFloatValue(Opcode); - sLog->outDebug(handler->GetTrinityString(LANG_GET_FLOAT), GUID_LOPART(guid), Opcode, fValue); handler->PSendSysMessage(LANG_GET_FLOAT_FIELD, GUID_LOPART(guid), Opcode, fValue); } @@ -1137,8 +1133,6 @@ public: return false; } - sLog->outDebug(handler->GetTrinityString(LANG_CHANGE_32BIT), Opcode, Value); - int CurrentValue = (int)handler->GetSession()->GetPlayer()->GetUInt32Value(Opcode); CurrentValue += Value; @@ -1223,8 +1217,6 @@ public: if (Value > 32) //uint32 = 32 bits return false; - sLog->outDebug(handler->GetTrinityString(LANG_SET_32BIT), Opcode, Value); - uint32 iValue = Value ? 1 << (Value - 1) : 0; target->SetUInt32Value(Opcode , iValue); diff --git a/src/server/scripts/Commands/cs_gobject.cpp b/src/server/scripts/Commands/cs_gobject.cpp index d5f589928b6..60a73ddba05 100644 --- a/src/server/scripts/Commands/cs_gobject.cpp +++ b/src/server/scripts/Commands/cs_gobject.cpp @@ -172,8 +172,6 @@ public: return false; } - sLog->outDebug(handler->GetTrinityString(LANG_GAMEOBJECT_CURRENT), gInfo->name, db_lowGUID, x, y, z, o); - map->Add(pGameObj); // TODO: is it really necessary to add both the real and DB table guid here ? diff --git a/src/server/scripts/Commands/cs_wp.cpp b/src/server/scripts/Commands/cs_wp.cpp index badbb789713..fcb15b4b6f3 100644 --- a/src/server/scripts/Commands/cs_wp.cpp +++ b/src/server/scripts/Commands/cs_wp.cpp @@ -75,8 +75,6 @@ public: */ static bool HandleWpAddCommand(ChatHandler* handler, const char* args) { - sLog->outDebug("DEBUG: HandleWpAddCommand"); - // optional char* path_number = NULL; uint32 pathid = 0; @@ -96,7 +94,6 @@ public: QueryResult result = WorldDatabase.Query("SELECT MAX(id) FROM waypoint_data"); uint32 maxpathid = result->Fetch()->GetInt32(); pathid = maxpathid+1; - sLog->outDebug("DEBUG: HandleWpAddCommand - New path started."); handler->PSendSysMessage("%s%s|r", "|cff00ff00", "New path started."); } } @@ -108,13 +105,10 @@ public: if (!pathid) { - sLog->outDebug("DEBUG: HandleWpAddCommand - Current creature haven't loaded path."); handler->PSendSysMessage("%s%s|r", "|cffff33ff", "Current creature haven't loaded path."); return true; } - sLog->outDebug("DEBUG: HandleWpAddCommand - point == 0"); - QueryResult result = WorldDatabase.PQuery("SELECT MAX(point) FROM waypoint_data WHERE id = '%u'",pathid); if (result) @@ -147,7 +141,7 @@ public: // Did player provide a path_id? if (!path_number) - sLog->outDebug("DEBUG: HandleWpLoadPathCommand - No path number provided"); + return false; if (!target) { @@ -167,7 +161,7 @@ public: if (!pathid) { - handler->PSendSysMessage("%s%s|r", "|cffff33ff", "No vallid path number provided."); + handler->PSendSysMessage("%s%s|r", "|cffff33ff", "No valid path number provided."); return true; } @@ -452,8 +446,6 @@ public: static bool HandleWpModifyCommand(ChatHandler* handler, const char* args) { - sLog->outDebug("DEBUG: HandleWpModifyCommand"); - if (!*args) return false; @@ -491,7 +483,6 @@ public: return false; } - sLog->outDebug("DEBUG: HandleWpModifyCommand - User did select an NPC"); // The visual waypoint Creature* wpCreature = NULL; wpGuid = target->GetGUIDLow(); @@ -513,8 +504,6 @@ public: if (!result) { - sLog->outDebug("DEBUG: HandleWpModifyCommand - No waypoint found - used 'wpguid'"); - handler->PSendSysMessage(LANG_WAYPOINT_NOTFOUNDSEARCH, target->GetGUIDLow()); // Select waypoint number from database // Since we compare float values, we have to deal with @@ -531,7 +520,6 @@ public: return true; } } - sLog->outDebug("DEBUG: HandleWpModifyCommand - After getting wpGuid"); do { @@ -546,8 +534,6 @@ public: arg_str = strtok((char*)NULL, " "); } - sLog->outDebug("DEBUG: HandleWpModifyCommand - Parameters parsed - now execute the command"); - // Check for argument if (show != "del" && show != "move" && arg_str == NULL) { @@ -644,8 +630,6 @@ public: static bool HandleWpShowCommand(ChatHandler* handler, const char* args) { - sLog->outDebug("DEBUG: HandleWpShowCommand"); - if (!*args) return false; @@ -656,7 +640,6 @@ public: // second arg: GUID (optional, if a creature is selected) char* guid_str = strtok((char*)NULL, " "); - sLog->outDebug("DEBUG: HandleWpShowCommand: show_str: %s guid_str: %s", show_str, guid_str); uint32 pathid = 0; Creature* target = handler->getSelectedCreature(); @@ -665,7 +648,6 @@ public: if (!guid_str) { - sLog->outDebug("DEBUG: HandleWpShowCommand: !guid_str"); // No PathID provided // -> Player must have selected a creature @@ -680,7 +662,6 @@ public: } else { - sLog->outDebug("|cff00ff00DEBUG: HandleWpShowCommand: PathID provided|r"); // PathID provided // Warn if player also selected a creature // -> Creature selection is ignored <- @@ -690,13 +671,9 @@ public: pathid = atoi((char*)guid_str); } - sLog->outDebug("DEBUG: HandleWpShowCommand: danach"); - std::string show = show_str; uint32 Maxpoint; - sLog->outDebug("DEBUG: HandleWpShowCommand: PathID: %u", pathid); - //handler->PSendSysMessage("wpshow - show: %s", show); // Show info for the selected waypoint @@ -811,7 +788,6 @@ public: return false; } - sLog->outDebug("DEBUG: UPDATE waypoint_data SET wpguid = '%u' WHERE id = '%u' and point = '%u'", wpCreature->GetGUIDLow(), pathid, point); // set "wpguid" column to the visual waypoint WorldDatabase.PExecute("UPDATE waypoint_data SET wpguid = '%u' WHERE id = '%u' and point = '%u'", wpCreature->GetGUIDLow(), pathid, point); diff --git a/src/server/shared/Database/MySQLConnection.cpp b/src/server/shared/Database/MySQLConnection.cpp index e2f2c698632..fad73844743 100755 --- a/src/server/shared/Database/MySQLConnection.cpp +++ b/src/server/shared/Database/MySQLConnection.cpp @@ -477,7 +477,7 @@ PreparedResultSet* MySQLConnection::Query(PreparedStatement* stmt) bool MySQLConnection::_HandleMySQLErrno(uint32 errNo) { - sLog->outDebug("%s", __FUNCTION__); + sLog->outSQLDriver("%s", __FUNCTION__); switch (errNo) { diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp index dd66e3e0811..eaff7cbd8fa 100755 --- a/src/server/shared/Logging/Log.cpp +++ b/src/server/shared/Logging/Log.cpp @@ -168,16 +168,7 @@ void Log::Initialize() m_dbLogLevel = sConfig->GetIntDefault("DBLogLevel", LOGL_NORMAL); m_sqlDriverQueryLogging = sConfig->GetBoolDefault("SQLDriverQueryLogging", false); - m_logFilter = 0; - - if(sConfig->GetBoolDefault("LogFilter_TransportMoves", true)) - m_logFilter |= LOG_FILTER_TRANSPORT_MOVES; - if(sConfig->GetBoolDefault("LogFilter_CreatureMoves", true)) - m_logFilter |= LOG_FILTER_CREATURE_MOVES; - if(sConfig->GetBoolDefault("LogFilter_VisibilityChanges", true)) - m_logFilter |= LOG_FILTER_VISIBILITY_CHANGES; - if(sConfig->GetBoolDefault("LogFilter_AchievementUpdates", true)) - m_logFilter |= LOG_FILTER_ACHIEVEMENT_UPDATES; + m_DebugLogMask = DebugLogFilters(sConfig->GetIntDefault("DebugLogMask", LOG_FILTER_NONE)); // Char log settings m_charLog_Dump = sConfig->GetBoolDefault("CharLogDump", false); @@ -723,8 +714,11 @@ void Log::outDebugInLine(const char * str, ...) } } -void Log::outDebug(const char * str, ...) +void Log::outDebug(DebugLogFilters f, const char * str, ...) { + if (!(m_DebugLogMask & f)) + return; + if (!str) return; diff --git a/src/server/shared/Logging/Log.h b/src/server/shared/Logging/Log.h index 61bb8b8ef9d..5f0fd8d27f2 100755 --- a/src/server/shared/Logging/Log.h +++ b/src/server/shared/Logging/Log.h @@ -24,12 +24,32 @@ class Config; -enum LogFilters +enum DebugLogFilters { - LOG_FILTER_TRANSPORT_MOVES = 1, - LOG_FILTER_CREATURE_MOVES = 2, - LOG_FILTER_VISIBILITY_CHANGES = 4, - LOG_FILTER_ACHIEVEMENT_UPDATES = 8 + LOG_FILTER_NONE = 0x00000000, + LOG_FILTER_UNITS = 0x00000001, // Anything related to units that doesn't fit in other categories. ie. creature formations + LOG_FILTER_PETS = 0x00000002, + LOG_FILTER_VEHICLES = 0x00000004, + LOG_FILTER_TSCR = 0x00000008, // C++ AI, instance scripts, etc. + LOG_FILTER_DATABASE_AI = 0x08000010, // SmartAI, EventAI, CreatureAI + LOG_FILTER_MAPSCRIPTS = 0x00000020, + LOG_FILTER_NETWORKIO = 0x00000040, // Anything packet/netcode related + LOG_FILTER_SPELLS_AURAS = 0x00000080, + LOG_FILTER_ACHIEVEMENTSYS = 0x00000100, + LOG_FILTER_CONDITIONSYS = 0x00000200, + LOG_FILTER_POOLSYS = 0x00000400, + LOG_FILTER_AUCTIONHOUSE = 0x00000800, + LOG_FILTER_BATTLEGROUND = 0x00001000, // Anything related to arena's and battlegrounds + LOG_FILTER_OUTDOORPVP = 0x00002000, + LOG_FILTER_CHATSYS = 0x00004000, + LOG_FILTER_LFG = 0x00008000, + LOG_FILTER_MAPS = 0x00010000, // Maps, instances, grids, cells, visibility + LOG_FILTER_PLAYER_LOADING = 0x00020000, // Debug output from Player::_Load functions + LOG_FILTER_PLAYER_ITEMS = 0x00040000, // Anything item related + LOG_FILTER_PLAYER_SKILLS = 0x00080000, // Skills related + LOG_FILTER_LOOT = 0x00100000, // Loot related + LOG_FILTER_GUILD = 0x00200000, // Guild related + LOG_FILTER_TRANSPORTS = 0x00400000, // Transport related }; enum LogTypes @@ -100,7 +120,7 @@ class Log void outCrash( const char * err, ... ) ATTR_PRINTF(2,3); void outBasic( const char * str, ... ) ATTR_PRINTF(2,3); void outDetail( const char * str, ... ) ATTR_PRINTF(2,3); - void outDebug( const char * str, ... ) ATTR_PRINTF(2,3); + void outDebug(DebugLogFilters f, const char* str, ...) ATTR_PRINTF(3,4); void outStaticDebug( const char * str, ... ) ATTR_PRINTF(2,3); void outDebugInLine( const char * str, ... ) ATTR_PRINTF(2,3); void outErrorDb( const char * str, ... ) ATTR_PRINTF(2,3); @@ -121,7 +141,6 @@ class Log void SetSQLDriverQueryLogging(bool newStatus) { m_sqlDriverQueryLogging = newStatus; } void SetRealmID(uint32 id) { realm = id; } - uint32 getLogFilter() const { return m_logFilter; } bool IsOutDebug() const { return m_logLevel > 2 || (m_logFileLevel > 2 && logfile); } bool IsOutCharDump() const { return m_charLog_Dump; } @@ -168,7 +187,6 @@ class Log uint8 m_dbLogLevel; uint8 m_logLevel; uint8 m_logFileLevel; - uint8 m_logFilter; bool m_dbChar; bool m_dbRA; bool m_dbGM; @@ -176,6 +194,8 @@ class Log bool m_charLog_Dump; bool m_charLog_Dump_Separate; std::string m_dumpsDir; + + DebugLogFilters m_DebugLogMask; }; #define sLog ACE_Singleton<Log, ACE_Thread_Mutex>::instance() diff --git a/src/server/shared/Packets/ByteBuffer.h b/src/server/shared/Packets/ByteBuffer.h index 198772c1d3a..e6672719226 100755 --- a/src/server/shared/Packets/ByteBuffer.h +++ b/src/server/shared/Packets/ByteBuffer.h @@ -416,10 +416,10 @@ class ByteBuffer if(!sLog->IsOutDebug()) // optimize disabled debug output return; - sLog->outDebug("STORAGE_SIZE: %lu", (unsigned long)size() ); + sLog->outDebug(LOG_FILTER_NETWORKIO, "STORAGE_SIZE: %lu", (unsigned long)size() ); for (uint32 i = 0; i < size(); ++i) sLog->outDebugInLine("%u - ", read<uint8>(i) ); - sLog->outDebug(" "); + sLog->outDebug(LOG_FILTER_NETWORKIO, " "); } void textlike() const @@ -427,10 +427,10 @@ class ByteBuffer if(!sLog->IsOutDebug()) // optimize disabled debug output return; - sLog->outDebug("STORAGE_SIZE: %lu", (unsigned long)size() ); + sLog->outDebug(LOG_FILTER_NETWORKIO, "STORAGE_SIZE: %lu", (unsigned long)size() ); for (uint32 i = 0; i < size(); ++i) sLog->outDebugInLine("%c", read<uint8>(i) ); - sLog->outDebug(" "); + sLog->outDebug(LOG_FILTER_NETWORKIO, " "); } void hexlike() const @@ -439,7 +439,7 @@ class ByteBuffer return; uint32 j = 1, k = 1; - sLog->outDebug("STORAGE_SIZE: %lu", (unsigned long)size() ); + sLog->outDebug(LOG_FILTER_NETWORKIO, "STORAGE_SIZE: %lu", (unsigned long)size() ); for (uint32 i = 0; i < size(); ++i) { diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp index 66a58caba80..c023e5c62a0 100755 --- a/src/server/worldserver/TCSoap/TCSoap.cpp +++ b/src/server/worldserver/TCSoap/TCSoap.cpp @@ -49,7 +49,7 @@ void TCSoapRunnable::run() if (!soap_valid_socket(soap_accept(&soap))) continue; // ran into an accept timeout - sLog->outDebug("TCSoap: accepted connection from IP=%d.%d.%d.%d", (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF); + sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: accepted connection from IP=%d.%d.%d.%d", (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF); struct soap* thread_soap = soap_copy(&soap);// make a safe copy ACE_Message_Block *mb = new ACE_Message_Block(sizeof(struct soap*)); @@ -87,33 +87,33 @@ int ns1__executeCommand(soap* soap, char* command, char** result) // security check if (!soap->userid || !soap->passwd) { - sLog->outDebug("TCSoap: Client didn't provide login information"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: Client didn't provide login information"); return 401; } uint32 accountId = sAccountMgr->GetId(soap->userid); if(!accountId) { - sLog->outDebug("TCSoap: Client used invalid username '%s'", soap->userid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: Client used invalid username '%s'", soap->userid); return 401; } if(!sAccountMgr->CheckPassword(accountId, soap->passwd)) { - sLog->outDebug("TCSoap: invalid password for account '%s'", soap->userid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: invalid password for account '%s'", soap->userid); return 401; } if(sAccountMgr->GetSecurity(accountId) < SEC_ADMINISTRATOR) { - sLog->outDebug("TCSoap: %s's gmlevel is too low", soap->userid); + sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: %s's gmlevel is too low", soap->userid); return 403; } if(!command || !*command) return soap_sender_fault(soap, "Command mustn't be empty", "The supplied command was an empty string"); - sLog->outDebug("TCSoap: got command '%s'", command); + sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: got command '%s'", command); SOAPCommand connection; // commands are executed in the world thread. We have to wait for them to be completed diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index d0ccc619985..3109c922914 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -440,21 +440,45 @@ LogTimestamp = 0 LogFileLevel = 0 # -# LogFilter_AchievementUpdates -# LogFilter_CreatureMoves -# LogFilter_TransportMoves -# LogFilter_VisibilityChanges -# Description: Filter log events -# Default: 1 - (Enabled, LogFilter_AchievementUpdates) -# 1 - (Enabled, LogFilter_CreatureMoves) -# 1 - (Enabled, LogFilter_TransportMoves) -# 1 - (Enabled, LogFilter_VisibilityChanges) -# 0 - (Disabled) - -LogFilter_AchievementUpdates = 1 -LogFilter_CreatureMoves = 1 -LogFilter_TransportMoves = 1 -LogFilter_VisibilityChanges = 1 +# Debug Log Mask +# Description: Bitmask that determines which debug log output (level 3) +# will be logged. +# Possible flags: +# 1 - Anything related to units that doesn't fit in other +# categories. +# 2 - Anything related to pets. +# 4 - Anything related to vehicles. +# 8 - Anything related to C++ AI, instance scripts, etc. +# 16 - Anything related to DB AI, such as SAI, EAI, CreatureAI +# 32 - Anything related to DB map scripts +# 64 - Anything related to network input/output, +# such as packet handlers and netcode logs +# 128 - Anything related to the spellsystem and aurasystem +# 256 - Anything related to the achievement system +# 512 - Anything related to the condition system +# 1024 - Anything related to the pool system +# 2048 - Anything related to the auction house +# 4096 - Anything related to arena's and battlegrounds +# 8192 - Anything related to outdoor PVP +# 16384 - Anything related to the chat system +# 32768 - Anything related to the LFG system +# 65536 - Anything related to maps, instances (not scripts), +# grids, cells, visibility, etc. +# 131072 - Anything related to player loading from DB +# (Player::_LoadXXX functions) +# 262144 - Anything related to items +# 524288 - Anything related to player skills +# (do not confuse with spells) +# 1048576 - Anything related to loot +# 2097152 - Anything related to guilds +# 4194304 - Anything related to transports +# +# Simply add the values together to create a bitmask. +# For more info see enum DebugLogFilters in Log.h +# +# Default: 0 (nothing) + +DebugLogMask = 0 # # WorldLogFile |