mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-24 14:53:52 +00:00
35 lines
886 B
C++
35 lines
886 B
C++
#ifndef OPENMW_PROCESSORPLAYERSTATSDYNAMIC_HPP
|
|
#define OPENMW_PROCESSORPLAYERSTATSDYNAMIC_HPP
|
|
|
|
|
|
#include "../PlayerProcessor.hpp"
|
|
|
|
namespace mwmp
|
|
{
|
|
class ProcessorPlayerStatsDynamic final: public PlayerProcessor
|
|
{
|
|
public:
|
|
ProcessorPlayerStatsDynamic()
|
|
{
|
|
BPP_INIT(ID_PLAYER_STATS_DYNAMIC)
|
|
}
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
{
|
|
if (isLocal())
|
|
{
|
|
if (isRequest())
|
|
static_cast<LocalPlayer *>(player)->updateStatsDynamic(true);
|
|
else
|
|
static_cast<LocalPlayer *>(player)->setDynamicStats();
|
|
}
|
|
else if (player != 0)
|
|
{
|
|
static_cast<DedicatedPlayer*>(player)->setStatsDynamic();
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERSTATSDYNAMIC_HPP
|