diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2008-02-22 19:58:29 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2008-02-22 19:58:29 +0000 |
commit | d3adc61aa4b4924f82d8cbc23bea26da7257da97 (patch) | |
tree | a332ee5ff920213ebfb558e646ba278885d1bdc3 /src/net | |
parent | 3d97d69ca9b0521aa0f49db0b739d50afc00318e (diff) | |
download | mana-d3adc61aa4b4924f82d8cbc23bea26da7257da97.tar.gz mana-d3adc61aa4b4924f82d8cbc23bea26da7257da97.tar.bz2 mana-d3adc61aa4b4924f82d8cbc23bea26da7257da97.tar.xz mana-d3adc61aa4b4924f82d8cbc23bea26da7257da97.zip |
Handling gender with an enum everywhere.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/beinghandler.cpp | 2 | ||||
-rw-r--r-- | src/net/charserverhandler.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp index 24db8454..38299b8d 100644 --- a/src/net/beinghandler.cpp +++ b/src/net/beinghandler.cpp @@ -475,7 +475,7 @@ BeingHandler::handleBeingEnterMessage(MessageIn &msg) Player *p = static_cast< Player * >(being); int hs = msg.readInt8(), hc = msg.readInt8(); p->setHairStyle(hs, hc); - p->setGender(msg.readInt8()); + p->setGender(msg.readInt8() == GENDER_MALE ? GENDER_MALE : GENDER_FEMALE); handleLooks(p, msg); } break; diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp index c83b68f1..6cc9e384 100644 --- a/src/net/charserverhandler.cpp +++ b/src/net/charserverhandler.cpp @@ -212,7 +212,7 @@ LocalPlayer* CharServerHandler::readPlayerData(MessageIn &msg, int &slot) LocalPlayer *tempPlayer = new LocalPlayer; slot = msg.readInt8(); // character slot tempPlayer->mName = msg.readString(); - tempPlayer->setGender(msg.readInt8()); + tempPlayer->setGender(msg.readInt8() == GENDER_MALE ? GENDER_MALE : GENDER_FEMALE); int hs = msg.readInt8(), hc = msg.readInt8(); tempPlayer->setHairStyle(hs, hc); tempPlayer->setLevel(msg.readInt16()); |