1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 21:49:55 +00:00
openmw-tes3mp/apps/openmw-mp/processors/object/ProcessorObjectTrap.hpp
David Cernat b5922d18fd Merge pull request #428 from TES3MP/0.6.3 while resolving conflicts
# Conflicts:
#   apps/openmw-mp/Networking.cpp
#   apps/openmw-mp/Script/Functions/Objects.cpp
#   apps/openmw-mp/Script/Functions/Objects.hpp
#   apps/openmw-mp/processors/ObjectProcessor.cpp
#   apps/openmw-mp/processors/object/ProcessorContainer.hpp
#   apps/openmw-mp/processors/object/ProcessorDoorState.hpp
#   apps/openmw-mp/processors/object/ProcessorMusicPlay.hpp
#   apps/openmw-mp/processors/object/ProcessorObjectAnimPlay.hpp
#   apps/openmw-mp/processors/object/ProcessorObjectDelete.hpp
#   apps/openmw-mp/processors/object/ProcessorObjectLock.hpp
#   apps/openmw-mp/processors/object/ProcessorObjectMove.hpp
#   apps/openmw-mp/processors/object/ProcessorObjectPlace.hpp
#   apps/openmw-mp/processors/object/ProcessorObjectRotate.hpp
#   apps/openmw-mp/processors/object/ProcessorObjectScale.hpp
#   apps/openmw-mp/processors/object/ProcessorObjectSpawn.hpp
#   apps/openmw-mp/processors/object/ProcessorObjectState.hpp
#   apps/openmw-mp/processors/object/ProcessorObjectTrap.hpp
#   apps/openmw-mp/processors/object/ProcessorScriptGlobalFloat.hpp
#   apps/openmw-mp/processors/object/ProcessorScriptGlobalShort.hpp
#   apps/openmw-mp/processors/object/ProcessorScriptLocalFloat.hpp
#   apps/openmw-mp/processors/object/ProcessorScriptLocalShort.hpp
#   apps/openmw-mp/processors/object/ProcessorScriptMemberFloat.hpp
#   apps/openmw-mp/processors/object/ProcessorScriptMemberShort.hpp
#   apps/openmw-mp/processors/object/ProcessorVideoPlay.hpp
#   apps/openmw/mwmp/Networking.cpp
#   apps/openmw/mwmp/processors/object/BaseObjectProcessor.hpp
#   apps/openmw/mwmp/processors/object/ProcessorMusicPlay.hpp
#   apps/openmw/mwmp/processors/object/ProcessorScriptGlobalFloat.hpp
#   apps/openmw/mwmp/processors/object/ProcessorScriptGlobalShort.hpp
#   apps/openmw/mwmp/processors/object/ProcessorScriptMemberFloat.hpp
#   apps/openmw/mwmp/processors/object/ProcessorScriptMemberShort.hpp
#   apps/openmw/mwmp/processors/object/ProcessorVideoPlay.hpp
2018-05-16 06:28:24 +03:00

32 lines
958 B
C++

#ifndef OPENMW_PROCESSOROBJECTTRAP_HPP
#define OPENMW_PROCESSOROBJECTTRAP_HPP
#include "../ObjectProcessor.hpp"
namespace mwmp
{
class ProcessorObjectTrap final: public ObjectProcessor
{
public:
ProcessorObjectTrap()
{
BPP_INIT(ID_OBJECT_TRAP)
}
void Do(ObjectPacket &packet, const std::shared_ptr<Player> &player, BaseObjectList &objectList) override
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player->npc.mName.c_str());
packet.Send(true);
auto objCtrl = Networking::get().getState().getObjectCtrl();
auto objects = objCtrl.copyObjects(objectList);
Networking::get().getState().getEventCtrl().Call<CoreEvent::ON_OBJECT_TRAP>(player.get(), objects);
objCtrl.sendObjects(player, objects, objectList.cell);
}
};
}
#endif //OPENMW_PROCESSOROBJECTTRAP_HPP