2017-03-31 18:36:24 +00:00
|
|
|
#ifndef OPENMW_PROCESSORPLAYERDEATH_HPP
|
|
|
|
#define OPENMW_PROCESSORPLAYERDEATH_HPP
|
|
|
|
|
2017-07-03 17:13:10 +00:00
|
|
|
#include "../PlayerProcessor.hpp"
|
2017-03-31 18:36:24 +00:00
|
|
|
#include <chrono>
|
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class ProcessorPlayerDeath : public PlayerProcessor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ProcessorPlayerDeath()
|
|
|
|
{
|
|
|
|
BPP_INIT(ID_PLAYER_DEATH)
|
|
|
|
}
|
|
|
|
|
|
|
|
void Do(PlayerPacket &packet, Player &player) override
|
|
|
|
{
|
2019-08-19 18:39:33 +00:00
|
|
|
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
|
2017-03-31 18:36:24 +00:00
|
|
|
|
2017-06-27 07:03:41 +00:00
|
|
|
player.creatureStats.mDead = true;
|
|
|
|
|
2017-03-31 18:36:24 +00:00
|
|
|
packet.Send(true);
|
|
|
|
|
2017-05-05 19:16:31 +00:00
|
|
|
Script::Call<Script::CallbackIdentity("OnPlayerDeath")>(player.getId());
|
2017-03-31 18:36:24 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERDEATH_HPP
|