diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-12 14:53:32 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-12 14:58:48 +0200 |
commit | 92a8e0403595cd0f4b8b2084c45ec79edca7e7c1 (patch) | |
tree | d1d4b2b6638935f666c6512b467a6ffc3017fb60 /src/net/ea/charserverhandler.cpp | |
parent | 14a6e6a4bc5d39ddf8f31efc07a5e2493a6f6d0a (diff) | |
download | mana-92a8e0403595cd0f4b8b2084c45ec79edca7e7c1.tar.gz mana-92a8e0403595cd0f4b8b2084c45ec79edca7e7c1.tar.bz2 mana-92a8e0403595cd0f4b8b2084c45ec79edca7e7c1.tar.xz mana-92a8e0403595cd0f4b8b2084c45ec79edca7e7c1.zip |
Append _F or _M to username in eAthena network layer
Abstracts it away and out of main.cpp and register.cpp.
Diffstat (limited to 'src/net/ea/charserverhandler.cpp')
-rw-r--r-- | src/net/ea/charserverhandler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index 2973fc4c..3402b5fc 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -170,8 +170,7 @@ void CharServerHandler::handleMessage(MessageIn &msg) LocalPlayer *CharServerHandler::readPlayerData(MessageIn &msg, int &slot) { LocalPlayer *tempPlayer = new LocalPlayer(mLoginData->account_ID, 0, NULL); - tempPlayer->setGender( - (mLoginData->sex == 0) ? GENDER_FEMALE : GENDER_MALE); + tempPlayer->setGender(mLoginData->sex); tempPlayer->mCharId = msg.readInt32(); tempPlayer->setXp(msg.readInt32()); @@ -218,7 +217,8 @@ void CharServerHandler::setCharCreateDialog(CharCreateDialog *window) { mCharCreateDialog = window; - if (!mCharCreateDialog) return; + if (!mCharCreateDialog) + return; std::vector<std::string> attributes; attributes.push_back(_("Strength:")); @@ -229,7 +229,7 @@ void CharServerHandler::setCharCreateDialog(CharCreateDialog *window) attributes.push_back(_("Luck:")); mCharCreateDialog->setAttributes(attributes, 30, 1, 9); - mCharCreateDialog->setFixedGender(true); + mCharCreateDialog->setFixedGender(true, mLoginData->sex); } void CharServerHandler::connect(LoginData *loginData) @@ -243,7 +243,7 @@ void CharServerHandler::connect(LoginData *loginData) // [Fate] The next word is unused by the old char server, so we squeeze in // tmw client version information outMsg.writeInt16(CLIENT_PROTOCOL_VERSION); - outMsg.writeInt8(loginData->sex); + outMsg.writeInt8((loginData->sex == GENDER_MALE) ? 1 : 0); // We get 4 useless bytes before the real answer comes in (what are these?) mNetwork->skip(4); |