code cleanup 3

This commit is contained in:
nytmyr
2025-01-10 12:10:12 -06:00
parent 95c1bb6883
commit 90e95572fd
38 changed files with 718 additions and 729 deletions
+5 -5
View File
@@ -81,12 +81,12 @@ void bot_command_max_melee_range(Client* c, const Seperator* sep)
int ab_arg = 1;
bool current_check = false;
uint32 typeValue = 0;
uint32 type_value = 0;
if (sep->IsNumber(1)) {
typeValue = atoi(sep->arg[1]);
type_value = atoi(sep->arg[1]);
++ab_arg;
if (typeValue < 0 || typeValue > 1) {
if (type_value < 0 || type_value > 1) {
c->Message(Chat::Yellow, "You must enter either 0 for disabled or 1 for enabled.");
return;
@@ -146,7 +146,7 @@ void bot_command_max_melee_range(Client* c, const Seperator* sep)
);
}
else {
my_bot->SetMaxMeleeRange(typeValue);
my_bot->SetMaxMeleeRange(type_value);
++success_count;
}
}
@@ -167,7 +167,7 @@ void bot_command_max_melee_range(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots {} stay at max melee range.",
success_count,
typeValue ? "will now" : "will no longer"
type_value ? "will now" : "will no longer"
).c_str()
);
}