summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/enums/resources/notifytypes.h1
-rw-r--r--src/net/eathena/inventoryhandler.cpp20
-rw-r--r--src/resources/notifications.h4
3 files changed, 22 insertions, 3 deletions
diff --git a/src/enums/resources/notifytypes.h b/src/enums/resources/notifytypes.h
index e30b5844c..9ad5c7577 100644
--- a/src/enums/resources/notifytypes.h
+++ b/src/enums/resources/notifytypes.h
@@ -181,6 +181,7 @@ namespace NotifyTypes
REFINE_UNKNOWN,
CART_ADD_WEIGHT_ERROR,
CART_ADD_COUNT_ERROR,
+ BOUND_ITEM,
TYPE_END
};
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
diff --git a/src/resources/notifications.h b/src/resources/notifications.h
index cf509b104..6b2e03cbd 100644
--- a/src/resources/notifications.h
+++ b/src/resources/notifications.h
@@ -649,6 +649,10 @@ namespace NotifyManager
// TRANSLATORS: notification message
N_("You can't add item to card because too many items."),
NotifyFlags::EMPTY},
+ {"bound item",
+ // TRANSLATORS: notification message
+ N_("Item %s bound to you."),
+ NotifyFlags::STRING},
};
} // namespace NotifyManager
#endif // RESOURCES_NOTIFICATIONS_H