changed DISABLED_ cmake variable to ENABLED_ and implemented for all disabled logs

This commit is contained in:
Yehonal
2017-08-19 19:42:48 +02:00
parent f888e8c86b
commit c1586e0d99
109 changed files with 3620 additions and 1228 deletions

View File

@@ -56,7 +56,9 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
recvData >> numDungeons;
if (!numDungeons)
{
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_JOIN [" UI64FMTD "] no dungeons selected", GetPlayer()->GetGUID());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_JOIN [" UI64FMTD "] no dungeons selected", GetPlayer()->GetGUID());
#endif
recvData.rfinish();
return;
}
@@ -75,7 +77,9 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
std::string comment;
recvData >> comment;
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_JOIN [" UI64FMTD "] roles: %u, Dungeons: %u, Comment: %s", GetPlayer()->GetGUID(), roles, uint8(newDungeons.size()), comment.c_str());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_JOIN [" UI64FMTD "] roles: %u, Dungeons: %u, Comment: %s", GetPlayer()->GetGUID(), roles, uint8(newDungeons.size()), comment.c_str());
#endif
sLFGMgr->JoinLfg(GetPlayer(), uint8(roles), newDungeons, comment);
}
@@ -86,7 +90,9 @@ void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recvData*/)
uint64 guid = GetPlayer()->GetGUID();
uint64 gguid = group ? group->GetGUID() : guid;
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_LEAVE [" UI64FMTD "] in group: %u", guid, grp ? 1 : 0);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_LEAVE [" UI64FMTD "] in group: %u", guid, grp ? 1 : 0);
#endif
// Check cheating - only leader can leave the queue
if (!group || group->GetLeaderGUID() == guid)
@@ -103,7 +109,9 @@ void WorldSession::HandleLfgProposalResultOpcode(WorldPacket& recvData)
recvData >> proposalID;
recvData >> accept;
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_PROPOSAL_RESULT [" UI64FMTD "] proposal: %u accept: %u", GetPlayer()->GetGUID(), lfgGroupID, accept ? 1 : 0);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_PROPOSAL_RESULT [" UI64FMTD "] proposal: %u accept: %u", GetPlayer()->GetGUID(), lfgGroupID, accept ? 1 : 0);
#endif
sLFGMgr->UpdateProposal(proposalID, GetPlayer()->GetGUID(), accept);
}
@@ -115,11 +123,15 @@ void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recvData)
Group* group = GetPlayer()->GetGroup();
if (!group)
{
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_SET_ROLES [" UI64FMTD "] Not in group", guid);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_SET_ROLES [" UI64FMTD "] Not in group", guid);
#endif
return;
}
uint64 gguid = group->GetGUID();
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_SET_ROLES: Group [" UI64FMTD "], Player [" UI64FMTD "], Roles: %u", gguid, guid, roles);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_SET_ROLES: Group [" UI64FMTD "], Player [" UI64FMTD "], Roles: %u", gguid, guid, roles);
#endif
sLFGMgr->UpdateRoleCheck(gguid, guid, roles);
}
@@ -127,7 +139,9 @@ void WorldSession::HandleLfgSetCommentOpcode(WorldPacket& recvData)
{
std::string comment;
recvData >> comment;
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_SET_COMMENT [" UI64FMTD "] comment: %s", guid, comment.c_str());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_SET_COMMENT [" UI64FMTD "] comment: %s", guid, comment.c_str());
#endif
sLFGMgr->SetComment(GetPlayer()->GetGUID(), comment);
sLFGMgr->LfrSetComment(GetPlayer(), comment);
@@ -139,7 +153,9 @@ void WorldSession::HandleLfgSetBootVoteOpcode(WorldPacket& recvData)
recvData >> agree;
uint64 guid = GetPlayer()->GetGUID();
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_SET_BOOT_VOTE [" UI64FMTD "] agree: %u", guid, agree ? 1 : 0);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_SET_BOOT_VOTE [" UI64FMTD "] agree: %u", guid, agree ? 1 : 0);
#endif
sLFGMgr->UpdateBoot(guid, agree);
}
@@ -148,14 +164,18 @@ void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recvData)
bool out;
recvData >> out;
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_TELEPORT [" UI64FMTD "] out: %u", GetPlayer()->GetGUID(), out ? 1 : 0);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_TELEPORT [" UI64FMTD "] out: %u", GetPlayer()->GetGUID(), out ? 1 : 0);
#endif
sLFGMgr->TeleportPlayer(GetPlayer(), out, true);
}
void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*/)
{
uint64 guid = GetPlayer()->GetGUID();
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_PLAYER_LOCK_INFO_REQUEST [" UI64FMTD "]", guid);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_PLAYER_LOCK_INFO_REQUEST [" UI64FMTD "]", guid);
#endif
// Get Random dungeons that can be done at a certain level and expansion
uint8 level = GetPlayer()->getLevel();
@@ -168,7 +188,9 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
uint32 rsize = uint32(randomDungeons.size());
uint32 lsize = uint32(lock.size());
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_PLAYER_INFO [" UI64FMTD "]", guid);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_PLAYER_INFO [" UI64FMTD "]", guid);
#endif
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
@@ -226,7 +248,9 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*/)
{
uint64 guid = GetPlayer()->GetGUID();
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_PARTY_LOCK_INFO_REQUEST [" UI64FMTD "]", guid);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LFG_PARTY_LOCK_INFO_REQUEST [" UI64FMTD "]", guid);
#endif
Group* group = GetPlayer()->GetGroup();
if (!group)
@@ -252,7 +276,9 @@ void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*
for (lfg::LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
size += 8 + 4 + uint32(it->second.size()) * (4 + 4);
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_PARTY_INFO [" UI64FMTD "]", guid);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_PARTY_INFO [" UI64FMTD "]", guid);
#endif
WorldPacket data(SMSG_LFG_PARTY_INFO, 1 + size);
BuildPartyLockDungeonBlock(data, lockMap);
SendPacket(&data);
@@ -276,7 +302,9 @@ void WorldSession::HandleLfrSearchLeaveOpcode(WorldPacket& recvData)
void WorldSession::HandleLfgGetStatus(WorldPacket& /*recvData*/)
{
;//sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_GET_STATUS %s", GetPlayerInfo().c_str());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_GET_STATUS %s", GetPlayerInfo().c_str());
#endif
uint64 guid = GetPlayer()->GetGUID();
lfg::LfgUpdateData updateData = sLFGMgr->GetLfgStatus(guid);
@@ -313,7 +341,9 @@ void WorldSession::SendLfgUpdatePlayer(lfg::LfgUpdateData const& updateData)
break;
}
;//sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_UPDATE_PLAYER %s updatetype: %u",
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_UPDATE_PLAYER %s updatetype: %u",
#endif
// GetPlayerInfo().c_str(), updateData.updateType);
WorldPacket data(SMSG_LFG_UPDATE_PLAYER, 1 + 1 + (size > 0 ? 1 : 0) * (1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
data << uint8(updateData.updateType); // Lfg Update type
@@ -354,7 +384,9 @@ void WorldSession::SendLfgUpdateParty(lfg::LfgUpdateData const& updateData)
break;
}
;//sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_UPDATE_PARTY %s updatetype: %u",
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_UPDATE_PARTY %s updatetype: %u",
#endif
// GetPlayerInfo().c_str(), updateData.updateType);
WorldPacket data(SMSG_LFG_UPDATE_PARTY, 1 + 1 + (size > 0 ? 1 : 0) * (1 + 1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
data << uint8(updateData.updateType); // Lfg Update type
@@ -378,7 +410,9 @@ void WorldSession::SendLfgUpdateParty(lfg::LfgUpdateData const& updateData)
void WorldSession::SendLfgRoleChosen(uint64 guid, uint8 roles)
{
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_ROLE_CHOSEN [" UI64FMTD "] guid: [" UI64FMTD "] roles: %u", GetPlayer()->GetGUID(), guid, roles);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_ROLE_CHOSEN [" UI64FMTD "] guid: [" UI64FMTD "] roles: %u", GetPlayer()->GetGUID(), guid, roles);
#endif
WorldPacket data(SMSG_LFG_ROLE_CHOSEN, 8 + 1 + 4);
data << uint64(guid); // Guid
@@ -395,7 +429,9 @@ void WorldSession::SendLfgRoleCheckUpdate(lfg::LfgRoleCheck const& roleCheck)
else
dungeons = roleCheck.dungeons;
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_ROLE_CHECK_UPDATE [" UI64FMTD "]", GetPlayer()->GetGUID());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_ROLE_CHECK_UPDATE [" UI64FMTD "]", GetPlayer()->GetGUID());
#endif
WorldPacket data(SMSG_LFG_ROLE_CHECK_UPDATE, 4 + 1 + 1 + dungeons.size() * 4 + 1 + roleCheck.roles.size() * (8 + 1 + 4 + 1));
data << uint32(roleCheck.state); // Check result
@@ -440,7 +476,9 @@ void WorldSession::SendLfgJoinResult(lfg::LfgJoinResultData const& joinData)
for (lfg::LfgLockPartyMap::const_iterator it = joinData.lockmap.begin(); it != joinData.lockmap.end(); ++it)
size += 8 + 4 + uint32(it->second.size()) * (4 + 4);
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_JOIN_RESULT [" UI64FMTD "] checkResult: %u checkValue: %u", GetPlayer()->GetGUID(), joinData.result, joinData.state);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_JOIN_RESULT [" UI64FMTD "] checkResult: %u checkValue: %u", GetPlayer()->GetGUID(), joinData.result, joinData.state);
#endif
WorldPacket data(SMSG_LFG_JOIN_RESULT, 4 + 4 + size);
data << uint32(joinData.result); // Check Result
data << uint32(joinData.state); // Check Value
@@ -451,7 +489,9 @@ void WorldSession::SendLfgJoinResult(lfg::LfgJoinResultData const& joinData)
void WorldSession::SendLfgQueueStatus(lfg::LfgQueueStatusData const& queueData)
{
;//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",
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
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",
#endif
// GetPlayer()->GetGUID(), queueData.dungeonId, queueData.waitTime, queueData.waitTimeAvg, queueData.waitTimeTank, queueData.waitTimeHealer, queueData.waitTimeDps, queueData.queuedTime, queueData.tanks, queueData.healers, queueData.dps);
WorldPacket data(SMSG_LFG_QUEUE_STATUS, 4 + 4 + 4 + 4 + 4 +4 + 1 + 1 + 1 + 4);
@@ -518,7 +558,9 @@ void WorldSession::SendLfgBootProposalUpdate(lfg::LfgPlayerBoot const& boot)
++agreeNum;
}
}
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_BOOT_PROPOSAL_UPDATE [" UI64FMTD "] inProgress: %u - didVote: %u - agree: %u - victim: [" UI64FMTD "] votes: %u - agrees: %u - left: %u - needed: %u - reason %s",
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_BOOT_PROPOSAL_UPDATE [" UI64FMTD "] inProgress: %u - didVote: %u - agree: %u - victim: [" UI64FMTD "] votes: %u - agrees: %u - left: %u - needed: %u - reason %s",
#endif
// guid, uint8(boot.inProgress), uint8(playerVote != lfg::LFG_ANSWER_PENDING), uint8(playerVote == lfg::LFG_ANSWER_AGREE), boot.victim, votesNum, agreeNum, secsleft, lfg::LFG_GROUP_KICK_VOTES_NEEDED, boot.reason.c_str());
WorldPacket data(SMSG_LFG_BOOT_PROPOSAL_UPDATE, 1 + 1 + 1 + 8 + 4 + 4 + 4 + 4 + boot.reason.length());
data << uint8(boot.inProgress); // Vote in progress
@@ -540,7 +582,9 @@ void WorldSession::SendLfgUpdateProposal(lfg::LfgProposal const& proposal)
bool silent = !proposal.isNew && gguid == proposal.group;
uint32 dungeonEntry = proposal.dungeonId;
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_PROPOSAL_UPDATE [" UI64FMTD "] state: %u", guid, proposal.state);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_PROPOSAL_UPDATE [" UI64FMTD "] state: %u", guid, proposal.state);
#endif
// show random dungeon if player selected random dungeon and it's not lfg group
if (!silent)
@@ -583,7 +627,9 @@ void WorldSession::SendLfgUpdateProposal(lfg::LfgProposal const& proposal)
void WorldSession::SendLfgLfrList(bool update)
{
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_LFR_LIST [" UI64FMTD "] update: %u", GetPlayer()->GetGUID(), update ? 1 : 0);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_LFR_LIST [" UI64FMTD "] update: %u", GetPlayer()->GetGUID(), update ? 1 : 0);
#endif
WorldPacket data(SMSG_LFG_UPDATE_SEARCH, 1);
data << uint8(update); // In Lfg Queue?
SendPacket(&data);
@@ -591,14 +637,18 @@ void WorldSession::SendLfgLfrList(bool update)
void WorldSession::SendLfgDisabled()
{
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_DISABLED [" UI64FMTD "]", GetPlayer()->GetGUID());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_DISABLED [" UI64FMTD "]", GetPlayer()->GetGUID());
#endif
WorldPacket data(SMSG_LFG_DISABLED, 0);
SendPacket(&data);
}
void WorldSession::SendLfgOfferContinue(uint32 dungeonEntry)
{
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_OFFER_CONTINUE [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), dungeonEntry);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_OFFER_CONTINUE [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), dungeonEntry);
#endif
WorldPacket data(SMSG_LFG_OFFER_CONTINUE, 4);
data << uint32(dungeonEntry);
SendPacket(&data);
@@ -606,7 +656,9 @@ void WorldSession::SendLfgOfferContinue(uint32 dungeonEntry)
void WorldSession::SendLfgTeleportError(uint8 err)
{
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_TELEPORT_DENIED [" UI64FMTD "] reason: %u", GetPlayer()->GetGUID(), err);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "SMSG_LFG_TELEPORT_DENIED [" UI64FMTD "] reason: %u", GetPlayer()->GetGUID(), err);
#endif
WorldPacket data(SMSG_LFG_TELEPORT_DENIED, 4);
data << uint32(err); // Error
SendPacket(&data);