mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 00:46:46 +00:00
[Cleanup] Gender constants cleanup (#3817)
* [Cleanup] Gender constants cleanup # Notes - Convert to a `Gender` namespace using `constexpr`. - Cleanup spots where we were using magic numbers for gender values. * Cleanup
This commit is contained in:
@@ -15,7 +15,7 @@ void SetGender(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
const uint8 gender_id = Strings::ToUnsignedInt(sep->arg[2]);
|
||||
if (!EQ::ValueWithin(gender_id, MALE, NEUTER)) {
|
||||
if (!EQ::ValueWithin(gender_id, Gender::Male, Gender::Neuter)) {
|
||||
c->Message(Chat::White, "Usage: #set gender [Gender ID]");
|
||||
c->Message(Chat::White, "Genders: 0 = Male, 1 = Female, 2 = Neuter");
|
||||
return;
|
||||
|
||||
@@ -15,7 +15,7 @@ void SetGenderPermanent(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
const uint8 gender_id = Strings::ToInt(sep->arg[2]);
|
||||
if (!EQ::ValueWithin(gender_id, MALE, NEUTER)) {
|
||||
if (!EQ::ValueWithin(gender_id, Gender::Male, Gender::Neuter)) {
|
||||
c->Message(Chat::White, "Usage: #set gender_permanent [Gender ID]");
|
||||
c->Message(Chat::White, "Genders: 0 = Male, 1 = Female, 2 = Neuter");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user