|
|
@ -4,15 +4,29 @@
|
|
|
|
#include "../Types.hpp"
|
|
|
|
#include "../Types.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
#define SETTINGSAPI \
|
|
|
|
#define SETTINGSAPI \
|
|
|
|
{"SetConsoleAllow", SettingFunctions::SetConsoleAllow},\
|
|
|
|
{"SetDifficulty", SettingFunctions::SetDifficulty},\
|
|
|
|
{"SetDifficulty", SettingFunctions::SetDifficulty},\
|
|
|
|
{"SetConsoleAllowed", SettingFunctions::SetConsoleAllowed},\
|
|
|
|
|
|
|
|
{"SetRestAllowed", SettingFunctions::SetRestAllowed},\
|
|
|
|
|
|
|
|
{"SetWaitAllowed", SettingFunctions::SetWaitAllowed},\
|
|
|
|
\
|
|
|
|
\
|
|
|
|
{"SendSettings", SettingFunctions::SendSettings}
|
|
|
|
{"SendSettings", SettingFunctions::SendSettings}
|
|
|
|
|
|
|
|
|
|
|
|
class SettingFunctions
|
|
|
|
class SettingFunctions
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* \brief Set the difficulty for a player.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* This changes the difficulty for that player in the server memory, but does not by itself
|
|
|
|
|
|
|
|
* send a packet.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* \param pid The player ID.
|
|
|
|
|
|
|
|
* \param bool The difficulty.
|
|
|
|
|
|
|
|
* \return void
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
static void SetDifficulty(unsigned short pid, int difficulty);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Set whether the console is allowed for a player.
|
|
|
|
* \brief Set whether the console is allowed for a player.
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -23,19 +37,31 @@ public:
|
|
|
|
* \param bool The console permission state.
|
|
|
|
* \param bool The console permission state.
|
|
|
|
* \return void
|
|
|
|
* \return void
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void SetConsoleAllow(unsigned short pid, bool state);
|
|
|
|
static void SetConsoleAllowed(unsigned short pid, bool state);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Set the difficulty for a player.
|
|
|
|
* \brief Set whether resting is allowed for a player.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* This changes the difficulty for that player in the server memory, but does not by itself
|
|
|
|
* This changes the resting permission for that player in the server memory, but does not
|
|
|
|
* send a packet.
|
|
|
|
* by itself send a packet.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* \param pid The player ID.
|
|
|
|
* \param pid The player ID.
|
|
|
|
* \param bool The difficulty.
|
|
|
|
* \param bool The resting permission state.
|
|
|
|
* \return void
|
|
|
|
* \return void
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void SetDifficulty(unsigned short pid, int difficulty);
|
|
|
|
static void SetRestAllowed(unsigned short pid, bool state);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* \brief Set whether waiting is allowed for a player.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* This changes the waiting permission for that player in the server memory, but does not
|
|
|
|
|
|
|
|
* by itself send a packet.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* \param pid The player ID.
|
|
|
|
|
|
|
|
* \param bool The waiting permission state.
|
|
|
|
|
|
|
|
* \return void
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
static void SetWaitAllowed(unsigned short pid, bool state);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Send a PlayerSettings packet to the player affected by it.
|
|
|
|
* \brief Send a PlayerSettings packet to the player affected by it.
|
|
|
|