1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-24 14:23:51 +00:00
openmw-tes3mp/apps/openmw/mwmp/processors/player/ProcessorPlayerSkill.hpp
2019-10-24 22:16:17 +03:00

35 lines
826 B
C++

#ifndef OPENMW_PROCESSORPLAYERSKILL_HPP
#define OPENMW_PROCESSORPLAYERSKILL_HPP
#include "../PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerSkill final: public PlayerProcessor
{
public:
ProcessorPlayerSkill()
{
BPP_INIT(ID_PLAYER_SKILL)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
{
if (isLocal())
{
if (isRequest())
static_cast<LocalPlayer *>(player)->updateSkills(true);
else
static_cast<LocalPlayer *>(player)->setSkills();
}
else if (player != 0)
{
static_cast<DedicatedPlayer *>(player)->setSkills();
}
}
};
}
#endif //OPENMW_PROCESSORPLAYERSKILL_HPP