mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 02:15:33 +00:00
27 lines
614 B
C++
27 lines
614 B
C++
|
//
|
||
|
// Created by koncord on 29.08.16.
|
||
|
//
|
||
|
|
||
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
||
|
#include "PacketClass.hpp"
|
||
|
|
||
|
mwmp::PacketClass::PacketClass(RakNet::RakPeerInterface *peer) : BasePacket(peer)
|
||
|
{
|
||
|
packetID = ID_GAME_CHARCLASS;
|
||
|
}
|
||
|
|
||
|
void mwmp::PacketClass::Packet(RakNet::BitStream *bs, mwmp::BasePlayer *player, bool send)
|
||
|
{
|
||
|
BasePacket::Packet(bs, player, send);
|
||
|
|
||
|
RW(player->klass.mId, send);
|
||
|
RW(player->customClass, send);
|
||
|
|
||
|
if(player->customClass)
|
||
|
{
|
||
|
RW(player->klass.mName, send);
|
||
|
RW(player->klass.mDescription, send);
|
||
|
RW(player->klass.mData, send);
|
||
|
}
|
||
|
}
|