Core: Fix more warnings, add new function sLog.outStaticDebug() that replaces DEBUG_LOG

--HG--
branch : trunk
This commit is contained in:
click
2010-08-22 01:57:04 +02:00
parent a40cb46e61
commit 670964803f
29 changed files with 171 additions and 171 deletions
@@ -527,7 +527,7 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket & recv_data)
m_playerLoading = true;
uint64 playerGuid = 0;
DEBUG_LOG("WORLD: Recvd Player Logon Message");
sLog.outStaticDebug("WORLD: Recvd Player Logon Message");
recv_data >> playerGuid;
@@ -612,13 +612,13 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
data.put(0, linecount);
SendPacket(&data);
DEBUG_LOG("WORLD: Sent motd (SMSG_MOTD)");
sLog.outStaticDebug("WORLD: Sent motd (SMSG_MOTD)");
// send server info
if (sWorld.getConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1)
chH.PSendSysMessage(_FULLVERSION);
DEBUG_LOG("WORLD: Sent server info");
sLog.outStaticDebug("WORLD: Sent server info");
}
//QueryResult *result = CharacterDatabase.PQuery("SELECT guildid,rank FROM guild_member WHERE guid = '%u'",pCurrChar->GetGUIDLow());
@@ -646,7 +646,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
data << uint8(1);
data << guild->GetMOTD();
SendPacket(&data);
DEBUG_LOG("WORLD: Sent guild-motd (SMSG_GUILD_EVENT)");
sLog.outStaticDebug("WORLD: Sent guild-motd (SMSG_GUILD_EVENT)");
guild->DisplayGuildBankTabsInfo(this);
@@ -785,7 +785,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
void WorldSession::HandleSetFactionAtWar(WorldPacket & recv_data)
{
DEBUG_LOG("WORLD: Received CMSG_SET_FACTION_ATWAR");
sLog.outStaticDebug("WORLD: Received CMSG_SET_FACTION_ATWAR");
uint32 repListID;
uint8 flag;
@@ -824,7 +824,7 @@ void WorldSession::HandleSetFactionCheat(WorldPacket & /*recv_data*/)
void WorldSession::HandleMeetingStoneInfo(WorldPacket & /*recv_data*/)
{
DEBUG_LOG("WORLD: Received CMSG_MEETING_STONE_INFO");
sLog.outStaticDebug("WORLD: Received CMSG_MEETING_STONE_INFO");
//SendLfgUpdate(0, 0, 0);
}
@@ -863,7 +863,7 @@ void WorldSession::HandleTutorialReset(WorldPacket & /*recv_data*/)
void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recv_data)
{
DEBUG_LOG("WORLD: Received CMSG_SET_WATCHED_FACTION");
sLog.outStaticDebug("WORLD: Received CMSG_SET_WATCHED_FACTION");
uint32 fact;
recv_data >> fact;
GetPlayer()->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fact);
@@ -871,7 +871,7 @@ void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recv_data)
void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket & recv_data)
{
DEBUG_LOG("WORLD: Received CMSG_SET_FACTION_INACTIVE");
sLog.outStaticDebug("WORLD: Received CMSG_SET_FACTION_INACTIVE");
uint32 replistid;
uint8 inactive;
recv_data >> replistid >> inactive;
@@ -881,13 +881,13 @@ void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket & recv_data)
void WorldSession::HandleShowingHelmOpcode(WorldPacket & /*recv_data*/)
{
DEBUG_LOG("CMSG_SHOWING_HELM for %s", _player->GetName());
sLog.outStaticDebug("CMSG_SHOWING_HELM for %s", _player->GetName());
_player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM);
}
void WorldSession::HandleShowingCloakOpcode(WorldPacket & /*recv_data*/)
{
DEBUG_LOG("CMSG_SHOWING_CLOAK for %s", _player->GetName());
sLog.outStaticDebug("CMSG_SHOWING_CLOAK for %s", _player->GetName());
_player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK);
}
@@ -31,7 +31,7 @@ void WorldSession::HandleAttackSwingOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
DEBUG_LOG("WORLD: Recvd CMSG_ATTACKSWING Message guidlow:%u guidhigh:%u", GUID_LOPART(guid), GUID_HIPART(guid));
sLog.outStaticDebug("WORLD: Recvd CMSG_ATTACKSWING Message guidlow:%u guidhigh:%u", GUID_LOPART(guid), GUID_HIPART(guid));
Unit *pEnemy = ObjectAccessor::GetUnit(*_player, guid);
@@ -44,8 +44,8 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket)
return;
//sLog.outDebug("WORLD: received CMSG_DUEL_ACCEPTED");
DEBUG_LOG("Player 1 is: %u (%s)", pl->GetGUIDLow(),pl->GetName());
DEBUG_LOG("Player 2 is: %u (%s)", plTarget->GetGUIDLow(),plTarget->GetName());
sLog.outStaticDebug("Player 1 is: %u (%s)", pl->GetGUIDLow(),pl->GetName());
sLog.outStaticDebug("Player 2 is: %u (%s)", plTarget->GetGUIDLow(),plTarget->GetName());
time_t now = time(NULL);
pl->duel->startTimer = now;
@@ -1072,18 +1072,18 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data)
void WorldSession::HandleCompleteCinematic(WorldPacket & /*recv_data*/)
{
DEBUG_LOG("WORLD: Player is watching cinema");
sLog.outStaticDebug("WORLD: Player is watching cinema");
}
void WorldSession::HandleNextCinematicCamera(WorldPacket & /*recv_data*/)
{
DEBUG_LOG("WORLD: Which movie to play");
sLog.outStaticDebug("WORLD: Which movie to play");
}
void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket & recv_data)
{
/* WorldSession::Update(getMSTime());*/
DEBUG_LOG("WORLD: Time Lag/Synchronization Resent/Update");
sLog.outStaticDebug("WORLD: Time Lag/Synchronization Resent/Update");
uint64 guid;
recv_data.readPackGUID(guid);
@@ -1105,7 +1105,7 @@ void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket & recv_data)
void WorldSession::HandleFeatherFallAck(WorldPacket &recv_data)
{
DEBUG_LOG("WORLD: CMSG_MOVE_FEATHER_FALL_ACK");
sLog.outStaticDebug("WORLD: CMSG_MOVE_FEATHER_FALL_ACK");
// no used
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
@@ -1203,7 +1203,7 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
{
uint64 guid;
recv_data >> guid;
DEBUG_LOG("Inspected guid is " UI64FMTD, guid);
sLog.outStaticDebug("Inspected guid is " UI64FMTD, guid);
_player->SetSelection(guid);
@@ -1281,7 +1281,7 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recv_data)
return;
}
DEBUG_LOG("Time %u sec, map=%u, x=%f, y=%f, z=%f, orient=%f", time/1000, mapid, PositionX, PositionY, PositionZ, Orientation);
sLog.outStaticDebug("Time %u sec, map=%u, x=%f, y=%f, z=%f, orient=%f", time/1000, mapid, PositionX, PositionY, PositionZ, Orientation);
if (GetSecurity() >= SEC_ADMINISTRATOR)
GetPlayer()->TeleportTo(mapid,PositionX,PositionY,PositionZ,Orientation);
@@ -199,8 +199,8 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data)
uint32 flags, time;
recv_data >> flags >> time;
DEBUG_LOG("Guid " UI64FMTD, guid);
DEBUG_LOG("Flags %u, time %u", flags, time/IN_MILLISECONDS);
sLog.outStaticDebug("Guid " UI64FMTD, guid);
sLog.outStaticDebug("Flags %u, time %u", flags, time/IN_MILLISECONDS);
Unit *mover = _player->m_mover;
Player *plMover = mover->GetTypeId() == TYPEID_PLAYER ? (Player*)mover : NULL;
@@ -417,7 +417,7 @@ bool WorldSession::CheckStableMaster(uint64 guid)
{
if (!GetPlayer()->isGameMaster() && !GetPlayer()->HasAuraType(SPELL_AURA_OPEN_STABLE))
{
DEBUG_LOG("Player (GUID:%u) attempt open stable in cheating way.", GUID_LOPART(guid));
sLog.outStaticDebug("Player (GUID:%u) attempt open stable in cheating way.", GUID_LOPART(guid));
return false;
}
}
@@ -426,7 +426,7 @@ bool WorldSession::CheckStableMaster(uint64 guid)
{
if (!GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_STABLEMASTER))
{
DEBUG_LOG("Stablemaster (GUID:%u) not found or you can't interact with him.", GUID_LOPART(guid));
sLog.outStaticDebug("Stablemaster (GUID:%u) not found or you can't interact with him.", GUID_LOPART(guid));
return false;
}
}
@@ -220,7 +220,7 @@ static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item **m
{
if (Item* item = myTrade->GetItem(TradeSlots(i)))
{
DEBUG_LOG("player trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot());
sLog.outStaticDebug("player trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot());
//Can return NULL
myItems[i] = item;
myItems[i]->SetInTrade();
@@ -228,7 +228,7 @@ static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item **m
if (Item* item = hisTrade->GetItem(TradeSlots(i)))
{
DEBUG_LOG("partner trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot());
sLog.outStaticDebug("partner trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot());
hisItems[i] = item;
hisItems[i]->SetInTrade();
}
+6 -6
View File
@@ -314,14 +314,14 @@ int WorldSocket::handle_input (ACE_HANDLE)
return Update(); // interesting line ,isn't it ?
}
DEBUG_LOG("WorldSocket::handle_input: Peer error closing connection errno = %s", ACE_OS::strerror (errno));
sLog.outStaticDebug("WorldSocket::handle_input: Peer error closing connection errno = %s", ACE_OS::strerror (errno));
errno = ECONNRESET;
return -1;
}
case 0:
{
DEBUG_LOG("WorldSocket::handle_input: Peer has closed connection");
sLog.outStaticDebug("WorldSocket::handle_input: Peer has closed connection");
errno = ECONNRESET;
return -1;
@@ -718,7 +718,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
sScriptMgr.OnPacketReceive(this, WorldPacket(*new_pct));
return HandleAuthSession (*new_pct);
case CMSG_KEEP_ALIVE:
DEBUG_LOG ("CMSG_KEEP_ALIVE ,size: %d", new_pct->size());
sLog.outStaticDebug ("CMSG_KEEP_ALIVE ,size: %d", new_pct->size());
sScriptMgr.OnPacketReceive(this, WorldPacket(*new_pct));
return 0;
default:
@@ -800,7 +800,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
recvPacket >> unk4;
recvPacket.read (digest, 20);
DEBUG_LOG ("WorldSocket::HandleAuthSession: client %u, unk2 %u, account %s, unk3 %u, clientseed %u",
sLog.outStaticDebug ("WorldSocket::HandleAuthSession: client %u, unk2 %u, account %s, unk3 %u, clientseed %u",
BuiltNumberClient,
unk2,
account.c_str(),
@@ -857,7 +857,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
const char* sStr = s.AsHexStr(); //Must be freed by OPENSSL_free()
const char* vStr = v.AsHexStr(); //Must be freed by OPENSSL_free()
DEBUG_LOG ("WorldSocket::HandleAuthSession: (s,v) check s: %s v: %s",
sLog.outStaticDebug ("WorldSocket::HandleAuthSession: (s,v) check s: %s v: %s",
sStr,
vStr);
@@ -970,7 +970,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
std::string address = GetRemoteAddress();
DEBUG_LOG ("WorldSocket::HandleAuthSession: Client '%s' authenticated successfully from %s.",
sLog.outStaticDebug ("WorldSocket::HandleAuthSession: Client '%s' authenticated successfully from %s.",
account.c_str(),
address.c_str());
+2 -2
View File
@@ -156,7 +156,7 @@ class ReactorRunnable : protected ACE_Task_Base
virtual int svc()
{
DEBUG_LOG ("Network Thread Starting");
sLog.outStaticDebug ("Network Thread Starting");
bool needInit = true;
if (!(sWorld.getConfig(CONFIG_MYSQL_BUNDLE_LOGINDB) & MYSQL_BUNDLE_RA))
@@ -218,7 +218,7 @@ class ReactorRunnable : protected ACE_Task_Base
if (needInit)
MySQL::Thread_End();
DEBUG_LOG ("Network Thread Exitting");
sLog.outStaticDebug ("Network Thread Exitting");
return 0;
}