Core/Protocol: Move some debug messages to their appropriate debug output mask.
This commit is contained in:
@@ -31,7 +31,7 @@ void WorldSession::SendAuthResponse(uint8 code, bool shortForm, uint32 queuePos)
|
||||
if (!shortForm)
|
||||
{
|
||||
packet << uint32(queuePos); // Queue position
|
||||
packet << uint8(0); // Unk 3.3.0
|
||||
packet << uint8(0); // Realm has a free character migration - bool
|
||||
}
|
||||
|
||||
SendPacket(&packet);
|
||||
|
||||
@@ -494,7 +494,7 @@ void WorldSession::HandleZoneUpdateOpcode(WorldPacket & recv_data)
|
||||
uint32 newZone;
|
||||
recv_data >> newZone;
|
||||
|
||||
sLog->outDetail("WORLD: Recvd ZONE_UPDATE: %u", newZone);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd ZONE_UPDATE: %u", newZone);
|
||||
|
||||
// use server size data
|
||||
uint32 newzone, newarea;
|
||||
@@ -730,7 +730,7 @@ void WorldSession::HandleBugOpcode(WorldPacket & recv_data)
|
||||
|
||||
void WorldSession::HandleReclaimCorpseOpcode(WorldPacket &recv_data)
|
||||
{
|
||||
sLog->outDetail("WORLD: Received CMSG_RECLAIM_CORPSE");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_RECLAIM_CORPSE");
|
||||
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
@@ -767,7 +767,7 @@ void WorldSession::HandleReclaimCorpseOpcode(WorldPacket &recv_data)
|
||||
|
||||
void WorldSession::HandleResurrectResponseOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
sLog->outDetail("WORLD: Received CMSG_RESURRECT_RESPONSE");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_RESURRECT_RESPONSE");
|
||||
|
||||
uint64 guid;
|
||||
uint8 status;
|
||||
@@ -938,7 +938,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data)
|
||||
|
||||
void WorldSession::HandleUpdateAccountData(WorldPacket &recv_data)
|
||||
{
|
||||
sLog->outDetail("WORLD: Received CMSG_UPDATE_ACCOUNT_DATA");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_UPDATE_ACCOUNT_DATA");
|
||||
|
||||
uint32 type, timestamp, decompressedSize;
|
||||
recv_data >> type >> timestamp >> decompressedSize;
|
||||
@@ -993,7 +993,7 @@ void WorldSession::HandleUpdateAccountData(WorldPacket &recv_data)
|
||||
|
||||
void WorldSession::HandleRequestAccountData(WorldPacket& recv_data)
|
||||
{
|
||||
sLog->outDetail("WORLD: Received CMSG_REQUEST_ACCOUNT_DATA");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_REQUEST_ACCOUNT_DATA");
|
||||
|
||||
uint32 type;
|
||||
recv_data >> type;
|
||||
@@ -1072,18 +1072,18 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data)
|
||||
|
||||
void WorldSession::HandleCompleteCinematic(WorldPacket & /*recv_data*/)
|
||||
{
|
||||
sLog->outStaticDebug("WORLD: Player is watching cinema");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_COMPLETE_CINEMATIC");
|
||||
}
|
||||
|
||||
void WorldSession::HandleNextCinematicCamera(WorldPacket & /*recv_data*/)
|
||||
{
|
||||
sLog->outStaticDebug("WORLD: Which movie to play");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_NEXT_CINEMATIC_CAMERA");
|
||||
}
|
||||
|
||||
void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
/* WorldSession::Update(getMSTime());*/
|
||||
sLog->outStaticDebug("WORLD: Time Lag/Synchronization Resent/Update");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_MOVE_TIME_SKIPPED");
|
||||
|
||||
uint64 guid;
|
||||
recv_data.readPackGUID(guid);
|
||||
@@ -1105,7 +1105,7 @@ void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket & recv_data)
|
||||
|
||||
void WorldSession::HandleFeatherFallAck(WorldPacket &recv_data)
|
||||
{
|
||||
sLog->outStaticDebug("WORLD: CMSG_MOVE_FEATHER_FALL_ACK");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_MOVE_FEATHER_FALL_ACK");
|
||||
|
||||
// no used
|
||||
recv_data.rfinish(); // prevent warnings spam
|
||||
@@ -1193,13 +1193,17 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
|
||||
{
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
sLog->outStaticDebug("Inspected guid is " UI64FMTD, guid);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_INSPECT");
|
||||
|
||||
_player->SetSelection(guid);
|
||||
|
||||
Player* player = ObjectAccessor::FindPlayer(guid);
|
||||
if (!player) // wrong player
|
||||
if (!player)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_INSPECT: No player found from GUID: " UI64FMTD, guid);
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 talent_points = 0x47;
|
||||
uint32 guid_size = player->GetPackGUID().wpos();
|
||||
@@ -1230,7 +1234,7 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data)
|
||||
|
||||
if (!player)
|
||||
{
|
||||
sLog->outError("InspectHonorStats: WTF, player not found...");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_INSPECT_HONOR_STATS: No player found from GUID: " UI64FMTD, guid);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1246,10 +1250,6 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data)
|
||||
|
||||
void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recv_data)
|
||||
{
|
||||
// write in client console: worldport 469 452 6454 2536 180 or /console worldport 469 452 6454 2536 180
|
||||
// Received opcode CMSG_WORLD_TELEPORT
|
||||
// Time is ***, map=469, x=452.000000, y=6454.000000, z=2536.000000, orient=3.141593
|
||||
|
||||
uint32 time;
|
||||
uint32 mapid;
|
||||
float PositionX;
|
||||
@@ -1264,20 +1264,20 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recv_data)
|
||||
recv_data >> PositionZ;
|
||||
recv_data >> Orientation; // o (3.141593 = 180 degrees)
|
||||
|
||||
//sLog->outDebug("Received opcode CMSG_WORLD_TELEPORT");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_WORLD_TELEPORT");
|
||||
|
||||
if (GetPlayer()->isInFlight())
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) in flight, ignore worldport command.", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow());
|
||||
return;
|
||||
}
|
||||
|
||||
sLog->outStaticDebug("Time %u sec, map=%u, x=%f, y=%f, z=%f, orient=%f", time/1000, mapid, PositionX, PositionY, PositionZ, Orientation);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_WORLD_TELEPORT: Player = %s, Time = %u, map = %u, x = %f, y = %f, z = %f, o = %f", GetPlayer()->GetName(), time, mapid, PositionX, PositionY, PositionZ, Orientation);
|
||||
|
||||
if (AccountMgr::IsAdminAccount(GetSecurity()))
|
||||
GetPlayer()->TeleportTo(mapid, PositionX, PositionY, PositionZ, Orientation);
|
||||
else
|
||||
SendNotification(LANG_YOU_NOT_HAVE_PERMISSION);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received worldport command from player %s", GetPlayer()->GetName());
|
||||
}
|
||||
|
||||
void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
|
||||
|
||||
@@ -339,9 +339,11 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid
|
||||
if (unit_target2->GetTypeId() == TYPEID_PLAYER)
|
||||
pet->SendUpdateToPlayer((Player*)unit_target2);
|
||||
}
|
||||
|
||||
if (Unit* powner = pet->GetCharmerOrOwner())
|
||||
if (powner->GetTypeId() == TYPEID_PLAYER)
|
||||
pet->SendUpdateToPlayer(powner->ToPlayer());
|
||||
|
||||
result = SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
@@ -741,7 +743,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
|
||||
|
||||
void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDetail("WORLD: CMSG_PET_CAST_SPELL");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_PET_CAST_SPELL");
|
||||
|
||||
uint64 guid;
|
||||
uint8 castCount;
|
||||
|
||||
@@ -113,7 +113,7 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recv_data)
|
||||
ObjectMgr::GetLocaleString(cl->SubName, loc_idx, SubName);
|
||||
}
|
||||
}
|
||||
sLog->outDetail("WORLD: CMSG_CREATURE_QUERY '%s' - Entry: %u.", ci->Name.c_str(), entry);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CREATURE_QUERY '%s' - Entry: %u.", ci->Name.c_str(), entry);
|
||||
// guess size
|
||||
WorldPacket data(SMSG_CREATURE_QUERY_RESPONSE, 100);
|
||||
data << uint32(entry); // creature entry
|
||||
@@ -179,7 +179,7 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data)
|
||||
ObjectMgr::GetLocaleString(gl->CastBarCaption, loc_idx, CastBarCaption);
|
||||
}
|
||||
}
|
||||
sLog->outDetail("WORLD: CMSG_GAMEOBJECT_QUERY '%s' - Entry: %u. ", info->name.c_str(), entry);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GAMEOBJECT_QUERY '%s' - Entry: %u. ", info->name.c_str(), entry);
|
||||
WorldPacket data (SMSG_GAMEOBJECT_QUERY_RESPONSE, 150);
|
||||
data << uint32(entry);
|
||||
data << uint32(info->type);
|
||||
@@ -209,7 +209,7 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data)
|
||||
|
||||
void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
|
||||
{
|
||||
sLog->outDetail("WORLD: Received MSG_CORPSE_QUERY");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_CORPSE_QUERY");
|
||||
|
||||
Corpse* corpse = GetPlayer()->GetCorpse();
|
||||
|
||||
@@ -264,7 +264,7 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data)
|
||||
uint64 guid;
|
||||
|
||||
recv_data >> textID;
|
||||
sLog->outDetail("WORLD: CMSG_NPC_TEXT_QUERY ID '%u'", textID);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_NPC_TEXT_QUERY ID '%u'", textID);
|
||||
|
||||
recv_data >> guid;
|
||||
GetPlayer()->SetSelection(guid);
|
||||
@@ -344,7 +344,7 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data)
|
||||
/// Only _static_ data is sent in this packet !!!
|
||||
void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
sLog->outDetail("WORLD: Received CMSG_PAGE_TEXT_QUERY");
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PAGE_TEXT_QUERY");
|
||||
|
||||
uint32 pageID;
|
||||
recv_data >> pageID;
|
||||
|
||||
@@ -99,7 +99,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
|
||||
return;
|
||||
}
|
||||
|
||||
sLog->outDetail("WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, castCount: %u, spellId: %u, Item: %u, glyphIndex: %u, data length = %i", bagIndex, slot, castCount, spellId, pItem->GetEntry(), glyphIndex, (uint32)recvPacket.size());
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, castCount: %u, spellId: %u, Item: %u, glyphIndex: %u, data length = %i", bagIndex, slot, castCount, spellId, pItem->GetEntry(), glyphIndex, (uint32)recvPacket.size());
|
||||
|
||||
ItemTemplate const* proto = pItem->GetTemplate();
|
||||
if (!proto)
|
||||
@@ -175,7 +175,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
|
||||
|
||||
void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDetail("WORLD: CMSG_OPEN_ITEM packet, data length = %i", (uint32)recvPacket.size());
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_OPEN_ITEM packet, data length = %i", (uint32)recvPacket.size());
|
||||
|
||||
Player* pUser = _player;
|
||||
|
||||
@@ -658,13 +658,16 @@ void WorldSession::HandleUpdateProjectilePosition(WorldPacket& recvPacket)
|
||||
recvPacket >> z;
|
||||
|
||||
Unit* caster = ObjectAccessor::GetUnit(*_player, casterGuid);
|
||||
Spell* spell = caster ? caster->FindCurrentSpellBySpellId(spellId) : NULL;
|
||||
if (spell && spell->m_targets.HasDst())
|
||||
{
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
Spell* spell = caster->FindCurrentSpellBySpellId(spellId);
|
||||
if (!spell || !spell->m_targets.HasDst())
|
||||
return;
|
||||
|
||||
Position pos = *spell->m_targets.GetDstPos();
|
||||
pos.Relocate(x, y, z);
|
||||
spell->m_targets.ModDst(pos);
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_SET_PROJECTILE_POSITION, 21);
|
||||
data << uint64(casterGuid);
|
||||
@@ -672,5 +675,5 @@ void WorldSession::HandleUpdateProjectilePosition(WorldPacket& recvPacket)
|
||||
data << float(x);
|
||||
data << float(y);
|
||||
data << float(z);
|
||||
SendPacket(&data);
|
||||
caster->SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ void WorldSession::QueuePacket(WorldPacket* new_packet)
|
||||
/// Logging helper for unexpected opcodes
|
||||
void WorldSession::LogUnexpectedOpcode(WorldPacket* packet, const char* status, const char *reason)
|
||||
{
|
||||
sLog->outError("SESSION (account: %u, guidlow: %u, char: %s): received unexpected opcode %s (0x%.4X, status: %s) %s",
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "SESSION (account: %u, guidlow: %u, char: %s): received unexpected opcode %s (0x%.4X, status: %s) %s",
|
||||
GetAccountId(), m_GUIDLow, _player ? _player->GetName() : "<none>",
|
||||
LookupOpcodeName(packet->GetOpcode()), packet->GetOpcode(), status, reason);
|
||||
}
|
||||
@@ -216,7 +216,7 @@ void WorldSession::LogUnexpectedOpcode(WorldPacket* packet, const char* status,
|
||||
/// Logging helper for unexpected opcodes
|
||||
void WorldSession::LogUnprocessedTail(WorldPacket* packet)
|
||||
{
|
||||
sLog->outError("SESSION: opcode %s (0x%.4X) have unprocessed tail data (read stop at %u from %u)",
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "SESSION: opcode %s (0x%.4X) have unprocessed tail data (read stop at %u from %u)",
|
||||
LookupOpcodeName(packet->GetOpcode()), packet->GetOpcode(), uint32(packet->rpos()), uint32(packet->wpos()));
|
||||
packet->print_storage();
|
||||
}
|
||||
@@ -334,7 +334,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
|
||||
LogUnprocessedTail(packet);
|
||||
break;
|
||||
case STATUS_NEVER:
|
||||
sLog->outError("SESSION (account: %u, guidlow: %u, char: %s): received not allowed opcode %s (0x%.4X)",
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "SESSION (account: %u, guidlow: %u, char: %s): received not allowed opcode %s (0x%.4X)",
|
||||
GetAccountId(), m_GUIDLow, _player ? _player->GetName() : "<none>",
|
||||
LookupOpcodeName(packet->GetOpcode()), packet->GetOpcode());
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user