// // Created by koncord on 01.04.17. // #ifndef OPENMW_PROCESSORPLAYERCELLSTATE_HPP #define OPENMW_PROCESSORPLAYERCELLSTATE_HPP #include "../PlayerProcessor.hpp" #include "../Networking.hpp" #include "../Script/Script.hpp" #include 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()); packet.setPlayer(&player); packet.Read(); CellController::get()->update(&player); Script::Call(player.getId()); } }; } #endif //OPENMW_PROCESSORPLAYERCELLSTATE_HPP