diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index d316b59fc..850c3e5ad 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -231,6 +231,14 @@ void Networking::processPlayerPacket(RakNet::Packet *packet) break; } + case ID_GAME_SPELLBOOK: + { + DEBUG_PRINTF("ID_GAME_SPELLBOOK\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 c66956f19..4e74e80c2 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -341,6 +341,10 @@ void Networking::processPlayerPacket(RakNet::Packet *packet) } break; } + case ID_GAME_SPELLBOOK: + { + break; + } case ID_GAME_ATTACK: { if (pl != 0) diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index db89cd792..0ea9a9257 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -155,7 +155,7 @@ add_component_dir (openmw-mp Packets/Player/PacketDrawState 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/PacketTime Packets/Player/PacketInventory Packets/Player/PacketSpellbook 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 49450c810..c851c6f4f 100644 --- a/components/openmw-mp/Controllers/PlayerPacketController.cpp +++ b/components/openmw-mp/Controllers/PlayerPacketController.cpp @@ -24,6 +24,7 @@ #include "../Packets/Player/PacketTime.hpp" #include "../Packets/Player/PacketLoaded.hpp" #include "../Packets/Player/PacketInventory.hpp" +#include "../Packets/Player/PacketSpellbook.hpp" #include "../Packets/Player/PacketConsole.hpp" #include "PlayerPacketController.hpp" @@ -64,6 +65,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 f01aa9b3a..9de08ec40 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -32,6 +32,7 @@ enum GameMessages ID_GUI_MESSAGEBOX, ID_GAME_TIME, ID_GAME_INVENTORY, + ID_GAME_SPELLBOOK, ID_OBJECT_PLACE, ID_OBJECT_DELETE, diff --git a/components/openmw-mp/Packets/Player/PacketSpellbook.cpp b/components/openmw-mp/Packets/Player/PacketSpellbook.cpp new file mode 100644 index 000000000..54589553f --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketSpellbook.cpp @@ -0,0 +1,15 @@ +#include +#include "PacketSpellbook.hpp" + +using namespace std; +using namespace mwmp; + +PacketSpellbook::PacketSpellbook(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_GAME_SPELLBOOK; +} + +void PacketSpellbook::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send) +{ + PlayerPacket::Packet(bs, player, send); +} diff --git a/components/openmw-mp/Packets/Player/PacketSpellbook.hpp b/components/openmw-mp/Packets/Player/PacketSpellbook.hpp new file mode 100644 index 000000000..4caa51d5f --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketSpellbook.hpp @@ -0,0 +1,18 @@ +#ifndef OPENMW_PACKETSPELLBOOK_HPP +#define OPENMW_PACKETSPELLBOOK_HPP + +#include + +namespace mwmp +{ + class PacketSpellbook : public PlayerPacket + { + public: + PacketSpellbook(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send); + }; +} + + +#endif //OPENMW_PACKETSPELLBOOK_HPP