aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-31 20:28:40 -0400
committerPaul Gilbert2018-03-31 20:28:40 -0400
commitb442db854327ea55c5399c1c319f7f35e771f37b (patch)
treef1fc54c8a1eea540cfc14bb377b42759ba9b372e
parentb6fc3fd99195f2cbc1e17ea6827175855df8f8cc (diff)
downloadscummvm-rg350-b442db854327ea55c5399c1c319f7f35e771f37b.tar.gz
scummvm-rg350-b442db854327ea55c5399c1c319f7f35e771f37b.tar.bz2
scummvm-rg350-b442db854327ea55c5399c1c319f7f35e771f37b.zip
XEEN: Fix initial generation of blacksmith wares
This only applies to newly started games; existing savegames will have invalid wares in the Blacksmiths
-rw-r--r--engines/xeen/party.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp
index a3bb674093..31a43be0a4 100644
--- a/engines/xeen/party.cpp
+++ b/engines/xeen/party.cpp
@@ -121,9 +121,7 @@ void BlacksmithWares::regenerate() {
ItemCategory itemCat = tempChar.makeItem(idx2 + 1, 0, 0);
if (catCount[itemCat] < 8) {
XeenItem &item = (*this)[itemCat][0][slotNum][catCount[itemCat]];
- item._id = tempChar._weapons[0]._id;
- item._material = tempChar._weapons[0]._material;
- item._state = tempChar._weapons[0]._state;
+ item = tempChar._items[itemCat][0];
++catCount[itemCat];
}
@@ -140,9 +138,7 @@ void BlacksmithWares::regenerate() {
ItemCategory itemCat = tempChar.makeItem(idx2 + (slotNum >= 2 ? 3 : 1), 0, 0);
if (catCount[itemCat] < 8) {
XeenItem &item = (*this)[itemCat][1][slotNum][catCount[itemCat]];
- item._id = tempChar._misc[0]._id;
- item._material = tempChar._misc[0]._material;
- item._state = tempChar._misc[0]._state;
+ item = tempChar._items[itemCat][0];
++catCount[itemCat];
}