Mercurial > wow > askmrrobot
comparison Gear.lua @ 135:57be71eccc0a v63
Small azerite gear fix.
| author | yellowfive |
|---|---|
| date | Sun, 12 Aug 2018 23:36:17 -0700 |
| parents | a0894ffebd15 |
| children | 6dc0e8e9f960 |
comparison
equal
deleted
inserted
replaced
| 134:41cf09da376d | 135:57be71eccc0a |
|---|---|
| 16 if (not item1 and item2) or (item1 and not item2) or item1.id ~= item2.id then | 16 if (not item1 and item2) or (item1 and not item2) or item1.id ~= item2.id then |
| 17 return 10000 | 17 return 10000 |
| 18 end | 18 end |
| 19 | 19 |
| 20 -- different versions of same item (id + bonus ids + suffix + drop level, constitutes a different physical drop) | 20 -- different versions of same item (id + bonus ids + suffix + drop level, constitutes a different physical drop) |
| 21 if Amr.GetItemUniqueId(item1, true) ~= Amr.GetItemUniqueId(item2, true) then | 21 if Amr.GetItemUniqueId(item1, true, true) ~= Amr.GetItemUniqueId(item2, true, true) then |
| 22 return 1000 | 22 return 1000 |
| 23 end | 23 end |
| 24 | 24 |
| 25 -- different upgrade levels of the same item | 25 -- different upgrade levels of the same item |
| 26 if item1.upgradeId ~= item2.upgradeId then | 26 if item1.upgradeId ~= item2.upgradeId then |
| 255 local optimalItem = gear[slotId] | 255 local optimalItem = gear[slotId] |
| 256 local optimalItemLink = Amr.CreateItemLink(optimalItem) | 256 local optimalItemLink = Amr.CreateItemLink(optimalItem) |
| 257 | 257 |
| 258 -- see if item is currently equipped, is false if don't have any item for that slot (e.g. OH for a 2-hander) | 258 -- see if item is currently equipped, is false if don't have any item for that slot (e.g. OH for a 2-hander) |
| 259 local isEquipped = false | 259 local isEquipped = false |
| 260 if equippedItem and optimalItem and Amr.GetItemUniqueId(equippedItem) == Amr.GetItemUniqueId(optimalItem) then | 260 if equippedItem and optimalItem and Amr.GetItemUniqueId(equippedItem, false, true) == Amr.GetItemUniqueId(optimalItem, false, true) then |
| 261 isEquipped = true | 261 isEquipped = true |
| 262 end | 262 end |
| 263 | 263 |
| 264 local isAzerite = optimalItem and C_AzeriteEmpoweredItem.IsAzeriteEmpoweredItemByID(optimalItem.id) | 264 local isAzerite = optimalItem and C_AzeriteEmpoweredItem.IsAzeriteEmpoweredItemByID(optimalItem.id) |
| 265 | 265 |
| 326 | 326 |
| 327 if isAzerite then | 327 if isAzerite then |
| 328 local azt = optimalItem.azerite or {} | 328 local azt = optimalItem.azerite or {} |
| 329 for i,spellId in ipairs(azt) do | 329 for i,spellId in ipairs(azt) do |
| 330 if spellId and spellId ~= 0 then | 330 if spellId and spellId ~= 0 then |
| 331 local equippedAzt = equippedItem and equippedItem.azerite or {} | 331 local equippedAzt = matchItem and matchItem.azerite or {} |
| 332 local isPowerActive = Amr.Contains(equippedAzt, spellId) | 332 local isPowerActive = Amr.Contains(equippedAzt, spellId) |
| 333 | 333 |
| 334 local socketBorder, socketIcon = createSocketWidget(panelMods, prevSocket or lblItem, prevSocket, isPowerActive) | 334 local socketBorder, socketIcon = createSocketWidget(panelMods, prevSocket or lblItem, prevSocket, isPowerActive) |
| 335 | 335 |
| 336 -- set icon and tooltip | 336 -- set icon and tooltip |
| 364 end | 364 end |
| 365 | 365 |
| 366 -- enchant | 366 -- enchant |
| 367 if optimalItem.enchantId and optimalItem.enchantId ~= 0 then | 367 if optimalItem.enchantId and optimalItem.enchantId ~= 0 then |
| 368 local isEnchantEquipped = matchItem and matchItem.enchantId and matchItem.enchantId == optimalItem.enchantId | 368 local isEnchantEquipped = matchItem and matchItem.enchantId and matchItem.enchantId == optimalItem.enchantId |
| 369 | 369 |
| 370 local lblEnchant = AceGUI:Create("AmrUiLabel") | 370 local lblEnchant = AceGUI:Create("AmrUiLabel") |
| 371 panelMods:AddChild(lblEnchant) | 371 panelMods:AddChild(lblEnchant) |
| 372 lblEnchant:SetPoint("TOPLEFT", lblItem.frame, "TOPRIGHT", 130, 0) | 372 lblEnchant:SetPoint("TOPLEFT", lblItem.frame, "TOPRIGHT", 130, 0) |
| 373 lblEnchant:SetWordWrap(false) | 373 lblEnchant:SetWordWrap(false) |
| 374 lblEnchant:SetWidth(170) | 374 lblEnchant:SetWidth(170) |
