summaryrefslogtreecommitdiff
path: root/src/net/eathena/charserverhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-01 12:59:07 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-01 12:59:07 +0300
commitd03ec48c778c22fd8e469e81fedf9cbf07b956b2 (patch)
tree400e6b09c4f09073b5cdb8edcf2faaabc474bca0 /src/net/eathena/charserverhandler.cpp
parent600e94486277d83de73c405242ee981a63835cfd (diff)
downloadmanaplus-d03ec48c778c22fd8e469e81fedf9cbf07b956b2.tar.gz
manaplus-d03ec48c778c22fd8e469e81fedf9cbf07b956b2.tar.bz2
manaplus-d03ec48c778c22fd8e469e81fedf9cbf07b956b2.tar.xz
manaplus-d03ec48c778c22fd8e469e81fedf9cbf07b956b2.zip
eathena: fix char gender on char selection dialog.
Diffstat (limited to 'src/net/eathena/charserverhandler.cpp')
-rw-r--r--src/net/eathena/charserverhandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp
index 992b4ca79..e8e2ea077 100644
--- a/src/net/eathena/charserverhandler.cpp
+++ b/src/net/eathena/charserverhandler.cpp
@@ -248,8 +248,9 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg,
msg.readInt32("slot change");
tempPlayer->setRename(msg.readInt32("rename (inverse)"));
- const uint8_t gender = static_cast<uint8_t>(msg.readUInt8("gender") & 3);
- tempPlayer->setGender(Being::intToGender(gender));
+ const uint8_t gender = static_cast<uint8_t>(msg.readUInt8("gender"));
+ if (gender != 99)
+ tempPlayer->setGender(Being::intToGender(gender));
}
void CharServerHandler::chooseCharacter(Net::Character *const character)