allow $edit secid if character is level 1

This commit is contained in:
Martin Michelsen
2024-10-08 23:54:34 -07:00
parent 7139df0265
commit 458f5b2d0f
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -638,6 +638,7 @@ Some subcommands are always available. They are:
* `$edit language L`: Set your language (Generally only useful on BB; values for L: J = Japanese, E = English, G = German, F = French, S = Spanish, B = Simplified Chinese, T = Traditional Chinese, K = Korean) * `$edit language L`: Set your language (Generally only useful on BB; values for L: J = Japanese, E = English, G = German, F = French, S = Spanish, B = Simplified Chinese, T = Traditional Chinese, K = Korean)
* `$edit name NAME`: Set your character name * `$edit name NAME`: Set your character name
* `$edit npc NPC-NAME`: Set or remove an NPC skin on your character (NPC-NAME can be ninja, rico, sonic, knuckles, tails, flowen, elly, or none) * `$edit npc NPC-NAME`: Set or remove an NPC skin on your character (NPC-NAME can be ninja, rico, sonic, knuckles, tails, flowen, elly, or none)
* `$edit secid SECID-NAME`: Set your section ID (cheat mode is required for this unless your character is Level 1)
The remaining subcommands are only available if cheat mode is enabled on the server. They are: The remaining subcommands are only available if cheat mode is enabled on the server. They are:
* `$edit atp N`: Set your ATP to N until stats are updated (e.g. by leveling up) * `$edit atp N`: Set your ATP to N until stats are updated (e.g. by leveling up)
@@ -650,7 +651,6 @@ The remaining subcommands are only available if cheat mode is enabled on the ser
* `$edit meseta N`: Set the amount of Meseta in your inventory * `$edit meseta N`: Set the amount of Meseta in your inventory
* `$edit exp N`: Set your total amount of EXP (does not affect level) * `$edit exp N`: Set your total amount of EXP (does not affect level)
* `$edit level N`: Set your current level (recomputes stats, but does not affect EXP) * `$edit level N`: Set your current level (recomputes stats, but does not affect EXP)
* `$edit secid SECID-NAME`: Set your section ID
* `$edit tech TECH-NAME LEVEL`: Set the level of one of your techniques * `$edit tech TECH-NAME LEVEL`: Set the level of one of your techniques
# Non-server features # Non-server features
+5 -1
View File
@@ -1420,7 +1420,11 @@ static void server_command_edit(shared_ptr<Client> c, const std::string& args) {
if (sys) { if (sys) {
sys->language = new_language; sys->language = new_language;
} }
} else if (tokens.at(0) == "secid" && cheats_allowed) { } else if (tokens.at(0) == "secid") {
if (!cheats_allowed && (p->disp.stats.level > 0)) {
send_text_message(c, "$C6You cannot change\nyour Section ID\nafter level 1");
return;
}
uint8_t secid = section_id_for_name(tokens.at(1)); uint8_t secid = section_id_for_name(tokens.at(1));
if (secid == 0xFF) { if (secid == 0xFF) {
send_text_message(c, "$C6No such section ID"); send_text_message(c, "$C6No such section ID");