1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-25 03:53:50 +00:00
openmw-tes3mp/apps/openmw/mwmp/processors/player/ProcessorPlayerReputation.hpp

39 lines
1 KiB
C++
Raw Normal View History

#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)
{
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