forked from teamnwah/openmw-tes3coop
Rename ID_GAME_UPDATE_BASESTATS into ID_GAME_DYNAMICSTATS_CURRENT
parent
295f486a97
commit
ce4b326b02
@ -1,18 +1,18 @@
|
||||
//
|
||||
// Created by koncord on 13.01.16.
|
||||
// Created by David Cernat on 28.09.16.
|
||||
//
|
||||
|
||||
#include "PacketMainStats.hpp"
|
||||
#include "PacketDynamicStatsBase.hpp"
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketMainStats::PacketMainStats(RakNet::RakPeerInterface *peer) : BasePacket(peer)
|
||||
PacketDynamicStatsBase::PacketDynamicStatsBase(RakNet::RakPeerInterface *peer) : BasePacket(peer)
|
||||
{
|
||||
packetID = ID_GAME_UPDATE_BASESTATS;
|
||||
packetID = ID_GAME_DYNAMICSTATS_BASE;
|
||||
}
|
||||
|
||||
void PacketMainStats::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
|
||||
void PacketDynamicStatsBase::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
|
||||
{
|
||||
BasePacket::Packet(bs, player, send);
|
||||
RW(player->CreatureStats()->mDynamic[0], send); // health
|
@ -0,0 +1,22 @@
|
||||
//
|
||||
// Created by David Cernat on 28.09.16.
|
||||
//
|
||||
|
||||
#ifndef OPENMW_PACKAGEDYNAMICSTATSBASE_HPP
|
||||
#define OPENMW_PACKAGEDYNAMICSTATSBASE_HPP
|
||||
|
||||
|
||||
#include <components/openmw-mp/Packets/BasePacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketDynamicStatsBase : public BasePacket
|
||||
{
|
||||
public:
|
||||
PacketDynamicStatsBase(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKAGEDYNAMICSTATSBASE_HPP
|
@ -0,0 +1,21 @@
|
||||
//
|
||||
// Created by David Cernat on 28.09.16.
|
||||
//
|
||||
|
||||
#include "PacketDynamicStatsCurrent.hpp"
|
||||
#include <components/openmw-mp/NetworkMessages.hpp>
|
||||
|
||||
using namespace mwmp;
|
||||
|
||||
PacketDynamicStatsCurrent::PacketDynamicStatsCurrent(RakNet::RakPeerInterface *peer) : BasePacket(peer)
|
||||
{
|
||||
packetID = ID_GAME_DYNAMICSTATS_CURRENT;
|
||||
}
|
||||
|
||||
void PacketDynamicStatsCurrent::Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
|
||||
{
|
||||
BasePacket::Packet(bs, player, send);
|
||||
RW(player->CreatureStats()->mDynamic[0], send); // health
|
||||
RW(player->CreatureStats()->mDynamic[1], send); // magic
|
||||
RW(player->CreatureStats()->mDynamic[2], send); // fatigue
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
//
|
||||
// Created by David Cernat on 28.09.16.
|
||||
//
|
||||
|
||||
#ifndef OPENMW_PACKAGEDYNAMICSTATSCURRENT_HPP
|
||||
#define OPENMW_PACKAGEDYNAMICSTATSCURRENT_HPP
|
||||
|
||||
|
||||
#include <components/openmw-mp/Packets/BasePacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketDynamicStatsCurrent : public BasePacket
|
||||
{
|
||||
public:
|
||||
PacketDynamicStatsCurrent(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKAGEDYNAMICSTATSCURRENT_HPP
|
@ -1,22 +0,0 @@
|
||||
//
|
||||
// Created by koncord on 13.01.16.
|
||||
//
|
||||
|
||||
#ifndef OPENMW_PACKAGEMAINSTATS_HPP
|
||||
#define OPENMW_PACKAGEMAINSTATS_HPP
|
||||
|
||||
|
||||
#include <components/openmw-mp/Packets/BasePacket.hpp>
|
||||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketMainStats : public BasePacket
|
||||
{
|
||||
public:
|
||||
PacketMainStats(RakNet::RakPeerInterface *peer);
|
||||
|
||||
virtual void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKAGEMAINSTATS_HPP
|
Loading…
Reference in New Issue