2016-08-29 13:00:19 +00:00
|
|
|
//
|
|
|
|
// Created by koncord on 29.08.16.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
2017-02-05 07:01:33 +00:00
|
|
|
#include "PacketPlayerClass.hpp"
|
2016-08-29 13:00:19 +00:00
|
|
|
|
2017-02-05 07:01:33 +00:00
|
|
|
mwmp::PacketPlayerClass::PacketPlayerClass(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
2016-08-29 13:00:19 +00:00
|
|
|
{
|
2017-02-05 07:01:33 +00:00
|
|
|
packetID = ID_PLAYER_CHARCLASS;
|
2016-08-29 13:00:19 +00:00
|
|
|
}
|
|
|
|
|
2017-03-06 09:44:08 +00:00
|
|
|
void mwmp::PacketPlayerClass::Packet(RakNet::BitStream *bs, bool send)
|
2016-08-29 13:00:19 +00:00
|
|
|
{
|
2017-03-06 09:44:08 +00:00
|
|
|
PlayerPacket::Packet(bs, send);
|
2016-08-29 13:00:19 +00:00
|
|
|
|
2016-09-29 09:05:44 +00:00
|
|
|
RW(player->charClass.mId, send);
|
|
|
|
if (player->charClass.mId.empty()) // custom class
|
2016-08-29 13:00:19 +00:00
|
|
|
{
|
2016-09-29 09:05:44 +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
|
|
|
}
|
|
|
|
}
|