mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 20:19:57 +00:00
[General] Add packet data for attacks on and by Actors
This commit is contained in:
parent
1db30a65cb
commit
cc2250815d
3 changed files with 19 additions and 3 deletions
|
@ -38,6 +38,7 @@ namespace mwmp
|
|||
std::string sound;
|
||||
|
||||
Animation animation;
|
||||
Attack attack;
|
||||
};
|
||||
|
||||
class BaseActorList
|
||||
|
|
|
@ -38,7 +38,19 @@ void PacketActorAttack::Packet(RakNet::BitStream *bs, bool send)
|
|||
RW(actor.refNumIndex, send);
|
||||
RW(actor.mpNum, send);
|
||||
|
||||
// TODO: Fill this in
|
||||
RW(actor.attack.target.refId, send);
|
||||
RW(actor.attack.target.refNumIndex, send);
|
||||
RW(actor.attack.target.mpNum, send);
|
||||
RW(actor.attack.target.guid, send);
|
||||
|
||||
RW(actor.attack.spellId, send);
|
||||
RW(actor.attack.type, send);
|
||||
RW(actor.attack.success, send);
|
||||
RW(actor.attack.damage, send);
|
||||
|
||||
RW(actor.attack.pressed, send);
|
||||
RW(actor.attack.knockdown, send);
|
||||
RW(actor.attack.block, send);
|
||||
|
||||
if (!send)
|
||||
{
|
||||
|
|
|
@ -16,13 +16,16 @@ void PacketPlayerAttack::Packet(RakNet::BitStream *bs, bool send)
|
|||
{
|
||||
PlayerPacket::Packet(bs, send);
|
||||
|
||||
RW(player->attack.target.refId, send);
|
||||
RW(player->attack.target.refNumIndex, send);
|
||||
RW(player->attack.target.mpNum, send);
|
||||
RW(player->attack.target.guid, send);
|
||||
|
||||
RW(player->attack.spellId, send);
|
||||
RW(player->attack.type, send);
|
||||
RW(player->attack.success, send);
|
||||
RW(player->attack.damage, send);
|
||||
//
|
||||
|
||||
RW(player->attack.pressed, send);
|
||||
RW(player->attack.knockdown, send);
|
||||
RW(player->attack.block, send);
|
||||
|
|
Loading…
Reference in a new issue