diff options
| author | click <none@none> | 2010-08-22 01:57:04 +0200 |
|---|---|---|
| committer | click <none@none> | 2010-08-22 01:57:04 +0200 |
| commit | 670964803f030c6d2b85d4281605ab221f5a5740 (patch) | |
| tree | 5babaf3c1c2f7833bf2be8b10a1f7bec78722751 /src/server/game/Server | |
| parent | a40cb46e610aefde8b270b34e9b510e76470a6b6 (diff) | |
Core: Fix more warnings, add new function sLog.outStaticDebug() that replaces DEBUG_LOG
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Server')
9 files changed, 33 insertions, 33 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp index e6aec50179d..286d7417cb2 100644 --- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp @@ -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); } diff --git a/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp b/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp index 404b70c1c84..a0157e216f9 100644 --- a/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp @@ -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); diff --git a/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp b/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp index 99c8a774b03..415530fdff4 100644 --- a/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp @@ -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; diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp index 5d5ffc39417..354553ac195 100644 --- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp @@ -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); diff --git a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp index 0a0e11922cc..008853064cd 100644 --- a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp @@ -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; diff --git a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp index 8b0c496a89d..58899a942ac 100644 --- a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp @@ -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; } } diff --git a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp b/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp index 9a31c3b415c..654939ea5d8 100644 --- a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp @@ -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(); } diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index fb5a09d77fc..6754955b3a1 100644 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -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()); diff --git a/src/server/game/Server/WorldSocketMgr.cpp b/src/server/game/Server/WorldSocketMgr.cpp index 50e6553592f..99d1407bdd8 100644 --- a/src/server/game/Server/WorldSocketMgr.cpp +++ b/src/server/game/Server/WorldSocketMgr.cpp @@ -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; } |
