diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-07-26 07:30:12 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-07-26 07:30:12 +0000 |
commit | 4b04c501e2391c9226595679c064510c6ea2e94c (patch) | |
tree | a67813e640cfe61c8c3e8ec95c40cd0c3c2b014e /src/net/loginhandler.cpp | |
parent | e6d8d2dd8eff63c23f0ffad25c5e2529bde93485 (diff) | |
download | mana-client-4b04c501e2391c9226595679c064510c6ea2e94c.tar.gz mana-client-4b04c501e2391c9226595679c064510c6ea2e94c.tar.bz2 mana-client-4b04c501e2391c9226595679c064510c6ea2e94c.tar.xz mana-client-4b04c501e2391c9226595679c064510c6ea2e94c.zip |
Removed char server selection dialog, and added character visualization in character selection dialog.
Diffstat (limited to 'src/net/loginhandler.cpp')
-rw-r--r-- | src/net/loginhandler.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/net/loginhandler.cpp b/src/net/loginhandler.cpp index d65f7001..5b8fbd1f 100644 --- a/src/net/loginhandler.cpp +++ b/src/net/loginhandler.cpp @@ -27,12 +27,10 @@ #include "network.h" #include "protocol.h" +#include "../localplayer.h" #include "../log.h" #include "../logindata.h" #include "../main.h" -#include "../serverinfo.h" - -extern SERVER_INFO **server_info; LoginHandler::LoginHandler() { @@ -56,9 +54,19 @@ void LoginHandler::handleMessage(MessageIn *msg) charNumber = msg->readByte(); printf("Account has %i characters:\n", charNumber); for (unsigned int i = 0; i < charNumber; i++) { - printf("%i) %s\n", i, msg->readString().c_str()); + // Create a temp empty player to show up in character + // selection dialog + LocalPlayer *temp = new LocalPlayer(0, 0, 0); + temp->setName(msg->readString()); + temp->setSex(msg->readByte()); + temp->setHairStyle(msg->readByte()); + temp->setHairColor(msg->readByte()); + temp->mLevel = msg->readByte(); + temp->mGp = msg->readShort(); + mCharInfo->select(i); + mCharInfo->setEntry(temp); } - state = CHAR_SERVER_STATE; + state = CHAR_SELECT_STATE; } // Login failed else |