From 732f50f7408a76e108d0af14aa3aaaa81391b1a9 Mon Sep 17 00:00:00 2001 From: Jan-Fabian Humann Date: Wed, 11 May 2005 14:24:29 +0000 Subject: first two trade items work again (itemcontainer slots 0 and 1 seem to be reserved) --- src/gui/itemcontainer.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/gui') diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index 67bae9b0..05a1f4de 100644 --- a/src/gui/itemcontainer.cpp +++ b/src/gui/itemcontainer.cpp @@ -77,7 +77,6 @@ void ItemContainer::draw(gcn::Graphics* graphics) int itemX = ((i - 2) % itemWidth) * 24; int itemY = ((i - 2) / itemWidth) * 24; - itemX -= itemX % 24; if (items[i].quantity > 0) { if (itemDb->getItemInfo(items[i].id)->getImage() > 0) { @@ -154,7 +153,7 @@ void ItemContainer::addItem(int index, int id, int quantity, bool equipment) int ItemContainer::getFreeSlot() { - for (int i = 0; i < INVENTORY_SIZE; i++) { + for (int i = 2; i < INVENTORY_SIZE; i++) { if (items[i].id == -1) { return i; } @@ -233,4 +232,3 @@ int ItemContainer::getNumberOfSlotsUsed() return NumberOfFilledSlot; } - -- cgit v1.2.3-70-g09d2