2017-04-16 07:00:25 +00:00
|
|
|
#ifndef OPENMW_PROCESSORPLAYERJOURNAL_HPP
|
|
|
|
#define OPENMW_PROCESSORPLAYERJOURNAL_HPP
|
|
|
|
|
2017-06-06 16:06:10 +00:00
|
|
|
#include "../PlayerProcessor.hpp"
|
2017-04-16 07:00:25 +00:00
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class ProcessorPlayerJournal : public PlayerProcessor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ProcessorPlayerJournal()
|
|
|
|
{
|
|
|
|
BPP_INIT(ID_PLAYER_JOURNAL)
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
|
|
{
|
2019-08-19 18:39:33 +00:00
|
|
|
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_JOURNAL from server");
|
2017-08-31 06:08:29 +00:00
|
|
|
|
2017-04-16 07:00:25 +00:00
|
|
|
if (isRequest())
|
|
|
|
{
|
|
|
|
// Entire journal cannot currently be requested from players
|
|
|
|
}
|
2017-05-27 19:32:28 +00:00
|
|
|
else if (player != 0)
|
|
|
|
{
|
2017-04-16 07:00:25 +00:00
|
|
|
static_cast<LocalPlayer*>(player)->addJournalItems();
|
2017-05-27 19:32:28 +00:00
|
|
|
}
|
2017-04-16 07:00:25 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERJOURNAL_HPP
|