summaryrefslogtreecommitdiff
path: root/src/net/beinghandler.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-08-30 16:46:21 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-08-30 16:46:21 +0000
commit928fcf801f53d44d8b31b4285052a067340ab4ff (patch)
tree91f8b62b56467d63b1e6a4f49cecab63971dd43f /src/net/beinghandler.cpp
parentc8c4fd4850b543215faf4de83cc0f93c17b5a038 (diff)
downloadMana-928fcf801f53d44d8b31b4285052a067340ab4ff.tar.gz
Mana-928fcf801f53d44d8b31b4285052a067340ab4ff.tar.bz2
Mana-928fcf801f53d44d8b31b4285052a067340ab4ff.tar.xz
Mana-928fcf801f53d44d8b31b4285052a067340ab4ff.zip
Merged equipment database with items database and got rid of the unused item
art attribute. Removed the now unnecessary multiplication of weapon IDs with 10000. Added a fallback item icon and used it for unknown items or when an item image fails to load.
Diffstat (limited to 'src/net/beinghandler.cpp')
-rw-r--r--src/net/beinghandler.cpp14
1 files changed, 7 insertions, 7 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;