Mercurial > wow > itemauditor
comparison Modules/Tooltip.lua @ 13:8c83d5f6e306
OPTIONS! QuickAuctions is now an optional dependency. I have also added some configuration options for it. If you have QA but don't want IA to update your thresholds you can shut off the integration. I have also added other options so you can select your faction or the neutral AH and it will update the tooltip.
author | Asa Ayers <Asa.Ayers@Gmail.com> |
---|---|
date | Fri, 02 Jul 2010 21:39:24 -0700 |
parents | 6a6296dd249f |
children | 44e70a3fdb19 |
comparison
equal
deleted
inserted
replaced
12:6a6296dd249f | 13:8c83d5f6e306 |
---|---|
11 -- local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, _, _, _, _, itemVendorPrice = GetItemInfo (link); | 11 -- local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, _, _, _, _, itemVendorPrice = GetItemInfo (link); |
12 -- local _, _, Color, Ltype, Id, Enchant, Gem1, Gem2, Gem3, Gem4, Suffix, Unique, LinkLvl, Name = string.find(link, "|?c?f?f?(%x*)|?H?([^:]*):?(%d+):?(%d*):?(%d*):?(%d*):?(%d*):?(%d*):?(%-?%d*):?(%-?%d*):?(%d*)|?h?%[?([^%[%]]*)%]?|?h?|?r?") | 12 -- local _, _, Color, Ltype, Id, Enchant, Gem1, Gem2, Gem3, Gem4, Suffix, Unique, LinkLvl, Name = string.find(link, "|?c?f?f?(%x*)|?H?([^:]*):?(%d+):?(%d*):?(%d*):?(%d*):?(%d*):?(%d*):?(%-?%d*):?(%-?%d*):?(%d*)|?h?%[?([^%[%]]*)%]?|?h?|?r?") |
13 | 13 |
14 local investedTotal, investedPerItem, count = ItemAuditor:GetItemCost(link) | 14 local investedTotal, investedPerItem, count = ItemAuditor:GetItemCost(link) |
15 | 15 |
16 local AHCut = ItemAuditor.db.factionrealm.AHCut | 16 local keep = 1 - addon:GetAHCut() |
17 local keep = 1 - AHCut | |
18 local show = false | 17 local show = false |
19 | 18 |
20 if investedTotal > 0 then | 19 if investedTotal > 0 then |
21 tip:AddDoubleLine("\124cffffffffIA: Total Invested", utils:FormatMoney(investedTotal)); | 20 tip:AddDoubleLine("\124cffffffffIA: Total Invested", utils:FormatMoney(investedTotal)); |
22 tip:AddDoubleLine("\124cffffffffIA: Invested/Item (" .. count .. ")", utils:FormatMoney(ceil(investedPerItem))); | 21 tip:AddDoubleLine("\124cffffffffIA: Invested/Item (" .. count .. ")", utils:FormatMoney(ceil(investedPerItem))); |
23 tip:AddDoubleLine("\124cffffffffIA: Minimum faction AH Price: ", utils:FormatMoney(ceil(investedPerItem/keep))) | 22 tip:AddDoubleLine("\124cffffffffIA: Minimum " .. addon:GetAHFaction() .. " AH Price: ", utils:FormatMoney(ceil(investedPerItem/keep))) |
24 show = true | 23 show = true |
25 | 24 |
26 end | 25 end |
27 local groupName = QAAPI:GetItemGroup(link) | 26 |
28 if groupName then | 27 if addon:IsQAEnabled() then |
29 local threshold = QAAPI:GetGroupThreshold(groupName) | 28 local groupName = QAAPI:GetItemGroup(link) |
30 tip:AddDoubleLine("\124cffffffffIA: QA Threshold: ", utils:FormatMoney(threshold)) | 29 if groupName then |
31 show = true | 30 local threshold = QAAPI:GetGroupThreshold(groupName) |
31 tip:AddDoubleLine("\124cffffffffIA: QA Threshold: ", utils:FormatMoney(threshold)) | |
32 show = true | |
33 end | |
32 end | 34 end |
33 | 35 |
34 if show then | 36 if show then |
35 tip:Show() | 37 tip:Show() |
36 end | 38 end |