openmw-tes3coop/apps/openmw/mwmp/processors/world/ProcessorContainer.hpp
David Cernat 27148ce9eb [General] Add placeholders for 12 new packets, to be implemented soon
Additionally, make it slightly clearer who created which previously existing packets.
2017-05-29 04:43:52 +03:00

33 lines
885 B
C++

#ifndef OPENMW_PROCESSORCONTAINER_HPP
#define OPENMW_PROCESSORCONTAINER_HPP
#include "BaseObjectProcessor.hpp"
namespace mwmp
{
class ProcessorContainer : public BaseObjectProcessor
{
public:
ProcessorContainer()
{
BPP_INIT(ID_CONTAINER)
}
virtual void Do(WorldPacket &packet, WorldEvent &event)
{
BaseObjectProcessor::Do(packet, event);
LOG_APPEND(Log::LOG_VERBOSE, "- action: %i", event.action);
// If we've received a request for information, comply with it
if (event.action == mwmp::BaseEvent::REQUEST)
event.sendContainers(ptrCellStore);
// Otherwise, edit containers based on the information received
else
event.editContainers(ptrCellStore);
}
};
}
#endif //OPENMW_PROCESSORCONTAINER_HPP