2016-01-12 03:41:44 +00:00
|
|
|
//
|
|
|
|
// Created by koncord on 17.03.16.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "PacketSkill.hpp"
|
|
|
|
|
|
|
|
#include <components/openmw-mp/NetworkMessages.hpp>
|
|
|
|
#include <components/esm/creaturestats.hpp>
|
|
|
|
|
|
|
|
using namespace mwmp;
|
|
|
|
|
2016-10-17 12:54:36 +00:00
|
|
|
PacketSkill::PacketSkill(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
2016-01-12 03:41:44 +00:00
|
|
|
{
|
|
|
|
packetID = ID_GAME_SKILL;
|
|
|
|
}
|
|
|
|
|
|
|
|
void PacketSkill::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
|
|
|
|
{
|
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 < SkillCount; ++i)
|
2016-01-12 03:41:44 +00:00
|
|
|
RW(player->NpcStats()->mSkills[i], send);
|
2016-09-30 01:52:21 +00:00
|
|
|
|
2016-09-30 04:15:59 +00:00
|
|
|
for (int i = 0; i < AttributeCount; ++i)
|
|
|
|
RW(player->NpcStats()->mSkillIncrease[i], send);
|
|
|
|
|
2016-09-30 01:52:21 +00:00
|
|
|
RW(player->NpcStats()->mLevelProgress, send);
|
2016-01-12 03:41:44 +00:00
|
|
|
}
|