chore(Core/Logging): replace most server loggers (#5726)

* chore(Core/Logging): replace most server loggers

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
Kargatum
2021-06-21 08:07:12 +07:00
committed by GitHub
parent 9f80a592bb
commit 5787d00d54
199 changed files with 2312 additions and 4487 deletions

View File

@@ -15,9 +15,7 @@
void WorldSession::HandleTaxiNodeStatusQueryOpcode(WorldPacket& recvData)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_TAXINODE_STATUS_QUERY");
#endif
ObjectGuid guid;
@@ -31,9 +29,7 @@ void WorldSession::SendTaxiStatus(ObjectGuid guid)
Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
if (!unit)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WorldSession::SendTaxiStatus - Unit (%s) not found.", guid.ToString().c_str());
#endif
return;
}
@@ -43,24 +39,18 @@ void WorldSession::SendTaxiStatus(ObjectGuid guid)
if (curloc == 0)
return;
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: current location %u ", curloc);
#endif
WorldPacket data(SMSG_TAXINODE_STATUS, 9);
data << guid;
data << uint8(GetPlayer()->m_taxi.IsTaximaskNodeKnown(curloc) ? 1 : 0);
SendPacket(&data);
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_TAXINODE_STATUS");
#endif
}
void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket& recvData)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_TAXIQUERYAVAILABLENODES");
#endif
ObjectGuid guid;
recvData >> guid;
@@ -69,9 +59,7 @@ void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket& recvData)
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
if (!unit)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleTaxiQueryAvailableNodes - Unit (%s) not found or you can't interact with him.", guid.ToString().c_str());
#endif
return;
}
@@ -98,9 +86,7 @@ void WorldSession::SendTaxiMenu(Creature* unit)
bool lastTaxiCheaterState = GetPlayer()->isTaxiCheater();
if (unit->GetEntry() == 29480) GetPlayer()->SetTaxiCheater(true); // Grimwing in Ebon Hold, special case. NOTE: Not perfect, Zul'Aman should not be included according to WoWhead, and I think taxicheat includes it.
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: CMSG_TAXINODE_STATUS_QUERY %u ", curloc);
#endif
WorldPacket data(SMSG_SHOWTAXINODES, (4 + 8 + 4 + 8 * 4));
data << uint32(1);
@@ -109,9 +95,7 @@ void WorldSession::SendTaxiMenu(Creature* unit)
GetPlayer()->m_taxi.AppendTaximaskTo(data, GetPlayer()->isTaxiCheater());
SendPacket(&data);
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_SHOWTAXINODES");
#endif
GetPlayer()->SetTaxiCheater(lastTaxiCheaterState);
}
@@ -168,9 +152,7 @@ void WorldSession::SendDiscoverNewTaxiNode(uint32 nodeid)
void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket& recvData)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_ACTIVATETAXIEXPRESS");
#endif
ObjectGuid guid;
uint32 node_count;
@@ -180,9 +162,7 @@ void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket& recvData)
Creature* npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
if (!npc)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleActivateTaxiExpressOpcode - Unit (%s) not found or you can't interact with it.", guid.ToString().c_str());
#endif
return;
}
std::vector<uint32> nodes;
@@ -205,18 +185,14 @@ void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket& recvData)
if (nodes.empty())
return;
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_ACTIVATETAXIEXPRESS from %d to %d", nodes.front(), nodes.back());
#endif
GetPlayer()->ActivateTaxiPathTo(nodes, npc, 0);
}
void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_MOVE_SPLINE_DONE");
#endif
ObjectGuid guid; // used only for proper packet read
recvData >> guid.ReadAsPacked();
@@ -230,24 +206,18 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData)
void WorldSession::HandleActivateTaxiOpcode(WorldPacket& recvData)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_ACTIVATETAXI");
#endif
ObjectGuid guid;
std::vector<uint32> nodes;
nodes.resize(2);
recvData >> guid >> nodes[0] >> nodes[1];
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Received CMSG_ACTIVATETAXI from %d to %d", nodes[0], nodes[1]);
#endif
Creature* npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
if (!npc)
{
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: HandleActivateTaxiOpcode - Unit (%s) not found or you can't interact with it.", guid.ToString().c_str());
#endif
return;
}
@@ -269,7 +239,5 @@ void WorldSession::SendActivateTaxiReply(ActivateTaxiReply reply)
data << uint32(reply);
SendPacket(&data);
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
LOG_DEBUG("network", "WORLD: Sent SMSG_ACTIVATETAXIREPLY");
#endif
}