Skip to content

Commit

Permalink
fix gear slots remaining locked while slot-locking is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexFolland committed Nov 17, 2023
1 parent f68db29 commit e0fa902
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions AutoGear.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2645,7 +2645,7 @@ function AutoGearConsiderAllItems(lootRollItemID, questRewardID, arbitraryItemIn
if invSlot == INVSLOT_MAINHAND or invSlot == INVSLOT_OFFHAND or invSlot == INVSLOT_TABARD then
--skip weapons for now
else
local isSlotLocked = AutoGearDB.LockedGearSlots[invSlot].enabled
local isSlotLocked = AutoGearDB.LockGearSlots and AutoGearDB.LockedGearSlots[invSlot].enabled
local equippedInfo = AutoGearEquippedItems[invSlot].info
local equippedScore = AutoGearEquippedItems[invSlot].score
if (not AutoGearBestItems[invSlot].equipped) then
Expand All @@ -2669,8 +2669,8 @@ function AutoGearConsiderAllItems(lootRollItemID, questRewardID, arbitraryItemIn
end
end
--handle weapons
local isMainHandSlotLocked = AutoGearDB.LockedGearSlots[INVSLOT_MAINHAND].enabled
local isOffHandSlotLocked = AutoGearDB.LockedGearSlots[INVSLOT_OFFHAND].enabled
local isMainHandSlotLocked = AutoGearDB.LockGearSlots and AutoGearDB.LockedGearSlots[INVSLOT_MAINHAND].enabled
local isOffHandSlotLocked = AutoGearDB.LockGearSlots and AutoGearDB.LockedGearSlots[INVSLOT_OFFHAND].enabled
if (AutoGearBestItems[INVSLOT_MAINHAND].score + AutoGearBestItems[INVSLOT_OFFHAND].score > AutoGearBestItems[INVSLOT_TABARD].score)
or (AutoGearEquippedItems[INVSLOT_TABARD].info.unusable)
or (((not AutoGearBestItems[INVSLOT_MAINHAND].info.empty)
Expand Down

1 comment on commit e0fa902

@AlexFolland
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cdmichaelb Would you mind testing this change? It fixes the issue you reported today. Thank you for reporting it. It was an oversight on my part when implementing slot-locking. The fix seems very simple, so I didn't bother with a non-release tag. If the fix didn't work, please feel free to open a new issue ticket about it.

Please sign in to comment.