From 1fe40a91823833007df2b5accb5b91701cd886ed Mon Sep 17 00:00:00 2001 From: Durel Date: Tue, 17 Oct 2017 11:03:31 -0400 Subject: [PATCH] 1) Sets now honor when priorities want to ignore the "wielded" wearable location --- aard_inventory.xml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/aard_inventory.xml b/aard_inventory.xml index 0823e10..36a2eca 100644 --- a/aard_inventory.xml +++ b/aard_inventory.xml @@ -13036,8 +13036,14 @@ function inv.set.createWithHandicap(priorityName, level, handicap) -- whack the shield and hold items in the set because we won't be using them. Otherwise, stick with -- the highest scoring weapon, shield, and hold items that we found in the initial search. if dualWieldAvailable and (bestWeaponSet.score > scorePrimary + scoreShield + scoreHold) then - newSet[inv.wearLoc[invWearableLocWielded]] = bestWeaponSet.primary - newSet[inv.wearLoc[invWearableLocSecond]] = bestWeaponSet.offhand + if inv.priority.locIsAllowed(inv.wearLoc[invWearableLocWielded], priorityName, level) then + newSet[inv.wearLoc[invWearableLocWielded]] = bestWeaponSet.primary + newSet[inv.wearLoc[invWearableLocSecond]] = bestWeaponSet.offhand + else + newSet[inv.wearLoc[invWearableLocWielded]] = nil + newSet[inv.wearLoc[invWearableLocSecond]] = bestWeaponSet.primary + end -- if + newSet[inv.wearLoc[invWearableLocShield]] = nil newSet[inv.wearLoc[invWearableLocHold]] = nil else