1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 22:19:54 +00:00
openmw-tes3mp/apps/openmw-mp/processors/world/ProcessorObjectDelete.hpp

31 lines
791 B
C++

//
// Created by koncord on 03.04.17.
//
#ifndef OPENMW_PROCESSOROBJECTDELETE_HPP
#define OPENMW_PROCESSOROBJECTDELETE_HPP
#include "apps/openmw-mp/WorldProcessor.hpp"
namespace mwmp
{
class ProcessorObjectDelete : public WorldProcessor
{
public:
ProcessorObjectDelete()
{
BPP_INIT(ID_OBJECT_DELETE)
}
void Do(WorldPacket &packet, Player &player, BaseEvent &event) override
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str());
packet.Send(true);
Script::Call<Script::CallbackIdentity("OnObjectDelete")>(player.getId(), event.cell.getDescription().c_str());
}
};
}
#endif //OPENMW_PROCESSOROBJECTDELETE_HPP