mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 00:19:56 +00:00
a74bf1baec
(cherry picked from commit 7748e582a8
)
31 lines
711 B
C++
31 lines
711 B
C++
#ifndef OPENMW_PROCESSORPLAYERCHARCLASS_HPP
|
|
#define OPENMW_PROCESSORPLAYERCHARCLASS_HPP
|
|
|
|
|
|
#include "../PlayerProcessor.hpp"
|
|
|
|
namespace mwmp
|
|
{
|
|
class ProcessorPlayerCharClass final: 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
|