1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 10:53:51 +00:00
openmw-tes3mp/components/openmw-mp/Packets/Actor/PacketActorDeath.cpp
2019-08-19 21:39:33 +03:00

28 lines
642 B
C++

#include <components/openmw-mp/NetworkMessages.hpp>
#include <components/openmw-mp/TimedLog.hpp>
#include "PacketActorDeath.hpp"
using namespace mwmp;
PacketActorDeath::PacketActorDeath(RakNet::RakPeerInterface *peer) : ActorPacket(peer)
{
packetID = ID_ACTOR_DEATH;
}
void PacketActorDeath::Actor(BaseActor &actor, bool send)
{
RW(actor.killer.isPlayer, send);
if (actor.killer.isPlayer)
{
RW(actor.killer.guid, send);
}
else
{
RW(actor.killer.refId, send, true);
RW(actor.killer.refNum, send);
RW(actor.killer.mpNum, send);
RW(actor.killer.name, send, true);
}
}