mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-09 22:20:24 +00:00
[Money Messages] Cleanup quest::givecash(), split, and task reward messages. (#2205)
* [Money Messages] Cleanup quest::givecash(), split, and task reward messages. - Cleans up all the money messages using ConvertMoneyToString(). - Allows quest::givecash() to have optional parameters other than copper. * Commification. * Corpse messages. * String IDs and cleanup.
This commit is contained in:
+27
-9
@@ -1019,8 +1019,27 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a
|
||||
loot_coin = (tmp[0] == 1 && tmp[1] == '\0');
|
||||
|
||||
if (loot_request_type == LootRequestType::GMPeek || loot_request_type == LootRequestType::GMAllowed) {
|
||||
client->Message(Chat::Yellow, "This corpse contains %u platinum, %u gold, %u silver and %u copper.",
|
||||
GetPlatinum(), GetGold(), GetSilver(), GetCopper());
|
||||
if (
|
||||
GetPlatinum() ||
|
||||
GetGold() ||
|
||||
GetSilver() ||
|
||||
GetCopper()
|
||||
) {
|
||||
client->Message(
|
||||
Chat::Yellow,
|
||||
fmt::format(
|
||||
"This corpse contains {}.",
|
||||
ConvertMoneyToString(
|
||||
GetPlatinum(),
|
||||
GetGold(),
|
||||
GetSilver(),
|
||||
GetCopper()
|
||||
)
|
||||
).c_str()
|
||||
);
|
||||
} else {
|
||||
client->Message(Chat::Yellow, "This corpse contains no money.");
|
||||
}
|
||||
|
||||
auto outapp = new EQApplicationPacket(OP_MoneyOnCorpse, sizeof(moneyOnCorpseStruct));
|
||||
moneyOnCorpseStruct* d = (moneyOnCorpseStruct*)outapp->pBuffer;
|
||||
@@ -1505,13 +1524,12 @@ void Corpse::QueryLoot(Client* to) {
|
||||
}
|
||||
}
|
||||
|
||||
bool has_money = (
|
||||
platinum > 0 ||
|
||||
gold > 0 ||
|
||||
silver > 0 ||
|
||||
copper > 0
|
||||
);
|
||||
if (has_money) {
|
||||
if (
|
||||
platinum ||
|
||||
gold ||
|
||||
silver ||
|
||||
copper
|
||||
) {
|
||||
to->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
|
||||
Reference in New Issue
Block a user