From a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Wed, 21 Nov 2007 16:30:11 +0000 Subject: Renamed {read,write}{Byte,Short,Long} to {read,write}{Int8,Int16,Int32}. This is less confusing in 64-bit context and less conflicting with the 0.0 client. --- src/net/playerhandler.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/net/playerhandler.cpp') diff --git a/src/net/playerhandler.cpp b/src/net/playerhandler.cpp index afaeca69..f6f7a8fa 100644 --- a/src/net/playerhandler.cpp +++ b/src/net/playerhandler.cpp @@ -107,7 +107,7 @@ void PlayerHandler::handleMessage(MessageIn &msg) { // TODO: Implement reconnecting to another game server std::string token = msg.readString(32); std::string address = msg.readString(); - int port = msg.readShort(); + int port = msg.readInt16(); logger->log("Changing server to %s:%d", address.c_str(), port); } break; @@ -116,9 +116,9 @@ void PlayerHandler::handleMessage(MessageIn &msg) logger->log("ATTRIBUTE UPDATE:"); while (msg.getUnreadLength()) { - int stat = msg.readByte(); - int base = msg.readShort(); - int value = msg.readShort(); + int stat = msg.readInt8(); + int base = msg.readInt16(); + int value = msg.readInt16(); logger->log("%d set to %d %d", stat, base, value); if (stat == BASE_ATTR_HP) @@ -141,7 +141,7 @@ void PlayerHandler::handleMessage(MessageIn &msg) /* case SMSG_PLAYER_ARROW_MESSAGE: { - Sint16 type = msg.readShort(); + Sint16 type = msg.readInt16(); switch (type) { case 0: @@ -162,8 +162,8 @@ void PlayerHandler::handleMapChangeMessage(MessageIn &msg) { std::string mapName = msg.readString(); - unsigned short x = msg.readShort(); - unsigned short y = msg.readShort(); + unsigned short x = msg.readInt16(); + unsigned short y = msg.readInt16(); logger->log("Changing map to %s (%d, %d)", mapName.c_str(), x, y); -- cgit v1.2.3-60-g2f50