[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
+4 -4
View File
@@ -281,10 +281,10 @@ Bot::Bot(
case SE_IllusionCopy:
case SE_Illusion: {
if (spell.base_value[x1] == -1) {
if (gender == FEMALE) {
gender = MALE;
} else if (gender == MALE) {
gender = FEMALE;
if (gender == Gender::Female) {
gender = Gender::Male;
} else if (gender == Gender::Male) {
gender = Gender::Female;
}
SendIllusionPacket(