mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
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:
@@ -41,9 +41,7 @@ void WorldSession::HandleTabardVendorActivateOpcode(WorldPacket& recvData)
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TABARDDESIGNER);
|
||||
if (!unit)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: HandleTabardVendorActivateOpcode - Unit (%s) not found or you can not interact with him.", guid.ToString().c_str());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -65,18 +63,14 @@ void WorldSession::HandleBankerActivateOpcode(WorldPacket& recvData)
|
||||
{
|
||||
ObjectGuid guid;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: Received CMSG_BANKER_ACTIVATE");
|
||||
#endif
|
||||
|
||||
recvData >> guid;
|
||||
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_BANKER);
|
||||
if (!unit)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: HandleBankerActivateOpcode - Unit (%s) not found or you can not interact with him.", guid.ToString().c_str());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -118,16 +112,12 @@ void WorldSession::SendTrainerList(ObjectGuid guid)
|
||||
|
||||
void WorldSession::SendTrainerList(ObjectGuid guid, const std::string& strTitle)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: SendTrainerList");
|
||||
#endif
|
||||
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
|
||||
if (!unit)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: SendTrainerList - Unit (%s) not found or you can not interact with him.", guid.ToString().c_str());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -139,18 +129,14 @@ void WorldSession::SendTrainerList(ObjectGuid guid, const std::string& strTitle)
|
||||
|
||||
if (!ci)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: SendTrainerList - (%s) NO CREATUREINFO!", guid.ToString().c_str());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
TrainerSpellData const* trainer_spells = unit->GetTrainerSpells();
|
||||
if (!trainer_spells)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: SendTrainerList - Training spells not found for creature (%s)", guid.ToString().c_str());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -243,16 +229,12 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData)
|
||||
uint32 spellId = 0;
|
||||
|
||||
recvData >> guid >> spellId;
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: Received CMSG_TRAINER_BUY_SPELL Npc %s, learn spell id is: %u", guid.ToString().c_str(), spellId);
|
||||
#endif
|
||||
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
|
||||
if (!unit)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: HandleTrainerBuySpellOpcode - Unit (%s) not found or you can not interact with him.", guid.ToString().c_str());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -300,9 +282,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recvData)
|
||||
|
||||
void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: Received CMSG_GOSSIP_HELLO");
|
||||
#endif
|
||||
|
||||
ObjectGuid guid;
|
||||
recvData >> guid;
|
||||
@@ -310,9 +290,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
|
||||
if (!unit)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: HandleGossipHelloOpcode - Unit (%s) not found or you can not interact with him.", guid.ToString().c_str());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -363,9 +341,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
|
||||
|
||||
/*void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recvData)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network.opcode", "WORLD: CMSG_GOSSIP_SELECT_OPTION");
|
||||
#endif
|
||||
|
||||
uint32 option;
|
||||
uint32 unk;
|
||||
@@ -376,21 +352,15 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
|
||||
|
||||
if (_player->PlayerTalkClass->GossipOptionCoded(option))
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network.opcode", "reading string");
|
||||
#endif
|
||||
recvData >> code;
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network.opcode", "string read: %s", code.c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
|
||||
if (!unit)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network.opcode", "WORLD: HandleGossipSelectOptionOpcode - Unit (%s) not found or you can't interact with him.", guid.ToString().c_str());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -412,9 +382,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData)
|
||||
|
||||
void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket& recvData)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: CMSG_SPIRIT_HEALER_ACTIVATE");
|
||||
#endif
|
||||
|
||||
ObjectGuid guid;
|
||||
|
||||
@@ -423,9 +391,7 @@ void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket& recvData)
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_SPIRITHEALER);
|
||||
if (!unit)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: HandleSpiritHealerActivateOpcode - Unit (%s) not found or you can not interact with him.", guid.ToString().c_str());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -481,9 +447,7 @@ void WorldSession::HandleBinderActivateOpcode(WorldPacket& recvData)
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_INNKEEPER);
|
||||
if (!unit)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: HandleBinderActivateOpcode - Unit (%s) not found or you can not interact with him.", npcGUID.ToString().c_str());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -515,9 +479,7 @@ void WorldSession::SendBindPoint(Creature* npc)
|
||||
|
||||
void WorldSession::HandleListStabledPetsOpcode(WorldPacket& recvData)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: Recv MSG_LIST_STABLED_PETS");
|
||||
#endif
|
||||
ObjectGuid npcGUID;
|
||||
|
||||
recvData >> npcGUID;
|
||||
@@ -553,9 +515,7 @@ void WorldSession::SendStablePetCallback(PreparedQueryResult result, ObjectGuid
|
||||
if (!GetPlayer())
|
||||
return;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: Recv MSG_LIST_STABLED_PETS Send.");
|
||||
#endif
|
||||
|
||||
WorldPacket data(MSG_LIST_STABLED_PETS, 200); // guess size
|
||||
|
||||
@@ -628,9 +588,7 @@ void WorldSession::SendStableResult(uint8 res)
|
||||
|
||||
void WorldSession::HandleStablePet(WorldPacket& recvData)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: Recv CMSG_STABLE_PET");
|
||||
#endif
|
||||
ObjectGuid npcGUID;
|
||||
|
||||
recvData >> npcGUID;
|
||||
@@ -735,9 +693,7 @@ void WorldSession::HandleStablePetCallback(PreparedQueryResult result)
|
||||
|
||||
void WorldSession::HandleUnstablePet(WorldPacket& recvData)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: Recv CMSG_UNSTABLE_PET.");
|
||||
#endif
|
||||
ObjectGuid npcGUID;
|
||||
uint32 petnumber;
|
||||
|
||||
@@ -838,9 +794,7 @@ void WorldSession::HandleUnstablePetCallback(PreparedQueryResult result, uint32
|
||||
|
||||
void WorldSession::HandleBuyStableSlot(WorldPacket& recvData)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: Recv CMSG_BUY_STABLE_SLOT.");
|
||||
#endif
|
||||
ObjectGuid npcGUID;
|
||||
|
||||
recvData >> npcGUID;
|
||||
@@ -873,16 +827,12 @@ void WorldSession::HandleBuyStableSlot(WorldPacket& recvData)
|
||||
|
||||
void WorldSession::HandleStableRevivePet(WorldPacket& /* recvData */)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "HandleStableRevivePet: Not implemented");
|
||||
#endif
|
||||
}
|
||||
|
||||
void WorldSession::HandleStableSwapPet(WorldPacket& recvData)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: Recv CMSG_STABLE_SWAP_PET.");
|
||||
#endif
|
||||
ObjectGuid npcGUID;
|
||||
uint32 petId;
|
||||
|
||||
@@ -993,9 +943,7 @@ void WorldSession::HandleStableSwapPetCallback(PreparedQueryResult result, uint3
|
||||
|
||||
void WorldSession::HandleRepairItemOpcode(WorldPacket& recvData)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: CMSG_REPAIR_ITEM");
|
||||
#endif
|
||||
|
||||
ObjectGuid npcGUID, itemGUID;
|
||||
uint8 guildBank; // new in 2.3.2, bool that means from guild bank money
|
||||
@@ -1005,9 +953,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket& recvData)
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_REPAIR);
|
||||
if (!unit)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "WORLD: HandleRepairItemOpcode - Unit (%s) not found or you can not interact with him.", npcGUID.ToString().c_str());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1022,9 +968,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket& recvData)
|
||||
|
||||
if (itemGUID)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "ITEM: Repair item, item %s, npc %s", itemGUID.ToString().c_str(), npcGUID.ToString().c_str());
|
||||
#endif
|
||||
|
||||
Item* item = _player->GetItemByGuid(itemGUID);
|
||||
if (item)
|
||||
@@ -1032,9 +976,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket& recvData)
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("network", "ITEM: Repair all items, npc %s", npcGUID.ToString().c_str());
|
||||
#endif
|
||||
_player->DurabilityRepairAll(true, discountMod, guildBank);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user