From f593049cd8286f48497782d8bc0afe787724ad5d Mon Sep 17 00:00:00 2001 From: wushin Date: Mon, 9 Nov 2015 13:46:56 -0600 Subject: Add third gender to account Add Gender to char Make gear work proper with new gender Enable legacy clients to use account gender --- src/mmo/enums.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/mmo/enums.hpp') 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 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; } } -- cgit v1.2.3-70-g09d2