1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-31 12:45:31 +00:00
openmw-tes3mp/apps/openmw/mwmp/processors/player/ProcessorPlayerSkill.hpp
David Cernat ed15d9ebf5 Merge pull request #406 from TES3MP/0.6.3 while resolving conflicts
Conflicts:
	apps/openmw-mp/Script/Functions/Mechanics.cpp
	apps/openmw-mp/Script/Functions/Mechanics.hpp
	components/openmw-mp/Base/BasePlayer.hpp
2018-04-13 18:05:38 +03:00

39 lines
868 B
C++

//
// Created by koncord on 16.04.17.
//
#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