2016-01-12 03:41:44 +00:00
|
|
|
//
|
2016-09-28 04:50:16 +00:00
|
|
|
// Created by David Cernat on 28.09.16.
|
2016-01-12 03:41:44 +00:00
|
|
|
//
|
|
|
|
|
2016-09-28 04:50:16 +00:00
|
|
|
#include "PacketDynamicStatsBase.hpp"
|
2016-01-12 03:41:44 +00:00
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
|
|
|
|
using namespace mwmp;
|
|
|
|
|
2016-09-28 04:50:16 +00:00
|
|
|
PacketDynamicStatsBase::PacketDynamicStatsBase(RakNet::RakPeerInterface *peer) : BasePacket(peer)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2016-09-28 04:50:16 +00:00
|
|
|
packetID = ID_GAME_DYNAMICSTATS_BASE;
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|
|
|
|
|
2016-09-28 04:50:16 +00:00
|
|
|
void PacketDynamicStatsBase::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
|
|
|
BasePacket::Packet(bs, player, send);
|
|
|
|
RW(player->CreatureStats()->mDynamic[0], send); // health
|
|
|
|
RW(player->CreatureStats()->mDynamic[1], send); // magic
|
|
|
|
RW(player->CreatureStats()->mDynamic[2], send); // fatigue
|
|
|
|
}
|