diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index e5905fad6..2745d4652 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -18,9 +18,9 @@ #include "MasterClient.hpp" #include "Cell.hpp" #include "PlayerProcessor.hpp" +#include "WorldProcessor.hpp" #include #include -#include using namespace mwmp; using namespace std; @@ -165,214 +165,8 @@ void Networking::processWorldPacket(RakNet::Packet *packet) baseEvent.objectChanges.objects.clear(); baseEvent.guid = packet->guid; - switch (packet->data[0]) - { - - case ID_OBJECT_PLACE: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_PLACE from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - myPacket->Send(true); - - Script::Call(player->getId(), baseEvent.cell.getDescription().c_str()); - - break; - } - - case ID_OBJECT_DELETE: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_DELETE from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - myPacket->Send(true); - - Script::Call(player->getId(), baseEvent.cell.getDescription().c_str()); - - break; - } - - case ID_OBJECT_SCALE: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_SCALE from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - myPacket->Send(true); - - Script::Call(player->getId(), baseEvent.cell.getDescription().c_str()); - - break; - } - - case ID_OBJECT_LOCK: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_LOCK from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - myPacket->Send(true); - - Script::Call(player->getId(), baseEvent.cell.getDescription().c_str()); - - break; - } - - case ID_OBJECT_UNLOCK: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_UNLOCK from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - myPacket->Send(true); - - Script::Call(player->getId(), baseEvent.cell.getDescription().c_str()); - - break; - } - - case ID_OBJECT_MOVE: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_MOVE from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - myPacket->Send(true); - - break; - } - - case ID_OBJECT_ROTATE: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_ROTATE from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - myPacket->Send(true); - - break; - } - - case ID_OBJECT_ANIM_PLAY: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_ANIM_PLAY from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - myPacket->Send(true); - - break; - } - - case ID_DOOR_STATE: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_DOOR_STATE from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - myPacket->Send(true); - - Script::Call(player->getId(), baseEvent.cell.getDescription().c_str()); - - break; - } - - case ID_CONTAINER: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_CONTAINER from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - - LOG_APPEND(Log::LOG_WARN, "- action: %i", baseEvent.action); - - // Until we have a timestamp-based system, send packets pertaining to more - // than one container (i.e. replies to server requests for container contents) - // only to players who have the container's cell loaded - if (baseEvent.action == BaseEvent::SET && baseEvent.objectChanges.count > 1) - CellController::get()->getCell(&baseEvent.cell)->sendToLoaded(myPacket, &baseEvent); - else - myPacket->Send(true); - - Script::Call(player->getId(), baseEvent.cell.getDescription().c_str()); - - LOG_APPEND(Log::LOG_INFO, "- Finished processing ID_CONTAINER"); - - break; - } - - case ID_SCRIPT_LOCAL_SHORT: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_SCRIPT_LOCAL_SHORT from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - myPacket->Send(true); - - break; - } - - case ID_SCRIPT_LOCAL_FLOAT: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_SCRIPT_LOCAL_FLOAT from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - myPacket->Send(true); - - break; - } - - case ID_SCRIPT_MEMBER_SHORT: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_SCRIPT_MEMBER_SHORT from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - myPacket->Send(true); - - break; - } - - case ID_SCRIPT_GLOBAL_SHORT: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_SCRIPT_GLOBAL_SHORT from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - myPacket->Send(true); - - break; - } - - case ID_MUSIC_PLAY: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_MUSIC_PLAY from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - myPacket->Send(true); - - break; - } - - case ID_VIDEO_PLAY: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_VIDEO_PLAY from %s", player->npc.mName.c_str()); - - myPacket->setEvent(&baseEvent); - myPacket->Read(); - myPacket->Send(true); - - break; - } - - default: + if(!WorldProcessor::Process(*packet)) LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled WorldPacket with identifier %i has arrived", packet->data[0]); - break; - } } diff --git a/apps/openmw-mp/ProcessorInitializer.cpp b/apps/openmw-mp/ProcessorInitializer.cpp index 38be0531e..4e3c7c43c 100644 --- a/apps/openmw-mp/ProcessorInitializer.cpp +++ b/apps/openmw-mp/ProcessorInitializer.cpp @@ -24,6 +24,23 @@ #include "processors/player/ProcessorPlayerCharGen.hpp" #include "processors/player/ProcessorGUIMessageBox.hpp" #include "processors/player/ProcessorPlayerCharClass.hpp" +#include "WorldProcessor.hpp" +#include "processors/world/ProcessorContainer.hpp" +#include "processors/world/ProcessorDoorState.hpp" +#include "processors/world/ProcessorMusicPlay.hpp" +#include "processors/world/ProcessorObjectAnimPlay.hpp" +#include "processors/world/ProcessorObjectDelete.hpp" +#include "processors/world/ProcessorObjectLock.hpp" +#include "processors/world/ProcessorObjectMove.hpp" +#include "processors/world/ProcessorObjectPlace.hpp" +#include "processors/world/ProcessorObjectRotate.hpp" +#include "processors/world/ProcessorObjectScale.hpp" +#include "processors/world/ProcessorObjectUnlock.hpp" +#include "processors/world/ProcessorScriptGlobalShort.hpp" +#include "processors/world/ProcessorScriptLocalFloat.hpp" +#include "processors/world/ProcessorScriptLocalShort.hpp" +#include "processors/world/ProcessorScriptMemberShort.hpp" +#include "processors/world/ProcessorVideoPlay.hpp" using namespace mwmp; @@ -49,4 +66,21 @@ void ProcessorInitializer() PlayerProcessor::AddProcessor(new ProcessorPlayerCharGen()); PlayerProcessor::AddProcessor(new ProcessorGUIMessageBox()); PlayerProcessor::AddProcessor(new ProcessorPlayerCharClass()); + + WorldProcessor::AddProcessor(new ProcessorContainer()); + WorldProcessor::AddProcessor(new ProcessorDoorState()); + WorldProcessor::AddProcessor(new ProcessorMusicPlay()); + WorldProcessor::AddProcessor(new ProcessorObjectAnimPlay()); + WorldProcessor::AddProcessor(new ProcessorObjectDelete()); + WorldProcessor::AddProcessor(new ProcessorObjectLock()); + WorldProcessor::AddProcessor(new ProcessorObjectMove()); + WorldProcessor::AddProcessor(new ProcessorObjectPlace()); + WorldProcessor::AddProcessor(new ProcessorObjectRotate()); + WorldProcessor::AddProcessor(new ProcessorObjectScale()); + WorldProcessor::AddProcessor(new ProcessorObjectUnlock()); + WorldProcessor::AddProcessor(new ProcessorScriptGlobalShort()); + WorldProcessor::AddProcessor(new ProcessorScriptLocalFloat()); + WorldProcessor::AddProcessor(new ProcessorScriptLocalShort()); + WorldProcessor::AddProcessor(new ProcessorScriptMemberShort()); + WorldProcessor::AddProcessor(new ProcessorVideoPlay()); } \ No newline at end of file diff --git a/apps/openmw-mp/processors/world/ProcessorContainer.hpp b/apps/openmw-mp/processors/world/ProcessorContainer.hpp new file mode 100644 index 000000000..8f7fdfc47 --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorContainer.hpp @@ -0,0 +1,39 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSORCONTAINER_HPP +#define OPENMW_PROCESSORCONTAINER_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorContainer : public WorldProcessor + { + public: + ProcessorContainer() + { + BPP_INIT(ID_VIDEO_PLAY) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + LOG_APPEND(Log::LOG_WARN, "- action: %i", event.action); + + // Until we have a timestamp-based system, send packets pertaining to more + // than one container (i.e. replies to server requests for container contents) + // only to players who have the container's cell loaded + if (event.action == BaseEvent::SET && event.objectChanges.count > 1) + CellController::get()->getCell(&event.cell)->sendToLoaded(&packet, &event); + else + packet.Send(true); + + Script::Call(player.getId(), event.cell.getDescription().c_str()); + + LOG_APPEND(Log::LOG_INFO, "- Finished processing ID_CONTAINER"); + } + }; +} + +#endif //OPENMW_PROCESSORCONTAINER_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorDoorState.hpp b/apps/openmw-mp/processors/world/ProcessorDoorState.hpp new file mode 100644 index 000000000..4a140b33b --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorDoorState.hpp @@ -0,0 +1,29 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSORDOORSTATE_HPP +#define OPENMW_PROCESSORDOORSTATE_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorDoorState : public WorldProcessor + { + public: + ProcessorDoorState() + { + BPP_INIT(ID_DOOR_STATE) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + packet.Send(true); + + Script::Call(player.getId(), event.cell.getDescription().c_str()); + } + }; +} + +#endif //OPENMW_PROCESSORDOORSTATE_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorMusicPlay.hpp b/apps/openmw-mp/processors/world/ProcessorMusicPlay.hpp new file mode 100644 index 000000000..10f1014d0 --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorMusicPlay.hpp @@ -0,0 +1,27 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSORMUSICPLAY_HPP +#define OPENMW_PROCESSORMUSICPLAY_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorMusicPlay : public WorldProcessor + { + public: + ProcessorMusicPlay() + { + BPP_INIT(ID_MUSIC_PLAY) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + packet.Send(true); + } + }; +} + +#endif //OPENMW_PROCESSORMUSICPLAY_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectAnimPlay.hpp b/apps/openmw-mp/processors/world/ProcessorObjectAnimPlay.hpp new file mode 100644 index 000000000..bb8c3c8bb --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorObjectAnimPlay.hpp @@ -0,0 +1,27 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSOROBJECTANIMPLAY_HPP +#define OPENMW_PROCESSOROBJECTANIMPLAY_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorObjectAnimPlay : public WorldProcessor + { + public: + ProcessorObjectAnimPlay() + { + BPP_INIT(ID_OBJECT_ANIM_PLAY) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + packet.Send(true); + } + }; +} + +#endif //OPENMW_PROCESSOROBJECTANIMPLAY_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectDelete.hpp b/apps/openmw-mp/processors/world/ProcessorObjectDelete.hpp new file mode 100644 index 000000000..89f74bcbf --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorObjectDelete.hpp @@ -0,0 +1,29 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSOROBJECTDELETE_HPP +#define OPENMW_PROCESSOROBJECTDELETE_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorObjectDelete : public WorldProcessor + { + public: + ProcessorObjectDelete() + { + BPP_INIT(ID_OBJECT_DELETE) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + packet.Send(true); + + Script::Call(player.getId(), event.cell.getDescription().c_str()); + } + }; +} + +#endif //OPENMW_PROCESSOROBJECTDELETE_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectLock.hpp b/apps/openmw-mp/processors/world/ProcessorObjectLock.hpp new file mode 100644 index 000000000..7f03c37b9 --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorObjectLock.hpp @@ -0,0 +1,29 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSOROBJECTLOCK_HPP +#define OPENMW_PROCESSOROBJECTLOCK_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorObjectLock : public WorldProcessor + { + public: + ProcessorObjectLock() + { + BPP_INIT(ID_OBJECT_LOCK) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + packet.Send(true); + + Script::Call(player.getId(), event.cell.getDescription().c_str()); + } + }; +} + +#endif //OPENMW_PROCESSOROBJECTLOCK_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectMove.hpp b/apps/openmw-mp/processors/world/ProcessorObjectMove.hpp new file mode 100644 index 000000000..cfbaaee9e --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorObjectMove.hpp @@ -0,0 +1,27 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSOROBJECTMOVE_HPP +#define OPENMW_PROCESSOROBJECTMOVE_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorObjectMove : public WorldProcessor + { + public: + ProcessorObjectMove() + { + BPP_INIT(ID_OBJECT_MOVE) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + packet.Send(true); + } + }; +} + +#endif //OPENMW_PROCESSOROBJECTMOVE_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectPlace.hpp b/apps/openmw-mp/processors/world/ProcessorObjectPlace.hpp new file mode 100644 index 000000000..d9b473eab --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorObjectPlace.hpp @@ -0,0 +1,29 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSOROBJECTPLACE_HPP +#define OPENMW_PROCESSOROBJECTPLACE_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorObjectPlace : public WorldProcessor + { + public: + ProcessorObjectPlace() + { + BPP_INIT(ID_OBJECT_PLACE) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + packet.Send(true); + + Script::Call(player.getId(), event.cell.getDescription().c_str()); + } + }; +} + +#endif //OPENMW_PROCESSOROBJECTPLACE_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectRotate.hpp b/apps/openmw-mp/processors/world/ProcessorObjectRotate.hpp new file mode 100644 index 000000000..955de8507 --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorObjectRotate.hpp @@ -0,0 +1,27 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSOROBJECTROTATE_HPP +#define OPENMW_PROCESSOROBJECTROTATE_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorObjectRotate : public WorldProcessor + { + public: + ProcessorObjectRotate() + { + BPP_INIT(ID_OBJECT_ROTATE) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + packet.Send(true); + } + }; +} + +#endif //OPENMW_PROCESSOROBJECTROTATE_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectScale.hpp b/apps/openmw-mp/processors/world/ProcessorObjectScale.hpp new file mode 100644 index 000000000..f215662e0 --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorObjectScale.hpp @@ -0,0 +1,29 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSOROBJECTSCALE_HPP +#define OPENMW_PROCESSOROBJECTSCALE_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorObjectScale : public WorldProcessor + { + public: + ProcessorObjectScale() + { + BPP_INIT(ID_OBJECT_SCALE) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + packet.Send(true); + + Script::Call(player.getId(), event.cell.getDescription().c_str()); + } + }; +} + +#endif //OPENMW_PROCESSOROBJECTSCALE_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectUnlock.hpp b/apps/openmw-mp/processors/world/ProcessorObjectUnlock.hpp new file mode 100644 index 000000000..2d83cc87c --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorObjectUnlock.hpp @@ -0,0 +1,29 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSOROBJECTUNLOCK_HPP +#define OPENMW_PROCESSOROBJECTUNLOCK_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorObjectUnlock : public WorldProcessor + { + public: + ProcessorObjectUnlock() + { + BPP_INIT(ID_OBJECT_UNLOCK) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + packet.Send(true); + + Script::Call(player.getId(), event.cell.getDescription().c_str()); + } + }; +} + +#endif //OPENMW_PROCESSOROBJECTUNLOCK_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorScriptGlobalShort.hpp b/apps/openmw-mp/processors/world/ProcessorScriptGlobalShort.hpp new file mode 100644 index 000000000..1bebe9116 --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorScriptGlobalShort.hpp @@ -0,0 +1,27 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSORSCRIPTGLOBALSHORT_HPP +#define OPENMW_PROCESSORSCRIPTGLOBALSHORT_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorScriptGlobalShort : public WorldProcessor + { + public: + ProcessorScriptGlobalShort() + { + BPP_INIT(ID_SCRIPT_GLOBAL_SHORT) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + packet.Send(true); + } + }; +} + +#endif //OPENMW_PROCESSORSCRIPTGLOBALSHORT_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorScriptLocalFloat.hpp b/apps/openmw-mp/processors/world/ProcessorScriptLocalFloat.hpp new file mode 100644 index 000000000..d5b519879 --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorScriptLocalFloat.hpp @@ -0,0 +1,27 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSORSCRIPTLOCALFLOAT_HPP +#define OPENMW_PROCESSORSCRIPTLOCALFLOAT_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorScriptLocalFloat : public WorldProcessor + { + public: + ProcessorScriptLocalFloat() + { + BPP_INIT(ID_SCRIPT_LOCAL_FLOAT) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + packet.Send(true); + } + }; +} + +#endif //OPENMW_PROCESSORSCRIPTLOCALFLOAT_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorScriptLocalShort.hpp b/apps/openmw-mp/processors/world/ProcessorScriptLocalShort.hpp new file mode 100644 index 000000000..d2465c607 --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorScriptLocalShort.hpp @@ -0,0 +1,27 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSORSCRIPTLOCALSHORT_HPP +#define OPENMW_PROCESSORSCRIPTLOCALSHORT_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorScriptLocalShort : public WorldProcessor + { + public: + ProcessorScriptLocalShort() + { + BPP_INIT(ID_SCRIPT_LOCAL_SHORT) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + packet.Send(true); + } + }; +} + +#endif //OPENMW_PROCESSORSCRIPTLOCALSHORT_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorScriptMemberShort.hpp b/apps/openmw-mp/processors/world/ProcessorScriptMemberShort.hpp new file mode 100644 index 000000000..bec3d4a71 --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorScriptMemberShort.hpp @@ -0,0 +1,27 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSORSCRIPTMEMBERSHORT_HPP +#define OPENMW_PROCESSORSCRIPTMEMBERSHORT_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorScriptMemberShort : public WorldProcessor + { + public: + ProcessorScriptMemberShort() + { + BPP_INIT(ID_SCRIPT_MEMBER_SHORT) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + packet.Send(true); + } + }; +} + +#endif //OPENMW_PROCESSORSCRIPTMEMBERSHORT_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorVideoPlay.hpp b/apps/openmw-mp/processors/world/ProcessorVideoPlay.hpp new file mode 100644 index 000000000..4de19ffec --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorVideoPlay.hpp @@ -0,0 +1,27 @@ +// +// Created by koncord on 03.04.17. +// + +#ifndef OPENMW_PROCESSORVIDEOPLAY_HPP +#define OPENMW_PROCESSORVIDEOPLAY_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorVideoPlay : public WorldProcessor + { + public: + ProcessorVideoPlay() + { + BPP_INIT(ID_VIDEO_PLAY) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + packet.Send(true); + } + }; +} + +#endif //OPENMW_PROCESSORVIDEOPLAY_HPP