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

25 lines
618 B
C++
Raw Normal View History

2016-08-29 13:00:19 +00:00
//
// Created by koncord on 29.08.16.
//
#include <components/openmw-mp/NetworkMessages.hpp>
#include "PacketPlayerClass.hpp"
2016-08-29 13:00:19 +00:00
mwmp::PacketPlayerClass::PacketPlayerClass(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
2016-08-29 13:00:19 +00:00
{
packetID = ID_PLAYER_CHARCLASS;
2016-08-29 13:00:19 +00:00
}
void mwmp::PacketPlayerClass::Packet(RakNet::BitStream *bs, bool send)
2016-08-29 13:00:19 +00:00
{
PlayerPacket::Packet(bs, send);
2016-08-29 13:00:19 +00:00
RW(player->charClass.mId, send);
if (player->charClass.mId.empty()) // custom class
2016-08-29 13:00:19 +00:00
{
RW(player->charClass.mName, send);
RW(player->charClass.mDescription, send);
RW(player->charClass.mData, send);
2016-08-29 13:00:19 +00:00
}
}