[General] Add TRACE log messages in player processors

new-script-api
David Cernat 7 years ago
parent 606ddff813
commit 64b57983f0

@ -20,6 +20,8 @@ bool PlayerProcessor::Process(RakNet::Packet &packet) noexcept
PlayerPacket *myPacket = Networking::get().getPlayerPacketController()->GetPacket(packet.data[0]); PlayerPacket *myPacket = Networking::get().getPlayerPacketController()->GetPacket(packet.data[0]);
myPacket->setPlayer(player.get()); myPacket->setPlayer(player.get());
LOG_MESSAGE_SIMPLE(Log::LOG_TRACE, "Processing %s from %s", processor.second->strPacketID.c_str(), player->npc.mName.c_str());
if (!processor.second->avoidReading) if (!processor.second->avoidReading)
myPacket->Read(); myPacket->Read();

@ -37,6 +37,9 @@ bool PlayerProcessor::Process(RakNet::Packet &packet)
else else
player = Main::get().getLocalPlayer(); player = Main::get().getLocalPlayer();
if (player != 0)
LOG_MESSAGE_SIMPLE(Log::LOG_TRACE, "Processing %s about %s", processor.second->strPacketID.c_str(), player->npc.mName.c_str());
if (!request && !processor.second->avoidReading && player != 0) if (!request && !processor.second->avoidReading && player != 0)
{ {
myPacket->setPlayer(player); myPacket->setPlayer(player);

Loading…
Cancel
Save