2018-01-29 20:32:51 +00:00
|
|
|
#ifndef OPENMW_PROCESSORPLAYERREPUTATION_HPP
|
|
|
|
#define OPENMW_PROCESSORPLAYERREPUTATION_HPP
|
|
|
|
|
|
|
|
|
|
|
|
#include "../PlayerProcessor.hpp"
|
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class ProcessorPlayerReputation : public PlayerProcessor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ProcessorPlayerReputation()
|
|
|
|
{
|
|
|
|
BPP_INIT(ID_PLAYER_REPUTATION)
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
|
|
{
|
2018-01-30 20:55:29 +00:00
|
|
|
if (isRequest())
|
2018-01-29 20:32:51 +00:00
|
|
|
{
|
2018-01-30 20:55:29 +00:00
|
|
|
static_cast<LocalPlayer *>(player)->updateReputation(true);
|
2018-01-29 20:32:51 +00:00
|
|
|
}
|
|
|
|
else if (player != 0)
|
|
|
|
{
|
2018-01-30 20:55:29 +00:00
|
|
|
static_cast<LocalPlayer *>(player)->setReputation();
|
2018-01-29 20:32:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERREPUTATION_HPP
|