diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-08 18:40:48 -0600 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-09 00:52:56 -0600 |
commit | 5fa3f62d0d6d9cbffeef0f6a2497aae023dbadcf (patch) | |
tree | a905c74e059311b5adf10a6eacbe53482d95c380 /src/gui/itemcontainer.cpp | |
parent | 6ea994477c58912785729e7922eb90862a1ab13c (diff) | |
download | mana-5fa3f62d0d6d9cbffeef0f6a2497aae023dbadcf.tar.gz mana-5fa3f62d0d6d9cbffeef0f6a2497aae023dbadcf.tar.bz2 mana-5fa3f62d0d6d9cbffeef0f6a2497aae023dbadcf.tar.xz mana-5fa3f62d0d6d9cbffeef0f6a2497aae023dbadcf.zip |
Add an interface for eAthena's storage system
Diffstat (limited to 'src/gui/itemcontainer.cpp')
-rw-r--r-- | src/gui/itemcontainer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/itemcontainer.cpp b/src/gui/itemcontainer.cpp index 02d6e66d..54f1f647 100644 --- a/src/gui/itemcontainer.cpp +++ b/src/gui/itemcontainer.cpp @@ -57,7 +57,7 @@ ItemContainer::ItemContainer(Inventory *inventory, int offset): mSelImg = resman->getImage("graphics/gui/selection.png"); if (!mSelImg) logger->error("Unable to load selection.png"); - mMaxItems = mInventory->getLastUsedSlot() - 1; // Count from 0, usage from 2 + mMaxItems = mInventory->getLastUsedSlot() - (mOffset - 1); // Count from 0, usage from 2 addMouseListener(this); addWidgetListener(this); @@ -76,7 +76,7 @@ void ItemContainer::logic() gcn::Widget::logic(); - int i = mInventory->getLastUsedSlot() - 1; // Count from 0, usage from 2 + int i = mInventory->getLastUsedSlot() - (mOffset - 1); // Count from 0, usage from 2 if (i != mMaxItems) { |