mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-02 19:43:52 +00:00
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:
commit
16d6014a87
@ -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');
|
||||
@ -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))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user