2017-04-25 16:01:56 +00:00
|
|
|
#ifndef OPENMW_PROCESSORPLAYERSTATSDYNAMIC_HPP
|
|
|
|
#define OPENMW_PROCESSORPLAYERSTATSDYNAMIC_HPP
|
2017-04-16 07:00:25 +00:00
|
|
|
|
|
|
|
|
2017-06-06 16:06:10 +00:00
|
|
|
#include "../PlayerProcessor.hpp"
|
2017-04-16 07:00:25 +00:00
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
2019-10-24 19:16:17 +00:00
|
|
|
class ProcessorPlayerStatsDynamic final: public PlayerProcessor
|
2017-04-16 07:00:25 +00:00
|
|
|
{
|
|
|
|
public:
|
2017-04-25 16:01:56 +00:00
|
|
|
ProcessorPlayerStatsDynamic()
|
2017-04-16 07:00:25 +00:00
|
|
|
{
|
2017-04-18 04:17:58 +00:00
|
|
|
BPP_INIT(ID_PLAYER_STATS_DYNAMIC)
|
2017-04-16 07:00:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
|
|
{
|
|
|
|
if (isLocal())
|
|
|
|
{
|
|
|
|
if (isRequest())
|
2017-04-18 04:17:58 +00:00
|
|
|
static_cast<LocalPlayer *>(player)->updateStatsDynamic(true);
|
2017-04-16 07:00:25 +00:00
|
|
|
else
|
|
|
|
static_cast<LocalPlayer *>(player)->setDynamicStats();
|
|
|
|
}
|
2017-04-23 22:46:27 +00:00
|
|
|
else if (player != 0)
|
2017-04-16 07:00:25 +00:00
|
|
|
{
|
2020-11-11 12:55:55 +00:00
|
|
|
static_cast<DedicatedPlayer*>(player)->setStatsDynamic();
|
2017-04-16 07:00:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-04-25 16:01:56 +00:00
|
|
|
#endif //OPENMW_PROCESSORPLAYERSTATSDYNAMIC_HPP
|