summaryrefslogtreecommitdiff
path: root/src/gui/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/inventory.cpp')
-rw-r--r--src/gui/inventory.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/inventory.cpp b/src/gui/inventory.cpp
index 864adf06..6b806f1d 100644
--- a/src/gui/inventory.cpp
+++ b/src/gui/inventory.cpp
@@ -99,11 +99,12 @@ int TmwInventory::increase_quantity(int index, int quantity) {
return 0;
}
-int TmwInventory::useItem(int idnum) {
- printf("Use item %i\n",idnum);
+int TmwInventory::use_item(int index, int id) {
WFIFOW(0) = net_w_value(0x00a7);
- WFIFOW(2) = net_w_value(idnum);
- WFIFOSET(4);
+ WFIFOW(2) = net_w_value(index);
+ WFIFOL(4) = net_l_value(id);
+ // Note: id is dest of item, usually player_node->account_ID
+ WFIFOSET(8);
while((out_size>0))flush();
return 0;