openmw-tes3coop/apps/openmw/mwmp/processors/player/ProcessorPlayerJournal.hpp
2017-08-31 09:08:29 +03:00

32 lines
802 B
C++

#ifndef OPENMW_PROCESSORPLAYERJOURNAL_HPP
#define OPENMW_PROCESSORPLAYERJOURNAL_HPP
#include "../PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerJournal : public PlayerProcessor
{
public:
ProcessorPlayerJournal()
{
BPP_INIT(ID_PLAYER_JOURNAL)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
{
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_JOURNAL from server");
if (isRequest())
{
// Entire journal cannot currently be requested from players
}
else if (player != 0)
{
static_cast<LocalPlayer*>(player)->addJournalItems();
}
}
};
}
#endif //OPENMW_PROCESSORPLAYERJOURNAL_HPP