From 02af7f6ba199b59646f3788a9dc98bd46d8754ce Mon Sep 17 00:00:00 2001 From: David Cernat Date: Mon, 29 Jan 2018 22:32:51 +0200 Subject: [PATCH] [General] Add placeholders for new packet types --- apps/openmw-mp/CMakeLists.txt | 38 ++++++++++--------- apps/openmw-mp/Script/ScriptFunctions.hpp | 3 ++ .../actor/ProcessorActorInteraction.hpp | 27 +++++++++++++ .../player/ProcessorPlayerAttack.hpp | 4 -- .../player/ProcessorPlayerInteraction.hpp | 25 ++++++++++++ .../player/ProcessorPlayerMiscellaneous.hpp | 25 ++++++++++++ .../player/ProcessorPlayerReputation.hpp | 23 +++++++++++ .../player/ProcessorRecordDynamic.hpp | 25 ++++++++++++ .../world/ProcessorScriptGlobalFloat.hpp | 18 +++++++++ .../world/ProcessorScriptMemberFloat.hpp | 18 +++++++++ apps/openmw/CMakeLists.txt | 24 ++++++------ .../mwmp/processors/ProcessorInitializer.cpp | 30 +++++++++++++-- .../actor/ProcessorActorInteraction.hpp | 25 ++++++++++++ .../processors/player/ProcessorCellCreate.hpp | 23 +++++++++++ .../player/ProcessorPlayerAttack.hpp | 10 ----- .../player/ProcessorPlayerBehavior.hpp | 30 +++++++++++++++ .../player/ProcessorPlayerInteraction.hpp | 27 +++++++++++++ .../player/ProcessorPlayerLevel.hpp | 4 -- .../player/ProcessorPlayerMiscellaneous.hpp | 32 ++++++++++++++++ .../player/ProcessorPlayerReputation.hpp | 38 +++++++++++++++++++ .../player/ProcessorRecordDynamic.hpp | 23 +++++++++++ .../world/ProcessorDoorDestination.hpp | 25 ++++++++++++ .../processors/world/ProcessorObjectReset.hpp | 26 +++++++++++++ .../world/ProcessorScriptGlobalFloat.hpp | 24 ++++++++++++ .../world/ProcessorScriptMemberFloat.hpp | 24 ++++++++++++ components/CMakeLists.txt | 26 +++++++------ .../Controllers/ActorPacketController.cpp | 2 + .../Controllers/PlayerPacketController.cpp | 18 +++++++-- .../Controllers/WorldPacketController.cpp | 8 ++++ components/openmw-mp/NetworkMessages.hpp | 12 ++++++ .../Packets/Actor/PacketActorInteraction.cpp | 15 ++++++++ .../Packets/Actor/PacketActorInteraction.hpp | 17 +++++++++ .../Packets/Player/PacketCellCreate.cpp | 17 +++++++++ .../Packets/Player/PacketCellCreate.hpp | 18 +++++++++ .../Packets/Player/PacketPlayerBehavior.cpp | 16 ++++++++ .../Packets/Player/PacketPlayerBehavior.hpp | 17 +++++++++ .../Player/PacketPlayerInteraction.cpp | 16 ++++++++ .../Player/PacketPlayerInteraction.hpp | 17 +++++++++ .../Player/PacketPlayerMiscellaneous.cpp | 16 ++++++++ .../Player/PacketPlayerMiscellaneous.hpp | 17 +++++++++ .../Packets/Player/PacketPlayerReputation.cpp | 16 ++++++++ .../Packets/Player/PacketPlayerReputation.hpp | 17 +++++++++ .../Packets/Player/PacketRecordDynamic.cpp | 17 +++++++++ .../Packets/Player/PacketRecordDynamic.hpp | 18 +++++++++ .../Packets/World/PacketDoorDestination.cpp | 16 ++++++++ .../Packets/World/PacketDoorDestination.hpp | 17 +++++++++ .../Packets/World/PacketObjectReset.cpp | 16 ++++++++ .../Packets/World/PacketObjectReset.hpp | 17 +++++++++ .../Packets/World/PacketScriptGlobalFloat.cpp | 15 ++++++++ .../Packets/World/PacketScriptGlobalFloat.hpp | 17 +++++++++ .../Packets/World/PacketScriptMemberFloat.cpp | 16 ++++++++ .../Packets/World/PacketScriptMemberFloat.hpp | 17 +++++++++ 52 files changed, 938 insertions(+), 64 deletions(-) create mode 100644 apps/openmw-mp/processors/actor/ProcessorActorInteraction.hpp create mode 100644 apps/openmw-mp/processors/player/ProcessorPlayerInteraction.hpp create mode 100644 apps/openmw-mp/processors/player/ProcessorPlayerMiscellaneous.hpp create mode 100644 apps/openmw-mp/processors/player/ProcessorPlayerReputation.hpp create mode 100644 apps/openmw-mp/processors/player/ProcessorRecordDynamic.hpp create mode 100644 apps/openmw-mp/processors/world/ProcessorScriptGlobalFloat.hpp create mode 100644 apps/openmw-mp/processors/world/ProcessorScriptMemberFloat.hpp create mode 100644 apps/openmw/mwmp/processors/actor/ProcessorActorInteraction.hpp create mode 100644 apps/openmw/mwmp/processors/player/ProcessorCellCreate.hpp create mode 100644 apps/openmw/mwmp/processors/player/ProcessorPlayerBehavior.hpp create mode 100644 apps/openmw/mwmp/processors/player/ProcessorPlayerInteraction.hpp create mode 100644 apps/openmw/mwmp/processors/player/ProcessorPlayerMiscellaneous.hpp create mode 100644 apps/openmw/mwmp/processors/player/ProcessorPlayerReputation.hpp create mode 100644 apps/openmw/mwmp/processors/player/ProcessorRecordDynamic.hpp create mode 100644 apps/openmw/mwmp/processors/world/ProcessorDoorDestination.hpp create mode 100644 apps/openmw/mwmp/processors/world/ProcessorObjectReset.hpp create mode 100644 apps/openmw/mwmp/processors/world/ProcessorScriptGlobalFloat.hpp create mode 100644 apps/openmw/mwmp/processors/world/ProcessorScriptMemberFloat.hpp create mode 100644 components/openmw-mp/Packets/Actor/PacketActorInteraction.cpp create mode 100644 components/openmw-mp/Packets/Actor/PacketActorInteraction.hpp create mode 100644 components/openmw-mp/Packets/Player/PacketCellCreate.cpp create mode 100644 components/openmw-mp/Packets/Player/PacketCellCreate.hpp create mode 100644 components/openmw-mp/Packets/Player/PacketPlayerBehavior.cpp create mode 100644 components/openmw-mp/Packets/Player/PacketPlayerBehavior.hpp create mode 100644 components/openmw-mp/Packets/Player/PacketPlayerInteraction.cpp create mode 100644 components/openmw-mp/Packets/Player/PacketPlayerInteraction.hpp create mode 100644 components/openmw-mp/Packets/Player/PacketPlayerMiscellaneous.cpp create mode 100644 components/openmw-mp/Packets/Player/PacketPlayerMiscellaneous.hpp create mode 100644 components/openmw-mp/Packets/Player/PacketPlayerReputation.cpp create mode 100644 components/openmw-mp/Packets/Player/PacketPlayerReputation.hpp create mode 100644 components/openmw-mp/Packets/Player/PacketRecordDynamic.cpp create mode 100644 components/openmw-mp/Packets/Player/PacketRecordDynamic.hpp create mode 100644 components/openmw-mp/Packets/World/PacketDoorDestination.cpp create mode 100644 components/openmw-mp/Packets/World/PacketDoorDestination.hpp create mode 100644 components/openmw-mp/Packets/World/PacketObjectReset.cpp create mode 100644 components/openmw-mp/Packets/World/PacketObjectReset.hpp create mode 100644 components/openmw-mp/Packets/World/PacketScriptGlobalFloat.cpp create mode 100644 components/openmw-mp/Packets/World/PacketScriptGlobalFloat.hpp create mode 100644 components/openmw-mp/Packets/World/PacketScriptMemberFloat.cpp create mode 100644 components/openmw-mp/Packets/World/PacketScriptMemberFloat.hpp diff --git a/apps/openmw-mp/CMakeLists.txt b/apps/openmw-mp/CMakeLists.txt index 1d4386511..0f5abd684 100644 --- a/apps/openmw-mp/CMakeLists.txt +++ b/apps/openmw-mp/CMakeLists.txt @@ -111,30 +111,33 @@ 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/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/ProcessorActorEquipment.hpp processors/actor/ProcessorActorInteraction.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/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/ProcessorRecordDynamic.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/ProcessorPlayerInteraction.hpp processors/player/ProcessorPlayerInventory.hpp processors/player/ProcessorPlayerJournal.hpp processors/player/ProcessorPlayerKillCount.hpp processors/player/ProcessorPlayerLevel.hpp processors/player/ProcessorPlayerMap.hpp - processors/player/ProcessorPlayerPosition.hpp processors/player/ProcessorPlayerQuickKeys.hpp - processors/player/ProcessorPlayerRest.hpp processors/player/ProcessorPlayerResurrect.hpp - processors/player/ProcessorPlayerShapeshift.hpp processors/player/ProcessorPlayerSkill.hpp - processors/player/ProcessorPlayerSpeech.hpp processors/player/ProcessorPlayerSpellbook.hpp - processors/player/ProcessorPlayerStatsDynamic.hpp processors/player/ProcessorPlayerTopic.hpp + processors/player/ProcessorPlayerMiscellaneous.hpp processors/player/ProcessorPlayerPosition.hpp + processors/player/ProcessorPlayerQuickKeys.hpp processors/player/ProcessorPlayerRest.hpp + processors/player/ProcessorPlayerResurrect.hpp processors/player/ProcessorPlayerShapeshift.hpp + processors/player/ProcessorPlayerSkill.hpp processors/player/ProcessorPlayerSpeech.hpp + processors/player/ProcessorPlayerSpellbook.hpp processors/player/ProcessorPlayerStatsDynamic.hpp + processors/player/ProcessorPlayerTopic.hpp ) source_group(tes3mp-server\\processors\\player FILES ${PROCESSORS_PLAYER}) @@ -148,7 +151,8 @@ set(PROCESSORS_WORLD processors/world/ProcessorObjectSpawn.hpp processors/world/ProcessorObjectState.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/ProcessorScriptMemberFloat.hpp processors/world/ProcessorScriptGlobalShort.hpp + processors/world/ProcessorScriptGlobalFloat.hpp processors/world/ProcessorVideoPlay.hpp ) source_group(tes3mp-server\\processors\\world FILES ${PROCESSORS_WORLD}) diff --git a/apps/openmw-mp/Script/ScriptFunctions.hpp b/apps/openmw-mp/Script/ScriptFunctions.hpp index bf6d3558c..fd151a329 100644 --- a/apps/openmw-mp/Script/ScriptFunctions.hpp +++ b/apps/openmw-mp/Script/ScriptFunctions.hpp @@ -148,6 +148,7 @@ public: {"OnPlayerSkill", Function()}, {"OnPlayerLevel", Function()}, {"OnPlayerBounty", Function()}, + {"OnPlayerReputation", Function()}, {"OnPlayerEquipment", Function()}, {"OnPlayerInventory", Function()}, {"OnPlayerJournal", Function()}, @@ -158,7 +159,9 @@ public: {"OnPlayerTopic", Function()}, {"OnPlayerDisposition", Function()}, {"OnPlayerBook", Function()}, + {"OnPlayerMiscellaneous", Function()}, {"OnPlayerMap", Function()}, + {"OnPlayerInteraction", Function()}, {"OnPlayerRest", Function()}, {"OnCellLoad", Function()}, {"OnCellUnload", Function()}, diff --git a/apps/openmw-mp/processors/actor/ProcessorActorInteraction.hpp b/apps/openmw-mp/processors/actor/ProcessorActorInteraction.hpp new file mode 100644 index 000000000..f051f7812 --- /dev/null +++ b/apps/openmw-mp/processors/actor/ProcessorActorInteraction.hpp @@ -0,0 +1,27 @@ +#ifndef OPENMW_PROCESSORACTORINTERACTION_HPP +#define OPENMW_PROCESSORACTORINTERACTION_HPP + +#include "../ActorProcessor.hpp" + +namespace mwmp +{ + class ProcessorActorInteraction : public ActorProcessor + { + public: + ProcessorActorInteraction() + { + BPP_INIT(ID_ACTOR_INTERACTION) + } + + 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_PROCESSORACTORINTERACTION_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp index 2120d97e7..1cac593cb 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 01.04.17. -// - #ifndef OPENMW_PROCESSORPLAYERATTACK_HPP #define OPENMW_PROCESSORPLAYERATTACK_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerInteraction.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerInteraction.hpp new file mode 100644 index 000000000..ad6b186a9 --- /dev/null +++ b/apps/openmw-mp/processors/player/ProcessorPlayerInteraction.hpp @@ -0,0 +1,25 @@ +#ifndef OPENMW_PROCESSORPLAYERINTERACTION_HPP +#define OPENMW_PROCESSORPLAYERINTERACTION_HPP + +#include "../PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerInteraction : public PlayerProcessor + { + public: + ProcessorPlayerInteraction() + { + BPP_INIT(ID_PLAYER_INTERACTION) + } + + void Do(PlayerPacket &packet, Player &player) override + { + DEBUG_PRINTF(strPacketID.c_str()); + + Script::Call(player.getId()); + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERINTERACTION_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerMiscellaneous.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerMiscellaneous.hpp new file mode 100644 index 000000000..0d5c4a042 --- /dev/null +++ b/apps/openmw-mp/processors/player/ProcessorPlayerMiscellaneous.hpp @@ -0,0 +1,25 @@ +#ifndef OPENMW_PROCESSORPLAYERMISCELLANEOUS_HPP +#define OPENMW_PROCESSORPLAYERMISCELLANEOUS_HPP + +#include "../PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerMiscellaneous : public PlayerProcessor + { + public: + ProcessorPlayerMiscellaneous() + { + BPP_INIT(ID_PLAYER_MISCELLANEOUS) + } + + void Do(PlayerPacket &packet, Player &player) override + { + DEBUG_PRINTF(strPacketID.c_str()); + + Script::Call(player.getId()); + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERMISCELLANEOUS_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerReputation.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerReputation.hpp new file mode 100644 index 000000000..619b9004d --- /dev/null +++ b/apps/openmw-mp/processors/player/ProcessorPlayerReputation.hpp @@ -0,0 +1,23 @@ +#ifndef OPENMW_PROCESSORPLAYERREPUTATION_HPP +#define OPENMW_PROCESSORPLAYERREPUTATION_HPP + +#include "../PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerReputation : public PlayerProcessor + { + public: + ProcessorPlayerReputation() + { + BPP_INIT(ID_PLAYER_REPUTATION) + } + + void Do(PlayerPacket &packet, Player &player) override + { + Script::Call(player.getId()); + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERREPUTATION_HPP diff --git a/apps/openmw-mp/processors/player/ProcessorRecordDynamic.hpp b/apps/openmw-mp/processors/player/ProcessorRecordDynamic.hpp new file mode 100644 index 000000000..790e286c9 --- /dev/null +++ b/apps/openmw-mp/processors/player/ProcessorRecordDynamic.hpp @@ -0,0 +1,25 @@ +#ifndef OPENMW_PROCESSORPLAYERRECORDDYNAMIC_HPP +#define OPENMW_PROCESSORPLAYERRECORDDYNAMIC_HPP + +#include "../PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerRecordDynamic : public PlayerProcessor + { + public: + ProcessorPlayerRecordDynamic() + { + BPP_INIT(ID_RECORD_DYNAMIC) + } + + void Do(PlayerPacket &packet, Player &player) override + { + DEBUG_PRINTF(strPacketID.c_str()); + + Script::Call(player.getId()); + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERRECORDDYNAMIC_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorScriptGlobalFloat.hpp b/apps/openmw-mp/processors/world/ProcessorScriptGlobalFloat.hpp new file mode 100644 index 000000000..d31261e70 --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorScriptGlobalFloat.hpp @@ -0,0 +1,18 @@ +#ifndef OPENMW_PROCESSORSCRIPTGLOBALFLOAT_HPP +#define OPENMW_PROCESSORSCRIPTGLOBALFLOAT_HPP + +#include "../WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorScriptGlobalFloat : public WorldProcessor + { + public: + ProcessorScriptGlobalFloat() + { + BPP_INIT(ID_SCRIPT_GLOBAL_FLOAT) + } + }; +} + +#endif //OPENMW_PROCESSORSCRIPTGLOBALFLOAT_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorScriptMemberFloat.hpp b/apps/openmw-mp/processors/world/ProcessorScriptMemberFloat.hpp new file mode 100644 index 000000000..3655b21b1 --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorScriptMemberFloat.hpp @@ -0,0 +1,18 @@ +#ifndef OPENMW_PROCESSORSCRIPTMEMBERFLOAT_HPP +#define OPENMW_PROCESSORSCRIPTMEMBERFLOAT_HPP + +#include "../WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorScriptMemberFloat : public WorldProcessor + { + public: + ProcessorScriptMemberFloat() + { + BPP_INIT(ID_SCRIPT_MEMBER_FLOAT) + } + }; +} + +#endif //OPENMW_PROCESSORSCRIPTMEMBERFLOAT_HPP diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 333a4a85b..582e6c0fe 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -108,25 +108,27 @@ add_openmw_dir(mwmp/processors BaseClientPacketProcessor PlayerProcessor WorldPr ) add_openmw_dir (mwmp/processors/actor ProcessorActorAI ProcessorActorAnimFlags ProcessorActorAnimPlay ProcessorActorAttack - ProcessorActorAuthority ProcessorActorCellChange ProcessorActorDeath ProcessorActorEquipment ProcessorActorList - ProcessorActorPosition ProcessorActorSpeech ProcessorActorStatsDynamic ProcessorActorTest + ProcessorActorAuthority ProcessorActorCellChange ProcessorActorDeath ProcessorActorEquipment ProcessorActorInteraction + ProcessorActorList ProcessorActorPosition ProcessorActorSpeech ProcessorActorStatsDynamic ProcessorActorTest ) add_openmw_dir (mwmp/processors/player ProcessorChatMessage ProcessorGUIMessageBox ProcessorHandshake - ProcessorUserDisconnected ProcessorUserMyID ProcessorGameSettings ProcessorGameTime ProcessorGameWeather - ProcessorPlayerBaseInfo ProcessorPlayerAnimFlags ProcessorPlayerAnimPlay ProcessorPlayerAttack ProcessorPlayerAttribute - ProcessorPlayerBook ProcessorPlayerBounty ProcessorPlayerCellChange ProcessorPlayerCellState ProcessorPlayerCharClass - ProcessorPlayerCharGen ProcessorPlayerDeath ProcessorPlayerDisposition ProcessorPlayerEquipment ProcessorPlayerFaction + ProcessorUserDisconnected ProcessorUserMyID ProcessorCellCreate ProcessorRecordDynamic ProcessorGameSettings + ProcessorGameTime ProcessorGameWeather ProcessorPlayerAnimFlags ProcessorPlayerAnimPlay ProcessorPlayerAttack + ProcessorPlayerAttribute ProcessorPlayerBaseInfo ProcessorPlayerBehavior ProcessorPlayerBook ProcessorPlayerBounty + ProcessorPlayerCellChange ProcessorPlayerCellState ProcessorPlayerCharClass ProcessorPlayerCharGen ProcessorPlayerDeath + ProcessorPlayerDisposition ProcessorPlayerEquipment ProcessorPlayerFaction ProcessorPlayerInteraction ProcessorPlayerInventory ProcessorPlayerJail ProcessorPlayerJournal ProcessorPlayerKillCount ProcessorPlayerLevel - ProcessorPlayerMap ProcessorPlayerPosition ProcessorPlayerQuickKeys ProcessorPlayerResurrect ProcessorPlayerShapeshift - ProcessorPlayerSkill ProcessorPlayerSpeech ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic ProcessorPlayerTopic + ProcessorPlayerMap ProcessorPlayerMiscellaneous ProcessorPlayerPosition ProcessorPlayerQuickKeys + ProcessorPlayerReputation ProcessorPlayerResurrect ProcessorPlayerShapeshift ProcessorPlayerSkill ProcessorPlayerSpeech + ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic ProcessorPlayerTopic ) add_openmw_dir (mwmp/processors/world BaseObjectProcessor ProcessorConsoleCommand ProcessorContainer ProcessorDoorState ProcessorMusicPlay ProcessorVideoPlay ProcessorObjectAnimPlay ProcessorObjectDelete ProcessorObjectLock - ProcessorObjectMove ProcessorObjectPlace ProcessorObjectRotate ProcessorObjectScale ProcessorObjectSpawn - ProcessorObjectState ProcessorObjectTrap ProcessorScriptLocalShort ProcessorScriptLocalFloat ProcessorScriptMemberShort - ProcessorScriptGlobalShort + ProcessorObjectMove ProcessorObjectPlace ProcessorObjectReset ProcessorObjectRotate ProcessorObjectScale + ProcessorObjectSpawn ProcessorObjectState ProcessorObjectTrap ProcessorScriptLocalShort ProcessorScriptLocalFloat + ProcessorScriptMemberShort ProcessorScriptMemberFloat ProcessorScriptGlobalShort ProcessorScriptGlobalFloat ) # Main executable diff --git a/apps/openmw/mwmp/processors/ProcessorInitializer.cpp b/apps/openmw/mwmp/processors/ProcessorInitializer.cpp index f0b994486..c2774c5a8 100644 --- a/apps/openmw/mwmp/processors/ProcessorInitializer.cpp +++ b/apps/openmw/mwmp/processors/ProcessorInitializer.cpp @@ -10,33 +10,39 @@ #include "player/ProcessorGUIMessageBox.hpp" #include "player/ProcessorHandshake.hpp" #include "player/ProcessorUserDisconnected.hpp" +#include "player/ProcessorCellCreate.hpp" +#include "player/ProcessorRecordDynamic.hpp" #include "player/ProcessorGameSettings.hpp" #include "player/ProcessorGameTime.hpp" #include "player/ProcessorGameWeather.hpp" -#include "player/ProcessorPlayerBaseInfo.hpp" -#include "player/ProcessorPlayerCharGen.hpp" #include "player/ProcessorPlayerAnimFlags.hpp" #include "player/ProcessorPlayerAnimPlay.hpp" #include "player/ProcessorPlayerAttack.hpp" #include "player/ProcessorPlayerAttribute.hpp" +#include "player/ProcessorPlayerBaseInfo.hpp" +#include "player/ProcessorPlayerBehavior.hpp" #include "player/ProcessorPlayerBook.hpp" #include "player/ProcessorPlayerBounty.hpp" #include "player/ProcessorPlayerCellChange.hpp" #include "player/ProcessorPlayerCellState.hpp" #include "player/ProcessorPlayerCharClass.hpp" +#include "player/ProcessorPlayerCharGen.hpp" #include "player/ProcessorPlayerDeath.hpp" #include "player/ProcessorPlayerDisposition.hpp" #include "player/ProcessorPlayerEquipment.hpp" #include "player/ProcessorPlayerFaction.hpp" +#include "player/ProcessorPlayerInteraction.hpp" #include "player/ProcessorPlayerInventory.hpp" #include "player/ProcessorPlayerJail.hpp" #include "player/ProcessorPlayerJournal.hpp" #include "player/ProcessorPlayerKillCount.hpp" #include "player/ProcessorPlayerLevel.hpp" #include "player/ProcessorPlayerMap.hpp" +#include "player/ProcessorPlayerMiscellaneous.hpp" #include "player/ProcessorPlayerPosition.hpp" #include "player/ProcessorPlayerQuickKeys.hpp" #include "player/ProcessorPlayerRegionAuthority.hpp" +#include "player/ProcessorPlayerReputation.hpp" #include "player/ProcessorPlayerRest.hpp" #include "player/ProcessorPlayerResurrect.hpp" #include "player/ProcessorPlayerShapeshift.hpp" @@ -49,6 +55,7 @@ #include "WorldProcessor.hpp" #include "world/ProcessorConsoleCommand.hpp" #include "world/ProcessorContainer.hpp" +#include "world/ProcessorDoorDestination.hpp" #include "world/ProcessorDoorState.hpp" #include "world/ProcessorMusicPlay.hpp" #include "world/ProcessorObjectAnimPlay.hpp" @@ -56,6 +63,7 @@ #include "world/ProcessorObjectLock.hpp" #include "world/ProcessorObjectMove.hpp" #include "world/ProcessorObjectPlace.hpp" +#include "world/ProcessorObjectReset.hpp" #include "world/ProcessorObjectRotate.hpp" #include "world/ProcessorObjectScale.hpp" #include "world/ProcessorObjectSpawn.hpp" @@ -64,7 +72,9 @@ #include "world/ProcessorScriptLocalShort.hpp" #include "world/ProcessorScriptLocalFloat.hpp" #include "world/ProcessorScriptMemberShort.hpp" +#include "world/ProcessorScriptMemberFloat.hpp" #include "world/ProcessorScriptGlobalShort.hpp" +#include "world/ProcessorScriptGlobalFloat.hpp" #include "world/ProcessorVideoPlay.hpp" #include "actor/ProcessorActorAI.hpp" @@ -75,6 +85,7 @@ #include "actor/ProcessorActorCellChange.hpp" #include "actor/ProcessorActorDeath.hpp" #include "actor/ProcessorActorEquipment.hpp" +#include "actor/ProcessorActorInteraction.hpp" #include "actor/ProcessorActorList.hpp" #include "actor/ProcessorActorPosition.hpp" #include "actor/ProcessorActorSpeech.hpp" @@ -89,33 +100,39 @@ void ProcessorInitializer() PlayerProcessor::AddProcessor(new ProcessorGUIMessageBox()); PlayerProcessor::AddProcessor(new ProcessorHandshake()); PlayerProcessor::AddProcessor(new ProcessorUserDisconnected()); + PlayerProcessor::AddProcessor(new ProcessorCellCreate()); + PlayerProcessor::AddProcessor(new ProcessorRecordDynamic()); PlayerProcessor::AddProcessor(new ProcessorGameSettings()); 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 ProcessorPlayerBaseInfo()); + PlayerProcessor::AddProcessor(new ProcessorPlayerBehavior()); PlayerProcessor::AddProcessor(new ProcessorPlayerBook()); PlayerProcessor::AddProcessor(new ProcessorPlayerBounty()); PlayerProcessor::AddProcessor(new ProcessorPlayerCellChange()); PlayerProcessor::AddProcessor(new ProcessorPlayerCellState()); PlayerProcessor::AddProcessor(new ProcessorPlayerCharClass()); + PlayerProcessor::AddProcessor(new ProcessorPlayerCharGen()); PlayerProcessor::AddProcessor(new ProcessorPlayerDeath()); PlayerProcessor::AddProcessor(new ProcessorPlayerDisposition()); PlayerProcessor::AddProcessor(new ProcessorPlayerEquipment()); PlayerProcessor::AddProcessor(new ProcessorPlayerFaction()); + PlayerProcessor::AddProcessor(new ProcessorPlayerInteraction()); PlayerProcessor::AddProcessor(new ProcessorPlayerInventory()); PlayerProcessor::AddProcessor(new ProcessorPlayerJail()); PlayerProcessor::AddProcessor(new ProcessorPlayerJournal()); PlayerProcessor::AddProcessor(new ProcessorPlayerKillCount()); PlayerProcessor::AddProcessor(new ProcessorPlayerLevel()); PlayerProcessor::AddProcessor(new ProcessorPlayerMap()); + PlayerProcessor::AddProcessor(new ProcessorPlayerMiscellaneous()); PlayerProcessor::AddProcessor(new ProcessorPlayerPosition()); PlayerProcessor::AddProcessor(new ProcessorPlayerQuickKeys()); PlayerProcessor::AddProcessor(new ProcessorPlayerRegionAuthority()); + PlayerProcessor::AddProcessor(new ProcessorPlayerReputation()); PlayerProcessor::AddProcessor(new ProcessorPlayerRest()); PlayerProcessor::AddProcessor(new ProcessorPlayerResurrect()); PlayerProcessor::AddProcessor(new ProcessorPlayerShapeshift()); @@ -127,6 +144,7 @@ void ProcessorInitializer() WorldProcessor::AddProcessor(new ProcessorConsoleCommand()); WorldProcessor::AddProcessor(new ProcessorContainer()); + WorldProcessor::AddProcessor(new ProcessorDoorDestination()); WorldProcessor::AddProcessor(new ProcessorDoorState()); WorldProcessor::AddProcessor(new ProcessorMusicPlay()); WorldProcessor::AddProcessor(new ProcessorObjectAnimPlay()); @@ -134,6 +152,7 @@ void ProcessorInitializer() WorldProcessor::AddProcessor(new ProcessorObjectLock()); WorldProcessor::AddProcessor(new ProcessorObjectMove()); WorldProcessor::AddProcessor(new ProcessorObjectPlace()); + WorldProcessor::AddProcessor(new ProcessorObjectReset()); WorldProcessor::AddProcessor(new ProcessorObjectRotate()); WorldProcessor::AddProcessor(new ProcessorObjectScale()); WorldProcessor::AddProcessor(new ProcessorObjectSpawn()); @@ -142,7 +161,9 @@ void ProcessorInitializer() WorldProcessor::AddProcessor(new ProcessorScriptLocalShort()); WorldProcessor::AddProcessor(new ProcessorScriptLocalFloat()); WorldProcessor::AddProcessor(new ProcessorScriptMemberShort()); + WorldProcessor::AddProcessor(new ProcessorScriptMemberFloat()); WorldProcessor::AddProcessor(new ProcessorScriptGlobalShort()); + WorldProcessor::AddProcessor(new ProcessorScriptGlobalFloat()); WorldProcessor::AddProcessor(new ProcessorVideoPlay()); ActorProcessor::AddProcessor(new ProcessorActorAI()); @@ -153,6 +174,7 @@ void ProcessorInitializer() ActorProcessor::AddProcessor(new ProcessorActorCellChange()); ActorProcessor::AddProcessor(new ProcessorActorDeath()); ActorProcessor::AddProcessor(new ProcessorActorEquipment()); + ActorProcessor::AddProcessor(new ProcessorActorInteraction()); ActorProcessor::AddProcessor(new ProcessorActorList()); ActorProcessor::AddProcessor(new ProcessorActorPosition()); ActorProcessor::AddProcessor(new ProcessorActorSpeech()); diff --git a/apps/openmw/mwmp/processors/actor/ProcessorActorInteraction.hpp b/apps/openmw/mwmp/processors/actor/ProcessorActorInteraction.hpp new file mode 100644 index 000000000..8d1fda29a --- /dev/null +++ b/apps/openmw/mwmp/processors/actor/ProcessorActorInteraction.hpp @@ -0,0 +1,25 @@ +#ifndef OPENMW_PROCESSORACTORINTERACTION_HPP +#define OPENMW_PROCESSORACTORINTERACTION_HPP + +#include "../ActorProcessor.hpp" +#include "apps/openmw/mwmp/Main.hpp" +#include "apps/openmw/mwmp/CellController.hpp" + +namespace mwmp +{ + class ProcessorActorInteraction : public ActorProcessor + { + public: + ProcessorActorInteraction() + { + BPP_INIT(ID_ACTOR_INTERACTION); + } + + virtual void Do(ActorPacket &packet, ActorList &actorList) + { + //Main::get().getCellController()->readInteraction(actorList); + } + }; +} + +#endif //OPENMW_PROCESSORACTORINTERACTION_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorCellCreate.hpp b/apps/openmw/mwmp/processors/player/ProcessorCellCreate.hpp new file mode 100644 index 000000000..af2d09acf --- /dev/null +++ b/apps/openmw/mwmp/processors/player/ProcessorCellCreate.hpp @@ -0,0 +1,23 @@ +#ifndef OPENMW_PROCESSORCELLCREATE_HPP +#define OPENMW_PROCESSORCELLCREATE_HPP + +#include "../PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorCellCreate : public PlayerProcessor + { + public: + ProcessorCellCreate() + { + BPP_INIT(ID_CELL_CREATE) + } + + virtual void Do(PlayerPacket &packet, BasePlayer *player) + { + // Placeholder + } + }; +} + +#endif //OPENMW_PROCESSORCELLCREATE_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerAttack.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerAttack.hpp index 99ebf9327..0fcab773b 100644 --- a/apps/openmw/mwmp/processors/player/ProcessorPlayerAttack.hpp +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerAttack.hpp @@ -1,19 +1,9 @@ -// -// Created by koncord on 16.04.17. -// - #ifndef OPENMW_PROCESSORPLAYERATTACK_HPP #define OPENMW_PROCESSORPLAYERATTACK_HPP #include "apps/openmw/mwmp/Main.hpp" #include "../PlayerProcessor.hpp" #include "apps/openmw/mwmp/MechanicsHelper.hpp" -#include "apps/openmw/mwbase/world.hpp" -#include "apps/openmw/mwworld/containerstore.hpp" -#include "apps/openmw/mwworld/inventorystore.hpp" -#include "apps/openmw/mwmechanics/combat.hpp" - -#include "apps/openmw/mwbase/environment.hpp" namespace mwmp { diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerBehavior.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerBehavior.hpp new file mode 100644 index 000000000..185a27099 --- /dev/null +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerBehavior.hpp @@ -0,0 +1,30 @@ +#ifndef OPENMW_PROCESSORPLAYERBEHAVIOR_HPP +#define OPENMW_PROCESSORPLAYERBEHAVIOR_HPP + +#include "../PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerBehavior : public PlayerProcessor + { + public: + ProcessorPlayerBehavior() + { + BPP_INIT(ID_PLAYER_BEHAVIOR) + } + + virtual void Do(PlayerPacket &packet, BasePlayer *player) + { + if (isLocal()) + { + //static_cast(player)->setBehavior(); + } + else if (player != 0) + { + //static_cast(player)->setBehavior(); + } + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERBEHAVIOR_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerInteraction.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerInteraction.hpp new file mode 100644 index 000000000..f0bd682c7 --- /dev/null +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerInteraction.hpp @@ -0,0 +1,27 @@ +#ifndef OPENMW_PROCESSORPLAYERINTERACTION_HPP +#define OPENMW_PROCESSORPLAYERINTERACTION_HPP + +#include "apps/openmw/mwmp/Main.hpp" +#include "../PlayerProcessor.hpp" +#include "apps/openmw/mwmp/MechanicsHelper.hpp" + +namespace mwmp +{ + class ProcessorPlayerInteraction : public PlayerProcessor + { + public: + ProcessorPlayerInteraction() + { + BPP_INIT(ID_PLAYER_INTERACTION) + } + + virtual void Do(PlayerPacket &packet, BasePlayer *player) + { + //if (player != 0) + // MechanicsHelper::processInteraction(player->interaction, static_cast(player)->getPtr()); + } + }; +} + + +#endif //OPENMW_PROCESSORPLAYERINTERACTION_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerLevel.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerLevel.hpp index 0270ca222..2c8779907 100644 --- a/apps/openmw/mwmp/processors/player/ProcessorPlayerLevel.hpp +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerLevel.hpp @@ -1,7 +1,3 @@ -// -// Created by koncord on 16.04.17. -// - #ifndef OPENMW_PROCESSORPLAYERLEVEL_HPP #define OPENMW_PROCESSORPLAYERLEVEL_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerMiscellaneous.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerMiscellaneous.hpp new file mode 100644 index 000000000..f6e06b08b --- /dev/null +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerMiscellaneous.hpp @@ -0,0 +1,32 @@ +#ifndef OPENMW_PROCESSORPLAYERMISCELLANEOUS_HPP +#define OPENMW_PROCESSORPLAYERMISCELLANEOUS_HPP + + +#include "../PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerMiscellaneous : public PlayerProcessor + { + public: + ProcessorPlayerMiscellaneous() + { + BPP_INIT(ID_PLAYER_MISCELLANEOUS) + } + + virtual void Do(PlayerPacket &packet, BasePlayer *player) + { + if (!isLocal()) return; + + LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_MISCELLANEOUS about LocalPlayer from server"); + + if (!isRequest()) + { + LocalPlayer &localPlayer = static_cast(*player); + //localPlayer.setMiscellaneous(); + } + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERMISCELLANEOUS_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerReputation.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerReputation.hpp new file mode 100644 index 000000000..4bdf7ee8b --- /dev/null +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerReputation.hpp @@ -0,0 +1,38 @@ +#ifndef OPENMW_PROCESSORPLAYERREPUTATION_HPP +#define OPENMW_PROCESSORPLAYERREPUTATION_HPP + + +#include "../PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerReputation : public PlayerProcessor + { + public: + ProcessorPlayerReputation() + { + BPP_INIT(ID_PLAYER_REPUTATION) + } + + virtual void Do(PlayerPacket &packet, BasePlayer *player) + { + if (isLocal()) + { + //if (isRequest()) + // static_cast(player)->updateReputation(true); + //else + // static_cast(player)->setReputation(); + } + else if (player != 0) + { + MWWorld::Ptr ptrPlayer = static_cast(player)->getPtr(); + MWMechanics::NpcStats *ptrNpcStats = &ptrPlayer.getClass().getNpcStats(ptrPlayer); + + ptrNpcStats->setReputation(player->npcStats.mReputation); + } + } + }; +} + + +#endif //OPENMW_PROCESSORPLAYERREPUTATION_HPP diff --git a/apps/openmw/mwmp/processors/player/ProcessorRecordDynamic.hpp b/apps/openmw/mwmp/processors/player/ProcessorRecordDynamic.hpp new file mode 100644 index 000000000..dfcfc9d64 --- /dev/null +++ b/apps/openmw/mwmp/processors/player/ProcessorRecordDynamic.hpp @@ -0,0 +1,23 @@ +#ifndef OPENMW_PROCESSORRECORDDYNAMIC_HPP +#define OPENMW_PROCESSORRECORDDYNAMIC_HPP + +#include "../PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorRecordDynamic : public PlayerProcessor + { + public: + ProcessorRecordDynamic() + { + BPP_INIT(ID_RECORD_DYNAMIC) + } + + virtual void Do(PlayerPacket &packet, BasePlayer *player) + { + // Placeholder + } + }; +} + +#endif //OPENMW_PROCESSORRECORDDYNAMIC_HPP diff --git a/apps/openmw/mwmp/processors/world/ProcessorDoorDestination.hpp b/apps/openmw/mwmp/processors/world/ProcessorDoorDestination.hpp new file mode 100644 index 000000000..8a671696d --- /dev/null +++ b/apps/openmw/mwmp/processors/world/ProcessorDoorDestination.hpp @@ -0,0 +1,25 @@ +#ifndef OPENMW_PROCESSDOORDESTINATION_HPP +#define OPENMW_PROCESSDOORDESTINATION_HPP + +#include "BaseObjectProcessor.hpp" + +namespace mwmp +{ + class ProcessorDoorDestination : public BaseObjectProcessor + { + public: + ProcessorDoorDestination() + { + BPP_INIT(ID_DOOR_DESTINATION) + } + + virtual void Do(WorldPacket &packet, WorldEvent &event) + { + BaseObjectProcessor::Do(packet, event); + + //event.setDoorDestinations(ptrCellStore); + } + }; +} + +#endif //OPENMW_PROCESSDOORDESTINATION_HPP diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectReset.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectReset.hpp new file mode 100644 index 000000000..b5236c697 --- /dev/null +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectReset.hpp @@ -0,0 +1,26 @@ +#ifndef OPENMW_PROCESSOROBJECTRESET_HPP +#define OPENMW_PROCESSOROBJECTRESET_HPP + +#include "BaseObjectProcessor.hpp" + +namespace mwmp +{ + class ProcessorObjectReset : public BaseObjectProcessor + { + public: + ProcessorObjectReset() + { + BPP_INIT(ID_OBJECT_RESET) + } + + virtual void Do(WorldPacket &packet, WorldEvent &event) + { + BaseObjectProcessor::Do(packet, event); + + //event.resetObjects(ptrCellStore); + } + + }; +} + +#endif //OPENMW_PROCESSOROBJECTRESET_HPP diff --git a/apps/openmw/mwmp/processors/world/ProcessorScriptGlobalFloat.hpp b/apps/openmw/mwmp/processors/world/ProcessorScriptGlobalFloat.hpp new file mode 100644 index 000000000..ae936720b --- /dev/null +++ b/apps/openmw/mwmp/processors/world/ProcessorScriptGlobalFloat.hpp @@ -0,0 +1,24 @@ +#ifndef OPENMW_PROCESSORSCRIPTGLOBALFLOAT_HPP +#define OPENMW_PROCESSORSCRIPTGLOBALFLOAT_HPP + +#include "../WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorScriptGlobalFloat : public WorldProcessor + { + public: + ProcessorScriptGlobalFloat() + { + BPP_INIT(ID_SCRIPT_GLOBAL_FLOAT) + } + + virtual void Do(WorldPacket &packet, WorldEvent &event) + { + LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s", strPacketID.c_str()); + //event.setGlobalFloats(); + } + }; +} + +#endif //OPENMW_PROCESSORSCRIPTGLOBALFLOAT_HPP diff --git a/apps/openmw/mwmp/processors/world/ProcessorScriptMemberFloat.hpp b/apps/openmw/mwmp/processors/world/ProcessorScriptMemberFloat.hpp new file mode 100644 index 000000000..9599432d8 --- /dev/null +++ b/apps/openmw/mwmp/processors/world/ProcessorScriptMemberFloat.hpp @@ -0,0 +1,24 @@ +#ifndef OPENMW_PROCESSORSCRIPTMEMBERFLOAT_HPP +#define OPENMW_PROCESSORSCRIPTMEMBERFLOAT_HPP + +#include "../WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorScriptMemberFloat : public WorldProcessor + { + public: + ProcessorScriptMemberFloat() + { + BPP_INIT(ID_SCRIPT_MEMBER_FLOAT) + } + + virtual void Do(WorldPacket &packet, WorldEvent &event) + { + LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s", strPacketID.c_str()); + //event.setMemberFloats(); + } + }; +} + +#endif //OPENMW_PROCESSORSCRIPTMEMBERFLOAT_HPP diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 2efc1c412..8cc272c63 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -176,28 +176,32 @@ add_component_dir (openmw-mp/Packets add_component_dir (openmw-mp/Packets/Actor ActorPacket PacketActorList PacketActorAuthority PacketActorTest PacketActorAI PacketActorAnimFlags PacketActorAnimPlay - PacketActorAttack PacketActorCellChange PacketActorDeath PacketActorEquipment PacketActorPosition PacketActorSpeech - PacketActorStatsDynamic + PacketActorAttack PacketActorCellChange PacketActorDeath PacketActorEquipment PacketActorInteraction PacketActorPosition + PacketActorSpeech PacketActorStatsDynamic ) add_component_dir (openmw-mp/Packets/Player PlayerPacket PacketHandshake PacketChatMessage PacketGUIBoxes PacketGameSettings PacketGameTime PacketGameWeather + + PacketCellCreate PacketRecordDynamic + PacketPlayerBaseInfo PacketPlayerCharGen PacketPlayerActiveSkills PacketPlayerAnimFlags PacketPlayerAnimPlay - PacketPlayerAttack PacketPlayerAttribute PacketPlayerBook PacketPlayerBounty PacketPlayerCellChange + PacketPlayerAttack PacketPlayerAttribute PacketPlayerBehavior PacketPlayerBook PacketPlayerBounty PacketPlayerCellChange PacketPlayerCellState PacketPlayerClass PacketPlayerDeath PacketPlayerEquipment PacketPlayerFaction - PacketPlayerInventory PacketPlayerJail PacketPlayerJournal PacketPlayerKillCount PacketPlayerLevel - PacketPlayerMap PacketPlayerPosition PacketPlayerQuickKeys PacketPlayerRegionAuthority PacketPlayerRest - PacketPlayerResurrect PacketPlayerShapeshift PacketPlayerSkill PacketPlayerSpeech PacketPlayerSpellbook - PacketPlayerStatsDynamic PacketPlayerTopic + PacketPlayerInteraction PacketPlayerInventory PacketPlayerJail PacketPlayerJournal PacketPlayerKillCount PacketPlayerLevel + PacketPlayerMap PacketPlayerMiscellaneous PacketPlayerPosition PacketPlayerQuickKeys PacketPlayerRegionAuthority + PacketPlayerReputation PacketPlayerRest PacketPlayerResurrect PacketPlayerShapeshift PacketPlayerSkill PacketPlayerSpeech + PacketPlayerSpellbook PacketPlayerStatsDynamic PacketPlayerTopic ) add_component_dir (openmw-mp/Packets/World WorldPacket - PacketConsoleCommand PacketContainer PacketObjectAnimPlay PacketObjectDelete PacketDoorState PacketObjectLock - PacketObjectMove PacketObjectPlace PacketObjectRotate PacketObjectScale PacketObjectSpawn PacketObjectState - PacketObjectTrap PacketMusicPlay PacketVideoPlay PacketScriptLocalShort PacketScriptLocalFloat - PacketScriptMemberShort PacketScriptGlobalShort + PacketConsoleCommand PacketContainer PacketObjectAnimPlay PacketObjectDelete PacketDoorDestination + PacketDoorState PacketObjectLock PacketObjectMove PacketObjectPlace PacketObjectReset PacketObjectRotate + PacketObjectScale PacketObjectSpawn PacketObjectState PacketObjectTrap PacketMusicPlay PacketVideoPlay + PacketScriptLocalShort PacketScriptLocalFloat PacketScriptMemberShort PacketScriptMemberFloat PacketScriptGlobalShort + PacketScriptGlobalFloat ) add_component_dir (fallback diff --git a/components/openmw-mp/Controllers/ActorPacketController.cpp b/components/openmw-mp/Controllers/ActorPacketController.cpp index 59aa9de01..ce5ca0f44 100644 --- a/components/openmw-mp/Controllers/ActorPacketController.cpp +++ b/components/openmw-mp/Controllers/ActorPacketController.cpp @@ -8,6 +8,7 @@ #include "../Packets/Actor/PacketActorCellChange.hpp" #include "../Packets/Actor/PacketActorDeath.hpp" #include "../Packets/Actor/PacketActorEquipment.hpp" +#include "../Packets/Actor/PacketActorInteraction.hpp" #include "../Packets/Actor/PacketActorPosition.hpp" #include "../Packets/Actor/PacketActorStatsDynamic.hpp" #include "../Packets/Actor/PacketActorSpeech.hpp" @@ -35,6 +36,7 @@ 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); diff --git a/components/openmw-mp/Controllers/PlayerPacketController.cpp b/components/openmw-mp/Controllers/PlayerPacketController.cpp index 897e1f8df..76333b6b0 100644 --- a/components/openmw-mp/Controllers/PlayerPacketController.cpp +++ b/components/openmw-mp/Controllers/PlayerPacketController.cpp @@ -4,15 +4,18 @@ #include "../Packets/Player/PacketHandshake.hpp" #include "../Packets/Player/PacketGUIBoxes.hpp" #include "../Packets/Player/PacketLoaded.hpp" +#include "../Packets/Player/PacketCellCreate.hpp" +#include "../Packets/Player/PacketRecordDynamic.hpp" #include "../Packets/Player/PacketGameSettings.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/PacketPlayerBaseInfo.hpp" +#include "../Packets/Player/PacketPlayerBehavior.hpp" #include "../Packets/Player/PacketPlayerBook.hpp" #include "../Packets/Player/PacketPlayerBounty.hpp" #include "../Packets/Player/PacketPlayerCellChange.hpp" @@ -21,15 +24,18 @@ #include "../Packets/Player/PacketPlayerDeath.hpp" #include "../Packets/Player/PacketPlayerEquipment.hpp" #include "../Packets/Player/PacketPlayerFaction.hpp" +#include "../Packets/Player/PacketPlayerInteraction.hpp" #include "../Packets/Player/PacketPlayerInventory.hpp" #include "../Packets/Player/PacketPlayerJail.hpp" #include "../Packets/Player/PacketPlayerJournal.hpp" #include "../Packets/Player/PacketPlayerKillCount.hpp" #include "../Packets/Player/PacketPlayerLevel.hpp" #include "../Packets/Player/PacketPlayerMap.hpp" +#include "../Packets/Player/PacketPlayerMiscellaneous.hpp" #include "../Packets/Player/PacketPlayerPosition.hpp" #include "../Packets/Player/PacketPlayerQuickKeys.hpp" #include "../Packets/Player/PacketPlayerRegionAuthority.hpp" +#include "../Packets/Player/PacketPlayerReputation.hpp" #include "../Packets/Player/PacketPlayerRest.hpp" #include "../Packets/Player/PacketPlayerResurrect.hpp" #include "../Packets/Player/PacketPlayerShapeshift.hpp" @@ -56,34 +62,40 @@ 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); 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); 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 eb0c7292f..5905d92b6 100644 --- a/components/openmw-mp/Controllers/WorldPacketController.cpp +++ b/components/openmw-mp/Controllers/WorldPacketController.cpp @@ -3,6 +3,7 @@ #include "../Packets/World/PacketObjectLock.hpp" #include "../Packets/World/PacketObjectMove.hpp" #include "../Packets/World/PacketObjectPlace.hpp" +#include "../Packets/World/PacketObjectReset.hpp" #include "../Packets/World/PacketObjectRotate.hpp" #include "../Packets/World/PacketObjectScale.hpp" #include "../Packets/World/PacketObjectSpawn.hpp" @@ -10,6 +11,7 @@ #include "../Packets/World/PacketObjectTrap.hpp" #include "../Packets/World/PacketContainer.hpp" +#include "../Packets/World/PacketDoorDestination.hpp" #include "../Packets/World/PacketDoorState.hpp" #include "../Packets/World/PacketMusicPlay.hpp" #include "../Packets/World/PacketVideoPlay.hpp" @@ -18,7 +20,9 @@ #include "../Packets/World/PacketScriptLocalShort.hpp" #include "../Packets/World/PacketScriptLocalFloat.hpp" #include "../Packets/World/PacketScriptMemberShort.hpp" +#include "../Packets/World/PacketScriptMemberFloat.hpp" #include "../Packets/World/PacketScriptGlobalShort.hpp" +#include "../Packets/World/PacketScriptGlobalFloat.hpp" #include "WorldPacketController.hpp" @@ -37,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); AddPacket(&packets, peer); @@ -44,6 +49,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); @@ -52,7 +58,9 @@ 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 ad5a34235..f63d2d2f3 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -22,6 +22,7 @@ enum GameMessages ID_GAME_WEATHER, ID_PLAYER_BASEINFO, + ID_PLAYER_BEHAVIOR, ID_PLAYER_CHARGEN, ID_PLAYER_ACTIVESKILLS, ID_PLAYER_ANIM_FLAGS, @@ -37,15 +38,18 @@ enum GameMessages ID_PLAYER_DISPOSITION, ID_PLAYER_EQUIPMENT, ID_PLAYER_FACTION, + ID_PLAYER_INTERACTION, ID_PLAYER_INVENTORY, ID_PLAYER_JAIL, ID_PLAYER_JOURNAL, ID_PLAYER_KILL_COUNT, ID_PLAYER_LEVEL, ID_PLAYER_MAP, + ID_PLAYER_MISCELLANEOUS, ID_PLAYER_POSITION, ID_PLAYER_QUICKKEYS, ID_PLAYER_REGION_AUTHORITY, + ID_PLAYER_REPUTATION, ID_PLAYER_RESURRECT, ID_PLAYER_REST, ID_PLAYER_SHAPESHIFT, @@ -65,6 +69,7 @@ enum GameMessages ID_ACTOR_CELL_CHANGE, ID_ACTOR_DEATH, ID_ACTOR_EQUIPMENT, + ID_ACTOR_INTERACTION, ID_ACTOR_POSITION, ID_ACTOR_SPEECH, ID_ACTOR_STATS_DYNAMIC, @@ -74,14 +79,19 @@ enum GameMessages ID_OBJECT_LOCK, ID_OBJECT_MOVE, ID_OBJECT_PLACE, + ID_OBJECT_RESET, ID_OBJECT_ROTATE, ID_OBJECT_SCALE, ID_OBJECT_SPAWN, ID_OBJECT_STATE, ID_OBJECT_TRAP, + + ID_CELL_CREATE, + ID_RECORD_DYNAMIC, ID_CONSOLE_COMMAND, ID_CONTAINER, + ID_DOOR_DESTINATION, ID_DOOR_STATE, ID_MUSIC_PLAY, ID_VIDEO_PLAY, @@ -89,7 +99,9 @@ enum GameMessages ID_SCRIPT_LOCAL_SHORT, ID_SCRIPT_LOCAL_FLOAT, ID_SCRIPT_MEMBER_SHORT, + ID_SCRIPT_MEMBER_FLOAT, ID_SCRIPT_GLOBAL_SHORT, + ID_SCRIPT_GLOBAL_FLOAT, ID_GAME_SETTINGS, ID_GAME_PREINIT diff --git a/components/openmw-mp/Packets/Actor/PacketActorInteraction.cpp b/components/openmw-mp/Packets/Actor/PacketActorInteraction.cpp new file mode 100644 index 000000000..0f58a817f --- /dev/null +++ b/components/openmw-mp/Packets/Actor/PacketActorInteraction.cpp @@ -0,0 +1,15 @@ +#include +#include +#include "PacketActorInteraction.hpp" + +using namespace mwmp; + +PacketActorInteraction::PacketActorInteraction(RakNet::RakPeerInterface *peer) : ActorPacket(peer) +{ + packetID = ID_ACTOR_INTERACTION; +} + +void PacketActorInteraction::Actor(BaseActor &actor, bool send) +{ + // Placeholder +} diff --git a/components/openmw-mp/Packets/Actor/PacketActorInteraction.hpp b/components/openmw-mp/Packets/Actor/PacketActorInteraction.hpp new file mode 100644 index 000000000..fecc3382c --- /dev/null +++ b/components/openmw-mp/Packets/Actor/PacketActorInteraction.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETACTORINTERACTION_HPP +#define OPENMW_PACKETACTORINTERACTION_HPP + +#include + +namespace mwmp +{ + class PacketActorInteraction : public ActorPacket + { + public: + PacketActorInteraction(RakNet::RakPeerInterface *peer); + + virtual void Actor(BaseActor &actor, bool send); + }; +} + +#endif //OPENMW_PACKETACTORINTERACTION_HPP diff --git a/components/openmw-mp/Packets/Player/PacketCellCreate.cpp b/components/openmw-mp/Packets/Player/PacketCellCreate.cpp new file mode 100644 index 000000000..8090c6491 --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketCellCreate.cpp @@ -0,0 +1,17 @@ +#include "PacketCellCreate.hpp" +#include + +using namespace mwmp; + +PacketCellCreate::PacketCellCreate(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_CELL_CREATE; + orderChannel = CHANNEL_SYSTEM; +} + +void PacketCellCreate::Packet(RakNet::BitStream *bs, bool send) +{ + PlayerPacket::Packet(bs, send); + + // Placeholder +} diff --git a/components/openmw-mp/Packets/Player/PacketCellCreate.hpp b/components/openmw-mp/Packets/Player/PacketCellCreate.hpp new file mode 100644 index 000000000..64bfde32a --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketCellCreate.hpp @@ -0,0 +1,18 @@ +#ifndef OPENMW_PACKETCELLCREATE_HPP +#define OPENMW_PACKETCELLCREATE_HPP + +#include +#include + +namespace mwmp +{ + class PacketCellCreate: public PlayerPacket + { + public: + PacketCellCreate(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETCELLCREATE_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerBehavior.cpp b/components/openmw-mp/Packets/Player/PacketPlayerBehavior.cpp new file mode 100644 index 000000000..72cf5f8ef --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerBehavior.cpp @@ -0,0 +1,16 @@ +#include "PacketPlayerBehavior.hpp" +#include + +using namespace mwmp; + +PacketPlayerBehavior::PacketPlayerBehavior(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_PLAYER_BEHAVIOR; +} + +void PacketPlayerBehavior::Packet(RakNet::BitStream *bs, bool send) +{ + PlayerPacket::Packet(bs, send); + + // Placeholder +} diff --git a/components/openmw-mp/Packets/Player/PacketPlayerBehavior.hpp b/components/openmw-mp/Packets/Player/PacketPlayerBehavior.hpp new file mode 100644 index 000000000..2e17f315e --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerBehavior.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETPLAYERBEHAVIOR_HPP +#define OPENMW_PACKETPLAYERBEHAVIOR_HPP + +#include + +namespace mwmp +{ + class PacketPlayerBehavior : public PlayerPacket + { + public: + PacketPlayerBehavior(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETPLAYERBEHAVIOR_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerInteraction.cpp b/components/openmw-mp/Packets/Player/PacketPlayerInteraction.cpp new file mode 100644 index 000000000..fa2edc90f --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerInteraction.cpp @@ -0,0 +1,16 @@ +#include "PacketPlayerInteraction.hpp" +#include + +using namespace mwmp; + +PacketPlayerInteraction::PacketPlayerInteraction(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_PLAYER_INTERACTION; +} + +void PacketPlayerInteraction::Packet(RakNet::BitStream *bs, bool send) +{ + PlayerPacket::Packet(bs, send); + + // Placeholder +} diff --git a/components/openmw-mp/Packets/Player/PacketPlayerInteraction.hpp b/components/openmw-mp/Packets/Player/PacketPlayerInteraction.hpp new file mode 100644 index 000000000..7bd6eabac --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerInteraction.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETPLAYERINTERACTION_HPP +#define OPENMW_PACKETPLAYERINTERACTION_HPP + +#include + +namespace mwmp +{ + class PacketPlayerInteraction : public PlayerPacket + { + public: + PacketPlayerInteraction(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETPLAYERINTERACTION_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerMiscellaneous.cpp b/components/openmw-mp/Packets/Player/PacketPlayerMiscellaneous.cpp new file mode 100644 index 000000000..6a6aa40f8 --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerMiscellaneous.cpp @@ -0,0 +1,16 @@ +#include "PacketPlayerMiscellaneous.hpp" +#include + +using namespace mwmp; + +PacketPlayerMiscellaneous::PacketPlayerMiscellaneous(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_PLAYER_MISCELLANEOUS; +} + +void PacketPlayerMiscellaneous::Packet(RakNet::BitStream *bs, bool send) +{ + PlayerPacket::Packet(bs, send); + + // Placeholder +} diff --git a/components/openmw-mp/Packets/Player/PacketPlayerMiscellaneous.hpp b/components/openmw-mp/Packets/Player/PacketPlayerMiscellaneous.hpp new file mode 100644 index 000000000..b3c178cba --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerMiscellaneous.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETPLAYERMISCELLANEOUS_HPP +#define OPENMW_PACKETPLAYERMISCELLANEOUS_HPP + +#include + +namespace mwmp +{ + class PacketPlayerMiscellaneous : public PlayerPacket + { + public: + PacketPlayerMiscellaneous(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETPLAYERMISCELLANEOUS_HPP diff --git a/components/openmw-mp/Packets/Player/PacketPlayerReputation.cpp b/components/openmw-mp/Packets/Player/PacketPlayerReputation.cpp new file mode 100644 index 000000000..291846ef9 --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerReputation.cpp @@ -0,0 +1,16 @@ +#include "PacketPlayerReputation.hpp" +#include + +using namespace mwmp; + +PacketPlayerReputation::PacketPlayerReputation(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_PLAYER_REPUTATION; +} + +void PacketPlayerReputation::Packet(RakNet::BitStream *bs, bool send) +{ + PlayerPacket::Packet(bs, send); + + // Placeholder +} diff --git a/components/openmw-mp/Packets/Player/PacketPlayerReputation.hpp b/components/openmw-mp/Packets/Player/PacketPlayerReputation.hpp new file mode 100644 index 000000000..d4b8128e4 --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerReputation.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETPLAYERREPUTATION_HPP +#define OPENMW_PACKETPLAYERREPUTATION_HPP + +#include + +namespace mwmp +{ + class PacketPlayerReputation : public PlayerPacket + { + public: + PacketPlayerReputation(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETPLAYERREPUTATION_HPP diff --git a/components/openmw-mp/Packets/Player/PacketRecordDynamic.cpp b/components/openmw-mp/Packets/Player/PacketRecordDynamic.cpp new file mode 100644 index 000000000..4ed8364eb --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketRecordDynamic.cpp @@ -0,0 +1,17 @@ +#include "PacketRecordDynamic.hpp" +#include + +using namespace mwmp; + +PacketRecordDynamic::PacketRecordDynamic(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_RECORD_DYNAMIC; + orderChannel = CHANNEL_SYSTEM; +} + +void PacketRecordDynamic::Packet(RakNet::BitStream *bs, bool send) +{ + PlayerPacket::Packet(bs, send); + + // Placeholder +} diff --git a/components/openmw-mp/Packets/Player/PacketRecordDynamic.hpp b/components/openmw-mp/Packets/Player/PacketRecordDynamic.hpp new file mode 100644 index 000000000..d58f936c3 --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketRecordDynamic.hpp @@ -0,0 +1,18 @@ +#ifndef OPENMW_PACKETRECORDDYNAMIC_HPP +#define OPENMW_PACKETRECORDDYNAMIC_HPP + +#include +#include + +namespace mwmp +{ + class PacketRecordDynamic: public PlayerPacket + { + public: + PacketRecordDynamic(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETRECORDDYNAMIC_HPP diff --git a/components/openmw-mp/Packets/World/PacketDoorDestination.cpp b/components/openmw-mp/Packets/World/PacketDoorDestination.cpp new file mode 100644 index 000000000..41f3c2764 --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketDoorDestination.cpp @@ -0,0 +1,16 @@ +#include +#include "PacketDoorDestination.hpp" + +using namespace mwmp; + +PacketDoorDestination::PacketDoorDestination(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +{ + packetID = ID_DOOR_DESTINATION; + hasCellData = true; +} + +void PacketDoorDestination::Object(WorldObject &worldObject, bool send) +{ + WorldPacket::Object(worldObject, send); + // Placeholder +} diff --git a/components/openmw-mp/Packets/World/PacketDoorDestination.hpp b/components/openmw-mp/Packets/World/PacketDoorDestination.hpp new file mode 100644 index 000000000..329476259 --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketDoorDestination.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETDOORDESTINATION_HPP +#define OPENMW_PACKETDOORDESTINATION_HPP + +#include + +namespace mwmp +{ + class PacketDoorDestination : public WorldPacket + { + public: + PacketDoorDestination(RakNet::RakPeerInterface *peer); + + virtual void Object(WorldObject &worldObject, bool send); + }; +} + +#endif //OPENMW_PACKETDOORDESTINATION_HPP diff --git a/components/openmw-mp/Packets/World/PacketObjectReset.cpp b/components/openmw-mp/Packets/World/PacketObjectReset.cpp new file mode 100644 index 000000000..7fcce2e39 --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketObjectReset.cpp @@ -0,0 +1,16 @@ +#include +#include "PacketObjectReset.hpp" + +using namespace mwmp; + +PacketObjectReset::PacketObjectReset(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +{ + packetID = ID_OBJECT_RESET; + hasCellData = true; +} + +void PacketObjectReset::Object(WorldObject &worldObject, bool send) +{ + WorldPacket::Object(worldObject, send); + // Placeholder +} diff --git a/components/openmw-mp/Packets/World/PacketObjectReset.hpp b/components/openmw-mp/Packets/World/PacketObjectReset.hpp new file mode 100644 index 000000000..58df1e6fb --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketObjectReset.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETOBJECTRESET_HPP +#define OPENMW_PACKETOBJECTRESET_HPP + +#include + +namespace mwmp +{ + class PacketObjectReset : public WorldPacket + { + public: + PacketObjectReset(RakNet::RakPeerInterface *peer); + + virtual void Object(WorldObject &worldObject, bool send); + }; +} + +#endif //OPENMW_PACKETOBJECTRESET_HPP diff --git a/components/openmw-mp/Packets/World/PacketScriptGlobalFloat.cpp b/components/openmw-mp/Packets/World/PacketScriptGlobalFloat.cpp new file mode 100644 index 000000000..c4a65a267 --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketScriptGlobalFloat.cpp @@ -0,0 +1,15 @@ +#include +#include "PacketScriptGlobalFloat.hpp" + +using namespace mwmp; + +PacketScriptGlobalFloat::PacketScriptGlobalFloat(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +{ + packetID = ID_SCRIPT_GLOBAL_FLOAT; +} + +void PacketScriptGlobalFloat::Object(WorldObject &worldObject, bool send) +{ + RW(worldObject.varName, send); + RW(worldObject.floatVal, send); +} diff --git a/components/openmw-mp/Packets/World/PacketScriptGlobalFloat.hpp b/components/openmw-mp/Packets/World/PacketScriptGlobalFloat.hpp new file mode 100644 index 000000000..a457ff7dc --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketScriptGlobalFloat.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETSCRIPTGLOBALFLOAT_HPP +#define OPENMW_PACKETSCRIPTGLOBALFLOAT_HPP + +#include + +namespace mwmp +{ + class PacketScriptGlobalFloat : public WorldPacket + { + public: + PacketScriptGlobalFloat(RakNet::RakPeerInterface *peer); + + virtual void Object(WorldObject &worldObject, bool send); + }; +} + +#endif //OPENMW_PACKETSCRIPTGLOBALFLOAT_HPP diff --git a/components/openmw-mp/Packets/World/PacketScriptMemberFloat.cpp b/components/openmw-mp/Packets/World/PacketScriptMemberFloat.cpp new file mode 100644 index 000000000..61161054d --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketScriptMemberFloat.cpp @@ -0,0 +1,16 @@ +#include +#include "PacketScriptMemberFloat.hpp" + +using namespace mwmp; + +PacketScriptMemberFloat::PacketScriptMemberFloat(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +{ + packetID = ID_SCRIPT_MEMBER_FLOAT; +} + +void PacketScriptMemberFloat::Object(WorldObject &worldObject, bool send) +{ + RW(worldObject.refId, send); + RW(worldObject.index, send); + RW(worldObject.floatVal, send); +} diff --git a/components/openmw-mp/Packets/World/PacketScriptMemberFloat.hpp b/components/openmw-mp/Packets/World/PacketScriptMemberFloat.hpp new file mode 100644 index 000000000..2b6f9ae2a --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketScriptMemberFloat.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETSCRIPTMEMBERFLOAT_HPP +#define OPENMW_PACKETSCRIPTMEMBERFLOAT_HPP + +#include + +namespace mwmp +{ + class PacketScriptMemberFloat : public WorldPacket + { + public: + PacketScriptMemberFloat(RakNet::RakPeerInterface *peer); + + virtual void Object(WorldObject &obj, bool send); + }; +} + +#endif //OPENMW_PACKETSCRIPTMEMBERFLOAT_HPP