2017-07-15 06:02:19 +00:00
|
|
|
#ifndef OPENMW_PROCESSORPLAYERSHAPESHIFT_HPP
|
|
|
|
#define OPENMW_PROCESSORPLAYERSHAPESHIFT_HPP
|
|
|
|
|
|
|
|
#include "../PlayerProcessor.hpp"
|
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class ProcessorPlayerShapeshift : public PlayerProcessor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ProcessorPlayerShapeshift()
|
|
|
|
{
|
|
|
|
BPP_INIT(ID_PLAYER_SHAPESHIFT)
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
|
|
{
|
2018-04-13 05:37:06 +00:00
|
|
|
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_SHAPESHIFT from server");
|
|
|
|
|
2017-07-15 06:02:19 +00:00
|
|
|
if (isLocal())
|
|
|
|
{
|
2018-04-13 05:37:06 +00:00
|
|
|
LOG_APPEND(Log::LOG_INFO, "- Packet was about LocalPlayer");
|
|
|
|
|
2017-07-15 06:02:19 +00:00
|
|
|
static_cast<LocalPlayer *>(player)->setShapeshift();
|
|
|
|
}
|
|
|
|
else if (player != 0)
|
|
|
|
{
|
|
|
|
static_cast<DedicatedPlayer *>(player)->setShapeshift();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERSHAPESHIFT_HPP
|