Make server able to receive the 5 new WorldPackets

coverity_scan^2
David Cernat 8 years ago
parent 4f0a3e8aa1
commit 52d156e136

@ -444,6 +444,91 @@ void Networking::ProcessWorldPacket(RakNet::Packet *packet)
break;
}
case ID_WORLD_OBJECT_SCALE:
{
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_WORLD_OBJECT_SCALE from %s",
player->Npc()->mName.c_str());
myPacket->Read(event);
LOG_APPEND(Log::LOG_WARN, "- cellRef: %s, %i\n- cell: %s",
event->cellRef.mRefID.c_str(),
event->cellRef.mRefNum.mIndex,
event->cell.getDescription().c_str());
myPacket->Send(event, true);
break;
}
case ID_WORLD_CONTAINER_ADD:
{
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_WORLD_CONTAINER_ADD from %s",
player->Npc()->mName.c_str());
myPacket->Read(event);
LOG_APPEND(Log::LOG_WARN, "- cellRef: %s, %i\n- cell: %s",
event->cellRef.mRefID.c_str(),
event->cellRef.mRefNum.mIndex,
event->cell.getDescription().c_str());
myPacket->Send(event, true);
break;
}
case ID_WORLD_CONTAINER_REMOVE:
{
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_WORLD_CONTAINER_REMOVE from %s",
player->Npc()->mName.c_str());
myPacket->Read(event);
LOG_APPEND(Log::LOG_WARN, "- cellRef: %s, %i\n- cell: %s",
event->cellRef.mRefID.c_str(),
event->cellRef.mRefNum.mIndex,
event->cell.getDescription().c_str());
myPacket->Send(event, true);
break;
}
case ID_WORLD_DOOR_ACTIVATE:
{
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_WORLD_DOOR_ACTIVATE from %s",
player->Npc()->mName.c_str());
myPacket->Read(event);
LOG_APPEND(Log::LOG_WARN, "- cellRef: %s, %i\n- cell: %s",
event->cellRef.mRefID.c_str(),
event->cellRef.mRefNum.mIndex,
event->cell.getDescription().c_str());
myPacket->Send(event, true);
break;
}
case ID_WORLD_ACTIVATOR_ACTIVATE:
{
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_WORLD_ACTIVATOR_ACTIVATE from %s",
player->Npc()->mName.c_str());
myPacket->Read(event);
LOG_APPEND(Log::LOG_WARN, "- cellRef: %s, %i\n- cell: %s",
event->cellRef.mRefID.c_str(),
event->cellRef.mRefNum.mIndex,
event->cell.getDescription().c_str());
myPacket->Send(event, true);
break;
}
case ID_WORLD_VIDEO_PLAY:
{
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_WORLD_VIDEO_PLAY from %s",

@ -6,6 +6,12 @@
#include "../Packets/World/PacketObjectPlace.hpp"
#include "../Packets/World/PacketObjectLock.hpp"
#include "../Packets/World/PacketObjectUnlock.hpp"
#include "../Packets/World/PacketObjectScale.hpp"
#include "../Packets/World/PacketContainerAdd.hpp"
#include "../Packets/World/PacketContainerRemove.hpp"
#include "../Packets/World/PacketDoorActivate.hpp"
#include "../Packets/World/PacketActivatorActivate.hpp"
#include "../Packets/World/PacketVideoPlay.hpp"
#include "WorldPacketController.hpp"
@ -24,6 +30,12 @@ mwmp::WorldPacketController::WorldPacketController(RakNet::RakPeerInterface *pee
AddPacket<PacketObjectPlace>(&packets, peer);
AddPacket<PacketObjectLock>(&packets, peer);
AddPacket<PacketObjectUnlock>(&packets, peer);
AddPacket<PacketObjectScale>(&packets, peer);
AddPacket<PacketContainerAdd>(&packets, peer);
AddPacket<PacketContainerRemove>(&packets, peer);
AddPacket<PacketDoorActivate>(&packets, peer);
AddPacket<PacketActivatorActivate>(&packets, peer);
AddPacket<PacketVideoPlay>(&packets, peer);
}

@ -37,7 +37,12 @@ enum GameMessages
ID_WORLD_OBJECT_DELETE,
ID_WORLD_OBJECT_LOCK,
ID_WORLD_OBJECT_UNLOCK,
ID_WORLD_OBJECT_SCALE,
ID_WORLD_CONTAINER_ADD,
ID_WORLD_CONTAINER_REMOVE,
ID_WORLD_DOOR_ACTIVATE,
ID_WORLD_ACTIVATOR_ACTIVATE,
ID_WORLD_VIDEO_PLAY
};

Loading…
Cancel
Save