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

@@ -204,7 +204,9 @@ void WorldSession::HandleCharEnum(PreparedQueryResult result)
do
{
uint32 guidlow = (*result)[0].GetUInt32();
;//sLog->outDetail("Loading char guid %u from account %u.", guidlow, GetAccountId());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDetail("Loading char guid %u from account %u.", guidlow, GetAccountId());
#endif
if (Player::BuildEnumData(result, &data))
{
_legitCharacters.insert(guidlow);
@@ -593,7 +595,9 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
{
uint8 unk;
createInfo->Data >> unk;
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "Character creation %s (account %u) has unhandled tail data: [%u]", createInfo->Name.c_str(), GetAccountId(), unk);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "Character creation %s (account %u) has unhandled tail data: [%u]", createInfo->Name.c_str(), GetAccountId(), unk);
#endif
}
// pussywizard:
@@ -651,7 +655,9 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
SendPacket(&data);
std::string IP_str = GetRemoteAddress();
;//sLog->outDetail("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDetail("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow());
#endif
sLog->outChar("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), createInfo->Name.c_str(), newChar.GetGUIDLow());
sScriptMgr->OnPlayerCreate(&newChar);
sWorld->AddGlobalPlayerData(newChar.GetGUIDLow(), GetAccountId(), newChar.GetName(), newChar.getGender(), newChar.getRace(), newChar.getClass(), newChar.getLevel(), 0, 0);
@@ -710,7 +716,9 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket& recvData)
return;
std::string IP_str = GetRemoteAddress();
;//sLog->outDetail("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDetail("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
#endif
sLog->outChar("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
sScriptMgr->OnPlayerDelete(guid);
@@ -916,13 +924,17 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder* holder)
data.put(0, linecount);
SendPacket(&data);
;//sLog->outStaticDebug("WORLD: Sent motd (SMSG_MOTD)");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("WORLD: Sent motd (SMSG_MOTD)");
#endif
// send server info
if (sWorld->getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1)
chH.PSendSysMessage(_FULLVERSION);
;//sLog->outStaticDebug("WORLD: Sent server info");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("WORLD: Sent server info");
#endif
}
if (uint32 guildId = Player::GetGuildIdFromStorage(pCurrChar->GetGUIDLow()))
@@ -1214,13 +1226,17 @@ void WorldSession::HandlePlayerLoginToCharInWorld(Player* pCurrChar)
data.put(0, linecount);
SendPacket(&data);
;//sLog->outStaticDebug("WORLD: Sent motd (SMSG_MOTD)");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("WORLD: Sent motd (SMSG_MOTD)");
#endif
// send server info
if (sWorld->getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1)
chH.PSendSysMessage(_FULLVERSION);
;//sLog->outStaticDebug("WORLD: Sent server info");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("WORLD: Sent server info");
#endif
}
data.Initialize(SMSG_LEARNED_DANCE_MOVES, 4+4);
@@ -1319,7 +1335,9 @@ void WorldSession::HandlePlayerLoginToCharOutOfWorld(Player* pCurrChar)
void WorldSession::HandleSetFactionAtWar(WorldPacket& recvData)
{
;//sLog->outStaticDebug("WORLD: Received CMSG_SET_FACTION_ATWAR");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("WORLD: Received CMSG_SET_FACTION_ATWAR");
#endif
uint32 repListID;
uint8 flag;
@@ -1367,7 +1385,9 @@ void WorldSession::HandleTutorialReset(WorldPacket & /*recvData*/)
void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket& recvData)
{
;//sLog->outStaticDebug("WORLD: Received CMSG_SET_WATCHED_FACTION");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("WORLD: Received CMSG_SET_WATCHED_FACTION");
#endif
uint32 fact;
recvData >> fact;
GetPlayer()->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fact);
@@ -1375,7 +1395,9 @@ void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket& recvData)
void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket & recvData)
{
;//sLog->outStaticDebug("WORLD: Received CMSG_SET_FACTION_INACTIVE");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("WORLD: Received CMSG_SET_FACTION_INACTIVE");
#endif
uint32 replistid;
uint8 inactive;
recvData >> replistid >> inactive;
@@ -1385,14 +1407,18 @@ void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket & recvData)
void WorldSession::HandleShowingHelmOpcode(WorldPacket& recvData)
{
;//sLog->outStaticDebug("CMSG_SHOWING_HELM for %s", _player->GetName().c_str());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("CMSG_SHOWING_HELM for %s", _player->GetName().c_str());
#endif
recvData.read_skip<uint8>(); // unknown, bool?
_player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM);
}
void WorldSession::HandleShowingCloakOpcode(WorldPacket& recvData)
{
;//sLog->outStaticDebug("CMSG_SHOWING_CLOAK for %s", _player->GetName().c_str());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outStaticDebug("CMSG_SHOWING_CLOAK for %s", _player->GetName().c_str());
#endif
recvData.read_skip<uint8>(); // unknown, bool?
_player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK);
}
@@ -1610,7 +1636,9 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recvData)
void WorldSession::HandleAlterAppearance(WorldPacket& recvData)
{
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ALTER_APPEARANCE");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ALTER_APPEARANCE");
#endif
uint32 Hair, Color, FacialHair, SkinColor;
recvData >> Hair >> Color >> FacialHair >> SkinColor;
@@ -1687,7 +1715,9 @@ void WorldSession::HandleRemoveGlyph(WorldPacket& recvData)
if (slot >= MAX_GLYPH_SLOT_INDEX)
{
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
#endif
return;
}
@@ -1847,7 +1877,9 @@ void WorldSession::HandleCharCustomize(WorldPacket& recvData)
void WorldSession::HandleEquipmentSetSave(WorldPacket &recvData)
{
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_SAVE");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_SAVE");
#endif
uint64 setGuid;
recvData.readPackGUID(setGuid);
@@ -1906,7 +1938,9 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket &recvData)
void WorldSession::HandleEquipmentSetDelete(WorldPacket &recvData)
{
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_DELETE");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_DELETE");
#endif
uint64 setGuid;
recvData.readPackGUID(setGuid);
@@ -1916,7 +1950,9 @@ void WorldSession::HandleEquipmentSetDelete(WorldPacket &recvData)
void WorldSession::HandleEquipmentSetUse(WorldPacket &recvData)
{
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_USE");
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_USE");
#endif
for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
{
@@ -1926,7 +1962,9 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recvData)
uint8 srcbag, srcslot;
recvData >> srcbag >> srcslot;
;//sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item " UI64FMTD ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item " UI64FMTD ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot);
#endif
// check if item slot is set to "ignored" (raw value == 1), must not be unequipped then
if (itemGuid == 1)