mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-16 05:11:29 +00:00
Added rule Bots:AllowCamelCaseNames
This commit is contained in:
parent
fe630bf7ca
commit
951f3239f1
@ -531,6 +531,7 @@ RULE_CATEGORY_END()
|
|||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
RULE_CATEGORY(Bots)
|
RULE_CATEGORY(Bots)
|
||||||
RULE_INT(Bots, AAExpansion, 8) // Bots get AAs through this expansion
|
RULE_INT(Bots, AAExpansion, 8) // Bots get AAs through this expansion
|
||||||
|
RULE_BOOL(Bots, AllowCamelCaseNames, false) // Allows the use of 'MyBot' type names
|
||||||
RULE_INT(Bots, CommandSpellRank, 1) // Filters bot command spells by rank (1, 2 and 3 are valid filters - any other number allows all ranks)
|
RULE_INT(Bots, CommandSpellRank, 1) // Filters bot command spells by rank (1, 2 and 3 are valid filters - any other number allows all ranks)
|
||||||
RULE_INT(Bots, CreationLimit, 150) // Number of bots that each account can create
|
RULE_INT(Bots, CreationLimit, 150) // Number of bots that each account can create
|
||||||
RULE_BOOL(Bots, FinishBuffing, false) // Allow for buffs to complete even if the bot caster is out of mana. Only affects buffing out of combat.
|
RULE_BOOL(Bots, FinishBuffing, false) // Allow for buffs to complete even if the bot caster is out of mana. Only affects buffing out of combat.
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#define CURRENT_BINARY_DATABASE_VERSION 9096
|
#define CURRENT_BINARY_DATABASE_VERSION 9096
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9006
|
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9007
|
||||||
#else
|
#else
|
||||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 0 // must be 0
|
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 0 // must be 0
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
9004|2016_04_07_bots_heal_override_target.sql|SELECT `bot_command` FROM `bot_command_settings` WHERE `bot_command` LIKE 'healrotationclearhot'|empty|
|
9004|2016_04_07_bots_heal_override_target.sql|SELECT `bot_command` FROM `bot_command_settings` WHERE `bot_command` LIKE 'healrotationclearhot'|empty|
|
||||||
9005|2016_04_08_bots_heal_rotations.sql|SHOW TABLES LIKE 'bot_heal_rotations'|empty|
|
9005|2016_04_08_bots_heal_rotations.sql|SHOW TABLES LIKE 'bot_heal_rotations'|empty|
|
||||||
9006|2016_04_12_bots_inventory_window.sql|SELECT `bot_command` FROM `bot_command_settings` WHERE `bot_command` LIKE 'inventorywindow'|empty|
|
9006|2016_04_12_bots_inventory_window.sql|SELECT `bot_command` FROM `bot_command_settings` WHERE `bot_command` LIKE 'inventorywindow'|empty|
|
||||||
|
9007|2016_06_23_bots_camel_case_name_rule.sql|SELECT * FROM `rule_values` WHERE `rule_name` LIKE 'Bots:AllowCamelCaseNames'|empty|
|
||||||
|
|
||||||
# Upgrade conditions:
|
# Upgrade conditions:
|
||||||
# This won't be needed after this system is implemented, but it is used database that are not
|
# This won't be needed after this system is implemented, but it is used database that are not
|
||||||
|
|||||||
@ -0,0 +1,2 @@
|
|||||||
|
INSERT INTO `rule_values` (`ruleset_id`, `rule_name`, `rule_value`, `notes`) VALUES
|
||||||
|
(1, 'Bots:AllowCamelCaseNames', 'false', 'Allows the use of \'MyBot\' type names');
|
||||||
@ -1538,7 +1538,7 @@ bool Bot::IsValidName(std::string& name)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (int i = 1; i < name.length(); ++i) {
|
for (int i = 1; i < name.length(); ++i) {
|
||||||
if (!islower(name[i]) && name[i] != '_') {
|
if ((!RuleB(Bots, AllowCamelCaseNames) && !islower(name[i])) && name[i] != '_') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user