1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 19:19:55 +00:00
openmw-tes3mp/apps/openmw-mp/processors/player/ProcessorPlayerDeath.hpp
2019-08-19 21:39:33 +03:00

30 lines
737 B
C++

#ifndef OPENMW_PROCESSORPLAYERDEATH_HPP
#define OPENMW_PROCESSORPLAYERDEATH_HPP
#include "../PlayerProcessor.hpp"
#include <chrono>
namespace mwmp
{
class ProcessorPlayerDeath : public PlayerProcessor
{
public:
ProcessorPlayerDeath()
{
BPP_INIT(ID_PLAYER_DEATH)
}
void Do(PlayerPacket &packet, Player &player) override
{
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
player.creatureStats.mDead = true;
packet.Send(true);
Script::Call<Script::CallbackIdentity("OnPlayerDeath")>(player.getId());
}
};
}
#endif //OPENMW_PROCESSORPLAYERDEATH_HPP