summaryrefslogtreecommitdiff
path: root/src/net/charserverhandler.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-21 16:30:11 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-21 16:30:11 +0000
commita5e6a44b51d4269ed6812c9a9e0b6a293d959a4d (patch)
treef269a803b58b47082156dc74bb0d6e8e2dc6519e /src/net/charserverhandler.cpp
parent1f6975d34e2c6fe8404fcbe13da406e624d94b68 (diff)
downloadmana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.tar.gz
mana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.tar.bz2
mana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.tar.xz
mana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.zip
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.
Diffstat (limited to 'src/net/charserverhandler.cpp')
-rw-r--r--src/net/charserverhandler.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp
index 0082db4c..bbfa82a4 100644
--- a/src/net/charserverhandler.cpp
+++ b/src/net/charserverhandler.cpp
@@ -65,7 +65,7 @@ void CharServerHandler::handleMessage(MessageIn &msg)
case APMSG_CHAR_DELETE_RESPONSE:
{
- int errMsg = msg.readByte();
+ int errMsg = msg.readInt8();
// Character deletion successful
if (errMsg == ERRMSG_OK)
{
@@ -117,7 +117,7 @@ void CharServerHandler::handleMessage(MessageIn &msg)
void CharServerHandler::handleCharCreateResponse(MessageIn &msg)
{
- int errMsg = msg.readByte();
+ int errMsg = msg.readInt8();
// Character creation failed
if (errMsg != ERRMSG_OK)
@@ -168,15 +168,15 @@ void CharServerHandler::handleCharCreateResponse(MessageIn &msg)
void CharServerHandler::handleCharSelectResponse(MessageIn &msg)
{
- int errMsg = msg.readByte();
+ int errMsg = msg.readInt8();
if (errMsg == ERRMSG_OK)
{
token = msg.readString(32);
std::string gameServer = msg.readString();
- unsigned short gameServerPort = msg.readShort();
+ unsigned short gameServerPort = msg.readInt16();
std::string chatServer = msg.readString();
- unsigned short chatServerPort = msg.readShort();
+ unsigned short chatServerPort = msg.readInt16();
logger->log("Game server: %s:%d", gameServer.c_str(), gameServerPort);
logger->log("Chat server: %s:%d", chatServer.c_str(), chatServerPort);
@@ -210,17 +210,17 @@ void CharServerHandler::handleCharSelectResponse(MessageIn &msg)
LocalPlayer* CharServerHandler::readPlayerData(MessageIn &msg, int &slot)
{
LocalPlayer *tempPlayer = new LocalPlayer;
- slot = msg.readByte(); // character slot
+ slot = msg.readInt8(); // character slot
tempPlayer->mName = msg.readString();
- tempPlayer->setGender(msg.readByte());
- int hs = msg.readByte(), hc = msg.readByte();
+ tempPlayer->setGender(msg.readInt8());
+ int hs = msg.readInt8(), hc = msg.readInt8();
tempPlayer->setHairStyle(hs, hc);
- tempPlayer->setLevel(msg.readByte());
- tempPlayer->setMoney(msg.readLong());
+ tempPlayer->setLevel(msg.readInt8());
+ tempPlayer->setMoney(msg.readInt32());
for (int i = 0; i < 7; i++)
{
- tempPlayer->setAttributeBase(i, msg.readByte());
+ tempPlayer->setAttributeBase(i, msg.readInt8());
}
return tempPlayer;