1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 15:49:55 +00:00
openmw-tes3mp/apps/openmw/mwmp/processors/player/ProcessorPlayerJournal.hpp
2017-04-18 11:38:40 +08:00

36 lines
762 B
C++

//
// Created by koncord on 16.04.17.
//
#ifndef OPENMW_PROCESSORPLAYERJOURNAL_HPP
#define OPENMW_PROCESSORPLAYERJOURNAL_HPP
#include "apps/openmw/mwmp/PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerJournal : public PlayerProcessor
{
public:
ProcessorPlayerJournal()
{
BPP_INIT(ID_PLAYER_JOURNAL)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
{
if (!isLocal()) return;
if (isRequest())
{
// Entire journal cannot currently be requested from players
}
else
static_cast<LocalPlayer*>(player)->addJournalItems();
}
};
}
#endif //OPENMW_PROCESSORPLAYERJOURNAL_HPP