1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 23:49:55 +00:00
openmw-tes3mp/apps/openmw-mp/processors/player/ProcessorPlayerResurrect.hpp
2017-04-03 06:44:14 +08:00

37 lines
836 B
C++

//
// Created by koncord on 01.04.17.
//
#ifndef OPENMW_PROCESSORPLAYERRESURRECT_HPP
#define OPENMW_PROCESSORPLAYERRESURRECT_HPP
#include "apps/openmw-mp/PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerResurrect : public PlayerProcessor
{
public:
ProcessorPlayerResurrect()
{
BPP_INIT(ID_PLAYER_RESURRECT)
avoidReading = true;
}
void Do(PlayerPacket &packet, Player &player) override
{
LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
player.creatureStats.mDead = false;
packet.Send(true);
Script::Call<Script::CallbackIdentity("OnPlayerResurrect")>(player.getId());
}
};
}
#endif //OPENMW_PROCESSORPLAYERRESURRECT_HPP