2016-01-12 03:41:44 +00:00
|
|
|
//
|
|
|
|
// Created by koncord on 07.01.16.
|
|
|
|
//
|
|
|
|
|
2017-02-05 07:01:33 +00:00
|
|
|
#include "PacketPlayerEquipment.hpp"
|
2016-01-12 03:41:44 +00:00
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
|
|
|
|
using namespace mwmp;
|
|
|
|
|
2017-02-05 07:01:33 +00:00
|
|
|
PacketPlayerEquipment::PacketPlayerEquipment(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2017-02-05 07:01:33 +00:00
|
|
|
packetID = ID_PLAYER_EQUIPMENT;
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|
|
|
|
|
2017-03-06 09:44:08 +00:00
|
|
|
void PacketPlayerEquipment::Packet(RakNet::BitStream *bs, bool send)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2017-03-06 09:44:08 +00:00
|
|
|
PlayerPacket::Packet(bs, send);
|
2016-01-12 03:41:44 +00:00
|
|
|
|
2016-08-17 15:20:36 +00:00
|
|
|
for (int i = 0; i < 19; i++)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2017-02-05 07:01:33 +00:00
|
|
|
RW(player->equipedItems[i].refId, send);
|
2017-01-25 15:06:15 +00:00
|
|
|
RW(player->equipedItems[i].count, send);
|
2017-02-05 12:56:27 +00:00
|
|
|
RW(player->equipedItems[i].charge, send);
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|
|
|
|
}
|