comparison Gear.lua @ 151:bdf1b0c98882 v71

bug fix to gear display
author yellowfive
date Thu, 03 Jan 2019 13:34:56 -0800
parents cfdb5e5c828e
children 31386c009f03
comparison
equal deleted inserted replaced
150:85ee6e672650 151:bdf1b0c98882
132 -- search the player's equipped gear, bag, and bank for an item that best matches the specified item 132 -- search the player's equipped gear, bag, and bank for an item that best matches the specified item
133 function Amr:FindMatchingItem(item, player, usedItems) 133 function Amr:FindMatchingItem(item, player, usedItems)
134 if not item then return nil end 134 if not item then return nil end
135 135
136 local equipped = player.Equipped and player.Equipped[player.ActiveSpec] or nil 136 local equipped = player.Equipped and player.Equipped[player.ActiveSpec] or nil
137 local bestItem, bestDiff, bestLoc = findMatchingItemFromTable(item, equipped, nil, 10000, nil, usedItems, "equip") 137 local bestItem, bestDiff, bestLoc = findMatchingItemFromTable(item, equipped, nil, 100000, nil, usedItems, "equip")
138 bestItem, bestDiff, bestLoc = findMatchingItemFromTable(item, player.BagItems, bestItem, bestDiff, bestLoc, usedItems, "bag") 138 bestItem, bestDiff, bestLoc = findMatchingItemFromTable(item, player.BagItems, bestItem, bestDiff, bestLoc, usedItems, "bag")
139 if player.BankItems then 139 if player.BankItems then
140 bestItem, bestDiff, bestLoc = findMatchingItemFromTable(item, player.BankItems, bestItem, bestDiff, bestLoc, usedItems, "bank") 140 bestItem, bestDiff, bestLoc = findMatchingItemFromTable(item, player.BankItems, bestItem, bestDiff, bestLoc, usedItems, "bank")
141 end 141 end
142 142