summaryrefslogtreecommitdiff
path: root/src/net/charserverhandler.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2008-02-22 19:58:29 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-01-05 17:28:29 +0100
commit615b1bc6080a3418b18fd4ab93b4212470709731 (patch)
treea82805bc56042899bd19620d667d890baefd7413 /src/net/charserverhandler.cpp
parent12d4837d4d8bb6cbb5d4cd4199bb77b76108fa51 (diff)
downloadmana-615b1bc6080a3418b18fd4ab93b4212470709731.tar.gz
mana-615b1bc6080a3418b18fd4ab93b4212470709731.tar.bz2
mana-615b1bc6080a3418b18fd4ab93b4212470709731.tar.xz
mana-615b1bc6080a3418b18fd4ab93b4212470709731.zip
Handling gender with an enum everywhere.
(cherry picked from mainline commit d3adc61aa4b4924f82d8cbc23bea26da7257da97) Conflicts: src/net/beinghandler.cpp src/net/charserverhandler.cpp src/player.cpp src/player.h
Diffstat (limited to 'src/net/charserverhandler.cpp')
-rw-r--r--src/net/charserverhandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp
index 249995ee..df3f5ecf 100644
--- a/src/net/charserverhandler.cpp
+++ b/src/net/charserverhandler.cpp
@@ -176,10 +176,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());