2018-01-29 20:32:51 +00:00
|
|
|
#ifndef OPENMW_PROCESSORPLAYERREPUTATION_HPP
|
|
|
|
#define OPENMW_PROCESSORPLAYERREPUTATION_HPP
|
|
|
|
|
|
|
|
|
|
|
|
#include "../PlayerProcessor.hpp"
|
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
2018-01-29 22:54:56 +00:00
|
|
|
class ProcessorPlayerReputation final: public PlayerProcessor
|
2018-01-29 20:32:51 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ProcessorPlayerReputation()
|
|
|
|
{
|
|
|
|
BPP_INIT(ID_PLAYER_REPUTATION)
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
|
|
{
|
|
|
|
if (isLocal())
|
|
|
|
{
|
|
|
|
//if (isRequest())
|
|
|
|
// static_cast<LocalPlayer *>(player)->updateReputation(true);
|
|
|
|
//else
|
|
|
|
// static_cast<LocalPlayer *>(player)->setReputation();
|
|
|
|
}
|
|
|
|
else if (player != 0)
|
|
|
|
{
|
|
|
|
MWWorld::Ptr ptrPlayer = static_cast<DedicatedPlayer *>(player)->getPtr();
|
|
|
|
MWMechanics::NpcStats *ptrNpcStats = &ptrPlayer.getClass().getNpcStats(ptrPlayer);
|
|
|
|
|
|
|
|
ptrNpcStats->setReputation(player->npcStats.mReputation);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERREPUTATION_HPP
|