mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-05 03:06:38 +00:00
[Commands] Cleanup #gender Command. (#1832)
- Cleanup message and logic. - Cleanup other spots using similar logic so they're all uniform.
This commit is contained in:
@@ -16,15 +16,15 @@ void command_setaaxp(Client *c, const Seperator *sep)
|
||||
target = c->GetTarget()->CastToClient();
|
||||
}
|
||||
|
||||
std::string aa_type = str_tolower(sep->arg[1]);
|
||||
std::string aa_type = str_tolower(sep->arg[1]);
|
||||
std::string group_raid_string;
|
||||
uint32 aa_experience = static_cast<uint32>(std::min(
|
||||
uint32 aa_experience = static_cast<uint32>(std::min(
|
||||
std::stoull(sep->arg[2]),
|
||||
(unsigned long long) 2000000000
|
||||
));
|
||||
bool is_aa = aa_type.find("aa") != std::string::npos;
|
||||
bool is_group = aa_type.find("group") != std::string::npos;
|
||||
bool is_raid = aa_type.find("raid") != std::string::npos;
|
||||
bool is_aa = aa_type.find("aa") != std::string::npos;
|
||||
bool is_group = aa_type.find("group") != std::string::npos;
|
||||
bool is_raid = aa_type.find("raid") != std::string::npos;
|
||||
if (!is_aa && !is_group && !is_raid) {
|
||||
c->Message(Chat::White, "Usage: #setaaxp [AA|Group|Raid] [AA Experience]");
|
||||
return;
|
||||
@@ -54,7 +54,15 @@ void command_setaaxp(Client *c, const Seperator *sep)
|
||||
|
||||
std::string aa_exp_message = fmt::format(
|
||||
"{} now {} {} {}AA Experience.",
|
||||
c == target ? "You" : target->GetCleanName(),
|
||||
(
|
||||
c == target ?
|
||||
"You" :
|
||||
fmt::format(
|
||||
"{} ({})",
|
||||
target->GetCleanName(),
|
||||
target->GetID()
|
||||
)
|
||||
),
|
||||
c == target ? "have" : "has",
|
||||
aa_experience,
|
||||
group_raid_string
|
||||
|
||||
Reference in New Issue
Block a user