forked from teamnwah/openmw-tes3coop
Add packet for player levels
parent
3e2fec973d
commit
046a1ea899
@ -0,0 +1,20 @@
|
||||
//
|
||||
// Created by David Cernat on 25.09.16.
|
||||
//
|
||||
|
||||
#include "PacketLevel.hpp"
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketLevel::PacketLevel(RakNet::RakPeerInterface *peer) : BasePacket(peer)
|
||||
{
|
||||
packetID = ID_GAME_LEVEL;
|
||||
}
|
||||
|
||||
void PacketLevel::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
|
||||
{
|
||||
BasePacket::Packet(bs, player, send);
|
||||
|
||||
RW(player->CreatureStats()->mLevel, send);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
//
|
||||
// Created by David Cernat on 25.09.16.
|
||||
//
|
||||
|
||||
#ifndef OPENMW_PACKETLEVEL_HPP
|
||||
#define OPENMW_PACKETLEVEL_HPP
|
||||
|
||||
#include <components/openmw-mp/Packets/BasePacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketLevel : public BasePacket
|
||||
{
|
||||
public:
|
||||
PacketLevel(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETLEVEL_HPP
|
Loading…
Reference in New Issue