Mercurial > wow > askmrrobot
comparison Gear.lua @ 100:c1996b3376ed
tweak to ilvl display info
| author | yellowfive |
|---|---|
| date | Tue, 25 Oct 2016 10:00:17 -0700 |
| parents | b8e9664d3229 |
| children | 917ac27213d1 |
comparison
equal
deleted
inserted
replaced
| 99:9322285ee639 | 100:c1996b3376ed |
|---|---|
| 218 -- fill the name/ilvl labels, which may require asynchronous loading of item information | 218 -- fill the name/ilvl labels, which may require asynchronous loading of item information |
| 219 if optimalItemLink then | 219 if optimalItemLink then |
| 220 Amr.GetItemInfo(optimalItemLink, function(obj, name, link, quality, iLevel) | 220 Amr.GetItemInfo(optimalItemLink, function(obj, name, link, quality, iLevel) |
| 221 -- set item name, tooltip, and ilvl | 221 -- set item name, tooltip, and ilvl |
| 222 obj.nameLabel:SetText(link:gsub("%[", ""):gsub("%]", "")) | 222 obj.nameLabel:SetText(link:gsub("%[", ""):gsub("%]", "")) |
| 223 | |
| 224 -- not quite right but whatever... close enough | |
| 225 if quality == 6 then | |
| 226 local tmprel = optimalItem.relicBonusIds | |
| 227 optimalItem.relicBonusIds = nil | |
| 228 link = Amr.CreateItemLink(optimalItem) | |
| 229 optimalItem.relicBonusIds = tmprel | |
| 230 end | |
| 231 | |
| 223 Amr:SetItemTooltip(obj.nameLabel, link) | 232 Amr:SetItemTooltip(obj.nameLabel, link) |
| 224 | 233 |
| 225 -- the game's info gives the wrong item level, so we have to scan for it | 234 -- the game's info gives the wrong item level, so we have to scan for it |
| 226 iLevel = (quality ~= 6 or optimalItem.relicBonusIds) and Amr.GetItemLevel(nil, nil, link) or "" | 235 --iLevel = (quality ~= 6 or optimalItem.relicBonusIds) and Amr.GetItemLevel(nil, nil, link) or "" |
| 227 obj.ilvlLabel:SetText(iLevel) | 236 obj.ilvlLabel:SetText(iLevel) |
| 228 | 237 |
| 229 end, { ilvlLabel = lblIlvl, nameLabel = lblItem }) | 238 end, { ilvlLabel = lblIlvl, nameLabel = lblItem }) |
| 230 end | 239 end |
| 231 | 240 |
