1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 07:19:54 +00:00
openmw-tes3mp/components/openmw-mp/Packets/Player/PacketPlayerClass.cpp
David Cernat 8b79cdd4f4 [Server] Document script functions, part 3
Also reorder functions in Cells and CharClass so they are consistent with the rest.
2017-07-25 18:07:09 +03:00

25 lines
628 B
C++

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