openmw-tes3coop/components/openmw-mp/Packets/PacketEquipment.cpp

25 lines
549 B
C++
Raw Normal View History

//
// Created by koncord on 07.01.16.
//
#include "PacketEquipment.hpp"
#include <components/openmw-mp/NetworkMessages.hpp>
using namespace mwmp;
2016-10-17 12:54:36 +00:00
PacketEquipment::PacketEquipment(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
{
packetID = ID_GAME_EQUIPMENT;
}
void PacketEquipment::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
{
2016-10-17 12:54:36 +00:00
PlayerPacket::Packet(bs, player, send);
2016-08-17 15:20:36 +00:00
for (int i = 0; i < 19; i++)
{
RW(player->EquipedItem(i)->refid, send);
RW(player->EquipedItem(i)->count, send);
}
}