summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-03 20:55:54 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 01:18:56 +0300
commite5b06e892186483d97de0f8778813153dd156df7 (patch)
treed659803d92db1703db260f58a88d2baea19ad1f5 /src/net
parent5a90cfe600073fbae6d097080ee88fd41cdcbeb7 (diff)
downloadplus-e5b06e892186483d97de0f8778813153dd156df7.tar.gz
plus-e5b06e892186483d97de0f8778813153dd156df7.tar.bz2
plus-e5b06e892186483d97de0f8778813153dd156df7.tar.xz
plus-e5b06e892186483d97de0f8778813153dd156df7.zip
eathena: fix packet SMSG_ITEM_DROPPED 0x084b.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/itemhandler.cpp17
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h2
3 files changed, 11 insertions, 10 deletions
diff --git a/src/net/eathena/itemhandler.cpp b/src/net/eathena/itemhandler.cpp
index ba55fa381..f37bb6f09 100644
--- a/src/net/eathena/itemhandler.cpp
+++ b/src/net/eathena/itemhandler.cpp
@@ -68,14 +68,15 @@ 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("id");
+ const int itemId = msg.readInt16("item id");
+ msg.readInt16("type");
+ 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("subx"));
+ const int subY = static_cast<int>(msg.readInt8("suby"));
+ const int amount = msg.readInt16("count");
if (actorManager)
{
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index 103c311fe..2cf2c8c8a 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -220,7 +220,7 @@ int16_t packet_lengths[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0,
// #0x0840
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 449fe0d48..31c943b4b 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -84,7 +84,7 @@
#define SMSG_SKILL_DAMAGE 0x01de
#define SMSG_ITEM_USE_RESPONSE 0x00a8
#define SMSG_ITEM_VISIBLE 0x009d /**< An item is on the floor */
-#define SMSG_ITEM_DROPPED 0x009e /**< An item is dropped */
+#define SMSG_ITEM_DROPPED 0x084b /**< An item is dropped */
#define SMSG_ITEM_REMOVE 0x00a1 /**< An item disappers */
#define SMSG_BEING_VISIBLE 0x0857
#define SMSG_BEING_MOVE 0x007b /**< A nearby monster moves */