You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
//
|
|
// Created by koncord on 03.04.17.
|
|
//
|
|
|
|
#ifndef OPENMW_WORLDPROCESSOR_HPP
|
|
#define OPENMW_WORLDPROCESSOR_HPP
|
|
|
|
|
|
#include <components/openmw-mp/Base/BasePacketProcessor.hpp>
|
|
#include <components/openmw-mp/Packets/BasePacket.hpp>
|
|
#include <components/openmw-mp/Packets/World/WorldPacket.hpp>
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
#include <unordered_map>
|
|
#include <memory>
|
|
#include "Script/Script.hpp"
|
|
#include "Player.hpp"
|
|
//#include <boost/unordered_map.hpp>
|
|
//#include <boost/shared_ptr.hpp>
|
|
|
|
namespace mwmp
|
|
{
|
|
class WorldProcessor : public BasePacketProcessor
|
|
{
|
|
public:
|
|
|
|
virtual void Do(WorldPacket &packet, Player &player, BaseEvent &event);
|
|
|
|
static bool Process(RakNet::Packet &packet, BaseEvent &event) noexcept;
|
|
static void AddProcessor(WorldProcessor *processor) noexcept;
|
|
|
|
//typedef boost::unordered_map<unsigned char, boost::shared_ptr<WorldProcessor> > processors_t;
|
|
typedef std::unordered_map<unsigned char, std::unique_ptr<WorldProcessor> > processors_t;
|
|
private:
|
|
static processors_t processors;
|
|
};
|
|
}
|
|
|
|
#endif //OPENMW_WORLDPROCESSOR_HPP
|