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

30 lines
724 B
C++

#ifndef OPENMW_PROCESSORPLAYERFACTION_HPP
#define OPENMW_PROCESSORPLAYERFACTION_HPP
#include "../PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerFaction final: 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