summaryrefslogtreecommitdiff
path: root/src/gui/trade.cpp
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/trade.cpp
parentccf84aa701dc938e7e390339c8ca5c2c7e5a21c5 (diff)
downloadmana-client-22774c178e7bab484485bded6950e76c8fa54b00.tar.gz
mana-client-22774c178e7bab484485bded6950e76c8fa54b00.tar.bz2
mana-client-22774c178e7bab484485bded6950e76c8fa54b00.tar.xz
mana-client-22774c178e7bab484485bded6950e76c8fa54b00.zip
Another trade update
Diffstat (limited to 'src/gui/trade.cpp')
-rw-r--r--src/gui/trade.cpp21
1 files changed, 1 insertions, 20 deletions
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);