aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/dialogs/dialogs_items.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-14 21:49:30 -0400
committerPaul Gilbert2018-03-14 21:49:30 -0400
commit29314838bf14f0103bcf603d090e9b6a73e524d5 (patch)
tree376df426e1dfbcb273be9d1d2acab121684541ea /engines/xeen/dialogs/dialogs_items.cpp
parent0b802f25d0513cc026b6c25b6d9755adc0f446e2 (diff)
downloadscummvm-rg350-29314838bf14f0103bcf603d090e9b6a73e524d5.tar.gz
scummvm-rg350-29314838bf14f0103bcf603d090e9b6a73e524d5.tar.bz2
scummvm-rg350-29314838bf14f0103bcf603d090e9b6a73e524d5.zip
XEEN: Fix switching characters when buying from blacksmith
Diffstat (limited to 'engines/xeen/dialogs/dialogs_items.cpp')
-rw-r--r--engines/xeen/dialogs/dialogs_items.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/engines/xeen/dialogs/dialogs_items.cpp b/engines/xeen/dialogs/dialogs_items.cpp
index 38529f6832..422ef8f21f 100644
--- a/engines/xeen/dialogs/dialogs_items.cpp
+++ b/engines/xeen/dialogs/dialogs_items.cpp
@@ -299,6 +299,8 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) {
// Otherwise, result and continue showing dialog
actionIndex = -1;
+ redrawFlag = REDRAW_FULL;
+ continue;
}
// Wait for a selection
@@ -342,8 +344,11 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) {
_oldCharacter = newChar;
startingChar = newChar;
c = &_itemsCharacter;
- } else if (mode != ITEMMODE_2 && mode != ITEMMODE_REPAIR
- && mode != ITEMMODE_IDENTIFY && itemIndex != -1) {
+ } else if (mode == ITEMMODE_2 || mode == ITEMMODE_REPAIR || mode == ITEMMODE_IDENTIFY) {
+ _oldCharacter = newChar;
+ startingChar = newChar;
+ c = newChar;
+ } else if (itemIndex != -1) {
InventoryItems &destItems = newChar->_items[category];
XeenItem &destItem = destItems[INV_ITEMS_TOTAL - 1];
InventoryItems &srcItems = c->_items[category];
@@ -362,13 +367,13 @@ Character *ItemsDialog::execute(Character *c, ItemsMode mode) {
srcItems.sort();
destItems.sort();
}
-
- continue;
+ } else {
+ c = newChar;
+ startingChar = newChar;
}
- c = newChar;
- startingChar = newChar;
intf.highlightChar(_buttonValue);
+ continue;
}
}
break;