2016-01-12 03:41:44 +00:00
|
|
|
//
|
|
|
|
// Created by koncord on 08.03.16.
|
|
|
|
//
|
|
|
|
|
2017-02-04 12:25:43 +00:00
|
|
|
#include "PacketPlayerAttribute.hpp"
|
2016-01-12 03:41:44 +00:00
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
|
|
|
|
using namespace mwmp;
|
|
|
|
|
2017-02-04 12:25:43 +00:00
|
|
|
PacketPlayerAttribute::PacketPlayerAttribute(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
2017-02-04 12:25:43 +00:00
|
|
|
packetID = ID_PLAYER_ATTRIBUTE;
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|
|
|
|
|
2017-02-04 12:25:43 +00:00
|
|
|
void PacketPlayerAttribute::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
|
|
|
|
2016-09-30 04:15:59 +00:00
|
|
|
for (int i = 0; i < AttributeCount; ++i)
|
2017-01-25 15:06:15 +00:00
|
|
|
RW(player->creatureStats.mAttributes[i], send);
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|