From 448eabff4c29f31cfb74468857dcbf91a0c43df4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 22 Aug 2015 16:43:39 +0300 Subject: Impliment packet SMSG_BIND_ITEM. --- src/net/eathena/inventoryhandler.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/net/eathena/inventoryhandler.cpp') diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 0b3b12b5e..fd74ac11a 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -1293,9 +1293,23 @@ void InventoryHandler::processCartAddError(Net::MessageIn &msg) void InventoryHandler::processBindItem(Net::MessageIn &msg) { - UNIMPLIMENTEDPACKET; - - msg.readInt16("item index"); + const int index = msg.readInt16("item index") - INVENTORY_OFFSET; + const Inventory *const inv = PlayerInfo::getInventory(); + if (inv) + { + std::string itemName; + const Item *item = inv->getItem(index); + if (item) + { + itemName = item->getName(); + } + else + { + // TRANSLATORS: unknown item message + itemName = _("Unknown item"); + } + NotifyManager::notify(NotifyTypes::BOUND_ITEM, itemName); + } } } // namespace EAthena -- cgit v1.2.3-70-g09d2