diff options
Diffstat (limited to 'src/net/eathena/itemhandler.cpp')
-rw-r--r-- | src/net/eathena/itemhandler.cpp | 38 |
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; |