Merge pull request #859 from eqft/feature/rule_for_gm_level_cmd_with_target

Convert constant check in level_command() to a Rule
This commit is contained in:
Michael Cook (mackal)
2019-07-16 13:43:02 -04:00
committed by GitHub
3 changed files with 4 additions and 1 deletions
+1
View File
@@ -205,6 +205,7 @@ RULE_CATEGORY_END()
RULE_CATEGORY(GM)
RULE_INT(GM, MinStatusToSummonItem, 250)
RULE_INT(GM, MinStatusToZoneAnywhere, 250)
RULE_INT(GM, MinStatusToLevelTarget, 100)
RULE_CATEGORY_END()
RULE_CATEGORY(World)
@@ -0,0 +1,2 @@
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`)
VALUES (1, 'GM:MinStatusToLevelTarget', '100', 'GM status needed to use #level on your target');
+1 -1
View File
@@ -2799,7 +2799,7 @@ void command_level(Client *c, const Seperator *sep)
if ((level <= 0) || ((level > RuleI(Character, MaxLevel)) && (c->Admin() < commandLevelAboveCap))) {
c->Message(0, "Error: #Level: Invalid Level");
}
else if (c->Admin() < 100) {
else if (c->Admin() < RuleI(GM, MinStatusToLevelTarget)) {
c->SetLevel(level, true);
#ifdef BOTS
if(RuleB(Bots, BotLevelsWithOwner))