PacketClass
parent
2054baf7d3
commit
a661de2a84
@ -0,0 +1,26 @@
|
||||
//
|
||||
// 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);
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
//
|
||||
// Created by koncord on 29.08.16.
|
||||
//
|
||||
|
||||
#ifndef OPENMW_PACKETCLASS_HPP
|
||||
#define OPENMW_PACKETCLASS_HPP
|
||||
|
||||
|
||||
#include <components/openmw-mp/Packets/BasePacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketClass : public BasePacket
|
||||
{
|
||||
public:
|
||||
PacketClass(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif //OPENMW_PACKETCLASS_HPP
|
Loading…
Reference in New Issue