mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 00:49:54 +00:00
a74bf1baec
(cherry picked from commit 7748e582a8
)
37 lines
983 B
C++
37 lines
983 B
C++
#ifndef OPENMW_PROCESSORPLAYERJAIL_HPP
|
|
#define OPENMW_PROCESSORPLAYERJAIL_HPP
|
|
|
|
#include "apps/openmw/mwbase/environment.hpp"
|
|
#include "apps/openmw/mwgui/windowmanagerimp.hpp"
|
|
|
|
#include "../PlayerProcessor.hpp"
|
|
#include "apps/openmw/mwmp/Main.hpp"
|
|
#include "apps/openmw/mwmp/Networking.hpp"
|
|
|
|
namespace mwmp
|
|
{
|
|
class ProcessorPlayerJail final: public PlayerProcessor
|
|
{
|
|
public:
|
|
ProcessorPlayerJail()
|
|
{
|
|
BPP_INIT(ID_PLAYER_JAIL)
|
|
}
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
{
|
|
LOG_MESSAGE_SIMPLE(TimedLog::LOG_INFO, "Received ID_PLAYER_JAIL from server");
|
|
|
|
if (isLocal())
|
|
{
|
|
// Apply death penalties
|
|
if (player->jailDays > 0)
|
|
{
|
|
MWBase::Environment::get().getWindowManager()->goToJail(player->jailDays);
|
|
}
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
#endif //OPENMW_PROCESSORPLAYERJAIL_HPP
|