Mercurial > wow > askmrrobot
diff Gear.lua @ 69:69db1c3025ac v27
fixed some bugs with 6.2 item link format changes, added bib overwolf support
author | yellowfive |
---|---|
date | Mon, 06 Jul 2015 17:39:57 -0700 |
parents | 932885bb1a6f |
children | 6abc0858b45e |
line wrap: on
line diff
--- a/Gear.lua Mon Jun 29 17:06:02 2015 -0700 +++ b/Gear.lua Mon Jul 06 17:39:57 2015 -0700 @@ -666,18 +666,19 @@ old = Amr.ParseItemLink(old) local new = gear[slotId] - - local diff = countItemDifferences(old, new) - if diff < 1000 then - -- same item, see if inventory has one that is closer (e.g. a duplicate item with correct enchants/gems) - local bestLink, bestItem, bestDiff = Amr:FindMatchingItem(new, player, usedItems) - if bestDiff and bestDiff < diff then + if new then + local diff = countItemDifferences(old, new) + if diff < 1000 then + -- same item, see if inventory has one that is closer (e.g. a duplicate item with correct enchants/gems) + local bestLink, bestItem, bestDiff = Amr:FindMatchingItem(new, player, usedItems) + if bestDiff and bestDiff < diff then + itemsToEquip[slotId] = new + remaining = remaining + 1 + end + else itemsToEquip[slotId] = new remaining = remaining + 1 end - else - itemsToEquip[slotId] = new - remaining = remaining + 1 end end