[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:
Alex King
2023-12-30 11:22:09 -05:00
committed by GitHub
parent 836c3d6596
commit 4712ca471b
20 changed files with 120 additions and 118 deletions
+2 -2
View File
@@ -152,11 +152,11 @@ bool TitleManager::IsClientEligibleForTitle(Client *client, TitleEntry title)
return false;
}
if (title.gender_id >= 0 && client->GetBaseGender() != title.gender_id) {
if (title.gender_id >= Gender::Male && client->GetBaseGender() != title.gender_id) {
return false;
}
if (title.class_id >= 0 && client->GetBaseClass() != title.class_id) {
if (title.class_id >= Class::None && client->GetBaseClass() != title.class_id) {
return false;
}