mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +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:
+25
-25
@@ -1192,75 +1192,75 @@ std::string ConvertMoneyToString(uint32 platinum, uint32 gold, uint32 silver, ui
|
||||
if (copper && silver && gold && platinum) { // CSGP
|
||||
money_string = fmt::format(
|
||||
"{} Platinum, {} Gold, {} Silver, and {} Copper",
|
||||
platinum,
|
||||
gold,
|
||||
silver,
|
||||
copper
|
||||
commify(std::to_string(platinum)),
|
||||
commify(std::to_string(gold)),
|
||||
commify(std::to_string(silver)),
|
||||
commify(std::to_string(copper))
|
||||
);
|
||||
} else if (copper && silver && gold && !platinum) { // CSG
|
||||
money_string = fmt::format(
|
||||
"{} Gold, {} Silver, and {} Copper",
|
||||
gold,
|
||||
silver,
|
||||
copper
|
||||
commify(std::to_string(gold)),
|
||||
commify(std::to_string(silver)),
|
||||
commify(std::to_string(copper))
|
||||
);
|
||||
} else if (copper && silver && !gold && !platinum) { // CS
|
||||
money_string = fmt::format(
|
||||
"{} Silver and {} Copper",
|
||||
silver,
|
||||
copper
|
||||
commify(std::to_string(silver)),
|
||||
commify(std::to_string(copper))
|
||||
);
|
||||
} else if (!copper && silver && gold && platinum) { // SGP
|
||||
money_string = fmt::format(
|
||||
"{} Platinum, {} Gold, and {} Silver",
|
||||
platinum,
|
||||
gold,
|
||||
silver
|
||||
commify(std::to_string(platinum)),
|
||||
commify(std::to_string(gold)),
|
||||
commify(std::to_string(silver))
|
||||
);
|
||||
} else if (!copper && silver && gold && !platinum) { // SG
|
||||
money_string = fmt::format(
|
||||
"{} Gold and {} Silver",
|
||||
gold,
|
||||
silver
|
||||
commify(std::to_string(gold)),
|
||||
commify(std::to_string(silver))
|
||||
);
|
||||
} else if (copper && !silver && gold && platinum) { // CGP
|
||||
money_string = fmt::format(
|
||||
"{} Platinum, {} Gold, and {} Copper",
|
||||
platinum,
|
||||
gold,
|
||||
copper
|
||||
commify(std::to_string(platinum)),
|
||||
commify(std::to_string(gold)),
|
||||
commify(std::to_string(copper))
|
||||
);
|
||||
} else if (copper && !silver && gold && !platinum) { // CG
|
||||
money_string = fmt::format(
|
||||
"{} Gold and {} Copper",
|
||||
gold,
|
||||
copper
|
||||
commify(std::to_string(gold)),
|
||||
commify(std::to_string(copper))
|
||||
);
|
||||
} else if (!copper && !silver && gold && platinum) { // GP
|
||||
money_string = fmt::format(
|
||||
"{} Platinum and {} Gold",
|
||||
platinum,
|
||||
gold
|
||||
commify(std::to_string(platinum)),
|
||||
commify(std::to_string(gold))
|
||||
);
|
||||
} else if (!copper && !silver && !gold && platinum) { // P
|
||||
money_string = fmt::format(
|
||||
"{} Platinum",
|
||||
platinum
|
||||
commify(std::to_string(platinum))
|
||||
);
|
||||
} else if (!copper && !silver && gold && !platinum) { // G
|
||||
money_string = fmt::format(
|
||||
"{} Gold",
|
||||
gold
|
||||
commify(std::to_string(gold))
|
||||
);
|
||||
} else if (!copper && silver && !gold && !platinum) { // S
|
||||
money_string = fmt::format(
|
||||
"{} Silver",
|
||||
silver
|
||||
commify(std::to_string(silver))
|
||||
);
|
||||
} else if (copper && !silver && !gold && !platinum) { // C
|
||||
money_string = fmt::format(
|
||||
"{} Copper",
|
||||
copper
|
||||
commify(std::to_string(copper))
|
||||
);
|
||||
}
|
||||
return money_string;
|
||||
|
||||
Reference in New Issue
Block a user