1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 00:49:54 +00:00
openmw-tes3mp/apps/openmw/mwmp/processors/player/ProcessorPlayerTopic.hpp
2019-10-24 22:16:17 +03:00

30 lines
706 B
C++

#ifndef OPENMW_PROCESSORPLAYERTOPIC_HPP
#define OPENMW_PROCESSORPLAYERTOPIC_HPP
#include "../PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerTopic final: public PlayerProcessor
{
public:
ProcessorPlayerTopic()
{
BPP_INIT(ID_PLAYER_TOPIC)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
{
if (isRequest())
{
// Entire list of topics cannot currently be requested from players
}
else if (player != 0)
{
static_cast<LocalPlayer*>(player)->addTopics();
}
}
};
}
#endif //OPENMW_PROCESSORPLAYERTOPIC_HPP