diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-09 17:46:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-09 17:56:14 +0300 |
commit | c030c786578bc33fbd37ecb2fa86f306f7920557 (patch) | |
tree | a3741e90a9e535a10d6e0fce245107db3b356d3c | |
parent | 8d519af0d6a5a7c3477e684269172b8163495a85 (diff) | |
download | manaplus-c030c786578bc33fbd37ecb2fa86f306f7920557.tar.gz manaplus-c030c786578bc33fbd37ecb2fa86f306f7920557.tar.bz2 manaplus-c030c786578bc33fbd37ecb2fa86f306f7920557.tar.xz manaplus-c030c786578bc33fbd37ecb2fa86f306f7920557.zip |
Add also notification about dropped item.
-rw-r--r-- | src/enums/resources/notifytypes.h | 1 | ||||
-rw-r--r-- | src/net/eathena/inventoryrecv.cpp | 5 | ||||
-rw-r--r-- | src/resources/notifications.h | 4 |
3 files changed, 10 insertions, 0 deletions
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 |