summaryrefslogtreecommitdiff
path: root/src/net/charserverhandler.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-02-04 16:54:35 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-02-04 16:54:35 +0000
commit2d12043f225263004b91e256e4b0d14c4842236e (patch)
tree6dda6785e9d8853badaaa7b22f87d5ac159626e5 /src/net/charserverhandler.cpp
parent9dc99e1888de6194c7ce555c33245e6bff586b3d (diff)
downloadmana-2d12043f225263004b91e256e4b0d14c4842236e.tar.gz
mana-2d12043f225263004b91e256e4b0d14c4842236e.tar.bz2
mana-2d12043f225263004b91e256e4b0d14c4842236e.tar.xz
mana-2d12043f225263004b91e256e4b0d14c4842236e.zip
Unify the various login dialogs to use LoginData.
Diffstat (limited to 'src/net/charserverhandler.cpp')
-rw-r--r--src/net/charserverhandler.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp
index e7fe3955..015c9d94 100644
--- a/src/net/charserverhandler.cpp
+++ b/src/net/charserverhandler.cpp
@@ -30,6 +30,7 @@
#include "../game.h"
#include "../localplayer.h"
#include "../log.h"
+#include "../logindata.h"
#include "../main.h"
#include "../gui/ok_dialog.h"
@@ -119,11 +120,11 @@ void CharServerHandler::handleMessage(MessageIn *msg)
break;
case 0x0071:
- char_ID = msg->readInt32();
- map_path = msg->readString(16);
- map_address = msg->readInt32();
- map_port = msg->readInt16();
player_node = mCharInfo->getEntry();
+ msg->skip(4); // CharID, must be the same as player_node->charID
+ map_path = msg->readString(16);
+ mLoginData->hostname = iptostring(msg->readInt32());
+ mLoginData->port = msg->readInt16();
mCharInfo->unlock();
mCharInfo->select(0);
// Clear unselected players infos
@@ -136,10 +137,6 @@ void CharServerHandler::handleMessage(MessageIn *msg)
} while (mCharInfo->getPos());
state = CONNECTING_STATE;
-
- logger->log("CharSelect: Map: %s", map_path.c_str());
- logger->log("CharSelect: Server: %s:%i", iptostring(map_address),
- map_port);
break;
case 0x0081:
@@ -165,9 +162,9 @@ void CharServerHandler::handleMessage(MessageIn *msg)
LocalPlayer* CharServerHandler::readPlayerData(MessageIn *msg, int &slot)
{
- LocalPlayer *tempPlayer = new LocalPlayer(account_ID, 0, NULL);
+ LocalPlayer *tempPlayer = new LocalPlayer(mLoginData->account_ID, 0, NULL);
- tempPlayer->mLoginId = msg->readInt32();
+ tempPlayer->mCharId = msg->readInt32();
tempPlayer->totalWeight = 0;
tempPlayer->maxWeight = 0;
tempPlayer->lastAttackTime = 0;