1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 07:19:54 +00:00
openmw-tes3mp/apps/openmw/mwmp/processors/player/ProcessorPlayerFaction.hpp
2017-06-07 00:06:10 +08:00

30 lines
719 B
C++

#ifndef OPENMW_PROCESSORPLAYERFACTION_HPP
#define OPENMW_PROCESSORPLAYERFACTION_HPP
#include "../PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerFaction : public PlayerProcessor
{
public:
ProcessorPlayerFaction()
{
BPP_INIT(ID_PLAYER_FACTION)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
{
if (isRequest())
{
// Entire faction membership cannot currently be requested from players
}
else if (player != 0)
{
static_cast<LocalPlayer*>(player)->setFactions();
}
}
};
}
#endif //OPENMW_PROCESSORPLAYERFACTION_HPP