From e9b22814b936a0c31f3d51a6059e53d7cbe43f6a Mon Sep 17 00:00:00 2001 From: David Cernat Date: Fri, 20 Jan 2017 11:15:10 +0200 Subject: [PATCH] Create placeholder for ID_GAME_JOURNAL --- apps/openmw-mp/Networking.cpp | 8 ++++++++ apps/openmw/mwmp/Networking.cpp | 4 ++++ components/CMakeLists.txt | 4 ++-- .../Controllers/PlayerPacketController.cpp | 2 ++ components/openmw-mp/NetworkMessages.hpp | 1 + .../openmw-mp/Packets/Player/PacketJournal.cpp | 15 +++++++++++++++ .../openmw-mp/Packets/Player/PacketJournal.hpp | 18 ++++++++++++++++++ 7 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 components/openmw-mp/Packets/Player/PacketJournal.cpp create mode 100644 components/openmw-mp/Packets/Player/PacketJournal.hpp diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 6b8d2b2ff..2c1bc5a45 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -242,6 +242,14 @@ void Networking::processPlayerPacket(RakNet::Packet *packet) break; } + case ID_GAME_JOURNAL: + { + DEBUG_PRINTF("ID_GAME_JOURNAL\n"); + myPacket->Read(player); + + break; + } + case ID_GAME_ATTACK: { DEBUG_PRINTF("ID_GAME_ATTACK\n"); diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index 7459196a0..f557622ad 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -346,6 +346,10 @@ void Networking::processPlayerPacket(RakNet::Packet *packet) } break; } + case ID_GAME_JOURNAL: + { + break; + } case ID_GAME_ATTACK: { if (pl != 0) diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 4eaef77c2..07f055495 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -157,8 +157,8 @@ add_component_dir (openmw-mp Packets/Player/PacketChatMessage Packets/Player/PacketCharGen Packets/Player/PacketAttribute Packets/Player/PacketSkill Packets/Player/PacketLevel Packets/Player/PacketHandshake Packets/Player/PacketGUIBoxes Packets/Player/PacketClass Packets/Player/PacketTime - Packets/Player/PacketInventory Packets/Player/PacketSpellbook Packets/Player/PacketActiveSkills - Packets/Player/PacketPlayerCellChange + Packets/Player/PacketInventory Packets/Player/PacketSpellbook Packets/Player/PacketJournal + Packets/Player/PacketActiveSkills Packets/Player/PacketPlayerCellChange Packets/World/PacketObjectDelete Packets/World/PacketObjectPlace Packets/World/PacketObjectLock Packets/World/PacketObjectUnlock Packets/World/PacketObjectScale Packets/World/PacketObjectMove diff --git a/components/openmw-mp/Controllers/PlayerPacketController.cpp b/components/openmw-mp/Controllers/PlayerPacketController.cpp index 07aa24766..56c4477a6 100644 --- a/components/openmw-mp/Controllers/PlayerPacketController.cpp +++ b/components/openmw-mp/Controllers/PlayerPacketController.cpp @@ -24,6 +24,7 @@ #include "../Packets/Player/PacketLoaded.hpp" #include "../Packets/Player/PacketInventory.hpp" #include "../Packets/Player/PacketSpellbook.hpp" +#include "../Packets/Player/PacketJournal.hpp" #include "../Packets/Player/PacketConsole.hpp" #include "../Packets/Player/PacketActiveSkills.hpp" #include "../Packets/Player/PacketPlayerCellChange.hpp" @@ -67,6 +68,7 @@ mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *p AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); + AddPacket(&packets, peer); AddPacket(&packets, peer); diff --git a/components/openmw-mp/NetworkMessages.hpp b/components/openmw-mp/NetworkMessages.hpp index 6538c4c15..e0c4afcaf 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -33,6 +33,7 @@ enum GameMessages ID_GAME_TIME, ID_GAME_INVENTORY, ID_GAME_SPELLBOOK, + ID_GAME_JOURNAL, ID_GAME_ACTIVESKILLS, ID_PLAYER_CELL_CHANGE, diff --git a/components/openmw-mp/Packets/Player/PacketJournal.cpp b/components/openmw-mp/Packets/Player/PacketJournal.cpp new file mode 100644 index 000000000..b24e4dcd3 --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketJournal.cpp @@ -0,0 +1,15 @@ +#include +#include "PacketJournal.hpp" + +using namespace std; +using namespace mwmp; + +PacketJournal::PacketJournal(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_GAME_JOURNAL; +} + +void PacketJournal::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send) +{ + PlayerPacket::Packet(bs, player, send); +} diff --git a/components/openmw-mp/Packets/Player/PacketJournal.hpp b/components/openmw-mp/Packets/Player/PacketJournal.hpp new file mode 100644 index 000000000..7a8214b3c --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketJournal.hpp @@ -0,0 +1,18 @@ +#ifndef OPENMW_PACKETJOURNAL_HPP +#define OPENMW_PACKETJOURNAL_HPP + +#include + +namespace mwmp +{ + class PacketJournal : public PlayerPacket + { + public: + PacketJournal(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send); + }; +} + + +#endif //OPENMW_PACKETJOURNAL_HPP