1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 00:49:54 +00:00
openmw-tes3mp/components/openmw-mp/Packets/Player/PacketPlayerEquipment.cpp

28 lines
662 B
C++
Raw Normal View History

//
// Created by koncord on 07.01.16.
//
#include "PacketPlayerEquipment.hpp"
#include <components/openmw-mp/NetworkMessages.hpp>
using namespace mwmp;
PacketPlayerEquipment::PacketPlayerEquipment(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
{
packetID = ID_PLAYER_EQUIPMENT;
}
void PacketPlayerEquipment::Packet(RakNet::BitStream *bs, bool send)
{
PlayerPacket::Packet(bs, send);
2016-08-17 15:20:36 +00:00
for (int i = 0; i < 19; i++)
{
RW(player->equipedItems[i].refId, send, 1);
RW(player->equipedItems[i].count, send);
RW(player->equipedItems[i].charge, send);
RW(player->equipedItems[i].enchantmentCharge, send);
}
}