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
|
|
|
//
|
|
|
|
|
2017-02-05 07:01:33 +00:00
|
|
|
#include "PacketPlayerDynamicStats.hpp"
|
2016-01-12 03:41:44 +00:00
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
|
|
|
|
using namespace mwmp;
|
|
|
|
|
2017-02-05 07:01:33 +00:00
|
|
|
PacketPlayerDynamicStats::PacketPlayerDynamicStats(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2017-02-05 07:01:33 +00:00
|
|
|
packetID = ID_PLAYER_DYNAMICSTATS;
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|
|
|
|
|
2017-02-05 07:01:33 +00:00
|
|
|
void PacketPlayerDynamicStats::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);
|
2017-01-25 15:06:15 +00:00
|
|
|
RW(player->creatureStats.mDynamic[0], send); // health
|
|
|
|
RW(player->creatureStats.mDynamic[1], send); // magic
|
|
|
|
RW(player->creatureStats.mDynamic[2], send); // fatigue
|
2017-01-26 04:17:29 +00:00
|
|
|
}
|