2016-01-12 03:41:44 +00:00
|
|
|
//
|
|
|
|
// Created by koncord on 13.01.16.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
2017-02-05 07:01:33 +00:00
|
|
|
#include "PacketPlayerAttack.hpp"
|
2016-01-12 03:41:44 +00:00
|
|
|
|
|
|
|
using namespace mwmp;
|
|
|
|
|
2017-02-05 07:01:33 +00:00
|
|
|
PacketPlayerAttack::PacketPlayerAttack(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2017-02-05 07:01:33 +00:00
|
|
|
packetID = ID_PLAYER_ATTACK;
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|
|
|
|
|
2017-03-06 09:44:08 +00:00
|
|
|
void PacketPlayerAttack::Packet(RakNet::BitStream *bs, bool send)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2017-03-06 09:44:08 +00:00
|
|
|
PlayerPacket::Packet(bs, send);
|
2016-01-12 03:41:44 +00:00
|
|
|
|
2017-01-25 15:06:15 +00:00
|
|
|
RW(player->attack.attacker, send);
|
|
|
|
RW(player->attack.target, send);
|
2017-04-17 06:35:18 +00:00
|
|
|
RW(player->attack.refId, send);
|
2017-01-25 15:06:15 +00:00
|
|
|
RW(player->attack.type, send);
|
|
|
|
RW(player->attack.success, send);
|
|
|
|
RW(player->attack.damage, send);
|
2016-01-12 03:41:44 +00:00
|
|
|
//
|
2017-01-25 15:06:15 +00:00
|
|
|
RW(player->attack.pressed, send);
|
|
|
|
RW(player->attack.knockdown, send);
|
|
|
|
RW(player->attack.block, send);
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|