diff --git a/apps/openmw-mp/CMakeLists.txt b/apps/openmw-mp/CMakeLists.txt index 3ed42cda3..3cdae7b2e 100644 --- a/apps/openmw-mp/CMakeLists.txt +++ b/apps/openmw-mp/CMakeLists.txt @@ -103,26 +103,29 @@ source_group(tes3mp-server FILES ${SERVER} ${SERVER_HEADER}) set(PROCESSORS_ACTOR processors/actor/ProcessorActorAnimFlags.hpp processors/actor/ProcessorActorAnimPlay.hpp - processors/actor/ProcessorActorAttack.hpp processors/actor/ProcessorActorAuthority.hpp - processors/actor/ProcessorActorCellChange.hpp processors/actor/ProcessorActorEquipment.hpp - processors/actor/ProcessorActorList.hpp processors/actor/ProcessorActorPosition.hpp - processors/actor/ProcessorActorSpeech.hpp processors/actor/ProcessorActorStatsDynamic.hpp - processors/actor/ProcessorActorTest.hpp + processors/actor/ProcessorActorAttack.hpp processors/actor/ProcessorActorCellChange.hpp + processors/actor/ProcessorActorEquipment.hpp processors/actor/ProcessorActorList.hpp + processors/actor/ProcessorActorPosition.hpp processors/actor/ProcessorActorSpeech.hpp + processors/actor/ProcessorActorStatsDynamic.hpp processors/actor/ProcessorActorTest.hpp ) source_group(tes3mp-server\\processors\\actor FILES ${PROCESSORS_ACTOR}) set(PROCESSORS_PLAYER processors/player/ProcessorChatMsg.hpp processors/player/ProcessorGUIMessageBox.hpp - processors/player/ProcessorPlayerAnimFlags.hpp processors/player/ProcessorPlayerAttack.hpp - processors/player/ProcessorPlayerAttribute.hpp processors/player/ProcessorPlayerBounty.hpp - processors/player/ProcessorPlayerCellChange.hpp processors/player/ProcessorPlayerCellState.hpp - processors/player/ProcessorPlayerCharClass.hpp processors/player/ProcessorPlayerCharGen.hpp - processors/player/ProcessorPlayerDeath.hpp processors/player/ProcessorPlayerEquipment.hpp + processors/player/ProcessorGameWeather.hpp processors/player/ProcessorPlayerAnimFlags.hpp + processors/player/ProcessorPlayerAnimPlay.hpp processors/player/ProcessorPlayerAttack.hpp + processors/player/ProcessorPlayerAttribute.hpp processors/player/ProcessorPlayerBook.hpp + processors/player/ProcessorPlayerBounty.hpp processors/player/ProcessorPlayerCellChange.hpp + processors/player/ProcessorPlayerCellState.hpp processors/player/ProcessorPlayerCharClass.hpp + processors/player/ProcessorPlayerCharGen.hpp processors/player/ProcessorPlayerDeath.hpp + processors/player/ProcessorPlayerDisposition.hpp processors/player/ProcessorPlayerEquipment.hpp processors/player/ProcessorPlayerFaction.hpp processors/player/ProcessorPlayerInventory.hpp processors/player/ProcessorPlayerJournal.hpp processors/player/ProcessorPlayerLevel.hpp - processors/player/ProcessorPlayerPosition.hpp processors/player/ProcessorPlayerResurrect.hpp - processors/player/ProcessorPlayerSkill.hpp processors/player/ProcessorPlayerSpellbook.hpp + processors/player/ProcessorPlayerMap.hpp processors/player/ProcessorPlayerPosition.hpp + processors/player/ProcessorPlayerRegionChange.hpp processors/player/ProcessorPlayerRest.hpp + processors/player/ProcessorPlayerResurrect.hpp processors/player/ProcessorPlayerSkill.hpp + processors/player/ProcessorPlayerSpeech.hpp processors/player/ProcessorPlayerSpellbook.hpp processors/player/ProcessorPlayerStatsDynamic.hpp processors/player/ProcessorPlayerTopic.hpp ) @@ -134,9 +137,10 @@ set(PROCESSORS_WORLD processors/world/ProcessorObjectDelete.hpp processors/world/ProcessorObjectLock.hpp processors/world/ProcessorObjectMove.hpp processors/world/ProcessorObjectPlace.hpp processors/world/ProcessorObjectRotate.hpp processors/world/ProcessorObjectScale.hpp - processors/world/ProcessorObjectTrap.hpp processors/world/ProcessorScriptLocalShort.hpp - processors/world/ProcessorScriptLocalFloat.hpp processors/world/ProcessorScriptMemberShort.hpp - processors/world/ProcessorScriptGlobalShort.hpp processors/world/ProcessorVideoPlay.hpp + processors/world/ProcessorObjectSpawn.hpp processors/world/ProcessorObjectTrap.hpp + processors/world/ProcessorScriptLocalShort.hpp processors/world/ProcessorScriptLocalFloat.hpp + processors/world/ProcessorScriptMemberShort.hpp processors/world/ProcessorScriptGlobalShort.hpp + processors/world/ProcessorVideoPlay.hpp ) source_group(tes3mp-server\\processors\\world FILES ${PROCESSORS_WORLD}) diff --git a/apps/openmw-mp/ProcessorInitializer.cpp b/apps/openmw-mp/ProcessorInitializer.cpp index 39e20950d..90569a6a8 100644 --- a/apps/openmw-mp/ProcessorInitializer.cpp +++ b/apps/openmw-mp/ProcessorInitializer.cpp @@ -10,34 +10,43 @@ #include "PlayerProcessor.hpp" #include "processors/player/ProcessorChatMsg.hpp" #include "processors/player/ProcessorGUIMessageBox.hpp" +#include "processors/player/ProcessorGameWeather.hpp" #include "processors/player/ProcessorPlayerCharGen.hpp" #include "processors/player/ProcessorPlayerAnimFlags.hpp" +#include "processors/player/ProcessorPlayerAnimPlay.hpp" #include "processors/player/ProcessorPlayerAttack.hpp" #include "processors/player/ProcessorPlayerAttribute.hpp" +#include "processors/player/ProcessorPlayerBook.hpp" #include "processors/player/ProcessorPlayerBounty.hpp" #include "processors/player/ProcessorPlayerCellChange.hpp" #include "processors/player/ProcessorPlayerCellState.hpp" #include "processors/player/ProcessorPlayerCharClass.hpp" #include "processors/player/ProcessorPlayerDeath.hpp" +#include "processors/player/ProcessorPlayerDisposition.hpp" #include "processors/player/ProcessorPlayerEquipment.hpp" #include "processors/player/ProcessorPlayerFaction.hpp" #include "processors/player/ProcessorPlayerInventory.hpp" #include "processors/player/ProcessorPlayerJournal.hpp" #include "processors/player/ProcessorPlayerLevel.hpp" +#include "processors/player/ProcessorPlayerMap.hpp" #include "processors/player/ProcessorPlayerPosition.hpp" +#include "processors/player/ProcessorPlayerRegionChange.hpp" +#include "processors/player/ProcessorPlayerRest.hpp" #include "processors/player/ProcessorPlayerResurrect.hpp" #include "processors/player/ProcessorPlayerSkill.hpp" +#include "processors/player/ProcessorPlayerSpeech.hpp" #include "processors/player/ProcessorPlayerSpellbook.hpp" #include "processors/player/ProcessorPlayerStatsDynamic.hpp" #include "processors/player/ProcessorPlayerTopic.hpp" #include "ActorProcessor.hpp" #include "processors/actor/ProcessorActorList.hpp" -#include "processors/actor/ProcessorActorAuthority.hpp" #include "processors/actor/ProcessorActorTest.hpp" +#include "processors/actor/ProcessorActorAI.hpp" #include "processors/actor/ProcessorActorAnimFlags.hpp" #include "processors/actor/ProcessorActorAnimPlay.hpp" #include "processors/actor/ProcessorActorAttack.hpp" #include "processors/actor/ProcessorActorCellChange.hpp" +#include "processors/actor/ProcessorActorDeath.hpp" #include "processors/actor/ProcessorActorEquipment.hpp" #include "processors/actor/ProcessorActorStatsDynamic.hpp" #include "processors/actor/ProcessorActorPosition.hpp" @@ -53,6 +62,7 @@ #include "processors/world/ProcessorObjectMove.hpp" #include "processors/world/ProcessorObjectRotate.hpp" #include "processors/world/ProcessorObjectScale.hpp" +#include "processors/world/ProcessorObjectSpawn.hpp" #include "processors/world/ProcessorObjectTrap.hpp" #include "processors/world/ProcessorScriptLocalShort.hpp" #include "processors/world/ProcessorScriptLocalFloat.hpp" @@ -67,33 +77,42 @@ void ProcessorInitializer() { PlayerProcessor::AddProcessor(new ProcessorChatMsg()); PlayerProcessor::AddProcessor(new ProcessorGUIMessageBox()); + PlayerProcessor::AddProcessor(new ProcessorGameWeather()); PlayerProcessor::AddProcessor(new ProcessorPlayerCharGen()); PlayerProcessor::AddProcessor(new ProcessorPlayerAnimFlags()); + PlayerProcessor::AddProcessor(new ProcessorPlayerAnimPlay()); PlayerProcessor::AddProcessor(new ProcessorPlayerAttack()); PlayerProcessor::AddProcessor(new ProcessorPlayerAttribute()); + PlayerProcessor::AddProcessor(new ProcessorPlayerBook()); PlayerProcessor::AddProcessor(new ProcessorPlayerBounty()); PlayerProcessor::AddProcessor(new ProcessorPlayerCellChange()); PlayerProcessor::AddProcessor(new ProcessorPlayerCellState()); PlayerProcessor::AddProcessor(new ProcessorPlayerCharClass()); PlayerProcessor::AddProcessor(new ProcessorPlayerDeath()); + PlayerProcessor::AddProcessor(new ProcessorPlayerDisposition()); PlayerProcessor::AddProcessor(new ProcessorPlayerEquipment()); PlayerProcessor::AddProcessor(new ProcessorPlayerFaction()); PlayerProcessor::AddProcessor(new ProcessorPlayerInventory()); PlayerProcessor::AddProcessor(new ProcessorPlayerJournal()); PlayerProcessor::AddProcessor(new ProcessorPlayerLevel()); + PlayerProcessor::AddProcessor(new ProcessorPlayerMap()); PlayerProcessor::AddProcessor(new ProcessorPlayerPosition()); + PlayerProcessor::AddProcessor(new ProcessorPlayerRegionChange()); + PlayerProcessor::AddProcessor(new ProcessorPlayerRest()); PlayerProcessor::AddProcessor(new ProcessorPlayerResurrect()); PlayerProcessor::AddProcessor(new ProcessorPlayerSkill()); + PlayerProcessor::AddProcessor(new ProcessorPlayerSpeech()); PlayerProcessor::AddProcessor(new ProcessorPlayerSpellbook()); PlayerProcessor::AddProcessor(new ProcessorPlayerStatsDynamic()); PlayerProcessor::AddProcessor(new ProcessorPlayerTopic()); ActorProcessor::AddProcessor(new ProcessorActorList()); - ActorProcessor::AddProcessor(new ProcessorActorAuthority()); + ActorProcessor::AddProcessor(new ProcessorActorAI()); ActorProcessor::AddProcessor(new ProcessorActorAnimFlags()); ActorProcessor::AddProcessor(new ProcessorActorAnimPlay()); ActorProcessor::AddProcessor(new ProcessorActorAttack()); ActorProcessor::AddProcessor(new ProcessorActorCellChange()); + ActorProcessor::AddProcessor(new ProcessorActorDeath()); ActorProcessor::AddProcessor(new ProcessorActorEquipment()); ActorProcessor::AddProcessor(new ProcessorActorPosition()); ActorProcessor::AddProcessor(new ProcessorActorSpeech()); @@ -110,6 +129,7 @@ void ProcessorInitializer() WorldProcessor::AddProcessor(new ProcessorObjectPlace()); WorldProcessor::AddProcessor(new ProcessorObjectRotate()); WorldProcessor::AddProcessor(new ProcessorObjectScale()); + WorldProcessor::AddProcessor(new ProcessorObjectSpawn()); WorldProcessor::AddProcessor(new ProcessorObjectTrap()); WorldProcessor::AddProcessor(new ProcessorScriptLocalShort()); WorldProcessor::AddProcessor(new ProcessorScriptLocalFloat()); diff --git a/apps/openmw-mp/Script/ScriptFunctions.hpp b/apps/openmw-mp/Script/ScriptFunctions.hpp index 32035e8b2..f96ffd116 100644 --- a/apps/openmw-mp/Script/ScriptFunctions.hpp +++ b/apps/openmw-mp/Script/ScriptFunctions.hpp @@ -124,6 +124,7 @@ public: {"OnPlayerDeath", Function()}, {"OnPlayerResurrect", Function()}, {"OnPlayerCellChange", Function()}, + {"OnPlayerRegionChange", Function()}, {"OnPlayerAttribute", Function()}, {"OnPlayerSkill", Function()}, {"OnPlayerLevel", Function()}, @@ -134,6 +135,10 @@ public: {"OnPlayerFaction", Function()}, {"OnPlayerSpellbook", Function()}, {"OnPlayerTopic", Function()}, + {"OnPlayerDisposition", Function()}, + {"OnPlayerBook", Function()}, + {"OnPlayerMap", Function()}, + {"OnPlayerRest", Function()}, {"OnCellLoad", Function()}, {"OnCellUnload", Function()}, {"OnCellDeletion", Function()}, @@ -143,6 +148,7 @@ public: {"OnObjectLock", Function()}, {"OnObjectPlace", Function()}, {"OnObjectScale", Function()}, + {"OnObjectSpawn", Function()}, {"OnObjectTrap", Function()}, {"OnActorList", Function()}, {"OnActorEquipment", Function()}, diff --git a/apps/openmw-mp/processors/actor/ProcessorActorAI.hpp b/apps/openmw-mp/processors/actor/ProcessorActorAI.hpp new file mode 100644 index 000000000..9cda87e31 --- /dev/null +++ b/apps/openmw-mp/processors/actor/ProcessorActorAI.hpp @@ -0,0 +1,27 @@ +#ifndef OPENMW_PROCESSORACTORAI_HPP +#define OPENMW_PROCESSORACTORAI_HPP + +#include "apps/openmw-mp/ActorProcessor.hpp" + +namespace mwmp +{ + class ProcessorActorAI : public ActorProcessor + { + public: + ProcessorActorAI() + { + BPP_INIT(ID_ACTOR_AI) + } + + void Do(ActorPacket &packet, Player &player, BaseActorList &actorList) override + { + // Send only to players who have the cell loaded + Cell *serverCell = CellController::get()->getCell(&actorList.cell); + + if (serverCell != nullptr && *serverCell->getAuthority() == actorList.guid) + serverCell->sendToLoaded(&packet, &actorList); + } + }; +} + +#endif //OPENMW_PROCESSORACTORAI_HPP diff --git a/apps/openmw-mp/processors/actor/ProcessorActorAuthority.hpp b/apps/openmw-mp/processors/actor/ProcessorActorAuthority.hpp deleted file mode 100644 index 9d2a196eb..000000000 --- a/apps/openmw-mp/processors/actor/ProcessorActorAuthority.hpp +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef OPENMW_PROCESSORACTORAUTHORITY_HPP -#define OPENMW_PROCESSORACTORAUTHORITY_HPP - -#include "apps/openmw-mp/ActorProcessor.hpp" - -namespace mwmp -{ - class ProcessorActorAuthority : public ActorProcessor - { - public: - ProcessorActorAuthority() - { - BPP_INIT(ID_ACTOR_AUTHORITY) - } - - void Do(ActorPacket &packet, Player &player, BaseActorList &actorList) override - { - // In the current implementation, only the server should be able to send ActorAuthority packets - } - }; -} - -#endif //OPENMW_PROCESSORACTORAUTHORITY_HPP diff --git a/apps/openmw-mp/processors/actor/ProcessorActorDeath.hpp b/apps/openmw-mp/processors/actor/ProcessorActorDeath.hpp new file mode 100644 index 000000000..b7f1aab54 --- /dev/null +++ b/apps/openmw-mp/processors/actor/ProcessorActorDeath.hpp @@ -0,0 +1,27 @@ +#ifndef OPENMW_PROCESSORACTORDEATH_HPP +#define OPENMW_PROCESSORACTORDEATH_HPP + +#include "apps/openmw-mp/ActorProcessor.hpp" + +namespace mwmp +{ + class ProcessorActorDeath : public ActorProcessor + { + public: + ProcessorActorDeath() + { + BPP_INIT(ID_ACTOR_DEATH) + } + + void Do(ActorPacket &packet, Player &player, BaseActorList &actorList) override + { + // Send only to players who have the cell loaded + Cell *serverCell = CellController::get()->getCell(&actorList.cell); + + if (serverCell != nullptr && *serverCell->getAuthority() == actorList.guid) + serverCell->sendToLoaded(&packet, &actorList); + } + }; +} + +#endif //OPENMW_PROCESSORACTORDEATH_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorChatMsg.hpp b/apps/openmw-mp/processors/player/ProcessorChatMsg.hpp index 6a82bc314..b9b86246a 100644 --- a/apps/openmw-mp/processors/player/ProcessorChatMsg.hpp +++ b/apps/openmw-mp/processors/player/ProcessorChatMsg.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PROCESSORPLAYERCHATMSG_HPP #define OPENMW_PROCESSORPLAYERCHATMSG_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp diff --git a/apps/openmw-mp/processors/player/ProcessorGUIMessageBox.hpp b/apps/openmw-mp/processors/player/ProcessorGUIMessageBox.hpp index 61a1f7253..b9ee7d1d4 100644 --- a/apps/openmw-mp/processors/player/ProcessorGUIMessageBox.hpp +++ b/apps/openmw-mp/processors/player/ProcessorGUIMessageBox.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PROCESSORGUIMESSAGEBOX_HPP #define OPENMW_PROCESSORGUIMESSAGEBOX_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp @@ -28,6 +27,4 @@ namespace mwmp }; } - - #endif //OPENMW_PROCESSORGUIMESSAGEBOX_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorGameWeather.hpp b/apps/openmw-mp/processors/player/ProcessorGameWeather.hpp new file mode 100644 index 000000000..342e23eba --- /dev/null +++ b/apps/openmw-mp/processors/player/ProcessorGameWeather.hpp @@ -0,0 +1,23 @@ +#ifndef OPENMW_PROCESSORGAMEWEATHER_HPP +#define OPENMW_PROCESSORGAMEWEATHER_HPP + +#include "apps/openmw-mp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorGameWeather : public PlayerProcessor + { + public: + ProcessorGameWeather() + { + BPP_INIT(ID_GAME_WEATHER) + } + + void Do(PlayerPacket &packet, Player &player) override + { + // Placeholder to be filled in later + } + }; +} + +#endif //OPENMW_PROCESSORGAMEWEATHER_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerAnimFlags.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerAnimFlags.hpp index 676673c56..2b84810c0 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerAnimFlags.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerAnimFlags.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PROCESSORPLAYERANIMFLAGS_HPP #define OPENMW_PROCESSORPLAYERANIMFLAGS_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp @@ -27,7 +26,4 @@ namespace mwmp }; } - - - #endif //OPENMW_PROCESSORPLAYERANIMFLAGS_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerAnimPlay.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerAnimPlay.hpp new file mode 100644 index 000000000..714677255 --- /dev/null +++ b/apps/openmw-mp/processors/player/ProcessorPlayerAnimPlay.hpp @@ -0,0 +1,25 @@ +#ifndef OPENMW_PROCESSORPLAYERANIMPLAY_HPP +#define OPENMW_PROCESSORPLAYERANIMPLAY_HPP + +#include "apps/openmw-mp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerAnimPlay : public PlayerProcessor + { + public: + ProcessorPlayerAnimPlay() + { + BPP_INIT(ID_PLAYER_ANIM_PLAY) + } + + void Do(PlayerPacket &packet, Player &player) override + { + DEBUG_PRINTF(strPacketID.c_str()); + + player.sendToLoaded(&packet); + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERANIMPLAY_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp index 1e22681b2..fc55a71e5 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PROCESSORPLAYERATTACK_HPP #define OPENMW_PROCESSORPLAYERATTACK_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerAttribute.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerAttribute.hpp index 8ed295192..29af23093 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerAttribute.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerAttribute.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PROCESSORPLAYERATTRIBUTE_HPP #define OPENMW_PROCESSORPLAYERATTRIBUTE_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerBook.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerBook.hpp new file mode 100644 index 000000000..87fd097ac --- /dev/null +++ b/apps/openmw-mp/processors/player/ProcessorPlayerBook.hpp @@ -0,0 +1,27 @@ +#ifndef OPENMW_PROCESSORPLAYERBOOK_HPP +#define OPENMW_PROCESSORPLAYERBOOK_HPP + +#include "apps/openmw-mp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerBook : public PlayerProcessor + { + public: + ProcessorPlayerBook() + { + BPP_INIT(ID_PLAYER_BOOK) + } + + void Do(PlayerPacket &packet, Player &player) override + { + DEBUG_PRINTF(strPacketID.c_str()); + + packet.Send(true); + + Script::Call(player.getId()); + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERBOOK_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerBounty.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerBounty.hpp index a2eb49b37..82cb60587 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerBounty.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerBounty.hpp @@ -1,7 +1,6 @@ #ifndef OPENMW_PROCESSORPLAYERBOUNTY_HPP #define OPENMW_PROCESSORPLAYERBOUNTY_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp index d7f2228d1..e87d3d833 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp @@ -78,5 +78,4 @@ namespace mwmp }; } - #endif //OPENMW_PROCESSORPLAYERCELLCHANGE_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerCellState.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerCellState.hpp index 7db32f7a8..35b5d84a6 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerCellState.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerCellState.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 01.04.17. -// - #ifndef OPENMW_PROCESSORPLAYERCELLSTATE_HPP #define OPENMW_PROCESSORPLAYERCELLSTATE_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" #include "apps/openmw-mp/Networking.hpp" #include "apps/openmw-mp/Script/Script.hpp" @@ -32,5 +27,4 @@ namespace mwmp }; } - #endif //OPENMW_PROCESSORPLAYERCELLSTATE_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerCharClass.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerCharClass.hpp index 4b17446eb..29894ac87 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerCharClass.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerCharClass.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PROCESSORPLAYERCHARCLASS_HPP #define OPENMW_PROCESSORPLAYERCHARCLASS_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp @@ -25,5 +24,4 @@ namespace mwmp }; } - #endif //OPENMW_PROCESSORPLAYERCHARCLASS_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerCharGen.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerCharGen.hpp index 04b056086..516fcd9db 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerCharGen.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerCharGen.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PROCESSORPLAYERCHARGEN_HPP #define OPENMW_PROCESSORPLAYERCHARGEN_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp @@ -28,7 +27,4 @@ namespace mwmp }; } - - - #endif //OPENMW_PROCESSORPLAYERCHARGEN_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerDeath.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerDeath.hpp index 09aca899c..94e29a728 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerDeath.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerDeath.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PROCESSORPLAYERDEATH_HPP #define OPENMW_PROCESSORPLAYERDEATH_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" #include diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerDisposition.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerDisposition.hpp new file mode 100644 index 000000000..5d9b82b08 --- /dev/null +++ b/apps/openmw-mp/processors/player/ProcessorPlayerDisposition.hpp @@ -0,0 +1,27 @@ +#ifndef OPENMW_PROCESSORPLAYERDISPOSITION_HPP +#define OPENMW_PROCESSORPLAYERDISPOSITION_HPP + +#include "apps/openmw-mp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerDisposition : public PlayerProcessor + { + public: + ProcessorPlayerDisposition() + { + BPP_INIT(ID_PLAYER_DISPOSITION) + } + + void Do(PlayerPacket &packet, Player &player) override + { + DEBUG_PRINTF(strPacketID.c_str()); + + packet.Send(true); + + Script::Call(player.getId()); + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERDISPOSITION_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerEquipment.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerEquipment.hpp index 5471e4308..eb823e83c 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerEquipment.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerEquipment.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PROCESSORPLAYEREQUIPMENT_HPP #define OPENMW_PROCESSORPLAYEREQUIPMENT_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerFaction.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerFaction.hpp index 304a56410..a8f2821df 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerFaction.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerFaction.hpp @@ -1,7 +1,6 @@ #ifndef OPENMW_PROCESSORPLAYERFACTION_HPP #define OPENMW_PROCESSORPLAYERFACTION_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerInventory.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerInventory.hpp index 124a2c2a2..79719f378 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerInventory.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerInventory.hpp @@ -26,6 +26,4 @@ namespace mwmp }; } - - #endif //OPENMW_PROCESSORPLAYERINVENTORY_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerJournal.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerJournal.hpp index bb783ad32..1ce55d02f 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerJournal.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerJournal.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 01.04.17. -// - #ifndef OPENMW_PROCESSORPLAYERJOURNAL_HPP #define OPENMW_PROCESSORPLAYERJOURNAL_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerLevel.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerLevel.hpp index 5228e26cf..1dafe0566 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerLevel.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerLevel.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 01.04.17. -// - #ifndef OPENMW_PROCESSORPLAYERLEVEL_HPP #define OPENMW_PROCESSORPLAYERLEVEL_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerMap.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerMap.hpp new file mode 100644 index 000000000..e22e21c79 --- /dev/null +++ b/apps/openmw-mp/processors/player/ProcessorPlayerMap.hpp @@ -0,0 +1,27 @@ +#ifndef OPENMW_PROCESSORPLAYERMAP_HPP +#define OPENMW_PROCESSORPLAYERMAP_HPP + +#include "apps/openmw-mp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerMap : public PlayerProcessor + { + public: + ProcessorPlayerMap() + { + BPP_INIT(ID_PLAYER_MAP) + } + + void Do(PlayerPacket &packet, Player &player) override + { + DEBUG_PRINTF(strPacketID.c_str()); + + packet.Send(true); + + Script::Call(player.getId()); + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERMAP_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerRegionChange.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerRegionChange.hpp new file mode 100644 index 000000000..b1b12cbd3 --- /dev/null +++ b/apps/openmw-mp/processors/player/ProcessorPlayerRegionChange.hpp @@ -0,0 +1,25 @@ +#ifndef OPENMW_PROCESSORPLAYERREGIONCHANGE_HPP +#define OPENMW_PROCESSORPLAYERREGIONCHANGE_HPP + +#include "apps/openmw-mp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerRegionChange : public PlayerProcessor + { + public: + ProcessorPlayerRegionChange() + { + BPP_INIT(ID_PLAYER_REGION_CHANGE) + } + + void Do(PlayerPacket &packet, Player &player) override + { + DEBUG_PRINTF(strPacketID.c_str()); + + Script::Call(player.getId()); + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERREGIONCHANGE_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerRest.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerRest.hpp new file mode 100644 index 000000000..c12d7254e --- /dev/null +++ b/apps/openmw-mp/processors/player/ProcessorPlayerRest.hpp @@ -0,0 +1,25 @@ +#ifndef OPENMW_PROCESSORPLAYERREST_HPP +#define OPENMW_PROCESSORPLAYERREST_HPP + +#include "apps/openmw-mp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerRest : public PlayerProcessor + { + public: + ProcessorPlayerRest() + { + BPP_INIT(ID_PLAYER_REST) + } + + void Do(PlayerPacket &packet, Player &player) override + { + DEBUG_PRINTF(strPacketID.c_str()); + + Script::Call(player.getId()); + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERREST_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerResurrect.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerResurrect.hpp index 88c2ba20e..c1d3b1cc9 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerResurrect.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerResurrect.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PROCESSORPLAYERRESURRECT_HPP #define OPENMW_PROCESSORPLAYERRESURRECT_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp @@ -32,6 +31,4 @@ namespace mwmp }; } - - #endif //OPENMW_PROCESSORPLAYERRESURRECT_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerSpeech.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerSpeech.hpp new file mode 100644 index 000000000..8fe268825 --- /dev/null +++ b/apps/openmw-mp/processors/player/ProcessorPlayerSpeech.hpp @@ -0,0 +1,25 @@ +#ifndef OPENMW_PROCESSORPLAYERSPEECH_HPP +#define OPENMW_PROCESSORPLAYERSPEECH_HPP + +#include "apps/openmw-mp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerSpeech : public PlayerProcessor + { + public: + ProcessorPlayerSpeech() + { + BPP_INIT(ID_PLAYER_SPEECH) + } + + void Do(PlayerPacket &packet, Player &player) override + { + DEBUG_PRINTF(strPacketID.c_str()); + + player.sendToLoaded(&packet); + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERSPEECH_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerStatsDynamic.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerStatsDynamic.hpp index 443656d05..ff45cad49 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerStatsDynamic.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerStatsDynamic.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PROCESSORPLAYERSTATS_DYNAMIC_HPP #define OPENMW_PROCESSORPLAYERSTATS_DYNAMIC_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp @@ -27,5 +26,4 @@ namespace mwmp }; } - #endif //OPENMW_PROCESSORPLAYERSTATS_DYNAMIC_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerTopic.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerTopic.hpp index 1518cdea9..440f3df74 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerTopic.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerTopic.hpp @@ -1,7 +1,6 @@ #ifndef OPENMW_PROCESSORPLAYERTOPIC_HPP #define OPENMW_PROCESSORPLAYERTOPIC_HPP - #include "apps/openmw-mp/PlayerProcessor.hpp" namespace mwmp diff --git a/apps/openmw-mp/processors/world/ProcessorContainer.hpp b/apps/openmw-mp/processors/world/ProcessorContainer.hpp index 7dcf614e5..d3878e802 100644 --- a/apps/openmw-mp/processors/world/ProcessorContainer.hpp +++ b/apps/openmw-mp/processors/world/ProcessorContainer.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 03.04.17. -// - #ifndef OPENMW_PROCESSORCONTAINER_HPP #define OPENMW_PROCESSORCONTAINER_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorDoorState.hpp b/apps/openmw-mp/processors/world/ProcessorDoorState.hpp index 4a140b33b..7f382eb44 100644 --- a/apps/openmw-mp/processors/world/ProcessorDoorState.hpp +++ b/apps/openmw-mp/processors/world/ProcessorDoorState.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 03.04.17. -// - #ifndef OPENMW_PROCESSORDOORSTATE_HPP #define OPENMW_PROCESSORDOORSTATE_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorMusicPlay.hpp b/apps/openmw-mp/processors/world/ProcessorMusicPlay.hpp index d9fd8fa2a..aef796021 100644 --- a/apps/openmw-mp/processors/world/ProcessorMusicPlay.hpp +++ b/apps/openmw-mp/processors/world/ProcessorMusicPlay.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 03.04.17. -// - #ifndef OPENMW_PROCESSORMUSICPLAY_HPP #define OPENMW_PROCESSORMUSICPLAY_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectAnimPlay.hpp b/apps/openmw-mp/processors/world/ProcessorObjectAnimPlay.hpp index 303839b56..e9bf7b54f 100644 --- a/apps/openmw-mp/processors/world/ProcessorObjectAnimPlay.hpp +++ b/apps/openmw-mp/processors/world/ProcessorObjectAnimPlay.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 03.04.17. -// - #ifndef OPENMW_PROCESSOROBJECTANIMPLAY_HPP #define OPENMW_PROCESSOROBJECTANIMPLAY_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectDelete.hpp b/apps/openmw-mp/processors/world/ProcessorObjectDelete.hpp index 7cf2617e9..5754dbc88 100644 --- a/apps/openmw-mp/processors/world/ProcessorObjectDelete.hpp +++ b/apps/openmw-mp/processors/world/ProcessorObjectDelete.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 03.04.17. -// - #ifndef OPENMW_PROCESSOROBJECTDELETE_HPP #define OPENMW_PROCESSOROBJECTDELETE_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectLock.hpp b/apps/openmw-mp/processors/world/ProcessorObjectLock.hpp index 53b374f47..035ba0746 100644 --- a/apps/openmw-mp/processors/world/ProcessorObjectLock.hpp +++ b/apps/openmw-mp/processors/world/ProcessorObjectLock.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 03.04.17. -// - #ifndef OPENMW_PROCESSOROBJECTLOCK_HPP #define OPENMW_PROCESSOROBJECTLOCK_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectMove.hpp b/apps/openmw-mp/processors/world/ProcessorObjectMove.hpp index 23845e564..77deaa7ce 100644 --- a/apps/openmw-mp/processors/world/ProcessorObjectMove.hpp +++ b/apps/openmw-mp/processors/world/ProcessorObjectMove.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 03.04.17. -// - #ifndef OPENMW_PROCESSOROBJECTMOVE_HPP #define OPENMW_PROCESSOROBJECTMOVE_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectPlace.hpp b/apps/openmw-mp/processors/world/ProcessorObjectPlace.hpp index 19a4123ce..93d5a849f 100644 --- a/apps/openmw-mp/processors/world/ProcessorObjectPlace.hpp +++ b/apps/openmw-mp/processors/world/ProcessorObjectPlace.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 03.04.17. -// - #ifndef OPENMW_PROCESSOROBJECTPLACE_HPP #define OPENMW_PROCESSOROBJECTPLACE_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectRotate.hpp b/apps/openmw-mp/processors/world/ProcessorObjectRotate.hpp index bc16b7344..42094ff92 100644 --- a/apps/openmw-mp/processors/world/ProcessorObjectRotate.hpp +++ b/apps/openmw-mp/processors/world/ProcessorObjectRotate.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 03.04.17. -// - #ifndef OPENMW_PROCESSOROBJECTROTATE_HPP #define OPENMW_PROCESSOROBJECTROTATE_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectScale.hpp b/apps/openmw-mp/processors/world/ProcessorObjectScale.hpp index 8166dc855..39418e15a 100644 --- a/apps/openmw-mp/processors/world/ProcessorObjectScale.hpp +++ b/apps/openmw-mp/processors/world/ProcessorObjectScale.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 03.04.17. -// - #ifndef OPENMW_PROCESSOROBJECTSCALE_HPP #define OPENMW_PROCESSOROBJECTSCALE_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectSpawn.hpp b/apps/openmw-mp/processors/world/ProcessorObjectSpawn.hpp new file mode 100644 index 000000000..1207d803d --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorObjectSpawn.hpp @@ -0,0 +1,36 @@ +#ifndef OPENMW_PROCESSOROBJECTSPAWN_HPP +#define OPENMW_PROCESSOROBJECTSPAWN_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" +#include + +namespace mwmp +{ + class ProcessorObjectSpawn : public WorldProcessor + { + public: + ProcessorObjectSpawn() + { + BPP_INIT(ID_OBJECT_SPAWN) + } + + 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.worldObjectCount; i++) + { + event.worldObjects.at(i).mpNum = mwmp::Networking::getPtr()->incrementMpNum(); + } + + // Send this packet back to the original sender with the mpNum generation from above, + // then send it to the other players + packet.Send(false); + packet.Send(true); + + Script::Call(player.getId(), event.cell.getDescription().c_str()); + } + }; +} + +#endif //OPENMW_PROCESSOROBJECTSPAWN_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorScriptGlobalShort.hpp b/apps/openmw-mp/processors/world/ProcessorScriptGlobalShort.hpp index 791f4ede5..ffa7b2039 100644 --- a/apps/openmw-mp/processors/world/ProcessorScriptGlobalShort.hpp +++ b/apps/openmw-mp/processors/world/ProcessorScriptGlobalShort.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 03.04.17. -// - #ifndef OPENMW_PROCESSORSCRIPTGLOBALSHORT_HPP #define OPENMW_PROCESSORSCRIPTGLOBALSHORT_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorScriptLocalFloat.hpp b/apps/openmw-mp/processors/world/ProcessorScriptLocalFloat.hpp index 0d12e9e81..ab6be90b6 100644 --- a/apps/openmw-mp/processors/world/ProcessorScriptLocalFloat.hpp +++ b/apps/openmw-mp/processors/world/ProcessorScriptLocalFloat.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 03.04.17. -// - #ifndef OPENMW_PROCESSORSCRIPTLOCALFLOAT_HPP #define OPENMW_PROCESSORSCRIPTLOCALFLOAT_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorScriptLocalShort.hpp b/apps/openmw-mp/processors/world/ProcessorScriptLocalShort.hpp index 88053d982..4c775e51f 100644 --- a/apps/openmw-mp/processors/world/ProcessorScriptLocalShort.hpp +++ b/apps/openmw-mp/processors/world/ProcessorScriptLocalShort.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 03.04.17. -// - #ifndef OPENMW_PROCESSORSCRIPTLOCALSHORT_HPP #define OPENMW_PROCESSORSCRIPTLOCALSHORT_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorScriptMemberShort.hpp b/apps/openmw-mp/processors/world/ProcessorScriptMemberShort.hpp index 29bf9ec6d..dbdb1341b 100644 --- a/apps/openmw-mp/processors/world/ProcessorScriptMemberShort.hpp +++ b/apps/openmw-mp/processors/world/ProcessorScriptMemberShort.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 03.04.17. -// - #ifndef OPENMW_PROCESSORSCRIPTMEMBERSHORT_HPP #define OPENMW_PROCESSORSCRIPTMEMBERSHORT_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorVideoPlay.hpp b/apps/openmw-mp/processors/world/ProcessorVideoPlay.hpp index f38e75296..1ae82be31 100644 --- a/apps/openmw-mp/processors/world/ProcessorVideoPlay.hpp +++ b/apps/openmw-mp/processors/world/ProcessorVideoPlay.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 03.04.17. -// - #ifndef OPENMW_PROCESSORVIDEOPLAY_HPP #define OPENMW_PROCESSORVIDEOPLAY_HPP diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 28809b614..53cf04cc6 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -101,23 +101,24 @@ add_openmw_dir (mwmp Main Networking LocalPlayer DedicatedPlayer PlayerList Loca BaseClientPacketProcessor PlayerProcessor WorldProcessor ActorProcessor ProcessorInitializer ) -add_openmw_dir (mwmp/processors/actor ProcessorActorAnimFlags ProcessorActorAnimPlay ProcessorActorAttack - ProcessorActorAuthority ProcessorActorCellChange ProcessorActorEquipment ProcessorActorList ProcessorActorPosition - ProcessorActorSpeech ProcessorActorStatsDynamic ProcessorActorTest +add_openmw_dir (mwmp/processors/actor ProcessorActorAI ProcessorActorAnimFlags ProcessorActorAnimPlay ProcessorActorAttack + ProcessorActorAuthority ProcessorActorCellChange ProcessorActorDeath ProcessorActorEquipment ProcessorActorList + ProcessorActorPosition ProcessorActorSpeech ProcessorActorStatsDynamic ProcessorActorTest ) -add_openmw_dir (mwmp/processors/player ProcessorChatMessage ProcessorGameConsole ProcessorGameTime ProcessorGUIMessageBox - ProcessorHandshake ProcessorUserDisconnected ProcessorUserMyID ProcessorPlayerBaseInfo ProcessorPlayerAnimFlags - ProcessorPlayerAttack ProcessorPlayerAttribute ProcessorPlayerBounty ProcessorPlayerCellChange ProcessorPlayerCellState - ProcessorPlayerCharClass ProcessorPlayerCharGen ProcessorPlayerDeath ProcessorPlayerEquipment ProcessorPlayerFaction - ProcessorPlayerInventory ProcessorPlayerJournal ProcessorPlayerLevel ProcessorPlayerPosition ProcessorPlayerResurrect - ProcessorPlayerSkill ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic ProcessorPlayerTopic +add_openmw_dir (mwmp/processors/player ProcessorChatMessage ProcessorGUIMessageBox ProcessorHandshake ProcessorUserDisconnected + ProcessorUserMyID ProcessorGameConsole ProcessorGameTime ProcessorGameWeather ProcessorPlayerBaseInfo + ProcessorPlayerAnimFlags ProcessorPlayerAnimPlay ProcessorPlayerAttack ProcessorPlayerAttribute ProcessorPlayerBook + ProcessorPlayerBounty ProcessorPlayerCellChange ProcessorPlayerCellState ProcessorPlayerCharClass ProcessorPlayerCharGen + ProcessorPlayerDeath ProcessorPlayerDisposition ProcessorPlayerEquipment ProcessorPlayerFaction ProcessorPlayerInventory + ProcessorPlayerJournal ProcessorPlayerLevel ProcessorPlayerMap ProcessorPlayerPosition ProcessorPlayerResurrect + ProcessorPlayerSkill ProcessorPlayerSpeech ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic ProcessorPlayerTopic ) add_openmw_dir (mwmp/processors/world BaseObjectProcessor ProcessorContainer ProcessorDoorState ProcessorMusicPlay - ProcessorObjectAnimPlay ProcessorObjectDelete ProcessorObjectLock ProcessorObjectMove ProcessorObjectPlace - ProcessorObjectRotate ProcessorObjectScale ProcessorObjectTrap ProcessorScriptGlobalShort ProcessorScriptLocalFloat - ProcessorScriptLocalShort ProcessorScriptMemberShort ProcessorVideoPlay + ProcessorVideoPlay ProcessorObjectAnimPlay ProcessorObjectDelete ProcessorObjectLock ProcessorObjectMove + ProcessorObjectPlace ProcessorObjectRotate ProcessorObjectScale ProcessorObjectSpawn ProcessorObjectTrap + ProcessorScriptLocalShort ProcessorScriptLocalFloat ProcessorScriptMemberShort ProcessorScriptGlobalShort ) # Main executable diff --git a/apps/openmw/mwmp/ProcessorInitializer.cpp b/apps/openmw/mwmp/ProcessorInitializer.cpp index bd8e4e011..8c43c2ac0 100644 --- a/apps/openmw/mwmp/ProcessorInitializer.cpp +++ b/apps/openmw/mwmp/ProcessorInitializer.cpp @@ -7,29 +7,37 @@ #include "PlayerProcessor.hpp" #include "processors/player/ProcessorChatMessage.hpp" -#include "processors/player/ProcessorGameConsole.hpp" -#include "processors/player/ProcessorGameTime.hpp" #include "processors/player/ProcessorGUIMessageBox.hpp" #include "processors/player/ProcessorHandshake.hpp" #include "processors/player/ProcessorUserDisconnected.hpp" +#include "processors/player/ProcessorGameConsole.hpp" +#include "processors/player/ProcessorGameTime.hpp" +#include "processors/player/ProcessorGameWeather.hpp" #include "processors/player/ProcessorPlayerBaseInfo.hpp" #include "processors/player/ProcessorPlayerCharGen.hpp" #include "processors/player/ProcessorPlayerAnimFlags.hpp" +#include "processors/player/ProcessorPlayerAnimPlay.hpp" #include "processors/player/ProcessorPlayerAttack.hpp" #include "processors/player/ProcessorPlayerAttribute.hpp" +#include "processors/player/ProcessorPlayerBook.hpp" #include "processors/player/ProcessorPlayerBounty.hpp" #include "processors/player/ProcessorPlayerCellChange.hpp" #include "processors/player/ProcessorPlayerCellState.hpp" #include "processors/player/ProcessorPlayerCharClass.hpp" #include "processors/player/ProcessorPlayerDeath.hpp" +#include "processors/player/ProcessorPlayerDisposition.hpp" #include "processors/player/ProcessorPlayerEquipment.hpp" #include "processors/player/ProcessorPlayerFaction.hpp" #include "processors/player/ProcessorPlayerInventory.hpp" #include "processors/player/ProcessorPlayerJournal.hpp" #include "processors/player/ProcessorPlayerLevel.hpp" +#include "processors/player/ProcessorPlayerMap.hpp" #include "processors/player/ProcessorPlayerPosition.hpp" +#include "processors/player/ProcessorPlayerRegionAuthority.hpp" +#include "processors/player/ProcessorPlayerRest.hpp" #include "processors/player/ProcessorPlayerResurrect.hpp" #include "processors/player/ProcessorPlayerSkill.hpp" +#include "processors/player/ProcessorPlayerSpeech.hpp" #include "processors/player/ProcessorPlayerSpellbook.hpp" #include "processors/player/ProcessorPlayerStatsDynamic.hpp" #include "processors/player/ProcessorPlayerTopic.hpp" @@ -45,6 +53,7 @@ #include "processors/world/ProcessorObjectPlace.hpp" #include "processors/world/ProcessorObjectRotate.hpp" #include "processors/world/ProcessorObjectScale.hpp" +#include "processors/world/ProcessorObjectSpawn.hpp" #include "processors/world/ProcessorObjectTrap.hpp" #include "processors/world/ProcessorScriptLocalShort.hpp" #include "processors/world/ProcessorScriptLocalFloat.hpp" @@ -52,11 +61,13 @@ #include "processors/world/ProcessorScriptGlobalShort.hpp" #include "processors/world/ProcessorVideoPlay.hpp" +#include "processors/actor/ProcessorActorAI.hpp" #include "processors/actor/ProcessorActorAnimFlags.hpp" #include "processors/actor/ProcessorActorAnimPlay.hpp" #include "processors/actor/ProcessorActorAttack.hpp" #include "processors/actor/ProcessorActorAuthority.hpp" #include "processors/actor/ProcessorActorCellChange.hpp" +#include "processors/actor/ProcessorActorDeath.hpp" #include "processors/actor/ProcessorActorEquipment.hpp" #include "processors/actor/ProcessorActorList.hpp" #include "processors/actor/ProcessorActorPosition.hpp" @@ -69,29 +80,37 @@ using namespace mwmp; void ProcessorInitializer() { PlayerProcessor::AddProcessor(new ProcessorChatMessage()); - PlayerProcessor::AddProcessor(new ProcessorGameConsole()); - PlayerProcessor::AddProcessor(new ProcessorGameTime()); PlayerProcessor::AddProcessor(new ProcessorGUIMessageBox()); PlayerProcessor::AddProcessor(new ProcessorHandshake()); PlayerProcessor::AddProcessor(new ProcessorUserDisconnected()); + PlayerProcessor::AddProcessor(new ProcessorGameConsole()); + PlayerProcessor::AddProcessor(new ProcessorGameTime()); + PlayerProcessor::AddProcessor(new ProcessorGameWeather()); PlayerProcessor::AddProcessor(new ProcessorPlayerBaseInfo()); PlayerProcessor::AddProcessor(new ProcessorPlayerCharGen()); PlayerProcessor::AddProcessor(new ProcessorPlayerAnimFlags()); + PlayerProcessor::AddProcessor(new ProcessorPlayerAnimPlay()); PlayerProcessor::AddProcessor(new ProcessorPlayerAttack()); PlayerProcessor::AddProcessor(new ProcessorPlayerAttribute()); + PlayerProcessor::AddProcessor(new ProcessorPlayerBook()); PlayerProcessor::AddProcessor(new ProcessorPlayerBounty()); PlayerProcessor::AddProcessor(new ProcessorPlayerCellChange()); PlayerProcessor::AddProcessor(new ProcessorPlayerCellState()); PlayerProcessor::AddProcessor(new ProcessorPlayerCharClass()); PlayerProcessor::AddProcessor(new ProcessorPlayerDeath()); + PlayerProcessor::AddProcessor(new ProcessorPlayerDisposition()); PlayerProcessor::AddProcessor(new ProcessorPlayerEquipment()); PlayerProcessor::AddProcessor(new ProcessorPlayerFaction()); PlayerProcessor::AddProcessor(new ProcessorPlayerInventory()); PlayerProcessor::AddProcessor(new ProcessorPlayerJournal()); PlayerProcessor::AddProcessor(new ProcessorPlayerLevel()); + PlayerProcessor::AddProcessor(new ProcessorPlayerMap()); PlayerProcessor::AddProcessor(new ProcessorPlayerPosition()); + PlayerProcessor::AddProcessor(new ProcessorPlayerRegionAuthority()); + PlayerProcessor::AddProcessor(new ProcessorPlayerRest()); PlayerProcessor::AddProcessor(new ProcessorPlayerResurrect()); PlayerProcessor::AddProcessor(new ProcessorPlayerSkill()); + PlayerProcessor::AddProcessor(new ProcessorPlayerSpeech()); PlayerProcessor::AddProcessor(new ProcessorPlayerSpellbook()); PlayerProcessor::AddProcessor(new ProcessorPlayerStatsDynamic()); PlayerProcessor::AddProcessor(new ProcessorPlayerTopic()); @@ -106,6 +125,7 @@ void ProcessorInitializer() WorldProcessor::AddProcessor(new ProcessorObjectPlace()); WorldProcessor::AddProcessor(new ProcessorObjectRotate()); WorldProcessor::AddProcessor(new ProcessorObjectScale()); + WorldProcessor::AddProcessor(new ProcessorObjectSpawn()); WorldProcessor::AddProcessor(new ProcessorObjectTrap()); WorldProcessor::AddProcessor(new ProcessorScriptLocalShort()); WorldProcessor::AddProcessor(new ProcessorScriptLocalFloat()); @@ -113,11 +133,13 @@ void ProcessorInitializer() WorldProcessor::AddProcessor(new ProcessorScriptGlobalShort()); WorldProcessor::AddProcessor(new ProcessorVideoPlay()); + ActorProcessor::AddProcessor(new ProcessorActorAI()); ActorProcessor::AddProcessor(new ProcessorActorAnimFlags()); ActorProcessor::AddProcessor(new ProcessorActorAnimPlay()); ActorProcessor::AddProcessor(new ProcessorActorAttack()); ActorProcessor::AddProcessor(new ProcessorActorAuthority()); ActorProcessor::AddProcessor(new ProcessorActorCellChange()); + ActorProcessor::AddProcessor(new ProcessorActorDeath()); ActorProcessor::AddProcessor(new ProcessorActorEquipment()); ActorProcessor::AddProcessor(new ProcessorActorList()); ActorProcessor::AddProcessor(new ProcessorActorPosition()); diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorAI.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorAI.hpp new file mode 100644 index 000000000..033c6d69c --- /dev/null +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorAI.hpp @@ -0,0 +1,25 @@ +#ifndef OPENMW_PROCESSORACTORAI_HPP +#define OPENMW_PROCESSORACTORAI_HPP + +#include "apps/openmw/mwmp/ActorProcessor.hpp" +#include "apps/openmw/mwmp/Main.hpp" +#include "apps/openmw/mwmp/CellController.hpp" + +namespace mwmp +{ + class ProcessorActorAI : public ActorProcessor + { + public: + ProcessorActorAI() + { + BPP_INIT(ID_ACTOR_AI); + } + + virtual void Do(ActorPacket &packet, ActorList &actorList) + { + //Main::get().getCellController()->readAI(actorList); + } + }; +} + +#endif //OPENMW_PROCESSORACTORAI_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorAnimFlags.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorAnimFlags.hpp index eb39026ef..440ec540e 100644 --- a/apps/openmw/mwmp/processors/actor/ProcessorActorAnimFlags.hpp +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorAnimFlags.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORACTORANIMFLAGS_HPP #define OPENMW_PROCESSORACTORANIMFLAGS_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorAnimPlay.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorAnimPlay.hpp index 772694a5c..b5325e796 100644 --- a/apps/openmw/mwmp/processors/actor/ProcessorActorAnimPlay.hpp +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorAnimPlay.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORACTORANIMPLAY_HPP #define OPENMW_PROCESSORACTORANIMPLAY_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorAttack.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorAttack.hpp index a81182ae9..4c465b2d7 100644 --- a/apps/openmw/mwmp/processors/actor/ProcessorActorAttack.hpp +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorAttack.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORACTORATTACK_HPP #define OPENMW_PROCESSORACTORATTACK_HPP - #include "apps/openmw/mwmp/ActorProcessor.hpp" #include "apps/openmw/mwmp/Main.hpp" #include "apps/openmw/mwmp/CellController.hpp" diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorAuthority.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorAuthority.hpp index 87ccd7a62..7d043bd59 100644 --- a/apps/openmw/mwmp/processors/actor/ProcessorActorAuthority.hpp +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorAuthority.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORACTORAUTHORITY_HPP #define OPENMW_PROCESSORACTORAUTHORITY_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorCellChange.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorCellChange.hpp index 7d8cb85a0..6636a32f8 100644 --- a/apps/openmw/mwmp/processors/actor/ProcessorActorCellChange.hpp +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorCellChange.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORACTORCELLCHANGE_HPP #define OPENMW_PROCESSORACTORCELLCHANGE_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorDeath.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorDeath.hpp new file mode 100644 index 000000000..5ef8bd51d --- /dev/null +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorDeath.hpp @@ -0,0 +1,25 @@ +#ifndef OPENMW_PROCESSORACTORDEATH_HPP +#define OPENMW_PROCESSORACTORDEATH_HPP + +#include "apps/openmw/mwmp/ActorProcessor.hpp" +#include "apps/openmw/mwmp/Main.hpp" +#include "apps/openmw/mwmp/CellController.hpp" + +namespace mwmp +{ + class ProcessorActorDeath : public ActorProcessor + { + public: + ProcessorActorDeath() + { + BPP_INIT(ID_ACTOR_DEATH); + } + + virtual void Do(ActorPacket &packet, ActorList &actorList) + { + //Main::get().getCellController()->readDeath(actorList); + } + }; +} + +#endif //OPENMW_PROCESSORACTORDEATH_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorEquipment.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorEquipment.hpp index 10b05d53e..01dbfd437 100644 --- a/apps/openmw/mwmp/processors/actor/ProcessorActorEquipment.hpp +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorEquipment.hpp @@ -1,7 +1,6 @@ #ifndef OPENMW_PROCESSORACTOREQUIPMENT_HPP #define OPENMW_PROCESSORACTOREQUIPMENT_HPP - #include "apps/openmw/mwmp/ActorProcessor.hpp" #include "apps/openmw/mwmp/Main.hpp" #include "apps/openmw/mwmp/CellController.hpp" diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorList.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorList.hpp index 6b13287e5..9de8a01b2 100644 --- a/apps/openmw/mwmp/processors/actor/ProcessorActorList.hpp +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorList.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORACTORLIST_HPP #define OPENMW_PROCESSORACTORLIST_HPP diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorPosition.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorPosition.hpp index 1a7985ca3..362a9e278 100644 --- a/apps/openmw/mwmp/processors/actor/ProcessorActorPosition.hpp +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorPosition.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORACTORPOSITION_HPP #define OPENMW_PROCESSORACTORPOSITION_HPP - #include "apps/openmw/mwmp/ActorProcessor.hpp" #include "apps/openmw/mwmp/Main.hpp" #include "apps/openmw/mwmp/CellController.hpp" diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorSpeech.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorSpeech.hpp index b2f64b85c..9ab03a876 100644 --- a/apps/openmw/mwmp/processors/actor/ProcessorActorSpeech.hpp +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorSpeech.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORACTORSPEECH_HPP #define OPENMW_PROCESSORACTORSPEECH_HPP - #include "apps/openmw/mwmp/ActorProcessor.hpp" #include "apps/openmw/mwmp/Main.hpp" #include "apps/openmw/mwmp/CellController.hpp" diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorStatsDynamic.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorStatsDynamic.hpp index 642e1fece..040283ce7 100644 --- a/apps/openmw/mwmp/processors/actor/ProcessorActorStatsDynamic.hpp +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorStatsDynamic.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORACTORSTATSDYNAMIC_HPP #define OPENMW_PROCESSORACTORSTATSDYNAMIC_HPP - #include "apps/openmw/mwmp/ActorProcessor.hpp" #include "apps/openmw/mwmp/Main.hpp" #include "apps/openmw/mwmp/CellController.hpp" diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorTest.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorTest.hpp index 92f7b854f..f3b6a62c2 100644 --- a/apps/openmw/mwmp/processors/actor/ProcessorActorTest.hpp +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorTest.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORACTORTEST_HPP #define OPENMW_PROCESSORACTORTEST_HPP - #include "apps/openmw/mwmp/ActorProcessor.hpp" #include "apps/openmw/mwmp/Main.hpp" #include "apps/openmw/mwmp/CellController.hpp" diff --git a/apps/openmw/mwmp/processors/player/ProcessorGameWeather.hpp b/apps/openmw/mwmp/processors/player/ProcessorGameWeather.hpp new file mode 100644 index 000000000..f1e56ba5c --- /dev/null +++ b/apps/openmw/mwmp/processors/player/ProcessorGameWeather.hpp @@ -0,0 +1,23 @@ +#ifndef OPENMW_PROCESSORGAMEWEATHER_HPP +#define OPENMW_PROCESSORGAMEWEATHER_HPP + +#include "apps/openmw/mwmp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorGameWeather : public PlayerProcessor + { + public: + ProcessorGameWeather() + { + BPP_INIT(ID_GAME_WEATHER) + } + + virtual void Do(PlayerPacket &packet, BasePlayer *player) + { + // Placeholder to be filled in later + } + }; +} + +#endif //OPENMW_PROCESSORGAMEWEATHER_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerAnimPlay.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerAnimPlay.hpp new file mode 100644 index 000000000..318909f78 --- /dev/null +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerAnimPlay.hpp @@ -0,0 +1,23 @@ +#ifndef OPENMW_PROCESSORPLAYERANIMPLAY_HPP +#define OPENMW_PROCESSORPLAYERANIMPLAY_HPP + +#include "apps/openmw/mwmp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerAnimPlay : public PlayerProcessor + { + public: + ProcessorPlayerAnimPlay() + { + BPP_INIT(ID_PLAYER_ANIM_PLAY) + } + + virtual void Do(PlayerPacket &packet, BasePlayer *player) + { + // Placeholder to be filled in later + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERANIMPLAY_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerBook.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerBook.hpp new file mode 100644 index 000000000..e609ddbf1 --- /dev/null +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerBook.hpp @@ -0,0 +1,23 @@ +#ifndef OPENMW_PROCESSORPLAYERBOOK_HPP +#define OPENMW_PROCESSORPLAYERBOOK_HPP + +#include "apps/openmw/mwmp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerBook : public PlayerProcessor + { + public: + ProcessorPlayerBook() + { + BPP_INIT(ID_PLAYER_BOOK) + } + + virtual void Do(PlayerPacket &packet, BasePlayer *player) + { + // Placeholder to be filled in later + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERBOOK_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerBounty.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerBounty.hpp index 51f52021d..c36426009 100644 --- a/apps/openmw/mwmp/processors/player/ProcessorPlayerBounty.hpp +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerBounty.hpp @@ -1,7 +1,6 @@ #ifndef OPENMW_PROCESSORPLAYERBOUNTY_HPP #define OPENMW_PROCESSORPLAYERBOUNTY_HPP - #include "apps/openmw/mwmp/PlayerProcessor.hpp" namespace mwmp @@ -34,5 +33,4 @@ namespace mwmp }; } - #endif //OPENMW_PROCESSORPLAYERBOUNTY_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerCellState.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerCellState.hpp index b7c124fed..f22ea7756 100644 --- a/apps/openmw/mwmp/processors/player/ProcessorPlayerCellState.hpp +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerCellState.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 16.04.17. -// - #ifndef OPENMW_PROCESSORPLAYERCELLSTATE_HPP #define OPENMW_PROCESSORPLAYERCELLSTATE_HPP - #include "apps/openmw/mwmp/PlayerProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerDisposition.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerDisposition.hpp new file mode 100644 index 000000000..8c732f6b3 --- /dev/null +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerDisposition.hpp @@ -0,0 +1,23 @@ +#ifndef OPENMW_PROCESSORPLAYERDISPOSITION_HPP +#define OPENMW_PROCESSORPLAYERDISPOSITION_HPP + +#include "apps/openmw/mwmp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerDisposition : public PlayerProcessor + { + public: + ProcessorPlayerDisposition() + { + BPP_INIT(ID_PLAYER_DISPOSITION) + } + + virtual void Do(PlayerPacket &packet, BasePlayer *player) + { + // Placeholder to be filled in later + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERDISPOSITION_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerFaction.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerFaction.hpp index 5e9654539..0e96ec8e4 100644 --- a/apps/openmw/mwmp/processors/player/ProcessorPlayerFaction.hpp +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerFaction.hpp @@ -1,7 +1,6 @@ #ifndef OPENMW_PROCESSORPLAYERFACTION_HPP #define OPENMW_PROCESSORPLAYERFACTION_HPP - #include "apps/openmw/mwmp/PlayerProcessor.hpp" namespace mwmp @@ -28,5 +27,4 @@ namespace mwmp }; } - #endif //OPENMW_PROCESSORPLAYERFACTION_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerInventory.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerInventory.hpp index 150d7100d..b56d8ecb0 100644 --- a/apps/openmw/mwmp/processors/player/ProcessorPlayerInventory.hpp +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerInventory.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PROCESSORPLAYERUPDATEINVENTORY_HPP #define OPENMW_PROCESSORPLAYERUPDATEINVENTORY_HPP - #include "apps/openmw/mwmp/PlayerProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerJournal.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerJournal.hpp index 803301b5b..3fbcbd5d9 100644 --- a/apps/openmw/mwmp/processors/player/ProcessorPlayerJournal.hpp +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerJournal.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 16.04.17. -// - #ifndef OPENMW_PROCESSORPLAYERJOURNAL_HPP #define OPENMW_PROCESSORPLAYERJOURNAL_HPP - #include "apps/openmw/mwmp/PlayerProcessor.hpp" namespace mwmp @@ -32,5 +27,4 @@ namespace mwmp }; } - #endif //OPENMW_PROCESSORPLAYERJOURNAL_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerMap.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerMap.hpp new file mode 100644 index 000000000..fdd112260 --- /dev/null +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerMap.hpp @@ -0,0 +1,23 @@ +#ifndef OPENMW_PROCESSORPLAYERMAP_HPP +#define OPENMW_PROCESSORPLAYERMAP_HPP + +#include "apps/openmw/mwmp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerMap : public PlayerProcessor + { + public: + ProcessorPlayerMap() + { + BPP_INIT(ID_PLAYER_MAP) + } + + virtual void Do(PlayerPacket &packet, BasePlayer *player) + { + // Placeholder to be filled in later + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERMAP_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerRegionAuthority.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerRegionAuthority.hpp new file mode 100644 index 000000000..f0e512b7c --- /dev/null +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerRegionAuthority.hpp @@ -0,0 +1,23 @@ +#ifndef OPENMW_PROCESSORPLAYERREGIONAUTHORITY_HPP +#define OPENMW_PROCESSORPLAYERREGIONAUTHORITY_HPP + +#include "apps/openmw/mwmp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerRegionAuthority : public PlayerProcessor + { + public: + ProcessorPlayerRegionAuthority() + { + BPP_INIT(ID_PLAYER_REGION_AUTHORITY) + } + + virtual void Do(PlayerPacket &packet, BasePlayer *player) + { + // Placeholder to be filled in later + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERREGIONAUTHORITY_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerRest.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerRest.hpp new file mode 100644 index 000000000..17d36f391 --- /dev/null +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerRest.hpp @@ -0,0 +1,23 @@ +#ifndef OPENMW_PROCESSORPLAYERREST_HPP +#define OPENMW_PROCESSORPLAYERREST_HPP + +#include "apps/openmw/mwmp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerRest : public PlayerProcessor + { + public: + ProcessorPlayerRest() + { + BPP_INIT(ID_PLAYER_REST) + } + + virtual void Do(PlayerPacket &packet, BasePlayer *player) + { + // Placeholder to be filled in later + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERREST_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerSpeech.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerSpeech.hpp new file mode 100644 index 000000000..fc30be70d --- /dev/null +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerSpeech.hpp @@ -0,0 +1,23 @@ +#ifndef OPENMW_PROCESSORPLAYERSPEECH_HPP +#define OPENMW_PROCESSORPLAYERSPEECH_HPP + +#include "apps/openmw/mwmp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerSpeech : public PlayerProcessor + { + public: + ProcessorPlayerSpeech() + { + BPP_INIT(ID_PLAYER_SPEECH) + } + + virtual void Do(PlayerPacket &packet, BasePlayer *player) + { + // Placeholder to be filled in later + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERSPEECH_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerTopic.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerTopic.hpp index 4a087a346..99141bf1a 100644 --- a/apps/openmw/mwmp/processors/player/ProcessorPlayerTopic.hpp +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerTopic.hpp @@ -1,7 +1,6 @@ #ifndef OPENMW_PROCESSORPLAYERTOPIC_HPP #define OPENMW_PROCESSORPLAYERTOPIC_HPP - #include "apps/openmw/mwmp/PlayerProcessor.hpp" namespace mwmp @@ -28,5 +27,4 @@ namespace mwmp }; } - #endif //OPENMW_PROCESSORPLAYERTOPIC_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorUserDisconnected.hpp b/apps/openmw/mwmp/processors/player/ProcessorUserDisconnected.hpp index dca44300e..f239918a7 100644 --- a/apps/openmw/mwmp/processors/player/ProcessorUserDisconnected.hpp +++ b/apps/openmw/mwmp/processors/player/ProcessorUserDisconnected.hpp @@ -7,6 +7,7 @@ #include "apps/openmw/mwmp/PlayerProcessor.hpp" +#include #include "apps/openmw/mwstate/statemanagerimp.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/world/ProcessorContainer.hpp b/apps/openmw/mwmp/processors/world/ProcessorContainer.hpp index e0ee32b16..cb2a3b4c8 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorContainer.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorContainer.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORCONTAINER_HPP #define OPENMW_PROCESSORCONTAINER_HPP diff --git a/apps/openmw/mwmp/processors/world/ProcessorDoorState.hpp b/apps/openmw/mwmp/processors/world/ProcessorDoorState.hpp index 17434327d..bae362aaa 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorDoorState.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorDoorState.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSDOORSTATE_HPP #define OPENMW_PROCESSDOORSTATE_HPP - #include "BaseObjectProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/world/ProcessorMusicPlay.hpp b/apps/openmw/mwmp/processors/world/ProcessorMusicPlay.hpp index efbe2d0f2..255d93a34 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorMusicPlay.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorMusicPlay.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORMUSICPLAY_HPP #define OPENMW_PROCESSORMUSICPLAY_HPP - #include "apps/openmw/mwmp/WorldProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectAnimPlay.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectAnimPlay.hpp index 73dfa8794..8f18885f5 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectAnimPlay.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectAnimPlay.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSOROBJECTANIMPLAY_HPP #define OPENMW_PROCESSOROBJECTANIMPLAY_HPP - #include "BaseObjectProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectDelete.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectDelete.hpp index b5079c6cb..b42574d74 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectDelete.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectDelete.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSOROBJECTDELETE_HPP #define OPENMW_PROCESSOROBJECTDELETE_HPP - #include "BaseObjectProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectLock.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectLock.hpp index fc9be71a8..bdda47f9f 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectLock.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectLock.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSOROBJECTLOCK_HPP #define OPENMW_PROCESSOROBJECTLOCK_HPP - #include "BaseObjectProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectMove.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectMove.hpp index 0bef6ca4e..97f16220b 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectMove.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectMove.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSOROBJECTMOVE_HPP #define OPENMW_PROCESSOROBJECTMOVE_HPP - #include "BaseObjectProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectPlace.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectPlace.hpp index 2fe203c76..30fe3cfba 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectPlace.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectPlace.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSOROBJECTPLACE_HPP #define OPENMW_PROCESSOROBJECTPLACE_HPP - #include "BaseObjectProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectRotate.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectRotate.hpp index 1af285a53..97cec92c3 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectRotate.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectRotate.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSOROBJECTROTATE_HPP #define OPENMW_PROCESSOROBJECTROTATE_HPP - #include "BaseObjectProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectScale.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectScale.hpp index 4ce599b89..2ea643a3f 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectScale.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectScale.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSOROBJECTSCALE_HPP #define OPENMW_PROCESSOROBJECTSCALE_HPP - #include "BaseObjectProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectSpawn.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectSpawn.hpp new file mode 100644 index 000000000..c04ca4bc4 --- /dev/null +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectSpawn.hpp @@ -0,0 +1,26 @@ +#ifndef OPENMW_PROCESSOROBJECTSPAWN_HPP +#define OPENMW_PROCESSOROBJECTSPAWN_HPP + +#include "BaseObjectProcessor.hpp" + +namespace mwmp +{ + class ProcessorObjectSpawn : public BaseObjectProcessor + { + public: + ProcessorObjectSpawn() + { + BPP_INIT(ID_OBJECT_SPAWN) + } + + virtual void Do(WorldPacket &packet, WorldEvent &event) + { + BaseObjectProcessor::Do(packet, event); + + //event.spawnObjects(ptrCellStore); + } + + }; +} + +#endif //OPENMW_PROCESSOROBJECTSPAWN_HPP diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectTrap.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectTrap.hpp index dcd0b92b0..96cf9096c 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectTrap.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectTrap.hpp @@ -1,7 +1,6 @@ #ifndef OPENMW_PROCESSOROBJECTTRAP_HPP #define OPENMW_PROCESSOROBJECTTRAP_HPP - #include "BaseObjectProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/world/ProcessorScriptGlobalShort.hpp b/apps/openmw/mwmp/processors/world/ProcessorScriptGlobalShort.hpp index cd275ec39..89800cba6 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorScriptGlobalShort.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorScriptGlobalShort.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORSCRIPTGLOBALSHORT_HPP #define OPENMW_PROCESSORSCRIPTGLOBALSHORT_HPP - #include "apps/openmw/mwmp/WorldProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/world/ProcessorScriptLocalFloat.hpp b/apps/openmw/mwmp/processors/world/ProcessorScriptLocalFloat.hpp index 1ec78d2d1..f900268ef 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorScriptLocalFloat.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorScriptLocalFloat.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORSCRIPTLOCALFLOAT_HPP #define OPENMW_PROCESSORSCRIPTLOCALFLOAT_HPP - #include "BaseObjectProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/world/ProcessorScriptLocalShort.hpp b/apps/openmw/mwmp/processors/world/ProcessorScriptLocalShort.hpp index dabce4067..13b3008b5 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorScriptLocalShort.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorScriptLocalShort.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORSCRIPTLOCALSHORT_HPP #define OPENMW_PROCESSORSCRIPTLOCALSHORT_HPP - #include "BaseObjectProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/world/ProcessorScriptMemberShort.hpp b/apps/openmw/mwmp/processors/world/ProcessorScriptMemberShort.hpp index ca0295636..27c8b4c78 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorScriptMemberShort.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorScriptMemberShort.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORSCRIPTMEMBERSHORT_HPP #define OPENMW_PROCESSORSCRIPTMEMBERSHORT_HPP - #include "apps/openmw/mwmp/WorldProcessor.hpp" namespace mwmp diff --git a/apps/openmw/mwmp/processors/world/ProcessorVideoPlay.hpp b/apps/openmw/mwmp/processors/world/ProcessorVideoPlay.hpp index b56b3b6d7..c9f9f3c95 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorVideoPlay.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorVideoPlay.hpp @@ -1,11 +1,6 @@ -// -// Created by koncord on 18.04.17. -// - #ifndef OPENMW_PROCESSORVIDEOPLAY_HPP #define OPENMW_PROCESSORVIDEOPLAY_HPP - #include "apps/openmw/mwmp/WorldProcessor.hpp" namespace mwmp diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index f26b78bae..ffa7de76c 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -169,24 +169,26 @@ add_component_dir (openmw-mp/Packets add_component_dir (openmw-mp/Packets/Actor ActorPacket - PacketActorList PacketActorAuthority PacketActorTest PacketActorAnimPlay PacketActorAttack PacketActorCellChange - PacketActorAnimFlags PacketActorEquipment PacketActorPosition PacketActorSpeech PacketActorStatsDynamic + PacketActorList PacketActorAuthority PacketActorTest PacketActorAI PacketActorAnimFlags PacketActorAnimPlay + PacketActorAttack PacketActorCellChange PacketActorDeath PacketActorEquipment PacketActorPosition PacketActorSpeech + PacketActorStatsDynamic ) add_component_dir (openmw-mp/Packets/Player PlayerPacket - PacketHandshake PacketChatMessage PacketPlayerBaseInfo PacketPlayerCharGen PacketPlayerAnimFlags PacketPlayerAttack - PacketPlayerAttribute PacketPlayerBounty PacketPlayerCellChange PacketPlayerCellState PacketPlayerClass - PacketPlayerDeath PacketPlayerEquipment PacketPlayerFaction PacketPlayerInventory PacketPlayerJournal PacketPlayerLevel - PacketPlayerPosition PacketPlayerResurrect PacketPlayerSkill PacketPlayerSpellbook PacketPlayerStatsDynamic - PacketPlayerTopic PacketPlayerActiveSkills PacketGUIBoxes PacketTime + PacketHandshake PacketChatMessage PacketGUIBoxes PacketGameTime PacketGameWeather PacketPlayerBaseInfo PacketPlayerCharGen + PacketPlayerActiveSkills PacketPlayerAnimFlags PacketPlayerAnimPlay PacketPlayerAttack PacketPlayerAttribute + PacketPlayerBook PacketPlayerBounty PacketPlayerCellChange PacketPlayerCellState PacketPlayerClass PacketPlayerDeath + PacketPlayerEquipment PacketPlayerFaction PacketPlayerInventory PacketPlayerJournal PacketPlayerLevel PacketPlayerMap + PacketPlayerPosition PacketPlayerRegionAuthority PacketPlayerRegionChange PacketPlayerRest PacketPlayerResurrect + PacketPlayerSkill PacketPlayerSpeech PacketPlayerSpellbook PacketPlayerStatsDynamic PacketPlayerTopic ) add_component_dir (openmw-mp/Packets/World WorldPacket PacketContainer PacketObjectAnimPlay PacketObjectDelete PacketDoorState PacketObjectLock PacketObjectMove PacketObjectPlace - PacketObjectRotate PacketObjectScale PacketObjectTrap PacketMusicPlay PacketVideoPlay PacketScriptLocalShort - PacketScriptLocalFloat PacketScriptMemberShort PacketScriptGlobalShort + PacketObjectRotate PacketObjectScale PacketObjectSpawn PacketObjectTrap PacketMusicPlay PacketVideoPlay + PacketScriptLocalShort PacketScriptLocalFloat PacketScriptMemberShort PacketScriptGlobalShort ) add_component_dir (fallback diff --git a/components/openmw-mp/Controllers/ActorPacketController.cpp b/components/openmw-mp/Controllers/ActorPacketController.cpp index 9af948a84..c98d3a0bd 100644 --- a/components/openmw-mp/Controllers/ActorPacketController.cpp +++ b/components/openmw-mp/Controllers/ActorPacketController.cpp @@ -5,10 +5,12 @@ #include "../Packets/Actor/PacketActorList.hpp" #include "../Packets/Actor/PacketActorAuthority.hpp" #include "../Packets/Actor/PacketActorTest.hpp" +#include "../Packets/Actor/PacketActorAI.hpp" #include "../Packets/Actor/PacketActorAnimFlags.hpp" #include "../Packets/Actor/PacketActorAnimPlay.hpp" #include "../Packets/Actor/PacketActorAttack.hpp" #include "../Packets/Actor/PacketActorCellChange.hpp" +#include "../Packets/Actor/PacketActorDeath.hpp" #include "../Packets/Actor/PacketActorEquipment.hpp" #include "../Packets/Actor/PacketActorPosition.hpp" #include "../Packets/Actor/PacketActorStatsDynamic.hpp" @@ -30,10 +32,12 @@ mwmp::ActorPacketController::ActorPacketController(RakNet::RakPeerInterface *pee AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); + AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); + AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); diff --git a/components/openmw-mp/Controllers/PlayerPacketController.cpp b/components/openmw-mp/Controllers/PlayerPacketController.cpp index 2d19fea96..256ea6b92 100644 --- a/components/openmw-mp/Controllers/PlayerPacketController.cpp +++ b/components/openmw-mp/Controllers/PlayerPacketController.cpp @@ -7,14 +7,17 @@ #include "../Packets/Player/PacketPlayerCharGen.hpp" #include "../Packets/Player/PacketHandshake.hpp" #include "../Packets/Player/PacketGUIBoxes.hpp" -#include "../Packets/Player/PacketTime.hpp" #include "../Packets/Player/PacketLoaded.hpp" #include "../Packets/Player/PacketConsole.hpp" +#include "../Packets/Player/PacketGameTime.hpp" +#include "../Packets/Player/PacketGameWeather.hpp" #include "../Packets/Player/PacketPlayerActiveSkills.hpp" #include "../Packets/Player/PacketPlayerBaseInfo.hpp" #include "../Packets/Player/PacketPlayerAnimFlags.hpp" +#include "../Packets/Player/PacketPlayerAnimPlay.hpp" #include "../Packets/Player/PacketPlayerAttack.hpp" #include "../Packets/Player/PacketPlayerAttribute.hpp" +#include "../Packets/Player/PacketPlayerBook.hpp" #include "../Packets/Player/PacketPlayerBounty.hpp" #include "../Packets/Player/PacketPlayerCellChange.hpp" #include "../Packets/Player/PacketPlayerCellState.hpp" @@ -25,9 +28,14 @@ #include "../Packets/Player/PacketPlayerInventory.hpp" #include "../Packets/Player/PacketPlayerJournal.hpp" #include "../Packets/Player/PacketPlayerLevel.hpp" +#include "../Packets/Player/PacketPlayerMap.hpp" #include "../Packets/Player/PacketPlayerPosition.hpp" +#include "../Packets/Player/PacketPlayerRegionAuthority.hpp" +#include "../Packets/Player/PacketPlayerRegionChange.hpp" +#include "../Packets/Player/PacketPlayerRest.hpp" #include "../Packets/Player/PacketPlayerResurrect.hpp" #include "../Packets/Player/PacketPlayerSkill.hpp" +#include "../Packets/Player/PacketPlayerSpeech.hpp" #include "../Packets/Player/PacketPlayerSpellbook.hpp" #include "../Packets/Player/PacketPlayerStatsDynamic.hpp" #include "../Packets/Player/PacketPlayerTopic.hpp" @@ -48,16 +56,19 @@ mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *p AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); - AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); + AddPacket(&packets, peer); + AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); + AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); + AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); @@ -68,9 +79,14 @@ mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *p AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); + AddPacket(&packets, peer); AddPacket(&packets, peer); + AddPacket(&packets, peer); + AddPacket(&packets, peer); + AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); + AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); diff --git a/components/openmw-mp/Controllers/WorldPacketController.cpp b/components/openmw-mp/Controllers/WorldPacketController.cpp index 05ff4361b..e127c56b1 100644 --- a/components/openmw-mp/Controllers/WorldPacketController.cpp +++ b/components/openmw-mp/Controllers/WorldPacketController.cpp @@ -9,6 +9,7 @@ #include "../Packets/World/PacketObjectPlace.hpp" #include "../Packets/World/PacketObjectRotate.hpp" #include "../Packets/World/PacketObjectScale.hpp" +#include "../Packets/World/PacketObjectSpawn.hpp" #include "../Packets/World/PacketObjectTrap.hpp" #include "../Packets/World/PacketContainer.hpp" @@ -40,6 +41,7 @@ mwmp::WorldPacketController::WorldPacketController(RakNet::RakPeerInterface *pee AddPacket(&packets, peer); 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 f27ae5260..3a4ba33e3 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -17,27 +17,37 @@ enum GameMessages ID_HANDSHAKE, ID_LOADED, ID_GUI_MESSAGEBOX, + ID_GAME_TIME, + ID_GAME_WEATHER, ID_PLAYER_BASEINFO, ID_PLAYER_CHARGEN, ID_PLAYER_ACTIVESKILLS, ID_PLAYER_ANIM_FLAGS, + ID_PLAYER_ANIM_PLAY, ID_PLAYER_ATTACK, ID_PLAYER_ATTRIBUTE, + ID_PLAYER_BOOK, ID_PLAYER_BOUNTY, ID_PLAYER_CELL_CHANGE, ID_PLAYER_CELL_STATE, ID_PLAYER_CHARCLASS, ID_PLAYER_DEATH, + ID_PLAYER_DISPOSITION, ID_PLAYER_EQUIPMENT, ID_PLAYER_FACTION, ID_PLAYER_INVENTORY, ID_PLAYER_JOURNAL, ID_PLAYER_LEVEL, + ID_PLAYER_MAP, ID_PLAYER_POSITION, + ID_PLAYER_REGION_AUTHORITY, + ID_PLAYER_REGION_CHANGE, ID_PLAYER_RESURRECT, + ID_PLAYER_REST, ID_PLAYER_SKILL, + ID_PLAYER_SPEECH, ID_PLAYER_SPELLBOOK, ID_PLAYER_STATS_DYNAMIC, ID_PLAYER_TOPIC, @@ -45,10 +55,12 @@ enum GameMessages ID_ACTOR_LIST, ID_ACTOR_AUTHORITY, ID_ACTOR_TEST, + ID_ACTOR_AI, ID_ACTOR_ANIM_FLAGS, ID_ACTOR_ANIM_PLAY, ID_ACTOR_ATTACK, ID_ACTOR_CELL_CHANGE, + ID_ACTOR_DEATH, ID_ACTOR_EQUIPMENT, ID_ACTOR_POSITION, ID_ACTOR_SPEECH, @@ -61,6 +73,7 @@ enum GameMessages ID_OBJECT_PLACE, ID_OBJECT_ROTATE, ID_OBJECT_SCALE, + ID_OBJECT_SPAWN, ID_OBJECT_TRAP, ID_CONTAINER, diff --git a/components/openmw-mp/Packets/Actor/PacketActorAI.cpp b/components/openmw-mp/Packets/Actor/PacketActorAI.cpp new file mode 100644 index 000000000..0ea01b0f0 --- /dev/null +++ b/components/openmw-mp/Packets/Actor/PacketActorAI.cpp @@ -0,0 +1,42 @@ +#include +#include +#include "PacketActorAI.hpp" + +using namespace mwmp; + +PacketActorAI::PacketActorAI(RakNet::RakPeerInterface *peer) : ActorPacket(peer) +{ + packetID = ID_ACTOR_AI; +} + +void PacketActorAI::Packet(RakNet::BitStream *bs, bool send) +{ + ActorPacket::Packet(bs, send); + + if (send) + actorList->count = (unsigned int)(actorList->baseActors.size()); + else + actorList->baseActors.clear(); + + RW(actorList->count, send); + + BaseActor actor; + + for (unsigned int i = 0; i < actorList->count; i++) + { + if (send) + { + actor = actorList->baseActors.at(i); + } + + RW(actor.refNumIndex, send); + RW(actor.mpNum, send); + + // Placeholder to be filled in later + + if (!send) + { + actorList->baseActors.push_back(actor); + } + } +} diff --git a/components/openmw-mp/Packets/Actor/PacketActorAI.hpp b/components/openmw-mp/Packets/Actor/PacketActorAI.hpp new file mode 100644 index 000000000..a4c4d87de --- /dev/null +++ b/components/openmw-mp/Packets/Actor/PacketActorAI.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETACTORAI_HPP +#define OPENMW_PACKETACTORAI_HPP + +#include + +namespace mwmp +{ + class PacketActorAI : public ActorPacket + { + public: + PacketActorAI(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETACTORAI_HPP diff --git a/components/openmw-mp/Packets/Actor/PacketActorDeath.cpp b/components/openmw-mp/Packets/Actor/PacketActorDeath.cpp new file mode 100644 index 000000000..08439f40a --- /dev/null +++ b/components/openmw-mp/Packets/Actor/PacketActorDeath.cpp @@ -0,0 +1,42 @@ +#include +#include +#include "PacketActorDeath.hpp" + +using namespace mwmp; + +PacketActorDeath::PacketActorDeath(RakNet::RakPeerInterface *peer) : ActorPacket(peer) +{ + packetID = ID_ACTOR_DEATH; +} + +void PacketActorDeath::Packet(RakNet::BitStream *bs, bool send) +{ + ActorPacket::Packet(bs, send); + + if (send) + actorList->count = (unsigned int)(actorList->baseActors.size()); + else + actorList->baseActors.clear(); + + RW(actorList->count, send); + + BaseActor actor; + + for (unsigned int i = 0; i < actorList->count; i++) + { + if (send) + { + actor = actorList->baseActors.at(i); + } + + RW(actor.refNumIndex, send); + RW(actor.mpNum, send); + + // Placeholder to be filled in later + + if (!send) + { + actorList->baseActors.push_back(actor); + } + } +} diff --git a/components/openmw-mp/Packets/Actor/PacketActorDeath.hpp b/components/openmw-mp/Packets/Actor/PacketActorDeath.hpp new file mode 100644 index 000000000..5aba35b6e --- /dev/null +++ b/components/openmw-mp/Packets/Actor/PacketActorDeath.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETACTORDEATH_HPP +#define OPENMW_PACKETACTORDEATH_HPP + +#include + +namespace mwmp +{ + class PacketActorDeath : public ActorPacket + { + public: + PacketActorDeath(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETACTORDEATH_HPP diff --git a/components/openmw-mp/Packets/Player/PacketConsole.hpp b/components/openmw-mp/Packets/Player/PacketConsole.hpp index 1b6571e97..3a0dd002d 100644 --- a/components/openmw-mp/Packets/Player/PacketConsole.hpp +++ b/components/openmw-mp/Packets/Player/PacketConsole.hpp @@ -26,5 +26,4 @@ namespace mwmp }; } - #endif //OPENMW_PACKETCONSOLE_HPP diff --git a/components/openmw-mp/Packets/Player/PacketDisconnect.hpp b/components/openmw-mp/Packets/Player/PacketDisconnect.hpp index c6d87d1af..df3eff5a6 100644 --- a/components/openmw-mp/Packets/Player/PacketDisconnect.hpp +++ b/components/openmw-mp/Packets/Player/PacketDisconnect.hpp @@ -21,5 +21,4 @@ namespace mwmp }; } - #endif //OPENMW_PACKETDISCONNECT_HPP diff --git a/components/openmw-mp/Packets/Player/PacketGUIBoxes.hpp b/components/openmw-mp/Packets/Player/PacketGUIBoxes.hpp index a96030b4d..6a5a5c870 100644 --- a/components/openmw-mp/Packets/Player/PacketGUIBoxes.hpp +++ b/components/openmw-mp/Packets/Player/PacketGUIBoxes.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PACKETGUIBOXES_HPP #define OPENMW_PACKETGUIBOXES_HPP - #include namespace mwmp diff --git a/components/openmw-mp/Packets/Player/PacketTime.cpp b/components/openmw-mp/Packets/Player/PacketGameTime.cpp similarity index 63% rename from components/openmw-mp/Packets/Player/PacketTime.cpp rename to components/openmw-mp/Packets/Player/PacketGameTime.cpp index 2458f5621..71027707e 100644 --- a/components/openmw-mp/Packets/Player/PacketTime.cpp +++ b/components/openmw-mp/Packets/Player/PacketGameTime.cpp @@ -2,18 +2,18 @@ // Created by koncord on 30.08.16. // -#include "PacketTime.hpp" +#include "PacketGameTime.hpp" #include using namespace mwmp; -PacketTime::PacketTime(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +PacketGameTime::PacketGameTime(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) { packetID = ID_GAME_TIME; orderChannel = CHANNEL_SYSTEM; } -void PacketTime::Packet(RakNet::BitStream *bs, bool send) +void PacketGameTime::Packet(RakNet::BitStream *bs, bool send) { PlayerPacket::Packet(bs, send); diff --git a/components/openmw-mp/Packets/Player/PacketTime.hpp b/components/openmw-mp/Packets/Player/PacketGameTime.hpp similarity index 51% rename from components/openmw-mp/Packets/Player/PacketTime.hpp rename to components/openmw-mp/Packets/Player/PacketGameTime.hpp index 31dd9327a..9f48f8674 100644 --- a/components/openmw-mp/Packets/Player/PacketTime.hpp +++ b/components/openmw-mp/Packets/Player/PacketGameTime.hpp @@ -2,22 +2,20 @@ // Created by koncord on 30.08.16. // -#ifndef OPENMW_TIMEPACKET_HPP -#define OPENMW_TIMEPACKET_HPP - +#ifndef OPENMW_PACKETGAMETIME_HPP +#define OPENMW_PACKETGAMETIME_HPP #include namespace mwmp { - class PacketTime : public PlayerPacket + class PacketGameTime : public PlayerPacket { public: - PacketTime(RakNet::RakPeerInterface *peer); + PacketGameTime(RakNet::RakPeerInterface *peer); virtual void Packet(RakNet::BitStream *bs, bool send); }; } - -#endif //OPENMW_TIMEPACKET_HPP +#endif //OPENMW_PACKETGAMETIME_HPP diff --git a/components/openmw-mp/Packets/Player/PacketGameWeather.cpp b/components/openmw-mp/Packets/Player/PacketGameWeather.cpp new file mode 100644 index 000000000..d02d51850 --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketGameWeather.cpp @@ -0,0 +1,17 @@ +#include "PacketGameWeather.hpp" +#include + +using namespace mwmp; + +PacketGameWeather::PacketGameWeather(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_GAME_WEATHER; + orderChannel = CHANNEL_SYSTEM; +} + +void PacketGameWeather::Packet(RakNet::BitStream *bs, bool send) +{ + PlayerPacket::Packet(bs, send); + + // Placeholder to be filled in later +} diff --git a/components/openmw-mp/Packets/Player/PacketGameWeather.hpp b/components/openmw-mp/Packets/Player/PacketGameWeather.hpp new file mode 100644 index 000000000..3d6806953 --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketGameWeather.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETGAMEWEATHER_HPP +#define OPENMW_PACKETGAMEWEATHER_HPP + +#include + +namespace mwmp +{ + class PacketGameWeather : public PlayerPacket + { + public: + PacketGameWeather(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETGAMEWEATHER_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerAnimFlags.hpp b/components/openmw-mp/Packets/Player/PacketPlayerAnimFlags.hpp index d90594dd7..7cae56aec 100644 --- a/components/openmw-mp/Packets/Player/PacketPlayerAnimFlags.hpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerAnimFlags.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PACKETPLAYERANIMFLAGS_HPP #define OPENMW_PACKETPLAYERANIMFLAGS_HPP - #include namespace mwmp @@ -19,5 +18,4 @@ namespace mwmp }; } - #endif //OPENMW_PACKETPLAYERANIMFLAGS_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerAnimPlay.cpp b/components/openmw-mp/Packets/Player/PacketPlayerAnimPlay.cpp new file mode 100644 index 000000000..34c601673 --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerAnimPlay.cpp @@ -0,0 +1,14 @@ +#include +#include "PacketPlayerAnimPlay.hpp" + +mwmp::PacketPlayerAnimPlay::PacketPlayerAnimPlay(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_PLAYER_ANIM_PLAY; +} + +void mwmp::PacketPlayerAnimPlay::Packet(RakNet::BitStream *bs, bool send) +{ + PlayerPacket::Packet(bs, send); + + // Placeholder to be filled in later +} diff --git a/components/openmw-mp/Packets/Player/PacketPlayerAnimPlay.hpp b/components/openmw-mp/Packets/Player/PacketPlayerAnimPlay.hpp new file mode 100644 index 000000000..112a81d02 --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerAnimPlay.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETPLAYERANIMPLAY_HPP +#define OPENMW_PACKETPLAYERANIMPLAY_HPP + +#include + +namespace mwmp +{ + class PacketPlayerAnimPlay : public PlayerPacket + { + public: + PacketPlayerAnimPlay(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETPLAYERANIMPLAY_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerAttack.hpp b/components/openmw-mp/Packets/Player/PacketPlayerAttack.hpp index 2450a7f18..65a08e8b5 100644 --- a/components/openmw-mp/Packets/Player/PacketPlayerAttack.hpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerAttack.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PACKETPLAYERATTACK_HPP #define OPENMW_PACKETPLAYERATTACK_HPP - #include namespace mwmp diff --git a/components/openmw-mp/Packets/Player/PacketPlayerBook.cpp b/components/openmw-mp/Packets/Player/PacketPlayerBook.cpp new file mode 100644 index 000000000..467137c2d --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerBook.cpp @@ -0,0 +1,17 @@ +#include +#include "PacketPlayerBook.hpp" + +using namespace std; +using namespace mwmp; + +PacketPlayerBook::PacketPlayerBook(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_PLAYER_BOOK; +} + +void PacketPlayerBook::Packet(RakNet::BitStream *bs, bool send) +{ + PlayerPacket::Packet(bs, send); + + // Placeholder to be filled in later +} diff --git a/components/openmw-mp/Packets/Player/PacketPlayerBook.hpp b/components/openmw-mp/Packets/Player/PacketPlayerBook.hpp new file mode 100644 index 000000000..b25d45d36 --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerBook.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETPLAYERBOOK_HPP +#define OPENMW_PACKETPLAYERBOOK_HPP + +#include + +namespace mwmp +{ + class PacketPlayerBook : public PlayerPacket + { + public: + PacketPlayerBook(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETPLAYERBOOK_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerCellChange.hpp b/components/openmw-mp/Packets/Player/PacketPlayerCellChange.hpp index e2800b55f..409b2eede 100644 --- a/components/openmw-mp/Packets/Player/PacketPlayerCellChange.hpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerCellChange.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PACKETPLAYERCELLCHANGE_HPP #define OPENMW_PACKETPLAYERCELLCHANGE_HPP - #include namespace mwmp @@ -19,6 +18,4 @@ namespace mwmp }; } - - #endif //OPENMW_PACKETPLAYERCELLCHANGE_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerCellState.hpp b/components/openmw-mp/Packets/Player/PacketPlayerCellState.hpp index 78d8b7b82..bfad68ed0 100644 --- a/components/openmw-mp/Packets/Player/PacketPlayerCellState.hpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerCellState.hpp @@ -1,7 +1,6 @@ #ifndef OPENMW_PACKETPLAYERCELLSTATE_HPP #define OPENMW_PACKETPLAYERCELLSTATE_HPP - #include namespace mwmp @@ -15,6 +14,4 @@ namespace mwmp }; } - - #endif //OPENMW_PACKETPLAYERCELLSTATE_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerCharGen.hpp b/components/openmw-mp/Packets/Player/PacketPlayerCharGen.hpp index bf201fc8d..fa3e778c7 100644 --- a/components/openmw-mp/Packets/Player/PacketPlayerCharGen.hpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerCharGen.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PACKETPLAYERCHARGEN_HPP #define OPENMW_PACKETPLAYERCHARGEN_HPP - #include namespace mwmp @@ -19,6 +18,4 @@ namespace mwmp }; } - - #endif //OPENMW_PACKETPLAYERCHARGEN_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerClass.hpp b/components/openmw-mp/Packets/Player/PacketPlayerClass.hpp index 400f136ad..33c685f65 100644 --- a/components/openmw-mp/Packets/Player/PacketPlayerClass.hpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerClass.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PACKETPLAYERCLASS_HPP #define OPENMW_PACKETPLAYERCLASS_HPP - #include namespace mwmp @@ -19,5 +18,4 @@ namespace mwmp }; } - #endif //OPENMW_PACKETPLAYERCLASS_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerFaction.hpp b/components/openmw-mp/Packets/Player/PacketPlayerFaction.hpp index fb6fe3c4a..73efd2c6b 100644 --- a/components/openmw-mp/Packets/Player/PacketPlayerFaction.hpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerFaction.hpp @@ -14,5 +14,4 @@ namespace mwmp }; } - #endif //OPENMW_PACKETPLAYERFACTION_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerInventory.hpp b/components/openmw-mp/Packets/Player/PacketPlayerInventory.hpp index 829a18e68..1bc97fbb2 100644 --- a/components/openmw-mp/Packets/Player/PacketPlayerInventory.hpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerInventory.hpp @@ -18,5 +18,4 @@ namespace mwmp }; } - #endif //OPENMW_PACKETPLAYERINVENTORY_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerJournal.hpp b/components/openmw-mp/Packets/Player/PacketPlayerJournal.hpp index 02f9402af..189af506f 100644 --- a/components/openmw-mp/Packets/Player/PacketPlayerJournal.hpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerJournal.hpp @@ -14,5 +14,4 @@ namespace mwmp }; } - #endif //OPENMW_PACKETPLAYERJOURNAL_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerMap.cpp b/components/openmw-mp/Packets/Player/PacketPlayerMap.cpp new file mode 100644 index 000000000..528b0ec5d --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerMap.cpp @@ -0,0 +1,17 @@ +#include +#include "PacketPlayerMap.hpp" + +using namespace std; +using namespace mwmp; + +PacketPlayerMap::PacketPlayerMap(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_PLAYER_MAP; +} + +void PacketPlayerMap::Packet(RakNet::BitStream *bs, bool send) +{ + PlayerPacket::Packet(bs, send); + + // Placeholder to be filled in later +} diff --git a/components/openmw-mp/Packets/Player/PacketPlayerMap.hpp b/components/openmw-mp/Packets/Player/PacketPlayerMap.hpp new file mode 100644 index 000000000..bc351989a --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerMap.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETPLAYERMAP_HPP +#define OPENMW_PACKETPLAYERMAP_HPP + +#include + +namespace mwmp +{ + class PacketPlayerMap : public PlayerPacket + { + public: + PacketPlayerMap(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETPLAYERMAP_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerRegionAuthority.cpp b/components/openmw-mp/Packets/Player/PacketPlayerRegionAuthority.cpp new file mode 100644 index 000000000..3a8748aef --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerRegionAuthority.cpp @@ -0,0 +1,16 @@ +#include +#include "PacketPlayerRegionAuthority.hpp" + +mwmp::PacketPlayerRegionAuthority::PacketPlayerRegionAuthority(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_PLAYER_REGION_AUTHORITY; + priority = IMMEDIATE_PRIORITY; + reliability = RELIABLE_ORDERED; +} + +void mwmp::PacketPlayerRegionAuthority::Packet(RakNet::BitStream *bs, bool send) +{ + PlayerPacket::Packet(bs, send); + + // Placeholder to be filled in later +} diff --git a/components/openmw-mp/Packets/Player/PacketPlayerRegionAuthority.hpp b/components/openmw-mp/Packets/Player/PacketPlayerRegionAuthority.hpp new file mode 100644 index 000000000..8180b79f7 --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerRegionAuthority.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETPLAYERREGIONAUTHORITY_HPP +#define OPENMW_PACKETPLAYERREGIONAUTHORITY_HPP + +#include + +namespace mwmp +{ + class PacketPlayerRegionAuthority : public PlayerPacket + { + public: + PacketPlayerRegionAuthority(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETPLAYERREGIONAUTHORITY_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerRegionChange.cpp b/components/openmw-mp/Packets/Player/PacketPlayerRegionChange.cpp new file mode 100644 index 000000000..3a6aa356b --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerRegionChange.cpp @@ -0,0 +1,16 @@ +#include +#include "PacketPlayerRegionChange.hpp" + +mwmp::PacketPlayerRegionChange::PacketPlayerRegionChange(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_PLAYER_REGION_CHANGE; + priority = IMMEDIATE_PRIORITY; + reliability = RELIABLE_ORDERED; +} + +void mwmp::PacketPlayerRegionChange::Packet(RakNet::BitStream *bs, bool send) +{ + PlayerPacket::Packet(bs, send); + + // Placeholder to be filled in later +} diff --git a/components/openmw-mp/Packets/Player/PacketPlayerRegionChange.hpp b/components/openmw-mp/Packets/Player/PacketPlayerRegionChange.hpp new file mode 100644 index 000000000..571fb8f6b --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerRegionChange.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETPLAYERREGIONCHANGE_HPP +#define OPENMW_PACKETPLAYERREGIONCHANGE_HPP + +#include + +namespace mwmp +{ + class PacketPlayerRegionChange : public PlayerPacket + { + public: + PacketPlayerRegionChange(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETPLAYERREGIONCHANGE_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerRest.cpp b/components/openmw-mp/Packets/Player/PacketPlayerRest.cpp new file mode 100644 index 000000000..7d20d9d5a --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerRest.cpp @@ -0,0 +1,16 @@ +#include "PacketPlayerRest.hpp" +#include + +using namespace mwmp; + +PacketPlayerRest::PacketPlayerRest(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_PLAYER_REST; +} + +void PacketPlayerRest::Packet(RakNet::BitStream *bs, bool send) +{ + PlayerPacket::Packet(bs, send); + + // Placeholder to be filled in later +} diff --git a/components/openmw-mp/Packets/Player/PacketPlayerRest.hpp b/components/openmw-mp/Packets/Player/PacketPlayerRest.hpp new file mode 100644 index 000000000..a7637f678 --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerRest.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETPLAYERREST_HPP +#define OPENMW_PACKETPLAYERREST_HPP + +#include + +namespace mwmp +{ + class PacketPlayerRest : public PlayerPacket + { + public: + PacketPlayerRest(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETPLAYERREST_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerSkill.hpp b/components/openmw-mp/Packets/Player/PacketPlayerSkill.hpp index 1d76015f2..fc71c720c 100644 --- a/components/openmw-mp/Packets/Player/PacketPlayerSkill.hpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerSkill.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PACKETPLAYERSKILL_HPP #define OPENMW_PACKETPLAYERSKILL_HPP - #include namespace mwmp @@ -21,6 +20,4 @@ namespace mwmp }; } - - #endif //OPENMW_PACKETPLAYERSKILL_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerSpeech.cpp b/components/openmw-mp/Packets/Player/PacketPlayerSpeech.cpp new file mode 100644 index 000000000..38b30be5f --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerSpeech.cpp @@ -0,0 +1,14 @@ +#include +#include "PacketPlayerSpeech.hpp" + +mwmp::PacketPlayerSpeech::PacketPlayerSpeech(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_PLAYER_SPEECH; +} + +void mwmp::PacketPlayerSpeech::Packet(RakNet::BitStream *bs, bool send) +{ + PlayerPacket::Packet(bs, send); + + // Placeholder to be filled in later +} diff --git a/components/openmw-mp/Packets/Player/PacketPlayerSpeech.hpp b/components/openmw-mp/Packets/Player/PacketPlayerSpeech.hpp new file mode 100644 index 000000000..98f38319c --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerSpeech.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETPLAYERSPEECH_HPP +#define OPENMW_PACKETPLAYERSPEECH_HPP + +#include + +namespace mwmp +{ + class PacketPlayerSpeech : public PlayerPacket + { + public: + PacketPlayerSpeech(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETPLAYERSPEECH_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerSpellbook.hpp b/components/openmw-mp/Packets/Player/PacketPlayerSpellbook.hpp index eda00065c..eeaa4c13c 100644 --- a/components/openmw-mp/Packets/Player/PacketPlayerSpellbook.hpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerSpellbook.hpp @@ -14,5 +14,4 @@ namespace mwmp }; } - #endif //OPENMW_PACKETPLAYERSPELLBOOK_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerStatsDynamic.hpp b/components/openmw-mp/Packets/Player/PacketPlayerStatsDynamic.hpp index 37543614e..799f901a4 100644 --- a/components/openmw-mp/Packets/Player/PacketPlayerStatsDynamic.hpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerStatsDynamic.hpp @@ -5,7 +5,6 @@ #ifndef OPENMW_PACKETSTATSDYNAMIC_HPP #define OPENMW_PACKETSTATSDYNAMIC_HPP - #include namespace mwmp diff --git a/components/openmw-mp/Packets/Player/PacketPlayerTopic.hpp b/components/openmw-mp/Packets/Player/PacketPlayerTopic.hpp index 8db8b0048..d111b1e74 100644 --- a/components/openmw-mp/Packets/Player/PacketPlayerTopic.hpp +++ b/components/openmw-mp/Packets/Player/PacketPlayerTopic.hpp @@ -14,5 +14,4 @@ namespace mwmp }; } - #endif //OPENMW_PACKETPLAYERTOPIC_HPP diff --git a/components/openmw-mp/Packets/Player/PlayerPacket.hpp b/components/openmw-mp/Packets/Player/PlayerPacket.hpp index a1dcd402f..1f6e0fa05 100644 --- a/components/openmw-mp/Packets/Player/PlayerPacket.hpp +++ b/components/openmw-mp/Packets/Player/PlayerPacket.hpp @@ -9,7 +9,6 @@ #include - namespace mwmp { class PlayerPacket : public BasePacket diff --git a/components/openmw-mp/Packets/World/PacketObjectSpawn.cpp b/components/openmw-mp/Packets/World/PacketObjectSpawn.cpp new file mode 100644 index 000000000..34ed8cff0 --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketObjectSpawn.cpp @@ -0,0 +1,48 @@ +#include +#include "PacketObjectSpawn.hpp" + +using namespace mwmp; + +PacketObjectSpawn::PacketObjectSpawn(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +{ + packetID = ID_OBJECT_SPAWN; +} + +void PacketObjectSpawn::Packet(RakNet::BitStream *bs, bool send) +{ + WorldPacket::Packet(bs, send); + + if (send) + event->worldObjectCount = (unsigned int)(event->worldObjects.size()); + else + event->worldObjects.clear(); + + RW(event->worldObjectCount, send); + + RW(event->cell.mData.mFlags, send); + RW(event->cell.mData.mX, send); + RW(event->cell.mData.mY, send); + RW(event->cell.mName, send); + + WorldObject worldObject; + + for (unsigned int i = 0; i < event->worldObjectCount; i++) + { + if (send) + { + worldObject = event->worldObjects.at(i); + } + + RW(worldObject.refId, send); + RW(worldObject.refNumIndex, send); + RW(worldObject.mpNum, send); + RW(worldObject.position, send); + + // Placeholder to be filled in later + + if (!send) + { + event->worldObjects.push_back(worldObject); + } + } +} diff --git a/components/openmw-mp/Packets/World/PacketObjectSpawn.hpp b/components/openmw-mp/Packets/World/PacketObjectSpawn.hpp new file mode 100644 index 000000000..c0d81a23d --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketObjectSpawn.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETOBJECTSPAWN_HPP +#define OPENMW_PACKETOBJECTSPAWN_HPP + +#include + +namespace mwmp +{ + class PacketObjectSpawn : public WorldPacket + { + public: + PacketObjectSpawn(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETOBJECTSPAWN_HPP