diff --git a/AuctionLite-classic.toc b/AuctionLite-classic.toc index c6532f0..314cd19 100644 --- a/AuctionLite-classic.toc +++ b/AuctionLite-classic.toc @@ -1,8 +1,8 @@ -## Interface: 11303 +## Interface: 11500 ## Title: AuctionLite-classic ## Notes: A lightweight addon that tracks auction house data and improves the auction house interface. ## Author: merial.kilrogg@gmail.com -## Version: 1.1a +## Version: 1.2 ## OptionalDeps: Ace3 ## SavedVariables: AuctionLiteDB ## X-Category: Interface Enhancements diff --git a/BuyFrame.lua b/BuyFrame.lua index df05f9e..a8cc49b 100644 --- a/BuyFrame.lua +++ b/BuyFrame.lua @@ -2019,7 +2019,8 @@ end -- Handle bag item clicks by searching for the item. function AuctionLite:BagClickBuy(container, slot) - local link = GetContainerItemLink(container, slot); + local location = ItemLocation:CreateFromBagAndSlot(container, slot) + local link = C_Item.GetItemLink(location); if link ~= nil then local name = self:SplitLink(link); self:NameClickBuy(name); diff --git a/CreateAuctions.lua b/CreateAuctions.lua index 504cd78..68fa9c8 100644 --- a/CreateAuctions.lua +++ b/CreateAuctions.lua @@ -27,11 +27,12 @@ function AuctionLite:CountItems(targetLink) if targetLink ~= nil then local i, j; for i = 0, 4 do - local numItems = GetContainerNumSlots(i); + local numItems = C_Container.GetContainerNumSlots(i); for j = 1, numItems do - local link = self:RemoveUniqueId(GetContainerItemLink(i, j)); + local link = self:RemoveUniqueId(C_Container.GetContainerItemLink(i, j)); if link == targetLink then - local _, count = GetContainerItemInfo(i, j); + local slotInfo = C_Container.GetContainerItemInfo(i, j); + local count = slotInfo.stackCount; total = total + count; end end @@ -48,9 +49,10 @@ function AuctionLite:FindItem(targetLink) if targetLink ~= nil then local i, j; for i = 0, 4 do - local numItems = GetContainerNumSlots(i); + local numItems = C_Container.GetContainerNumSlots(i); for j = 1, numItems do - local link = self:RemoveUniqueId(GetContainerItemLink(i, j)); + local location = ItemLocation:CreateFromBagAndSlot(i, j); + local link = self:RemoveUniqueId(C_Item.GetItemLink(location)); if link == targetLink then return i, j; end diff --git a/Images/SellFrame-Blank.blp b/Images/SellFrame-Blank.blp new file mode 100644 index 0000000..e4dcddf Binary files /dev/null and b/Images/SellFrame-Blank.blp differ diff --git a/Locale/deDE.lua b/Locale/deDE.lua index 0546ef3..4dc80be 100644 --- a/Locale/deDE.lua +++ b/Locale/deDE.lua @@ -20,6 +20,7 @@ L["|cffff0000Stack size too large.|r"] = "|cffff0000Stapelgröße zu groß.|r" L["|cffff0000Using %.3gx vendor price.|r"] = "|cffff0000Benutze %.3gx Händlerpreis.|r" L["|cffff7030Buyout less than vendor price.|r"] = "|cffff7030Sofortkaufpreis unter Händler-Verkaufswert.|r" L["|cffff7030Stack %d will have %d |4item:items;.|r"] = "|cffff7030Stapel %d wird %d |4Gegenstand:Gegenstände; haben.|r" +L["|cffffd000[Note]|r Fast auction scans can only be used once every 15 minutes. Using a slow scan for now."] = "[Hinweis]|r Schnelle Auktionsscans können nur einmal alle 15 Minuten verwendet werden. Ich verwende vorerst einen langsamen Scan." L["|cffffd000Using historical data.|r"] = "|cffffd000Verwende historische Daten.|r" L["|cffffff00Scanning: %d%%|r"] = "|cffffff00Scanne: %d%%|r" L["Accept"] = "Akzeptieren" diff --git a/Locale/enUS.lua b/Locale/enUS.lua index 5e43133..35fa2e8 100644 --- a/Locale/enUS.lua +++ b/Locale/enUS.lua @@ -20,6 +20,7 @@ L["|cffff0000Invalid stack size/count.|r"] = true L["|cffff0000No bid price set.|r"] = true L["|cffff0000Not enough cash for deposit.|r"] = true L["|cffff0000Not enough items available.|r"] = true +L["|cffffd000[Note]|r Fast auction scans can only be used once every 15 minutes. Using a slow scan for now."] = true L["|cffff0000Stack size too large.|r"] = true L["|cffff0000Using %.3gx vendor price.|r"] = true L["|cffff7030Buyout less than vendor price.|r"] = true diff --git a/Locale/esES.lua b/Locale/esES.lua index 94c8f97..a286d05 100644 --- a/Locale/esES.lua +++ b/Locale/esES.lua @@ -20,6 +20,7 @@ L["|cffff0000Stack size too large.|r"] = "|cffff0000Tamaño de montón demasiado L["|cffff0000Using %.3gx vendor price.|r"] = "|cffff0000Usando %.3gx precio de vendedor.|r" L["|cffff7030Buyout less than vendor price.|r"] = "|cffff7030Precio de compra menos que precio de vendedor.|r" L["|cffff7030Stack %d will have %d |4item:items;.|r"] = "|cffff7030Montón %d tendrá %d |4objeto:objetos;.|r" +L["|cffffd000[Note]|r Fast auction scans can only be used once every 15 minutes. Using a slow scan for now."] = "[Nota]|r Los escaneos rápidos de subasta solo se pueden utilizar una vez cada 15 minutos. Usando un escaneo lento por ahora." L["|cffffd000Using historical data.|r"] = "|cffffd000Usando datos históricos.|r" L["|cffffff00Scanning: %d%%|r"] = "|cffffff00Escaneando: %d%%|r" L["Accept"] = "Aceptar" diff --git a/Locale/frFR.lua b/Locale/frFR.lua index 81debcd..1283c5a 100644 --- a/Locale/frFR.lua +++ b/Locale/frFR.lua @@ -20,6 +20,7 @@ L["|cffff0000Stack size too large.|r"] = "|cffff0000Taille de la pile trop grand L["|cffff0000Using %.3gx vendor price.|r"] = "|cffff0000Utilisation de %.3gx le prix marchand.|r" L["|cffff7030Buyout less than vendor price.|r"] = "|cffff7030Achat immédiat inférieur au prix du marchand.|r" L["|cffff7030Stack %d will have %d |4item:items;.|r"] = "|cffff7030La %dème pile aura %d |4objet:objets;.|r" +L["|cffffd000[Note]|r Fast auction scans can only be used once every 15 minutes. Using a slow scan for now."] = "[Remarque]|r Les analyses d'enchères rapides ne peuvent être utilisées qu'une fois toutes les 15 minutes. Utilisation d'une analyse lente pour l'instant." L["|cffffd000Using historical data.|r"] = "|cffffd000Utilisation des données historiques.|r" L["|cffffff00Scanning: %d%%|r"] = "|cffffff00Analyse : %d%%|r" L["Accept"] = "Accepter" diff --git a/Locale/itIT.lua b/Locale/itIT.lua index 3b0e360..12c4a55 100644 --- a/Locale/itIT.lua +++ b/Locale/itIT.lua @@ -20,6 +20,7 @@ L["|cffff0000Stack size too large.|r"] = "|cffff0000Dimensione Pila troppo grand L["|cffff0000Using %.3gx vendor price.|r"] = "|cffff0000Uso %.3gx prezzo mercante.|r" L["|cffff7030Buyout less than vendor price.|r"] = "|cffff7030Prezzo acquisto inferiore al prezzo di vendita di un mercante.|r" L["|cffff7030Stack %d will have %d |4item:items;.|r"] = "|cffff7030La Pila %d avrà %d |4oggetto:oggetti;.|r" +L["|cffffd000[Note]|r Fast auction scans can only be used once every 15 minutes. Using a slow scan for now."] = "[Nota]|r Le scansioni dell'asta rapida possono essere utilizzate solo una volta ogni 15 minuti. Utilizzo una scansione lenta per ora." L["|cffffd000Using historical data.|r"] = "|cffffd000Uso dati storici.|r" L["|cffffff00Scanning: %d%%|r"] = "|cffffff00Scansione: %d%%|r" L["Accept"] = "Accetta" diff --git a/Locale/koKR.lua b/Locale/koKR.lua index 7cac348..906e049 100644 --- a/Locale/koKR.lua +++ b/Locale/koKR.lua @@ -20,6 +20,7 @@ L["|cffff0000Stack size too large.|r"] = "|cffff0000묶음 크기가 너무 큽 L["|cffff0000Using %.3gx vendor price.|r"] = "|cffff0000상점가의 %.3g배 가격으로 책정합니다.|r" L["|cffff7030Buyout less than vendor price.|r"] = "|cffff7030상점가보다 낮은 즉시 구매가로 등록된 물품.|r" L["|cffff7030Stack %d will have %d |4item:items;.|r"] = "|cffff7030%d 묶음씩 %d개 품목이 됩니다.|r" +L["|cffffd000[Note]|r Fast auction scans can only be used once every 15 minutes. Using a slow scan for now."] = "[참고]|r 빠른 경매 스캔은 15분에 한 번만 사용할 수 있습니다. 지금은 느린 스캔을 사용하고 있습니다." L["|cffffd000Using historical data.|r"] = "|cffffd000저장된 가격으로 책정합니다.|r" L["|cffffff00Scanning: %d%%|r"] = "|cffffff00조사중: %d%%|r" L["Accept"] = "수락" diff --git a/Locale/ptBR.lua b/Locale/ptBR.lua index 7c99e91..bb2ed19 100644 --- a/Locale/ptBR.lua +++ b/Locale/ptBR.lua @@ -20,6 +20,7 @@ L["|cffff0000Stack size too large.|r"] = "|cffff0000Tamanho da pilha muito grand L["|cffff0000Using %.3gx vendor price.|r"] = "|cffff0000Usando %.3gx o preço do vendedor.|r" L["|cffff7030Buyout less than vendor price.|r"] = "|cffff7030Preço de compra menor que o preço do vendedor.|r" L["|cffff7030Stack %d will have %d |4item:items;.|r"] = "|cffff7030Pilhas %d irão ter %d |4item:items;.|r" +L["|cffffd000[Note]|r Fast auction scans can only be used once every 15 minutes. Using a slow scan for now."] = "[Nota]|r Varreduras rápidas de leilão só podem ser usadas uma vez a cada 15 minutos. Usando uma varredura lenta por enquanto." L["|cffffd000Using historical data.|r"] = "|cffffd000Usando dados historicos.|r" L["|cffffff00Scanning: %d%%|r"] = "|cffffff00Sondando: %d%%|r" L["Accept"] = "Aceitar" diff --git a/Locale/ruRU.lua b/Locale/ruRU.lua index 0e419c3..799a613 100644 --- a/Locale/ruRU.lua +++ b/Locale/ruRU.lua @@ -20,6 +20,7 @@ L["|cffff0000Stack size too large.|r"] = " |cffff0000Размер связки L["|cffff0000Using %.3gx vendor price.|r"] = "|cffff0000Используя цену продавца, умноженную на %.3g.|r" L["|cffff7030Buyout less than vendor price.|r"] = "|cffff7030Цена выкупа меньше цены продажи торговцу.|r" L["|cffff7030Stack %d will have %d |4item:items;.|r"] = "|cffff7030Связка %d содержит %d |4предмет:предмета:предметов;.|r" +L["|cffffd000[Note]|r Fast auction scans can only be used once every 15 minutes. Using a slow scan for now."] = "[Примечание]|r Быстрое сканирование аукциона можно использовать только один раз каждые 15 минут. Пока используем медленное сканирование." L["|cffffd000Using historical data.|r"] = "|cffffd000Используются исторические данные.|r" L["|cffffff00Scanning: %d%%|r"] = "|cffffff00Сканирование: %d%%|r" L["Accept"] = "Принять" diff --git a/Locale/zhCN.lua b/Locale/zhCN.lua index e4f7a4b..9bf7363 100644 --- a/Locale/zhCN.lua +++ b/Locale/zhCN.lua @@ -20,6 +20,7 @@ L["|cffff0000Stack size too large.|r"] = "|cffff0000堆叠数量太大.|r" L["|cffff0000Using %.3gx vendor price.|r"] = "|cffff0000使用 %.3gx 商店价格.|r" L["|cffff7030Buyout less than vendor price.|r"] = "|cffff7030一口价低于商人价格。|r" L["|cffff7030Stack %d will have %d |4item:items;.|r"] = "|cffff7030堆叠 %d 将有 %d |4物品:物品;.|r" +L["|cffffd000[Note]|r Fast auction scans can only be used once every 15 minutes. Using a slow scan for now."] = "[注意]|r 快速拍卖扫描每15分钟只能使用一次。 现在使用慢速扫描。" L["|cffffd000Using historical data.|r"] = "|cffffd000使用历史数据。|r" L["|cffffff00Scanning: %d%%|r"] = "|cffffff00搜索中:%d%%|r" L["Accept"] = "接受" diff --git a/Locale/zhTW.lua b/Locale/zhTW.lua index a05958f..66f0822 100644 --- a/Locale/zhTW.lua +++ b/Locale/zhTW.lua @@ -20,6 +20,7 @@ L["|cffff0000Stack size too large.|r"] = "|cffff0000堆疊數量太大。|r" L["|cffff0000Using %.3gx vendor price.|r"] = "|cffff0000使用 %.3gx 商店價格.|r" L["|cffff7030Buyout less than vendor price.|r"] = "|cffff7030直購價比商店價錢還低.|r" L["|cffff7030Stack %d will have %d |4item:items;.|r"] = "|cffff7030堆疊 %d 將有 %d |4物品:物品;.|r" +L["|cffffd000[Note]|r Fast auction scans can only be used once every 15 minutes. Using a slow scan for now."] = "[注意]|r 快速拍賣掃描每15分鐘只能使用一次。 現在使用慢速掃描。" L["|cffffd000Using historical data.|r"] = "|cffffd000使用歷史資料。|r" L["|cffffff00Scanning: %d%%|r"] = "|cffffff00正在掃描: %d%%|r" L["Accept"] = "允許" diff --git a/QueryAuctions.lua b/QueryAuctions.lua index f4c0fbb..ccf1300 100644 --- a/QueryAuctions.lua +++ b/QueryAuctions.lua @@ -93,9 +93,7 @@ function AuctionLite:QueryUpdate() getAll = true; else Query.getAll = false; - self:Print(L["|cffffd000[Note]|r " .. - "Fast auction scans can only be used once every " .. - "15 minutes. Using a slow scan for now."]); + self:Print(L["|cffffd000[Note]|r Fast auction scans can only be used once every 15 minutes. Using a slow scan for now."]); end end diff --git a/SellFrame.lua b/SellFrame.lua index 4f1b4ae..c2f1f4c 100644 --- a/SellFrame.lua +++ b/SellFrame.lua @@ -168,7 +168,7 @@ function AuctionLite:SetItemBidBuyout(bid, buyout) end end --- Set the number of stacksto the maximum value based on the current stack size +-- Set the number of stacks to the maximum value based on the current stack size function AuctionLite:SellStacksMaxButton_OnClick() local _, _, _, _, _, _, link = self:GetAuctionSellItemInfoAndLink(); @@ -444,7 +444,7 @@ function AuctionLite:ClearSellFrame() ChangedSize = 0; - SellItemButton:SetNormalTexture(nil); + SellItemButton:SetNormalTexture("Interface\\AddOns\\AuctionLite-classic\\Images\\SellFrame-Blank"); SellItemButtonName:SetText(""); SellItemButtonCount:Hide(); @@ -948,7 +948,8 @@ end -- Handle bag item clicks by dropping the item into the sell tab. function AuctionLite:BagClickSell(container, slot) - if GetContainerItemLink(container, slot) ~= nil then + local location = ItemLocation:CreateFromBagAndSlot(container, slot); + if C_Item.GetItemLink(location) ~= nil then ClearCursor(); ClickAuctionSellItemButton(); ClearCursor(); diff --git a/Tooltip.lua b/Tooltip.lua index 2855e3e..e32fe8c 100644 --- a/Tooltip.lua +++ b/Tooltip.lua @@ -225,8 +225,9 @@ end -- Add data to bag item tooltips. function AuctionLite:BagTooltip(tooltip, bag, slot) if tooltip:NumLines() > 0 then - local link = GetContainerItemLink(bag, slot); - local _, count = GetContainerItemInfo(bag, slot); + local location = ItemLocation:CreateFromBagAndSlot(bag, slot); + local link = C_Item.GetItemLink(location); + local count = C_Item.GetStackCount(location); self:AddTooltipData(tooltip, link, count); end end diff --git a/Util.lua b/Util.lua index d7e1119..0a38be3 100644 --- a/Util.lua +++ b/Util.lua @@ -174,22 +174,25 @@ function AuctionLite:GetAuctionSellItemInfoAndLink() -- Look through the bags to find a matching item. for i = 0, 4 do - local numItems = GetContainerNumSlots(i); + local numItems = C_Container.GetContainerNumSlots(i); for j = 1, numItems do - local _, curCount, locked = GetContainerItemInfo(i, j); - if count == curCount and locked then - -- We've found a partial match. Now check the name... - local curLink = GetContainerItemLink(i, j); - local curName = self:SplitLink(curLink); - if name == curName then - if link == nil then - -- It's our first match--make a note of it. - link = self:RemoveUniqueId(curLink); - container = i; - slot = j; - else - -- Ambiguous result. Bail! - return; + if C_Container.GetContainerItemInfo(i, j) ~= nil then + local slotInfo = C_Container.GetContainerItemInfo(i, j); + local curCount, locked = slotInfo.stackCount, slotInfo.isLocked; + if count == curCount and locked then + -- We've found a partial match. Now check the name... + local curLink = C_Container.GetContainerItemLink(i, j); + local curName = self:SplitLink(curLink); + if name == curName then + if link == nil then + -- It's our first match--make a note of it. + link = self:RemoveUniqueId(curLink); + container = i; + slot = j; + else + -- Ambiguous result. Bail! + return; + end end end end