summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/beinghandler.cpp14
-rw-r--r--src/net/charserverhandler.cpp4
-rw-r--r--src/net/network.cpp2
3 files changed, 9 insertions, 11 deletions
diff --git a/src/net/beinghandler.cpp b/src/net/beinghandler.cpp
index c6e03c86..2c643a16 100644
--- a/src/net/beinghandler.cpp
+++ b/src/net/beinghandler.cpp
@@ -82,7 +82,7 @@ void BeingHandler::handleMessage(MessageIn *msg)
dstBeing = beingManager->findBeing(id);
- if (dstBeing == NULL)
+ if (!dstBeing)
{
// Being with id >= 110000000 and job 0 are better
// known as ghosts, so don't create those.
@@ -108,7 +108,7 @@ void BeingHandler::handleMessage(MessageIn *msg)
dstBeing->mJob = job;
dstBeing->setHairStyle(msg->readInt16());
dstBeing->setVisibleEquipment(
- Being::WEAPON_SPRITE, msg->readInt16() * 10000);
+ Being::WEAPON_SPRITE, msg->readInt16());
dstBeing->setVisibleEquipment(
Being::BOTTOMCLOTHES_SPRITE, msg->readInt16());
@@ -261,8 +261,7 @@ void BeingHandler::handleMessage(MessageIn *msg)
dstBeing->setHairStyle(id);
break;
case 2:
- dstBeing->setVisibleEquipment(
- Being::WEAPON_SPRITE, id * 10000);
+ dstBeing->setVisibleEquipment(Being::WEAPON_SPRITE, id);
break;
case 3: // Change lower headgear for eAthena, pants for us
dstBeing->setVisibleEquipment(
@@ -280,7 +279,8 @@ void BeingHandler::handleMessage(MessageIn *msg)
dstBeing->setHairColor(id);
break;
default:
- logger->log("c3: %i\n", id); // unsupported
+ logger->log("SMSG_BEING_CHANGE_LOOKS: unsupported type: "
+ "%d, id: %d", type, id);
break;
}
}
@@ -306,7 +306,7 @@ void BeingHandler::handleMessage(MessageIn *msg)
dstBeing = beingManager->findBeing(id);
- if (dstBeing == NULL)
+ if (!dstBeing)
{
dstBeing = beingManager->createBeing(id, job);
}
@@ -378,7 +378,7 @@ void BeingHandler::handleMessage(MessageIn *msg)
case 0x0119:
// Change in players look
- logger->log("0x0119 %i %i %i %x %i\n", msg->readInt32(),
+ logger->log("0x0119 %i %i %i %x %i", msg->readInt32(),
msg->readInt16(), msg->readInt16(), msg->readInt16(),
msg->readInt8());
break;
diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp
index 9018b0af..a3f696c6 100644
--- a/src/net/charserverhandler.cpp
+++ b/src/net/charserverhandler.cpp
@@ -204,9 +204,7 @@ LocalPlayer* CharServerHandler::readPlayerData(MessageIn &msg, int &slot)
msg.readInt16(); // class
tempPlayer->setHairStyle(msg.readInt16());
Uint16 weapon = msg.readInt16();
- if (weapon == 11)
- weapon = 2;
- tempPlayer->setVisibleEquipment(Being::WEAPON_SPRITE, weapon * 10000);
+ tempPlayer->setVisibleEquipment(Being::WEAPON_SPRITE, weapon);
tempPlayer->mLevel = msg.readInt16();
msg.readInt16(); // skill point
tempPlayer->setVisibleEquipment(Being::BOTTOMCLOTHES_SPRITE, msg.readInt16()); // head bottom
diff --git a/src/net/network.cpp b/src/net/network.cpp
index c90e0201..fa5964d6 100644
--- a/src/net/network.cpp
+++ b/src/net/network.cpp
@@ -296,7 +296,7 @@ MessageIn Network::getNextMessage()
len = readWord(2);
#ifdef DEBUG
- logger->log("Received packet 0x%x of length %d\n", msgId, length);
+ logger->log("Received packet 0x%x of length %d", msgId, length);
#endif
MessageIn msg(mInBuffer, len);