2017-03-31 18:36:24 +00:00
|
|
|
//
|
|
|
|
// Created by koncord on 01.04.17.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef OPENMW_PROCESSORPLAYERCELLSTATE_HPP
|
|
|
|
#define OPENMW_PROCESSORPLAYERCELLSTATE_HPP
|
|
|
|
|
|
|
|
|
2017-04-02 21:45:41 +00:00
|
|
|
#include "apps/openmw-mp/PlayerProcessor.hpp"
|
|
|
|
#include "apps/openmw-mp/Networking.hpp"
|
|
|
|
#include "apps/openmw-mp/Script/Script.hpp"
|
2017-03-31 18:36:24 +00:00
|
|
|
#include <components/openmw-mp/Controllers/PlayerPacketController.hpp>
|
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class ProcessorPlayerCellState : public PlayerProcessor
|
|
|
|
{
|
|
|
|
PlayerPacketController *playerController;
|
|
|
|
public:
|
|
|
|
ProcessorPlayerCellState()
|
|
|
|
{
|
|
|
|
BPP_INIT(ID_PLAYER_CELL_STATE)
|
|
|
|
playerController = Networking::get().getPlayerController();
|
|
|
|
}
|
|
|
|
|
|
|
|
void Do(PlayerPacket &packet, Player &player) override
|
|
|
|
{
|
|
|
|
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID, player.npc.mName.c_str());
|
|
|
|
|
|
|
|
CellController::get()->update(&player);
|
|
|
|
|
|
|
|
Script::Call<Script::CallbackIdentity("OnPlayerCellState")>(player.getId());
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERCELLSTATE_HPP
|