Make GM max speed customisable through mangosd.conf (#89)
To complete this update be sure to apply DB Update : Rel21_16_052_Commands_help_for_custom_gm_speed.sql
This commit is contained in:
parent
e387af0884
commit
ab99ea5c71
@ -1073,7 +1073,7 @@ bool ChatHandler::HandleModifyASpeedCommand(char* args)
|
|||||||
|
|
||||||
float modSpeed = (float)atof(args);
|
float modSpeed = (float)atof(args);
|
||||||
|
|
||||||
if (modSpeed > 10 || modSpeed < 0.1)
|
if (modSpeed > sWorld.getConfig(CONFIG_UINT32_GM_MAX_SPEED_FACTOR) || modSpeed < 0.1)
|
||||||
{
|
{
|
||||||
SendSysMessage(LANG_BAD_VALUE);
|
SendSysMessage(LANG_BAD_VALUE);
|
||||||
SetSentErrorMessage(true);
|
SetSentErrorMessage(true);
|
||||||
@ -1126,7 +1126,7 @@ bool ChatHandler::HandleModifySpeedCommand(char* args)
|
|||||||
|
|
||||||
float modSpeed = (float)atof(args);
|
float modSpeed = (float)atof(args);
|
||||||
|
|
||||||
if (modSpeed > 10 || modSpeed < 0.1)
|
if (modSpeed > sWorld.getConfig(CONFIG_UINT32_GM_MAX_SPEED_FACTOR) || modSpeed < 0.1)
|
||||||
{
|
{
|
||||||
SendSysMessage(LANG_BAD_VALUE);
|
SendSysMessage(LANG_BAD_VALUE);
|
||||||
SetSentErrorMessage(true);
|
SetSentErrorMessage(true);
|
||||||
@ -1177,7 +1177,7 @@ bool ChatHandler::HandleModifySwimCommand(char* args)
|
|||||||
|
|
||||||
float modSpeed = (float)atof(args);
|
float modSpeed = (float)atof(args);
|
||||||
|
|
||||||
if (modSpeed > 10.0f || modSpeed < 0.01f)
|
if (modSpeed > sWorld.getConfig(CONFIG_UINT32_GM_MAX_SPEED_FACTOR) || modSpeed < 0.01f)
|
||||||
{
|
{
|
||||||
SendSysMessage(LANG_BAD_VALUE);
|
SendSysMessage(LANG_BAD_VALUE);
|
||||||
SetSentErrorMessage(true);
|
SetSentErrorMessage(true);
|
||||||
@ -1228,7 +1228,7 @@ bool ChatHandler::HandleModifyBWalkCommand(char* args)
|
|||||||
|
|
||||||
float modSpeed = (float)atof(args);
|
float modSpeed = (float)atof(args);
|
||||||
|
|
||||||
if (modSpeed > 10.0f || modSpeed < 0.1f)
|
if (modSpeed > sWorld.getConfig(CONFIG_UINT32_GM_MAX_SPEED_FACTOR) || modSpeed < 0.1f)
|
||||||
{
|
{
|
||||||
SendSysMessage(LANG_BAD_VALUE);
|
SendSysMessage(LANG_BAD_VALUE);
|
||||||
SetSentErrorMessage(true);
|
SetSentErrorMessage(true);
|
||||||
|
@ -664,6 +664,7 @@ void World::LoadConfigSettings(bool reload)
|
|||||||
setConfigMinMax(CONFIG_UINT32_START_GM_LEVEL, "GM.StartLevel", 1, getConfig(CONFIG_UINT32_START_PLAYER_LEVEL), MAX_LEVEL);
|
setConfigMinMax(CONFIG_UINT32_START_GM_LEVEL, "GM.StartLevel", 1, getConfig(CONFIG_UINT32_START_PLAYER_LEVEL), MAX_LEVEL);
|
||||||
setConfig(CONFIG_BOOL_GM_LOWER_SECURITY, "GM.LowerSecurity", false);
|
setConfig(CONFIG_BOOL_GM_LOWER_SECURITY, "GM.LowerSecurity", false);
|
||||||
setConfig(CONFIG_UINT32_GM_INVISIBLE_AURA, "GM.InvisibleAura", 31748);
|
setConfig(CONFIG_UINT32_GM_INVISIBLE_AURA, "GM.InvisibleAura", 31748);
|
||||||
|
setConfig(CONFIG_UINT32_GM_MAX_SPEED_FACTOR, "GM.MaxSpeedFactor", 10);
|
||||||
|
|
||||||
setConfig(CONFIG_UINT32_GROUP_VISIBILITY, "Visibility.GroupMode", 0);
|
setConfig(CONFIG_UINT32_GROUP_VISIBILITY, "Visibility.GroupMode", 0);
|
||||||
|
|
||||||
|
@ -134,6 +134,7 @@ enum eConfigUInt32Values
|
|||||||
CONFIG_UINT32_GM_LEVEL_IN_WHO_LIST,
|
CONFIG_UINT32_GM_LEVEL_IN_WHO_LIST,
|
||||||
CONFIG_UINT32_START_GM_LEVEL,
|
CONFIG_UINT32_START_GM_LEVEL,
|
||||||
CONFIG_UINT32_GM_INVISIBLE_AURA,
|
CONFIG_UINT32_GM_INVISIBLE_AURA,
|
||||||
|
CONFIG_UINT32_GM_MAX_SPEED_FACTOR,
|
||||||
CONFIG_UINT32_GROUP_VISIBILITY,
|
CONFIG_UINT32_GROUP_VISIBILITY,
|
||||||
CONFIG_UINT32_MAIL_DELIVERY_DELAY,
|
CONFIG_UINT32_MAIL_DELIVERY_DELAY,
|
||||||
CONFIG_UINT32_MASS_MAILER_SEND_PER_TICK,
|
CONFIG_UINT32_MASS_MAILER_SEND_PER_TICK,
|
||||||
|
@ -1163,6 +1163,10 @@ Channel.SilentlyGMJoin = 0
|
|||||||
# A spell that will be cast when a gm uses ".gm visible off" (Must be aura spell)
|
# A spell that will be cast when a gm uses ".gm visible off" (Must be aura spell)
|
||||||
# Default: 31748 (Spirit Particles, big)
|
# Default: 31748 (Spirit Particles, big)
|
||||||
# 0 (Disabled)
|
# 0 (Disabled)
|
||||||
|
# GM.MaxSpeedFactor
|
||||||
|
# Set the max speed factor whend using commands .mod speed / .mod aspeed etc...
|
||||||
|
# Only Integer values
|
||||||
|
# Default: 10
|
||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
@ -1179,6 +1183,7 @@ GM.LogTrade = 1
|
|||||||
GM.StartLevel = 1
|
GM.StartLevel = 1
|
||||||
GM.LowerSecurity = 0
|
GM.LowerSecurity = 0
|
||||||
GM.InvisibleAura = 31748
|
GM.InvisibleAura = 31748
|
||||||
|
GM.MaxSpeedFactor = 10
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# VISIBILITY AND RADIUSES
|
# VISIBILITY AND RADIUSES
|
||||||
|
Loading…
x
Reference in New Issue
Block a user