diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/beinghandler.cpp | 6 | ||||
-rw-r--r-- | src/net/charserverhandler.cpp | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp index 4f525e8d..5b689266 100644 --- a/src/net/beinghandler.cpp +++ b/src/net/beinghandler.cpp @@ -137,7 +137,8 @@ void BeingHandler::handleMessage(MessageIn *msg) msg->readInt16(); // manner msg->readInt16(); // karma msg->readInt8(); // unknown - dstBeing->setGender(1 - msg->readInt8()); // gender + dstBeing->setGender( + (msg->readInt8() == 0) ? GENDER_FEMALE : GENDER_MALE); // Set these after the gender, as the sprites may be gender-specific dstBeing->setSprite(Being::BOTTOMCLOTHES_SPRITE, headBottom); @@ -404,7 +405,8 @@ void BeingHandler::handleMessage(MessageIn *msg) msg->readInt32(); // emblem msg->readInt16(); // manner msg->readInt8(); // karma - dstBeing->setGender(1 - msg->readInt8()); // gender + dstBeing->setGender( + (msg->readInt8() == 0) ? GENDER_FEMALE : GENDER_MALE); // Set these after the gender, as the sprites may be gender-specific dstBeing->setSprite(Being::WEAPON_SPRITE, weapon); diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp index 11754b6f..eb724630 100644 --- a/src/net/charserverhandler.cpp +++ b/src/net/charserverhandler.cpp @@ -187,10 +187,11 @@ void CharServerHandler::handleMessage(MessageIn *msg) } } -LocalPlayer* CharServerHandler::readPlayerData(MessageIn &msg, int &slot) +LocalPlayer *CharServerHandler::readPlayerData(MessageIn &msg, int &slot) { LocalPlayer *tempPlayer = new LocalPlayer(mLoginData->account_ID, 0, NULL); - tempPlayer->setGender(1 - mLoginData->sex); + tempPlayer->setGender( + (mLoginData->sex == 0) ? GENDER_FEMALE : GENDER_MALE); tempPlayer->mCharId = msg.readInt32(); tempPlayer->setXp(msg.readInt32()); |