diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-23 21:11:53 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-08-23 21:11:53 +0000 |
commit | edfe5e4525d16a477a1c88344e3321ccf23b605e (patch) | |
tree | cf6be7f81ef24ef6d56c0291fbcb80df4899ece8 /src/game.cpp | |
parent | d39602e433ce887e9f921e7c472a8e5af16fa7ec (diff) | |
download | mana-edfe5e4525d16a477a1c88344e3321ccf23b605e.tar.gz mana-edfe5e4525d16a477a1c88344e3321ccf23b605e.tar.bz2 mana-edfe5e4525d16a477a1c88344e3321ccf23b605e.tar.xz mana-edfe5e4525d16a477a1c88344e3321ccf23b605e.zip |
Some code cleanups in the sell dialog. Made the dialog accept items instead of looking them up in the inventory itself.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp index f4241d0d..3dd254ef 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1606,8 +1606,10 @@ void do_parse() sellDialog->reset(); sellDialog->setVisible(true); for (int k = 0; k < n_items; k++) { - sellDialog->addItem( - RFIFOW(4 + 10 * k), RFIFOL(4 + 10 * k + 2)); + Item *item = inventory->getItem(RFIFOW(4 + 10 * k)); + if (item) { + sellDialog->addItem(item, RFIFOL(4 + 10 * k + 2)); + } } } else { |