Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
[Fixes #1] Error when using AH button to search for reagents
Browse files Browse the repository at this point in the history
  • Loading branch information
plusmouse committed Jun 12, 2021
1 parent 4a1bd29 commit cfa6115
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Auctionator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -628,20 +628,19 @@ local function Atr_OnClickTradeSkillBut()

Atr_SelectPane (BUY_TAB);

local index = TradeSkillFrame.RecipeList:GetSelectedRecipeID()
local index = GetTradeSkillSelectionIndex()


local link = C_TradeSkillUI.GetRecipeItemLink(index)
local link = GetTradeSkillItemLink(index)

local _, _, _, _, _, itemType = GetItemInfo (link);

local numReagents = C_TradeSkillUI.GetRecipeNumReagents(index)
local numReagents = GetTradeSkillNumReagents(index)

local reagentId

local shoppingListName = GetItemInfo (link)
if (shoppingListName == nil) then
shoppingListName = C_TradeSkillUI.GetRecipeInfo(index).name
shoppingListName = GetTradeSkillLine()
end

local items = {}
Expand All @@ -651,7 +650,7 @@ local function Atr_OnClickTradeSkillBut()
end

for reagentId = 1, numReagents do
local reagentName = C_TradeSkillUI.GetRecipeReagentInfo(index, reagentId)
local reagentName = GetTradeSkillReagentInfo(index, reagentId)
if (reagentName and not zc.StringSame(reagentName, "Crystal Vial")) then
table.insert (items, reagentName)
end
Expand All @@ -673,7 +672,6 @@ local function Atr_ModTradeSkillFrame()
gTradeSkillFrameModded = true

local button = CreateFrame("BUTTON", "Auctionator_Search", TradeSkillFrame, "UIPanelButtonTemplate");
print(TradeSkillDetailScrollFrame, "p")
button:SetPoint("TOPRIGHT", "TradeSkillDetailScrollFrame", "TOPRIGHT", 0, -22);

button:SetHeight (20)
Expand Down

0 comments on commit cfa6115

Please sign in to comment.