From c030c786578bc33fbd37ecb2fa86f306f7920557 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 9 Sep 2015 17:46:17 +0300 Subject: Add also notification about dropped item. --- src/enums/resources/notifytypes.h | 1 + src/net/eathena/inventoryrecv.cpp | 5 +++++ src/resources/notifications.h | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/src/enums/resources/notifytypes.h b/src/enums/resources/notifytypes.h index 998e45ae8..6772a172a 100644 --- a/src/enums/resources/notifytypes.h +++ b/src/enums/resources/notifytypes.h @@ -213,6 +213,7 @@ namespace NotifyTypes DELETE_ITEM_SOLD, DELETE_ITEM_ANALYSIS, DELETE_ITEM_UNKNOWN, + DELETE_ITEM_DROPPED, TYPE_END }; diff --git a/src/net/eathena/inventoryrecv.cpp b/src/net/eathena/inventoryrecv.cpp index d3496a149..8cd1d6496 100644 --- a/src/net/eathena/inventoryrecv.cpp +++ b/src/net/eathena/inventoryrecv.cpp @@ -991,6 +991,11 @@ void InventoryRecv::processPlayerInventoryRemove(Net::MessageIn &msg) { if (Item *const item = inventory->getItem(index)) { + if (amount) + { + NotifyManager::notify(NotifyTypes::DELETE_ITEM_DROPPED, + item->getName()); + } item->increaseQuantity(-amount); if (item->getQuantity() == 0) inventory->removeItemAt(index); diff --git a/src/resources/notifications.h b/src/resources/notifications.h index 0be514081..59b9801df 100644 --- a/src/resources/notifications.h +++ b/src/resources/notifications.h @@ -777,6 +777,10 @@ namespace NotifyManager // TRANSLATORS: notification message N_("Item %s deleted."), NotifyFlags::STRING}, + {"delete item dropped", + // TRANSLATORS: notification message + N_("Dropped item %s."), + NotifyFlags::STRING}, }; } // namespace NotifyManager #endif // RESOURCES_NOTIFICATIONS_H -- cgit v1.2.3-70-g09d2