2016-01-12 03:41:44 +00:00
|
|
|
//
|
2016-09-28 12:20:23 +00:00
|
|
|
// Created by koncord on 13.01.16.
|
2016-01-12 03:41:44 +00:00
|
|
|
//
|
|
|
|
|
2016-09-28 11:13:24 +00:00
|
|
|
#include "PacketDynamicStats.hpp"
|
2016-01-12 03:41:44 +00:00
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
|
|
|
|
using namespace mwmp;
|
|
|
|
|
2016-10-17 12:54:36 +00:00
|
|
|
PacketDynamicStats::PacketDynamicStats(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2016-09-28 11:13:24 +00:00
|
|
|
packetID = ID_GAME_DYNAMICSTATS;
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|
|
|
|
|
2016-09-28 11:13:24 +00:00
|
|
|
void PacketDynamicStats::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2016-10-17 12:54:36 +00:00
|
|
|
PlayerPacket::Packet(bs, player, send);
|
2016-01-12 03:41:44 +00:00
|
|
|
RW(player->CreatureStats()->mDynamic[0], send); // health
|
|
|
|
RW(player->CreatureStats()->mDynamic[1], send); // magic
|
|
|
|
RW(player->CreatureStats()->mDynamic[2], send); // fatigue
|
|
|
|
}
|