summaryrefslogtreecommitdiff
path: root/src/mmo
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2015-11-09 13:46:56 -0600
committerwushin <pasekei@gmail.com>2016-02-08 18:53:15 -0600
commitf593049cd8286f48497782d8bc0afe787724ad5d (patch)
tree371402a86444ce9104227d638192fa4a305dd48f /src/mmo
parentf81bcc78fb1aa5475bbe54907ff82199fc031521 (diff)
downloadtmwa-f593049cd8286f48497782d8bc0afe787724ad5d.tar.gz
tmwa-f593049cd8286f48497782d8bc0afe787724ad5d.tar.bz2
tmwa-f593049cd8286f48497782d8bc0afe787724ad5d.tar.xz
tmwa-f593049cd8286f48497782d8bc0afe787724ad5d.zip
Add third gender to account
Add Gender to char Make gear work proper with new gender Enable legacy clients to use account gender
Diffstat (limited to 'src/mmo')
-rw-r--r--src/mmo/enums.hpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mmo/enums.hpp b/src/mmo/enums.hpp
index caecc13..9a8f8ea 100644
--- a/src/mmo/enums.hpp
+++ b/src/mmo/enums.hpp
@@ -113,7 +113,8 @@ enum class SEX : uint8_t
MALE = 1,
// For items. This is also used as error, sometime.
// TODO switch to Option<SEX> where appropriate.
- NEUTRAL = 2,
+ UNSPECIFIED = 2,
+ NEUTRAL = 3,
};
inline
char sex_to_char(SEX sex)
@@ -122,7 +123,8 @@ char sex_to_char(SEX sex)
{
case SEX::FEMALE: return 'F';
case SEX::MALE: return 'M';
- default: return '\0';
+ case SEX::NEUTRAL: return 'N';
+ default: return 'S';
}
}
inline
@@ -132,7 +134,8 @@ SEX sex_from_char(char c)
{
case 'F': return SEX::FEMALE;
case 'M': return SEX::MALE;
- default: return SEX::NEUTRAL;
+ case 'N': return SEX::NEUTRAL;
+ default: return SEX::UNSPECIFIED;
}
}