summaryrefslogtreecommitdiff
path: root/src/gui/itemamount.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemamount.cpp')
-rw-r--r--src/gui/itemamount.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/gui/itemamount.cpp b/src/gui/itemamount.cpp
index a98a67ab..aed8d11d 100644
--- a/src/gui/itemamount.cpp
+++ b/src/gui/itemamount.cpp
@@ -47,20 +47,30 @@ void ItemAmountWindow::finish(Item *item, int amount, Usage usage)
tradeWindow->tradeItem(item, amount);
break;
case ItemDrop:
- Net::getInventoryHandler()->dropItem(item, amount);
+ item->doEvent("doDrop", amount);
break;
case ItemSplit:
- Net::getInventoryHandler()->splitItem(item, amount);
+ item->doEvent("doSplit", amount);
break;
case StoreAdd:
- Net::getInventoryHandler()->moveItem(Inventory::INVENTORY,
- item->getInvIndex(), amount,
- Inventory::STORAGE);
+ {
+ Mana::Event event("doMove");
+ event.setItem("item", item);
+ event.setInt("amount", amount);
+ event.setInt("source", Inventory::INVENTORY);
+ event.setInt("destination", Inventory::STORAGE);
+ event.trigger("Item");
+ }
break;
case StoreRemove:
- Net::getInventoryHandler()->moveItem(Inventory::STORAGE,
- item->getInvIndex(), amount,
- Inventory::INVENTORY);
+ {
+ Mana::Event event("doMove");
+ event.setItem("item", item);
+ event.setInt("amount", amount);
+ event.setInt("source", Inventory::STORAGE);
+ event.setInt("destination", Inventory::INVENTORY);
+ event.trigger("Item");
+ }
break;
default:
break;