summaryrefslogtreecommitdiff
path: root/src/net/eathena/inventoryrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-09-25 08:38:59 +0300
committerAndrei Karas <akaras@inbox.ru>2018-09-25 08:38:59 +0300
commit84ec06e6d2814ec0cbef904fb352baf1f43bf7c7 (patch)
tree55424a8ee7641c918676087638008ca890d0713f /src/net/eathena/inventoryrecv.cpp
parent24ec93205e7ce9ebecaf9dc9aed8cd2b1491adf5 (diff)
downloadplus-84ec06e6d2814ec0cbef904fb352baf1f43bf7c7.tar.gz
plus-84ec06e6d2814ec0cbef904fb352baf1f43bf7c7.tar.bz2
plus-84ec06e6d2814ec0cbef904fb352baf1f43bf7c7.tar.xz
plus-84ec06e6d2814ec0cbef904fb352baf1f43bf7c7.zip
Add packet SMSG_ITEM_MOVE_FAILED 0x0aa7.
Diffstat (limited to 'src/net/eathena/inventoryrecv.cpp')
-rw-r--r--src/net/eathena/inventoryrecv.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp
index c17db75d1..dbf7b8610 100644
--- a/src/net/eathena/inventoryrecv.cpp
+++ b/src/net/eathena/inventoryrecv.cpp
@@ -1490,4 +1490,20 @@ void InventoryRecv::processPlayerInventoryUse(Net::MessageIn &msg)
BLOCK_END("InventoryRecv::processPlayerInventoryUse")
}
+void InventoryRecv::processItemMoveFailed(Net::MessageIn &msg)
+{
+ Inventory *const inventory = localPlayer != nullptr
+ ? PlayerInfo::getInventory() : nullptr;
+ const int index = msg.readInt16("index") - INVENTORY_OFFSET;
+ msg.readInt16("unknown"); // 1
+ if (inventory != nullptr)
+ {
+ if (Item *const item = inventory->getItem(index))
+ {
+ NotifyManager::notify(NotifyTypes::DELETE_ITEM_DROPPED,
+ item->getName());
+ }
+ }
+}
+
} // namespace EAthena