[Scummvm-git-logs] scummvm master -> 29314838bf14f0103bcf603d090e9b6a73e524d5

dreammaster dreammaster at scummvm.org
Thu Mar 15 02:49:35 CET 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
29314838bf XEEN: Fix switching characters when buying from blacksmith


Commit: 29314838bf14f0103bcf603d090e9b6a73e524d5
    https://github.com/scummvm/scummvm/commit/29314838bf14f0103bcf603d090e9b6a73e524d5
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-03-14T21:49:30-04:00

Commit Message:
XEEN: Fix switching characters when buying from blacksmith

Changed paths:
    engines/xeen/dialogs/dialogs_items.cpp


diff --git a/engines/xeen/dialogs/dialogs_items.cpp b/engines/xeen/dialogs/dialogs_items.cpp
index 38529f6..422ef8f 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;





More information about the Scummvm-git-logs mailing list