2018-01-29 20:32:51 +00:00
|
|
|
#ifndef OPENMW_PROCESSORPLAYERMISCELLANEOUS_HPP
|
|
|
|
#define OPENMW_PROCESSORPLAYERMISCELLANEOUS_HPP
|
|
|
|
|
|
|
|
|
|
|
|
#include "../PlayerProcessor.hpp"
|
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
2019-10-24 19:16:17 +00:00
|
|
|
class ProcessorPlayerMiscellaneous final: public PlayerProcessor
|
2018-01-29 20:32:51 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ProcessorPlayerMiscellaneous()
|
|
|
|
{
|
|
|
|
BPP_INIT(ID_PLAYER_MISCELLANEOUS)
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
|
|
{
|
|
|
|
if (!isLocal()) return;
|
|
|
|
|
2019-08-19 18:39:33 +00:00
|
|
|
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_MISCELLANEOUS about LocalPlayer from server");
|
2018-01-29 20:32:51 +00:00
|
|
|
|
|
|
|
if (!isRequest())
|
|
|
|
{
|
|
|
|
LocalPlayer &localPlayer = static_cast<LocalPlayer&>(*player);
|
2018-01-31 02:50:29 +00:00
|
|
|
|
|
|
|
if (player->miscellaneousChangeType == mwmp::MISCELLANEOUS_CHANGE_TYPE::MARK_LOCATION)
|
|
|
|
localPlayer.setMarkLocation();
|
2018-02-06 04:36:46 +00:00
|
|
|
else if (player->miscellaneousChangeType == mwmp::MISCELLANEOUS_CHANGE_TYPE::SELECTED_SPELL)
|
|
|
|
localPlayer.setSelectedSpell();
|
2018-01-29 20:32:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERMISCELLANEOUS_HPP
|