// // Created by koncord on 01.04.17. // #ifndef OPENMW_PROCESSORPLAYERDEATH_HPP #define OPENMW_PROCESSORPLAYERDEATH_HPP #include "../PlayerProcessor.hpp" #include namespace mwmp { class ProcessorPlayerDeath : public PlayerProcessor { public: ProcessorPlayerDeath() { BPP_INIT(ID_PLAYER_DEATH) } void Do(PlayerPacket &packet, std::shared_ptr player) override { LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player->npc.mName.c_str()); player->creatureStats.mDead = true; packet.Send(true); Networking::get().getState().getEventCtrl().Call(player, player->deathReason); } }; } #endif //OPENMW_PROCESSORPLAYERDEATH_HPP