diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-09-30 17:00:43 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-09-30 17:00:43 +0000 |
commit | 8b2e6f95f79170e3cf0080f05bacf488a652e546 (patch) | |
tree | 32f34815ecba5c49c74d316c417f4c5903d60a23 /src | |
parent | 25246c487851b7d113d1fb1d3daf7dc1cdf000c5 (diff) | |
download | mana-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')
-rw-r--r-- | src/gui/inventory.cpp | 9 | ||||
-rw-r--r-- | src/gui/inventory.h | 2 |
2 files changed, 6 insertions, 5 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; diff --git a/src/gui/inventory.h b/src/gui/inventory.h index 21a958ab..653d99db 100644 --- a/src/gui/inventory.h +++ b/src/gui/inventory.h @@ -59,7 +59,7 @@ class TmwInventory{ int remove_item(int id); // remove a item int change_quantity(int index, int quantity); // change number of a item int increase_quantity(int index, int quantity); // increase quantity of a item - int useItem(int idnum); + int use_item(int index, int id); //END API private: itemHolder items[INVENTORY_SIZE]; // this is the holder of items |