From b442db854327ea55c5399c1c319f7f35e771f37b Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 31 Mar 2018 20:28:40 -0400 Subject: XEEN: Fix initial generation of blacksmith wares This only applies to newly started games; existing savegames will have invalid wares in the Blacksmiths --- engines/xeen/party.cpp | 8 ++------ 1 file 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]; } -- cgit v1.2.3