summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 19:44:23 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-27 20:18:11 +0100
commit712ca58c011123505c807266dcc8d9d84ca1aa44 (patch)
tree27c0dfe49f21bffe25007f70475be3223d3fa851 /src/main.cpp
parentff5e1957dd4fde40e41e4c5e4b9e04e1f36e5ef2 (diff)
downloadmana-712ca58c011123505c807266dcc8d9d84ca1aa44.tar.gz
mana-712ca58c011123505c807266dcc8d9d84ca1aa44.tar.bz2
mana-712ca58c011123505c807266dcc8d9d84ca1aa44.tar.xz
mana-712ca58c011123505c807266dcc8d9d84ca1aa44.zip
Made eAthena's Network class statically accessible
Now the instance doesn't need to be passed into the MessageOut class anymore. Expect a lot of cleanup in the next commit.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 321a4ee0..bd17ce9c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -752,8 +752,7 @@ static void accountLogin(Network *network, LoginData *loginData)
loginData->username,
loginData->password);
#else
- MessageOut outMsg(network);
- outMsg.writeInt16(0x0064);
+ MessageOut outMsg(0x0064);
outMsg.writeInt32(0); // client version
outMsg.writeString(loginData->username, 24);
outMsg.writeString(loginData->password, 24);
@@ -807,8 +806,7 @@ static void charLogin(Network *network, LoginData *loginData)
charServerHandler.setLoginData(loginData);
// Send login infos
- MessageOut outMsg(network);
- outMsg.writeInt16(0x0065);
+ MessageOut outMsg(0x0065);
outMsg.writeInt32(loginData->account_ID);
outMsg.writeInt32(loginData->session_ID1);
outMsg.writeInt32(loginData->session_ID2);
@@ -827,8 +825,6 @@ static void mapLogin(Network *network, LoginData *loginData)
player_node->getName().c_str());
config.setValue("lastCharacter", player_node->getName());
- MessageOut outMsg(network);
-
logger->log("Trying to connect to map server...");
logger->log("Map: %s", map_path.c_str());
@@ -836,7 +832,7 @@ static void mapLogin(Network *network, LoginData *loginData)
network->registerHandler(&mapLoginHandler);
// Send login infos
- outMsg.writeInt16(0x0072);
+ MessageOut outMsg(0x0072);
outMsg.writeInt32(loginData->account_ID);
outMsg.writeInt32(player_node->mCharId);
outMsg.writeInt32(loginData->session_ID1);