2016-01-12 03:41:44 +00:00
|
|
|
//
|
|
|
|
// Created by koncord on 13.01.16.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
#include "PacketAttack.hpp"
|
|
|
|
|
|
|
|
using namespace mwmp;
|
|
|
|
|
2016-10-17 12:54:36 +00:00
|
|
|
PacketAttack::PacketAttack(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
|
|
|
packetID = ID_GAME_ATTACK;
|
|
|
|
}
|
|
|
|
|
|
|
|
void PacketAttack::Packet(RakNet::BitStream *bs, mwmp::BasePlayer *player, bool send)
|
|
|
|
{
|
2016-10-17 12:54:36 +00:00
|
|
|
PlayerPacket::Packet(bs, player, 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);
|
|
|
|
RW(player->attack.refid, send);
|
|
|
|
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
|
|
|
}
|