1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 04:49:54 +00:00
openmw-tes3mp/apps/openmw/mwmp/processors/player/ProcessorPlayerMiscellaneous.hpp
2019-08-19 21:39:33 +03:00

36 lines
1.1 KiB
C++

#ifndef OPENMW_PROCESSORPLAYERMISCELLANEOUS_HPP
#define OPENMW_PROCESSORPLAYERMISCELLANEOUS_HPP
#include "../PlayerProcessor.hpp"
namespace mwmp
{
class ProcessorPlayerMiscellaneous : public PlayerProcessor
{
public:
ProcessorPlayerMiscellaneous()
{
BPP_INIT(ID_PLAYER_MISCELLANEOUS)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
{
if (!isLocal()) return;
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_MISCELLANEOUS about LocalPlayer from server");
if (!isRequest())
{
LocalPlayer &localPlayer = static_cast<LocalPlayer&>(*player);
if (player->miscellaneousChangeType == mwmp::MISCELLANEOUS_CHANGE_TYPE::MARK_LOCATION)
localPlayer.setMarkLocation();
else if (player->miscellaneousChangeType == mwmp::MISCELLANEOUS_CHANGE_TYPE::SELECTED_SPELL)
localPlayer.setSelectedSpell();
}
}
};
}
#endif //OPENMW_PROCESSORPLAYERMISCELLANEOUS_HPP