1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 23:23:52 +00:00

[Server] Print debug info only for certain world packets

This commit is contained in:
David Cernat 2017-04-08 12:00:07 +03:00
parent 417284c701
commit 89a8ace41c
8 changed files with 13 additions and 2 deletions

View file

@ -38,8 +38,6 @@ bool WorldProcessor::Process(RakNet::Packet &packet, BaseEvent &event) noexcept
Player *player = Players::getPlayer(packet.guid);
WorldPacket *myPacket = Networking::get().getWorldController()->GetPacket(packet.data[0]);
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s from %s", processor.second->strPacketID.c_str(),
player->npc.mName.c_str());
myPacket->setEvent(&event);
if (!processor.second->avoidReading)

View file

@ -15,6 +15,8 @@ namespace mwmp
void Do(WorldPacket &packet, Player &player, BaseEvent &event) override
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
// Send only to players who have the cell loaded
Cell *serverCell = CellController::get()->getCell(&event.cell);

View file

@ -19,6 +19,7 @@ namespace mwmp
void Do(WorldPacket &packet, Player &player, BaseEvent &event) override
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
LOG_APPEND(Log::LOG_INFO, "- action: %i", event.action);
// Until we have a timestamp-based system, send packets pertaining to more

View file

@ -19,6 +19,8 @@ namespace mwmp
void Do(WorldPacket &packet, Player &player, BaseEvent &event) override
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
packet.Send(true);
Script::Call<Script::CallbackIdentity("OnObjectDelete")>(player.getId(), event.cell.getDescription().c_str());

View file

@ -19,6 +19,8 @@ namespace mwmp
void Do(WorldPacket &packet, Player &player, BaseEvent &event) override
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
packet.Send(true);
Script::Call<Script::CallbackIdentity("OnObjectLock")>(player.getId(), event.cell.getDescription().c_str());

View file

@ -20,6 +20,8 @@ namespace mwmp
void Do(WorldPacket &packet, Player &player, BaseEvent &event) override
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
for (unsigned int i = 0; i < event.objectChanges.count; i++)
{
event.objectChanges.objects.at(i).mpNum = mwmp::Networking::getPtr()->incrementMpNum();

View file

@ -19,6 +19,8 @@ namespace mwmp
void Do(WorldPacket &packet, Player &player, BaseEvent &event) override
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
packet.Send(true);
Script::Call<Script::CallbackIdentity("OnObjectScale")>(player.getId(), event.cell.getDescription().c_str());

View file

@ -19,6 +19,8 @@ namespace mwmp
void Do(WorldPacket &packet, Player &player, BaseEvent &event) override
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
packet.Send(true);
Script::Call<Script::CallbackIdentity("OnObjectUnlock")>(player.getId(), event.cell.getDescription().c_str());