summaryrefslogtreecommitdiff
path: root/src/gui/inventory.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2004-09-30 17:00:43 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2004-09-30 17:00:43 +0000
commit8b2e6f95f79170e3cf0080f05bacf488a652e546 (patch)
tree32f34815ecba5c49c74d316c417f4c5903d60a23 /src/gui/inventory.cpp
parent25246c487851b7d113d1fb1d3daf7dc1cdf000c5 (diff)
downloadmana-client-8b2e6f95f79170e3cf0080f05bacf488a652e546.tar.gz
mana-client-8b2e6f95f79170e3cf0080f05bacf488a652e546.tar.bz2
mana-client-8b2e6f95f79170e3cf0080f05bacf488a652e546.tar.xz
mana-client-8b2e6f95f79170e3cf0080f05bacf488a652e546.zip
*** empty log message ***
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;