summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorJan-Fabian Humann <malastare@gmx.net>2005-04-06 21:30:02 +0000
committerJan-Fabian Humann <malastare@gmx.net>2005-04-06 21:30:02 +0000
commit22774c178e7bab484485bded6950e76c8fa54b00 (patch)
treee1acd405cc961ae8908ee92443567b96f51d0881 /src/gui
parentccf84aa701dc938e7e390339c8ca5c2c7e5a21c5 (diff)
downloadmana-22774c178e7bab484485bded6950e76c8fa54b00.tar.gz
mana-22774c178e7bab484485bded6950e76c8fa54b00.tar.bz2
mana-22774c178e7bab484485bded6950e76c8fa54b00.tar.xz
mana-22774c178e7bab484485bded6950e76c8fa54b00.zip
Another trade update
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemcontainer.cpp1
-rw-r--r--src/gui/trade.cpp21
2 files changed, 1 insertions, 21 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp
index aa60d322..3f03bbb3 100644
--- a/src/gui/itemcontainer.cpp
+++ b/src/gui/itemcontainer.cpp
@@ -138,7 +138,6 @@ void ItemContainer::addItem(int index, int id, int quantity, bool equipment)
int ItemContainer::getFreeSlot()
{
for (int i = 0; i < INVENTORY_SIZE; i++) {
- printf("i %d id %d\n", i, items[i].id);
if (items[i].id == -1) {
return i;
}
diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp
index 66394ddb..4f6b24fc 100644
--- a/src/gui/trade.cpp
+++ b/src/gui/trade.cpp
@@ -143,34 +143,15 @@ void TradeWindow::action(const std::string &eventId)
if (eventId == "add") {
if (inventoryWindow->items->getIndex() >= 0 &&
inventoryWindow->items->getIndex() <= INVENTORY_SIZE) {
- if (inventoryWindow->items->isEquipment(
- inventoryWindow->items->getIndex())) {
- if (inventoryWindow->items->isEquipped(
- inventoryWindow->items->getIndex())) {
- inventoryWindow->unequipItem(
- inventoryWindow->items->getIndex());
- }
- }
- int i = tradeWindow->my_items->getFreeSlot();
- printf("%d\n", i);
- if (i >= 0) {
- printf("successfull\n");
+ if (tradeWindow->my_items->getFreeSlot() >= 0) {
- //addItem(i, inventoryWindow->items->getId(), true, inventoryWindow->items->getQuantity(), inventoryWindow->items->isEquipment(inventoryWindow->items->getIndex()));
-
WFIFOW(0) = net_w_value(0x00e8);
WFIFOW(2) = net_w_value(inventoryWindow->items->getIndex());
WFIFOL(4) = net_l_value(inventoryWindow->items->getQuantity());
WFIFOSET(8);
while ((out_size > 0)) flush();
- //inventoryWindow->changeQuantity(inventoryWindow->items->getIndex(), 0);
-
- } else {
- printf("not successfull\n");
}
-
-
}
} else if (eventId == "cancel") {
WFIFOW(0) = net_w_value(0x00ed);