mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-30 17:58:16 +00:00
[Commands] Cleanup #corpse Command. (#1790)
- Cleanup message and logic. - Add ConvertMoneyToString(platinum, gold, silver, copper) helper method. - Cleanup NPC::QueryLoot() and Corpse::QueryLoot().
This commit is contained in:
+16
-8
@@ -674,12 +674,18 @@ void NPC::QueryLoot(Client* to)
|
||||
to->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Item {} | Name: {} ID: {} Min Level: {} Max Level: {}",
|
||||
"Item {} | Name: {} ({}){}",
|
||||
item_number,
|
||||
linker.GenerateLink().c_str(),
|
||||
current_item->item_id,
|
||||
current_item->trivial_min_level,
|
||||
current_item->trivial_max_level
|
||||
(
|
||||
current_item->charges > 1 ?
|
||||
fmt::format(
|
||||
" Amount: {}",
|
||||
current_item->charges
|
||||
) :
|
||||
""
|
||||
)
|
||||
).c_str()
|
||||
);
|
||||
item_count++;
|
||||
@@ -696,11 +702,13 @@ void NPC::QueryLoot(Client* to)
|
||||
to->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Money | Platinum: {} Gold: {} Silver: {} Copper: {}",
|
||||
platinum,
|
||||
gold,
|
||||
silver,
|
||||
copper
|
||||
"Money | {}",
|
||||
ConvertMoneyToString(
|
||||
platinum,
|
||||
gold,
|
||||
silver,
|
||||
copper
|
||||
)
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user