mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 01:49:54 +00:00
1b259e2d33
Created Package system
29 lines
790 B
C++
29 lines
790 B
C++
//
|
|
// Created by koncord on 13.01.16.
|
|
//
|
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
#include "PacketAttack.hpp"
|
|
|
|
using namespace mwmp;
|
|
|
|
PacketAttack::PacketAttack(RakNet::RakPeerInterface *peer) : BasePacket(peer)
|
|
{
|
|
packetID = ID_GAME_ATTACK;
|
|
}
|
|
|
|
void PacketAttack::Packet(RakNet::BitStream *bs, mwmp::BasePlayer *player, bool send)
|
|
{
|
|
BasePacket::Packet(bs, player, send);
|
|
|
|
RW(player->GetAttack()->attacker, send);
|
|
RW(player->GetAttack()->target, send);
|
|
RW(player->GetAttack()->refid, send);
|
|
RW(player->GetAttack()->type, send);
|
|
RW(player->GetAttack()->success, send);
|
|
RW(player->GetAttack()->damage, send);
|
|
//
|
|
RW(player->GetAttack()->pressed, send);
|
|
RW(player->GetAttack()->knockdown, send);
|
|
RW(player->GetAttack()->block, send);
|
|
}
|