diff options
Diffstat (limited to 'src/game/Handlers/MiscHandler.cpp')
-rw-r--r-- | src/game/Handlers/MiscHandler.cpp | 323 |
1 files changed, 238 insertions, 85 deletions
diff --git a/src/game/Handlers/MiscHandler.cpp b/src/game/Handlers/MiscHandler.cpp index 708db524f2..1c7c30546c 100644 --- a/src/game/Handlers/MiscHandler.cpp +++ b/src/game/Handlers/MiscHandler.cpp @@ -46,7 +46,9 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket & recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_REPOP_REQUEST Message"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_REPOP_REQUEST Message"); +#endif recv_data.read_skip<uint8>(); @@ -63,7 +65,9 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket & recv_data) // release spirit after he's killed but before he is updated if (GetPlayer()->getDeathState() == JUST_DIED) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleRepopRequestOpcode: got request after player %s(%d) was killed and before he was updated", GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow()); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleRepopRequestOpcode: got request after player %s(%d) was killed and before he was updated", GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow()); +#endif GetPlayer()->KillPlayer(); } @@ -75,7 +79,9 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket & recv_data) void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GOSSIP_SELECT_OPTION"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GOSSIP_SELECT_OPTION"); +#endif uint32 gossipListId; uint32 menuId; @@ -95,7 +101,9 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); if (!unit) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid))); +#endif return; } } @@ -104,7 +112,9 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) go = _player->GetMap()->GetGameObject(guid); if (!go) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - GameObject (GUID: %u) not found.", uint32(GUID_LOPART(guid))); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - GameObject (GUID: %u) not found.", uint32(GUID_LOPART(guid))); +#endif return; } } @@ -127,7 +137,9 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) } else { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - unsupported GUID type for highguid %u. lowpart %u.", uint32(GUID_HIPART(guid)), uint32(GUID_LOPART(guid))); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - unsupported GUID type for highguid %u. lowpart %u.", uint32(GUID_HIPART(guid)), uint32(GUID_LOPART(guid))); +#endif return; } @@ -137,7 +149,9 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) if ((unit && unit->GetCreatureTemplate()->ScriptID != unit->LastUsedScriptID) || (go && go->GetGOInfo()->ScriptId != go->LastUsedScriptID)) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - Script reloaded while in use, ignoring and set new scipt id"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - Script reloaded while in use, ignoring and set new scipt id"); +#endif if (unit) unit->LastUsedScriptID = unit->GetCreatureTemplate()->ScriptID; if (go) @@ -393,7 +407,9 @@ void WorldSession::HandleWhoOpcode(WorldPacket& recvData) void WorldSession::HandleLogoutRequestOpcode(WorldPacket & /*recv_data*/) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_LOGOUT_REQUEST Message, security - %u", GetSecurity()); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_LOGOUT_REQUEST Message, security - %u", GetSecurity()); +#endif if (uint64 lguid = GetPlayer()->GetLootGUID()) DoLootRelease(lguid); @@ -447,7 +463,9 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket & /*recv_data*/) void WorldSession::HandlePlayerLogoutOpcode(WorldPacket & /*recv_data*/) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_PLAYER_LOGOUT Message"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_PLAYER_LOGOUT Message"); +#endif } void WorldSession::HandleLogoutCancelOpcode(WorldPacket & /*recv_data*/) @@ -496,7 +514,9 @@ void WorldSession::HandleZoneUpdateOpcode(WorldPacket & recv_data) uint32 newZone; recv_data >> newZone; - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd ZONE_UPDATE: %u", newZone); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd ZONE_UPDATE: %u", newZone); +#endif // use server size data uint32 newzone, newarea; @@ -515,7 +535,9 @@ void WorldSession::HandleSetSelectionOpcode(WorldPacket & recv_data) void WorldSession::HandleStandStateChangeOpcode(WorldPacket & recv_data) { - // ;//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Received CMSG_STANDSTATECHANGE"); -- too many spam in log at lags/debug stop +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + // sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Received CMSG_STANDSTATECHANGE"); -- too many spam in log at lags/debug stop +#endif uint32 animstate; recv_data >> animstate; @@ -526,13 +548,17 @@ void WorldSession::HandleContactListOpcode(WorldPacket & recv_data) { uint32 unk; recv_data >> unk; - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_CONTACT_LIST - Unk: %d", unk); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_CONTACT_LIST - Unk: %d", unk); +#endif _player->GetSocial()->SendSocialList(_player); } void WorldSession::HandleAddFriendOpcode(WorldPacket & recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ADD_FRIEND"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ADD_FRIEND"); +#endif std::string friendName = GetTrinityString(LANG_FRIEND_IGNORE_UNKNOWN); std::string friendNote; @@ -544,7 +570,9 @@ void WorldSession::HandleAddFriendOpcode(WorldPacket & recv_data) if (!normalizePlayerName(friendName)) return; - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: %s asked to add friend : '%s'", GetPlayer()->GetName().c_str(), friendName.c_str()); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: %s asked to add friend : '%s'", GetPlayer()->GetName().c_str(), friendName.c_str()); +#endif // xinef: Get Data From global storage uint32 guidLow = sWorld->GetGlobalPlayerGUID(friendName); @@ -580,7 +608,9 @@ void WorldSession::HandleAddFriendOpcode(WorldPacket & recv_data) if (!GetPlayer()->GetSocial()->AddToSocialList(guidLow, false)) { friendResult = FRIEND_LIST_FULL; - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: %s's friend list is full.", GetPlayer()->GetName().c_str()); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: %s's friend list is full.", GetPlayer()->GetName().c_str()); +#endif } } GetPlayer()->GetSocial()->SetFriendNote(guidLow, friendNote); @@ -589,14 +619,18 @@ void WorldSession::HandleAddFriendOpcode(WorldPacket & recv_data) sSocialMgr->SendFriendStatus(GetPlayer(), friendResult, guidLow, false); - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_FRIEND_STATUS)"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_FRIEND_STATUS)"); +#endif } void WorldSession::HandleDelFriendOpcode(WorldPacket & recv_data) { uint64 FriendGUID; - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_DEL_FRIEND"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_DEL_FRIEND"); +#endif recv_data >> FriendGUID; @@ -604,12 +638,16 @@ void WorldSession::HandleDelFriendOpcode(WorldPacket & recv_data) sSocialMgr->SendFriendStatus(GetPlayer(), FRIEND_REMOVED, GUID_LOPART(FriendGUID), false); - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent motd (SMSG_FRIEND_STATUS)"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent motd (SMSG_FRIEND_STATUS)"); +#endif } void WorldSession::HandleAddIgnoreOpcode(WorldPacket & recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ADD_IGNORE"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ADD_IGNORE"); +#endif std::string ignoreName = GetTrinityString(LANG_FRIEND_IGNORE_UNKNOWN); @@ -618,9 +656,9 @@ void WorldSession::HandleAddIgnoreOpcode(WorldPacket & recv_data) if (!normalizePlayerName(ignoreName)) return; - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: %s asked to Ignore: '%s'", - // GetPlayer()->GetName().c_str(), ignoreName.c_str()); - +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: %s asked to Ignore: '%s'", GetPlayer()->GetName().c_str(), ignoreName.c_str()); +#endif uint32 lowGuid = sWorld->GetGlobalPlayerGUID(ignoreName); if (!lowGuid) return; @@ -643,7 +681,9 @@ void WorldSession::HandleAddIgnoreOpcode(WorldPacket & recv_data) sSocialMgr->SendFriendStatus(GetPlayer(), ignoreResult, lowGuid, false); - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_FRIEND_STATUS)"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent (SMSG_FRIEND_STATUS)"); +#endif } void WorldSession::HandleLoadActionsSwitchSpec(PreparedQueryResult result) @@ -688,7 +728,9 @@ void WorldSession::HandleDelIgnoreOpcode(WorldPacket & recv_data) { uint64 IgnoreGUID; - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_DEL_IGNORE"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_DEL_IGNORE"); +#endif recv_data >> IgnoreGUID; @@ -696,12 +738,16 @@ void WorldSession::HandleDelIgnoreOpcode(WorldPacket & recv_data) sSocialMgr->SendFriendStatus(GetPlayer(), FRIEND_IGNORE_REMOVED, GUID_LOPART(IgnoreGUID), false); - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent motd (SMSG_FRIEND_STATUS)"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent motd (SMSG_FRIEND_STATUS)"); +#endif } void WorldSession::HandleSetContactNotesOpcode(WorldPacket & recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_SET_CONTACT_NOTES"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_SET_CONTACT_NOTES"); +#endif uint64 guid; std::string note; recv_data >> guid >> note; @@ -717,13 +763,16 @@ void WorldSession::HandleBugOpcode(WorldPacket & recv_data) recv_data >> typelen >> type; + +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) if (suggestion == 0) - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUG [Bug Report]"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUG [Bug Report]"); else - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUG [Suggestion]"); + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUG [Suggestion]"); - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", type.c_str()); - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", content.c_str()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", type.c_str()); + sLog->outDebug(LOG_FILTER_NETWORKIO, "%s", content.c_str()); +#endif PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_BUG_REPORT); @@ -735,7 +784,9 @@ void WorldSession::HandleBugOpcode(WorldPacket & recv_data) void WorldSession::HandleReclaimCorpseOpcode(WorldPacket &recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_RECLAIM_CORPSE"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_RECLAIM_CORPSE"); +#endif uint64 guid; recv_data >> guid; @@ -772,7 +823,9 @@ void WorldSession::HandleReclaimCorpseOpcode(WorldPacket &recv_data) void WorldSession::HandleResurrectResponseOpcode(WorldPacket & recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_RESURRECT_RESPONSE"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_RESURRECT_RESPONSE"); +#endif uint64 guid; uint8 status; @@ -817,28 +870,36 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data) uint32 triggerId; recv_data >> triggerId; - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_AREATRIGGER. Trigger ID: %u", triggerId); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_AREATRIGGER. Trigger ID: %u", triggerId); +#endif Player* player = GetPlayer(); if (player->IsInFlight()) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) in flight, ignore Area Trigger ID:%u", - // player->GetName().c_str(), player->GetGUIDLow(), triggerId); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) in flight, ignore Area Trigger ID:%u", + player->GetName().c_str(), player->GetGUIDLow(), triggerId); +#endif return; } AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(triggerId); if (!atEntry) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) send unknown (by DBC) Area Trigger ID:%u", - // player->GetName().c_str(), player->GetGUIDLow(), triggerId); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) send unknown (by DBC) Area Trigger ID:%u", + player->GetName().c_str(), player->GetGUIDLow(), triggerId); +#endif return; } if (!player->IsInAreaTriggerRadius(atEntry)) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) too far (trigger map: %u player map: %u), ignore Area Trigger ID: %u", - // player->GetName().c_str(), atEntry->mapid, player->GetMapId(), player->GetGUIDLow(), triggerId); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) too far (trigger map: %u player map: %u), ignore Area Trigger ID: %u", + player->GetName().c_str(), atEntry->mapid, player->GetMapId(), player->GetGUIDLow(), triggerId); +#endif return; } @@ -896,12 +957,16 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data) void WorldSession::HandleUpdateAccountData(WorldPacket &recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_UPDATE_ACCOUNT_DATA"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_UPDATE_ACCOUNT_DATA"); +#endif uint32 type, timestamp, decompressedSize; recv_data >> type >> timestamp >> decompressedSize; - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "UAD: type %u, time %u, decompressedSize %u", type, timestamp, decompressedSize); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "UAD: type %u, time %u, decompressedSize %u", type, timestamp, decompressedSize); +#endif if (type > NUM_ACCOUNT_DATA_TYPES) return; @@ -951,12 +1016,16 @@ void WorldSession::HandleUpdateAccountData(WorldPacket &recv_data) void WorldSession::HandleRequestAccountData(WorldPacket& recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_REQUEST_ACCOUNT_DATA"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_REQUEST_ACCOUNT_DATA"); +#endif uint32 type; recv_data >> type; - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "RAD: type %u", type); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "RAD: type %u", type); +#endif if (type >= NUM_ACCOUNT_DATA_TYPES) return; @@ -972,7 +1041,9 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recv_data) if (size && compress(dest.contents(), &destSize, (uint8 const*)adata->Data.c_str(), size) != Z_OK) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "RAD: Failed to compress account data"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "RAD: Failed to compress account data"); +#endif return; } @@ -989,7 +1060,9 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recv_data) void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_ACTION_BUTTON"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_ACTION_BUTTON"); +#endif uint8 button; uint32 packetData; recv_data >> button >> packetData; @@ -997,10 +1070,14 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data) uint32 action = ACTION_BUTTON_ACTION(packetData); uint8 type = ACTION_BUTTON_TYPE(packetData); - ;//sLog->outDetail("BUTTON: %u ACTION: %u TYPE: %u", button, action, type); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDetail("BUTTON: %u ACTION: %u TYPE: %u", button, action, type); +#endif if (!packetData) { - ;//sLog->outDetail("MISC: Remove action from button %u", button); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDetail("MISC: Remove action from button %u", button); +#endif GetPlayer()->removeActionButton(button); } else @@ -1009,16 +1086,24 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data) { case ACTION_BUTTON_MACRO: case ACTION_BUTTON_CMACRO: - ;//sLog->outDetail("MISC: Added Macro %u into button %u", action, button); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDetail("MISC: Added Macro %u into button %u", action, button); +#endif break; case ACTION_BUTTON_EQSET: - ;//sLog->outDetail("MISC: Added EquipmentSet %u into button %u", action, button); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDetail("MISC: Added EquipmentSet %u into button %u", action, button); +#endif break; case ACTION_BUTTON_SPELL: - ;//sLog->outDetail("MISC: Added Spell %u into button %u", action, button); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDetail("MISC: Added Spell %u into button %u", action, button); +#endif break; case ACTION_BUTTON_ITEM: - ;//sLog->outDetail("MISC: Added Item %u into button %u", action, button); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDetail("MISC: Added Item %u into button %u", action, button); +#endif break; default: sLog->outError("MISC: Unknown action button type %u for action %u into button %u for player %s (GUID: %u)", type, action, button, _player->GetName().c_str(), _player->GetGUIDLow()); @@ -1030,12 +1115,16 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data) void WorldSession::HandleCompleteCinematic(WorldPacket & /*recv_data*/) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_COMPLETE_CINEMATIC"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_COMPLETE_CINEMATIC"); +#endif } void WorldSession::HandleNextCinematicCamera(WorldPacket & /*recv_data*/) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_NEXT_CINEMATIC_CAMERA"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_NEXT_CINEMATIC_CAMERA"); +#endif } void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket & recv_data) @@ -1048,7 +1137,9 @@ void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket & recv_data) void WorldSession::HandleFeatherFallAck(WorldPacket &recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_MOVE_FEATHER_FALL_ACK"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_MOVE_FEATHER_FALL_ACK"); +#endif // no used recv_data.rfinish(); // prevent warnings spam @@ -1069,7 +1160,9 @@ void WorldSession::HandleMoveUnRootAck(WorldPacket& recv_data) return; } - ;//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_FORCE_MOVE_UNROOT_ACK"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_FORCE_MOVE_UNROOT_ACK"); +#endif recv_data.read_skip<uint32>(); // unk @@ -1095,7 +1188,9 @@ void WorldSession::HandleMoveRootAck(WorldPacket& recv_data) return; } - ;//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_FORCE_MOVE_ROOT_ACK"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_FORCE_MOVE_ROOT_ACK"); +#endif recv_data.read_skip<uint32>(); // unk @@ -1137,12 +1232,16 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data) uint64 guid; recv_data >> guid; - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_INSPECT"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_INSPECT"); +#endif Player* player = ObjectAccessor::GetPlayer(*_player, guid); if (!player) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_INSPECT: No player found from GUID: " UI64FMTD, guid); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_INSPECT: No player found from GUID: " UI64FMTD, guid); +#endif return; } @@ -1174,7 +1273,9 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data) Player* player = ObjectAccessor::GetPlayer(*_player, guid); if (!player) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_INSPECT_HONOR_STATS: No player found from GUID: " UI64FMTD, guid); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_INSPECT_HONOR_STATS: No player found from GUID: " UI64FMTD, guid); +#endif return; } @@ -1204,15 +1305,21 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recv_data) recv_data >> PositionZ; recv_data >> Orientation; // o (3.141593 = 180 degrees) - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_WORLD_TELEPORT"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_WORLD_TELEPORT"); +#endif if (GetPlayer()->IsInFlight()) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) in flight, ignore worldport command.", GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow()); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) in flight, ignore worldport command.", GetPlayer()->GetName().c_str(), GetPlayer()->GetGUIDLow()); +#endif return; } - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_WORLD_TELEPORT: Player = %s, Time = %u, map = %u, x = %f, y = %f, z = %f, o = %f", GetPlayer()->GetName().c_str(), time, mapid, PositionX, PositionY, PositionZ, Orientation); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_WORLD_TELEPORT: Player = %s, Time = %u, map = %u, x = %f, y = %f, z = %f, o = %f", GetPlayer()->GetName().c_str(), time, mapid, PositionX, PositionY, PositionZ, Orientation); +#endif if (AccountMgr::IsAdminAccount(GetSecurity())) GetPlayer()->TeleportTo(mapid, PositionX, PositionY, PositionZ, Orientation); @@ -1222,7 +1329,9 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recv_data) void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_WHOIS"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_WHOIS"); +#endif std::string charname; recv_data >> charname; @@ -1277,12 +1386,16 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data) data << msg; SendPacket(&data); - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "Received whois command from player %s for character %s", GetPlayer()->GetName().c_str(), charname.c_str()); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "Received whois command from player %s for character %s", GetPlayer()->GetName().c_str(), charname.c_str()); +#endif } void WorldSession::HandleComplainOpcode(WorldPacket & recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_COMPLAIN"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_COMPLAIN"); +#endif uint8 spam_type; // 0 - mail, 1 - chat uint64 spammer_guid; @@ -1317,12 +1430,16 @@ void WorldSession::HandleComplainOpcode(WorldPacket & recv_data) data << uint8(0); SendPacket(&data); - ;//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()); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + 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()); +#endif } void WorldSession::HandleRealmSplitOpcode(WorldPacket & recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_REALM_SPLIT"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_REALM_SPLIT"); +#endif uint32 unk; std::string split_date = "01/01/01"; @@ -1342,22 +1459,30 @@ void WorldSession::HandleRealmSplitOpcode(WorldPacket & recv_data) void WorldSession::HandleFarSightOpcode(WorldPacket& recvData) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_FAR_SIGHT"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_FAR_SIGHT"); +#endif bool apply; recvData >> apply; if (apply) { - ;//sLog->outDebug("Added FarSight " UI64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow()); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "Added FarSight " UI64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow()); +#endif if (WorldObject* target = _player->GetViewpoint()) _player->SetSeer(target); else - ;//sLog->outError("Player %s requests non-existing seer " UI64FMTD, _player->GetName().c_str(), _player->GetUInt64Value(PLAYER_FARSIGHT)); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outError("Player %s requests non-existing seer " UI64FMTD, _player->GetName().c_str(), _player->GetUInt64Value(PLAYER_FARSIGHT)); +#endif } else { - ;//sLog->outDebug("Player %u set vision to self", _player->GetGUIDLow()); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "Player %u set vision to self", _player->GetGUIDLow()); +#endif _player->SetSeer(_player); } @@ -1366,7 +1491,9 @@ void WorldSession::HandleFarSightOpcode(WorldPacket& recvData) void WorldSession::HandleSetTitleOpcode(WorldPacket & recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_SET_TITLE"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_SET_TITLE"); +#endif int32 title; recv_data >> title; @@ -1393,7 +1520,9 @@ void WorldSession::HandleTimeSyncResp(WorldPacket & recv_data) void WorldSession::HandleResetInstancesOpcode(WorldPacket & /*recv_data*/) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_RESET_INSTANCES"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_RESET_INSTANCES"); +#endif if (Group* group = _player->GetGroup()) { @@ -1406,7 +1535,9 @@ void WorldSession::HandleResetInstancesOpcode(WorldPacket & /*recv_data*/) void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_SET_DUNGEON_DIFFICULTY"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_SET_DUNGEON_DIFFICULTY"); +#endif uint32 mode; recv_data >> mode; @@ -1459,7 +1590,9 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data) void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_SET_RAID_DIFFICULTY"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_SET_RAID_DIFFICULTY"); +#endif uint32 mode; recv_data >> mode; @@ -1616,7 +1749,9 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data) void WorldSession::HandleCancelMountAuraOpcode(WorldPacket & /*recv_data*/) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CANCEL_MOUNT_AURA"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CANCEL_MOUNT_AURA"); +#endif //If player is not mounted, so go out :) if (!_player->IsMounted()) // not blizz like; no any messages on blizz @@ -1638,7 +1773,9 @@ void WorldSession::HandleCancelMountAuraOpcode(WorldPacket & /*recv_data*/) void WorldSession::HandleMoveSetCanFlyAckOpcode(WorldPacket & recv_data) { // fly mode on/off - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_MOVE_SET_CAN_FLY_ACK"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_MOVE_SET_CAN_FLY_ACK"); +#endif uint64 guid; // guid - unused recv_data.readPackGUID(guid); @@ -1664,7 +1801,9 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode(WorldPacket & recv_data) void WorldSession::HandleRequestPetInfoOpcode(WorldPacket & /*recv_data */) { /* - ;//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_REQUEST_PET_INFO"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_REQUEST_PET_INFO"); +#endif recv_data.hexlike(); */ } @@ -1676,7 +1815,9 @@ void WorldSession::HandleSetTaxiBenchmarkOpcode(WorldPacket & recv_data) mode ? _player->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_TAXI_BENCHMARK) : _player->RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_TAXI_BENCHMARK); - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "Client used \"/timetest %d\" command", mode); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "Client used \"/timetest %d\" command", mode); +#endif } void WorldSession::HandleQueryInspectAchievements(WorldPacket & recv_data) @@ -1694,7 +1835,9 @@ void WorldSession::HandleQueryInspectAchievements(WorldPacket & recv_data) void WorldSession::HandleWorldStateUITimerUpdate(WorldPacket& /*recv_data*/) { // empty opcode - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_WORLD_STATE_UI_TIMER_UPDATE"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_WORLD_STATE_UI_TIMER_UPDATE"); +#endif WorldPacket data(SMSG_WORLD_STATE_UI_TIMER_UPDATE, 4); data << uint32(time(NULL)); @@ -1704,7 +1847,9 @@ void WorldSession::HandleWorldStateUITimerUpdate(WorldPacket& /*recv_data*/) void WorldSession::HandleReadyForAccountDataTimes(WorldPacket& /*recv_data*/) { // empty opcode - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_READY_FOR_ACCOUNT_DATA_TIMES"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_READY_FOR_ACCOUNT_DATA_TIMES"); +#endif SendAccountDataTimes(GLOBAL_CACHE_MASK); } @@ -1719,7 +1864,9 @@ void WorldSession::SendSetPhaseShift(uint32 PhaseShift) //Battlefield and Battleground void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket & recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY"); +#endif Battleground* bg = _player->GetBattleground(); @@ -1742,7 +1889,9 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket & recv_data) void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket & recv_data) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE"); +#endif Battleground* bg = _player->GetBattleground(); @@ -1791,7 +1940,9 @@ void WorldSession::HandleInstanceLockResponse(WorldPacket& recvPacket) if (!_player->HasPendingBind() || _player->GetPendingBind() != _player->GetInstanceId() || (_player->GetGroup() && _player->GetGroup()->isLFGGroup() && _player->GetGroup()->IsLfgRandomInstance())) { - ;//sLog->outDetail("InstanceLockResponse: Player %s (guid %u) tried to bind himself/teleport to graveyard without a pending bind!", _player->GetName().c_str(), _player->GetGUIDLow()); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDetail("InstanceLockResponse: Player %s (guid %u) tried to bind himself/teleport to graveyard without a pending bind!", _player->GetName().c_str(), _player->GetGUIDLow()); +#endif return; } @@ -1805,7 +1956,9 @@ void WorldSession::HandleInstanceLockResponse(WorldPacket& recvPacket) void WorldSession::HandleUpdateMissileTrajectory(WorldPacket& recvPacket) { - ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_UPDATE_MISSILE_TRAJECTORY"); +#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS) + sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_UPDATE_MISSILE_TRAJECTORY"); +#endif uint64 guid; uint32 spellId; |