mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 12:41:30 +00:00
[Cleanup] Fix Issues with Strings::Commify and Mob::SendStatsWindow (#4984)
This commit is contained in:
parent
adb3196ca5
commit
ed3f6c2a40
@ -313,6 +313,12 @@ std::string Strings::Commify(const std::string &number)
|
||||
|
||||
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;
|
||||
for (i = string_length - 3; i >= 0; i -= 3) {
|
||||
if (i > 0) {
|
||||
|
||||
@ -1317,7 +1317,7 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
||||
ns->spawn.IsMercenary = IsMerc() ? 1 : 0;
|
||||
ns->spawn.targetable_with_hotkey = no_target_hotkey ? 0 : 1; // opposite logic!
|
||||
ns->spawn.untargetable = IsTargetable();
|
||||
|
||||
|
||||
ns->spawn.petOwnerId = ownerid;
|
||||
|
||||
ns->spawn.haircolor = haircolor;
|
||||
@ -2361,7 +2361,7 @@ void Mob::SendStatsWindow(Client* c, bool use_window)
|
||||
|
||||
// Attack 2
|
||||
final_string += fmt::format(
|
||||
"Offense: {}{} | {}{}",
|
||||
"Offense: {}{}{}{}",
|
||||
Strings::Commify(offense(skill)),
|
||||
(
|
||||
itembonuses.ATK ?
|
||||
@ -8792,4 +8792,4 @@ bool Mob::LoadDataBucketsCache()
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user