openmw-tes3coop/components/openmw-mp/Packets/Player/PacketPlayerSkill.cpp

29 lines
693 B
C++
Raw Normal View History

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