summaryrefslogtreecommitdiff
path: root/src
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
parent24ec93205e7ce9ebecaf9dc9aed8cd2b1491adf5 (diff)
downloadmanaplus-84ec06e6d2814ec0cbef904fb352baf1f43bf7c7.tar.gz
manaplus-84ec06e6d2814ec0cbef904fb352baf1f43bf7c7.tar.bz2
manaplus-84ec06e6d2814ec0cbef904fb352baf1f43bf7c7.tar.xz
manaplus-84ec06e6d2814ec0cbef904fb352baf1f43bf7c7.zip
Add packet SMSG_ITEM_MOVE_FAILED 0x0aa7.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/inventoryrecv.cpp16
-rw-r--r--src/net/eathena/inventoryrecv.h1
-rw-r--r--src/net/eathena/packetsin.inc13
3 files changed, 30 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
diff --git a/src/net/eathena/inventoryrecv.h b/src/net/eathena/inventoryrecv.h
index 544c6a817..b019643fe 100644
--- a/src/net/eathena/inventoryrecv.h
+++ b/src/net/eathena/inventoryrecv.h
@@ -74,6 +74,7 @@ namespace EAthena
void processMergeItem(Net::MessageIn &msg);
void processMergeItemResponse(Net::MessageIn &msg);
void processPlayerInventoryUse(Net::MessageIn &msg);
+ void processItemMoveFailed(Net::MessageIn &msg);
int getSlot(const int eAthenaSlot) A_WARN_UNUSED;
} // namespace InventoryRecv
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index 0ea950d92..263ca4a1e 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -985,6 +985,18 @@ if (packetVersion >= 20161026)
packet(SMSG_GUILD_MEMBER_LIST, 0x0aa5, -1, &GuildRecv::processGuildMemberList, 20161026);
}
+// 20161130 re
+if (packetVersionRe >= 20161130)
+{
+ packet(SMSG_ITEM_MOVE_FAILED, 0x0aa7, 6, &InventoryRecv::processItemMoveFailed, 20161130);
+}
+
+// 20161214 main
+if (packetVersionMain >= 20161214)
+{
+ packet(SMSG_ITEM_MOVE_FAILED, 0x0aa7, 6, &InventoryRecv::processItemMoveFailed, 20161214);
+}
+
// 20170315
if (packetVersion >= 20170315)
{
@@ -1037,6 +1049,7 @@ packet(SMSG_PLAYER_GET_EXP2, 0x0acc, 18, &PlayerRecv::processPlay
if (packets_zero == true)
{
packet(SMSG_ITEM_DROPPED, 0x0add, 22, &ItemRecv::processItemDropped, 20171018);
+ packet(SMSG_ITEM_MOVE_FAILED, 0x0aa7, 6, &InventoryRecv::processItemMoveFailed, 20171018);
}
// 20171207