diff --git a/zone/gm_commands/givemoney.cpp b/zone/gm_commands/givemoney.cpp index ab71df4ce..4c3076f9e 100755 --- a/zone/gm_commands/givemoney.cpp +++ b/zone/gm_commands/givemoney.cpp @@ -30,82 +30,12 @@ void command_givemoney(Client *c, const Seperator *sep) platinum, true ); - std::string money_string; - if (copper && silver && gold && platinum) { // CSGP - money_string = fmt::format( - "{} Platinum, {} Gold, {} Silver, and {} Copper", - platinum, - gold, - silver, - copper - ); - } else if (copper && silver && gold && !platinum) { // CSG - money_string = fmt::format( - "{} Gold, {} Silver, and {} Copper", - gold, - silver, - copper - ); - } else if (copper && silver && !gold && !platinum) { // CS - money_string = fmt::format( - "{} Silver and {} Copper", - silver, - copper - ); - } else if (copper && !silver && !gold && !platinum) { // C - money_string = fmt::format( - "{} Copper", - copper - ); - } else if (!copper && silver && gold && platinum) { // SGP - money_string = fmt::format( - "{} Platinum, {} Gold, and {} Silver", - platinum, - gold, - silver - ); - } else if (!copper && silver && gold && !platinum) { // SG - money_string = fmt::format( - "{} Gold and {} Silver", - gold, - silver - ); - } else if (!copper && silver && !gold && !platinum) { // S - money_string = fmt::format( - "{} Silver", - silver - ); - } else if (copper && !silver && gold && platinum) { // CGP - money_string = fmt::format( - "{} Platinum, {} Gold, and {} Copper", - platinum, - gold, - copper - ); - } else if (copper && !silver && gold && !platinum) { // CG - money_string = fmt::format( - "{} Gold and {} Copper", - gold, - copper - ); - } else if (!copper && !silver && gold && platinum) { // GP - money_string = fmt::format( - "{} Platinum and {} Gold", - platinum, - gold - ); - } else if (!copper && !silver && gold && !platinum) { // G - money_string = fmt::format( - "{} Gold", - gold - ); - } - + c->Message( Chat::White, fmt::format( "Added {} to {}.", - money_string, + ConvertMoneyToString(platinum, gold, silver, copper), c == target ? "yourself" : target->GetCleanName() ).c_str() );