1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 10:19:55 +00:00
openmw-tes3mp/apps/openmw/mwmp/processors/player/ProcessorPlayerCharClass.hpp
2017-05-02 22:47:58 +03:00

35 lines
762 B
C++

//
// Created by koncord on 16.04.17.
//
#ifndef OPENMW_PROCESSORPLAYERCHARCLASS_HPP
#define OPENMW_PROCESSORPLAYERCHARCLASS_HPP
#include "apps/openmw/mwmp/PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerCharClass : public PlayerProcessor
{
public:
ProcessorPlayerCharClass()
{
BPP_INIT(ID_PLAYER_CHARCLASS)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
{
if (isLocal())
{
if (isRequest())
static_cast<LocalPlayer *>(player)->sendClass();
else
static_cast<LocalPlayer *>(player)->setClass();
}
}
};
}
#endif //OPENMW_PROCESSORPLAYERCHARCLASS_HPP