openmw-tes3coop/apps/openmw-mp/processors/world/ProcessorDoorState.hpp
Koncord fe2dd1bad4 [Server] Use correct cells in "send" functions
Remove unused return type from ON_PLAYER_SENDMESSAGE
2017-08-29 03:34:36 +08:00

30 lines
779 B
C++

#ifndef OPENMW_PROCESSORDOORSTATE_HPP
#define OPENMW_PROCESSORDOORSTATE_HPP
#include "../WorldProcessor.hpp"
namespace mwmp
{
class ProcessorDoorState : public WorldProcessor
{
public:
ProcessorDoorState()
{
BPP_INIT(ID_DOOR_STATE)
}
void Do(WorldPacket &packet, std::shared_ptr<Player> player, BaseEvent &event) override
{
packet.Send(true);
auto objCtrl = Networking::get().getState().getObjectCtrl();
auto objects = objCtrl.copyObjects(event);
Networking::get().getState().getEventCtrl().Call<CoreEvent::ON_DOOR_STATE>(player, objects);
objCtrl.sendObjects(player, objects, event.cell);
}
};
}
#endif //OPENMW_PROCESSORDOORSTATE_HPP