2018-08-09 15:25:20 +00:00
|
|
|
#include "PacketPlayerItemUse.hpp"
|
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
|
|
|
|
using namespace mwmp;
|
|
|
|
|
|
|
|
PacketPlayerItemUse::PacketPlayerItemUse(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
|
|
|
{
|
|
|
|
packetID = ID_PLAYER_ITEM_USE;
|
|
|
|
}
|
|
|
|
|
2019-12-04 08:17:33 +00:00
|
|
|
void PacketPlayerItemUse::Packet(RakNet::BitStream *newBitstream, bool send)
|
2018-08-09 15:25:20 +00:00
|
|
|
{
|
2019-12-04 08:17:33 +00:00
|
|
|
PlayerPacket::Packet(newBitstream, send);
|
2018-08-09 15:25:20 +00:00
|
|
|
|
|
|
|
RW(player->usedItem.refId, send, true);
|
|
|
|
RW(player->usedItem.count, send);
|
|
|
|
RW(player->usedItem.charge, send);
|
|
|
|
RW(player->usedItem.enchantmentCharge, send);
|
|
|
|
RW(player->usedItem.soul, send, true);
|
2019-08-16 02:50:07 +00:00
|
|
|
|
|
|
|
RW(player->usingItemMagic, send);
|
|
|
|
RW(player->itemUseDrawState, send);
|
2018-08-09 15:25:20 +00:00
|
|
|
}
|