summaryrefslogtreecommitdiff
path: root/src/net/eathena/itemhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-16 20:59:21 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-16 20:59:21 +0300
commit2b498808d000346d2310d0a5a1906eadf98cf2ce (patch)
treed98cfc196433de4807e19333c810f518436acd18 /src/net/eathena/itemhandler.cpp
parent3242aa80fbee19eb421ace68d1c3c69e4fc777e6 (diff)
downloadplus-2b498808d000346d2310d0a5a1906eadf98cf2ce.tar.gz
plus-2b498808d000346d2310d0a5a1906eadf98cf2ce.tar.bz2
plus-2b498808d000346d2310d0a5a1906eadf98cf2ce.tar.xz
plus-2b498808d000346d2310d0a5a1906eadf98cf2ce.zip
Add packet SMSG_ITEM_DROPPED2 0x0b19.
Diffstat (limited to 'src/net/eathena/itemhandler.cpp')
-rw-r--r--src/net/eathena/itemhandler.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/net/eathena/itemhandler.cpp b/src/net/eathena/itemhandler.cpp
index 004b97104..827541e90 100644
--- a/src/net/eathena/itemhandler.cpp
+++ b/src/net/eathena/itemhandler.cpp
@@ -41,6 +41,7 @@ ItemHandler::ItemHandler() :
SMSG_ITEM_VISIBLE,
SMSG_ITEM_VISIBLE2,
SMSG_ITEM_DROPPED,
+ SMSG_ITEM_DROPPED2,
SMSG_ITEM_REMOVE,
SMSG_GRAFFITI_VISIBLE,
SMSG_ITEM_MVP_DROPPED,
@@ -77,6 +78,10 @@ void ItemHandler::handleMessage(Net::MessageIn &msg)
processItemVisible2(msg);
break;
+ case SMSG_ITEM_DROPPED2:
+ processItemDropped2(msg);
+ break;
+
default:
break;
}
@@ -110,6 +115,39 @@ void ItemHandler::processItemDropped(Net::MessageIn &msg)
}
}
+void ItemHandler::processItemDropped2(Net::MessageIn &msg)
+{
+ const BeingId id = msg.readBeingId("id");
+ const int itemId = msg.readInt16("item id");
+ const int itemType = msg.readUInt8("type");
+ const Identified identified = fromInt(
+ msg.readUInt8("identify"), Identified);
+ msg.readUInt8("attribute");
+ const uint8_t refine = msg.readUInt8("refine");
+ int cards[4];
+ for (int f = 0; f < 4; f++)
+ cards[f] = msg.readInt16("card");
+ 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("subx"));
+ const int subY = static_cast<int>(msg.readInt8("suby"));
+
+ if (actorManager)
+ {
+ actorManager->createItem(id,
+ itemId,
+ x, y,
+ itemType,
+ amount,
+ 0,
+ ItemColor_one,
+ identified,
+ subX, subY,
+ nullptr);
+ }
+}
+
void ItemHandler::processGraffiti(Net::MessageIn &msg)
{
UNIMPLIMENTEDPACKET;