summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-23 18:04:34 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-23 19:46:21 +0300
commit0cd770e7cb6aae30e281a9e46ca7cc32df76b4be (patch)
tree63bae95203f49712bc8ea688ff1066de1bb084a7
parent832f7a39b3c5e29cdd95dc93b7b18d1ecb7e7ff8 (diff)
downloadplus-0cd770e7cb6aae30e281a9e46ca7cc32df76b4be.tar.gz
plus-0cd770e7cb6aae30e281a9e46ca7cc32df76b4be.tar.bz2
plus-0cd770e7cb6aae30e281a9e46ca7cc32df76b4be.tar.xz
plus-0cd770e7cb6aae30e281a9e46ca7cc32df76b4be.zip
Add packet fields comments in itemhandler.
-rw-r--r--src/net/ea/itemhandler.cpp18
-rw-r--r--src/net/tmwa/itemhandler.cpp16
2 files changed, 17 insertions, 17 deletions
diff --git a/src/net/ea/itemhandler.cpp b/src/net/ea/itemhandler.cpp
index 7142ccd7f..14779875c 100644
--- a/src/net/ea/itemhandler.cpp
+++ b/src/net/ea/itemhandler.cpp
@@ -39,14 +39,14 @@ ItemHandler::~ItemHandler()
void ItemHandler::processItemVisible(Net::MessageIn &msg)
{
- const int id = msg.readInt32();
- const int itemId = msg.readInt16();
- const uint8_t identify = msg.readUInt8(); // identify flag
- const int x = msg.readInt16();
- const int y = msg.readInt16();
- const int amount = msg.readInt16();
- const int subX = static_cast<int>(msg.readInt8());
- const int subY = static_cast<int>(msg.readInt8());
+ const int id = msg.readInt32("item object id");
+ const int itemId = msg.readInt16("item id");
+ const uint8_t identify = msg.readUInt8("identify");
+ const int x = msg.readInt16("x");
+ const int y = msg.readInt16("y");
+ const int amount = msg.readInt16("amount");
+ const int subX = static_cast<int>(msg.readInt8("sub x"));
+ const int subY = static_cast<int>(msg.readInt8("sub y"));
if (actorManager)
{
@@ -60,7 +60,7 @@ void ItemHandler::processItemRemove(Net::MessageIn &msg)
if (actorManager)
{
if (FloorItem *const item = actorManager
- ->findItem(msg.readInt32()))
+ ->findItem(msg.readInt32("floor item id")))
{
actorManager->destroy(item);
}
diff --git a/src/net/tmwa/itemhandler.cpp b/src/net/tmwa/itemhandler.cpp
index 95d1d0971..6549cec9f 100644
--- a/src/net/tmwa/itemhandler.cpp
+++ b/src/net/tmwa/itemhandler.cpp
@@ -70,14 +70,14 @@ void ItemHandler::handleMessage(Net::MessageIn &msg)
void ItemHandler::processItemDropped(Net::MessageIn &msg)
{
- const int id = msg.readInt32();
- const int itemId = msg.readInt16();
- const uint8_t identify = msg.readUInt8(); // identify flag
- const int x = msg.readInt16();
- const int y = msg.readInt16();
- const int subX = static_cast<int>(msg.readInt8());
- const int subY = static_cast<int>(msg.readInt8());
- const int amount = msg.readInt16();
+ const int id = msg.readInt32("item object id");
+ const int itemId = msg.readInt16("item id");
+ const uint8_t identify = msg.readUInt8("identify");
+ const int x = msg.readInt16("x");
+ const int y = msg.readInt16("y");
+ const int subX = static_cast<int>(msg.readInt8("sub x"));
+ const int subY = static_cast<int>(msg.readInt8("sub y"));
+ const int amount = msg.readInt16("amount");
if (actorManager)
{