@ -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)
@ -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);
@ -19,6 +19,7 @@ namespace mwmp
LOG_APPEND(Log::LOG_INFO, "- action: %i", event.action);
// Until we have a timestamp-based system, send packets pertaining to more
@ -19,6 +19,8 @@ namespace mwmp
packet.Send(true);
Script::Call<Script::CallbackIdentity("OnObjectDelete")>(player.getId(), event.cell.getDescription().c_str());
Script::Call<Script::CallbackIdentity("OnObjectLock")>(player.getId(), event.cell.getDescription().c_str());
@ -20,6 +20,8 @@ namespace mwmp
for (unsigned int i = 0; i < event.objectChanges.count; i++)
event.objectChanges.objects.at(i).mpNum = mwmp::Networking::getPtr()->incrementMpNum();
Script::Call<Script::CallbackIdentity("OnObjectScale")>(player.getId(), event.cell.getDescription().c_str());
Script::Call<Script::CallbackIdentity("OnObjectUnlock")>(player.getId(), event.cell.getDescription().c_str());