diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-03-14 03:56:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-03-14 04:06:13 +0300 |
commit | 112d2ad1904051160822d1845d1418cca889c0d5 (patch) | |
tree | 9731934d9dc367f931c028158f3d26a670e18feb /src/being.cpp | |
parent | 02e9a62ce9a0f288804bfa2aa59c3a84b0376c4a (diff) | |
download | manaplus-112d2ad1904051160822d1845d1418cca889c0d5.tar.gz manaplus-112d2ad1904051160822d1845d1418cca889c0d5.tar.bz2 manaplus-112d2ad1904051160822d1845d1418cca889c0d5.tar.xz manaplus-112d2ad1904051160822d1845d1418cca889c0d5.zip |
Add support for other gender.
Fix per gender and race items separation.
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp index db8940662..15d93f251 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -2627,6 +2627,35 @@ void Being::updatePercentHP() } } +int Being::genderToInt(Gender sex) +{ + switch (sex) + { + case GENDER_FEMALE: + case GENDER_UNSPECIFIED: + default: + return 0; + case GENDER_MALE: + return 1; + case GENDER_OTHER: + return 3; + } +} + +Gender Being::intToGender(int sex) +{ + switch (sex) + { + case 0: + default: + return GENDER_FEMALE; + case 1: + return GENDER_MALE; + case 3: + return GENDER_OTHER; + } +} + BeingEquipBackend::BeingEquipBackend(Being *being): mBeing(being) { |