[Cleanup] Fix Issues with Strings::Commify and Mob::SendStatsWindow

This commit is contained in:
Kinglykrab
2025-08-13 00:17:34 -04:00
parent c4f408bffc
commit 030c71701c
2 changed files with 9 additions and 3 deletions
+6
View File
@@ -313,6 +313,12 @@ std::string Strings::Commify(const std::string &number)
auto string_length = static_cast<int>(number.length()); auto string_length = static_cast<int>(number.length());
if (string_length == 3) {
return number;
} else if (string_length == 4 && number.starts_with("-")) {
return number;
}
int i = 0; int i = 0;
for (i = string_length - 3; i >= 0; i -= 3) { for (i = string_length - 3; i >= 0; i -= 3) {
if (i > 0) { if (i > 0) {
+1 -1
View File
@@ -2361,7 +2361,7 @@ void Mob::SendStatsWindow(Client* c, bool use_window)
// Attack 2 // Attack 2
final_string += fmt::format( final_string += fmt::format(
"Offense: {}{} | {}{}", "Offense: {}{}{}{}",
Strings::Commify(offense(skill)), Strings::Commify(offense(skill)),
( (
itembonuses.ATK ? itembonuses.ATK ?