forked from teamnwah/openmw-tes3coop
30 lines
791 B
C++
30 lines
791 B
C++
#ifndef OPENMW_PROCESSORDOORSTATE_HPP
|
|
#define OPENMW_PROCESSORDOORSTATE_HPP
|
|
|
|
#include "../WorldProcessor.hpp"
|
|
|
|
namespace mwmp
|
|
{
|
|
class ProcessorDoorState final: public WorldProcessor
|
|
{
|
|
public:
|
|
ProcessorDoorState()
|
|
{
|
|
BPP_INIT(ID_DOOR_STATE)
|
|
}
|
|
|
|
void Do(WorldPacket &packet, const 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
|