summaryrefslogtreecommitdiff
path: root/src/gui/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/connection.cpp')
-rw-r--r--src/gui/connection.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/connection.cpp b/src/gui/connection.cpp
index 0e885598..bfa69f23 100644
--- a/src/gui/connection.cpp
+++ b/src/gui/connection.cpp
@@ -104,12 +104,12 @@ void ConnectionDialog::mapLogin()
{
// Send login infos
MessageOut outMsg;
- outMsg.writeShort(0x0072);
- outMsg.writeLong(account_ID);
- outMsg.writeLong(char_ID);
- outMsg.writeLong(session_ID1);
- outMsg.writeLong(session_ID2);
- outMsg.writeByte(sex);
+ outMsg.writeInt16(0x0072);
+ outMsg.writeInt32(account_ID);
+ outMsg.writeInt32(char_ID);
+ outMsg.writeInt32(session_ID1);
+ outMsg.writeInt32(session_ID2);
+ outMsg.writeInt8(sex);
// Skip a mysterious 4 bytes
while ((in_size < 4)|| (out_size > 0)) flush();
@@ -120,7 +120,7 @@ void ConnectionDialog::mapLogin()
if (msg.getId() == SMSG_LOGIN_SUCCESS)
{
unsigned char direction;
- msg.readLong(); // server tick
+ msg.readInt32(); // server tick
msg.readCoordinates(startX, startY, direction);
msg.skip(2); // unknown
logger->log("Protocol: Player start position: (%d, %d), Direction: %d",
@@ -140,7 +140,7 @@ void ConnectionDialog::mapLogin()
// Send "map loaded"
// TODO: be able to reuse the same msg
MessageOut newMsg;
- newMsg.writeShort(0x007d);
+ newMsg.writeInt16(0x007d);
}
void connectionInputHandler(SDL_KeyboardEvent *keyEvent)