[General] Add packet data for attacks on and by Actors

pull/176/merge
David Cernat 8 years ago
parent 1db30a65cb
commit cc2250815d

@ -38,6 +38,7 @@ namespace mwmp
std::string sound; std::string sound;
Animation animation; Animation animation;
Attack attack;
}; };
class BaseActorList class BaseActorList

@ -37,9 +37,21 @@ void PacketActorAttack::Packet(RakNet::BitStream *bs, bool send)
RW(actor.refId, send); RW(actor.refId, send);
RW(actor.refNumIndex, send); RW(actor.refNumIndex, send);
RW(actor.mpNum, 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) if (!send)
{ {
actorList->baseActors.push_back(actor); actorList->baseActors.push_back(actor);

@ -16,13 +16,16 @@ void PacketPlayerAttack::Packet(RakNet::BitStream *bs, bool send)
{ {
PlayerPacket::Packet(bs, 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.target.guid, send);
RW(player->attack.spellId, send); RW(player->attack.spellId, send);
RW(player->attack.type, send); RW(player->attack.type, send);
RW(player->attack.success, send); RW(player->attack.success, send);
RW(player->attack.damage, send); RW(player->attack.damage, send);
//
RW(player->attack.pressed, send); RW(player->attack.pressed, send);
RW(player->attack.knockdown, send); RW(player->attack.knockdown, send);
RW(player->attack.block, send); RW(player->attack.block, send);

Loading…
Cancel
Save