openmw-tes3coop/components/openmw-mp/Packets/Player/PacketPlayerDynamicStats.cpp
Koncord 690211ad99 [General] Extract BaseEvent & BasePlayer from packets to functions
Move Send and Read functions to BasePacket
2017-03-06 18:40:07 +08:00

21 lines
595 B
C++

//
// Created by koncord on 13.01.16.
//
#include "PacketPlayerDynamicStats.hpp"
#include <components/openmw-mp/NetworkMessages.hpp>
using namespace mwmp;
PacketPlayerDynamicStats::PacketPlayerDynamicStats(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
{
packetID = ID_PLAYER_DYNAMICSTATS;
}
void PacketPlayerDynamicStats::Packet(RakNet::BitStream *bs, bool send)
{
PlayerPacket::Packet(bs, send);
RW(player->creatureStats.mDynamic[0], send); // health
RW(player->creatureStats.mDynamic[1], send); // magic
RW(player->creatureStats.mDynamic[2], send); // fatigue
}