2017-05-16 16:25:31 +00:00
|
|
|
#ifndef OPENMW_PROCESSORPLAYERFACTION_HPP
|
|
|
|
#define OPENMW_PROCESSORPLAYERFACTION_HPP
|
|
|
|
|
|
|
|
#include "apps/openmw/mwmp/PlayerProcessor.hpp"
|
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class ProcessorPlayerFaction : public PlayerProcessor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ProcessorPlayerFaction()
|
|
|
|
{
|
|
|
|
BPP_INIT(ID_PLAYER_FACTION)
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
|
|
{
|
2017-05-18 16:27:20 +00:00
|
|
|
if (isRequest())
|
|
|
|
{
|
|
|
|
// Entire faction membership cannot currently be requested from players
|
|
|
|
}
|
2017-05-27 19:32:28 +00:00
|
|
|
else if (player != 0)
|
|
|
|
{
|
2017-05-18 16:27:20 +00:00
|
|
|
static_cast<LocalPlayer*>(player)->setFactions();
|
2017-05-27 19:32:28 +00:00
|
|
|
}
|
2017-05-16 16:25:31 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERFACTION_HPP
|