Skip to content

Commit

Permalink
Added RECrystallize action house scanner addon price sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnpsp committed Nov 7, 2024
1 parent 19847d4 commit 5ce4519
Showing 1 changed file with 28 additions and 24 deletions.
52 changes: 28 additions & 24 deletions KiwiFarm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,8 @@ do
elseif source == 'Aux:Disenchant' and AuxDisenchant then
local item = AuxInfo.item(itemID)
price = item and AuxDisenchant.value(item.item_id, item.slot, item.quality, item.level)
elseif source == 'REC:Market' and RECrystallize_PriceCheck then
price = RECrystallize_PriceCheck(itemLink)
elseif TSM_API and TSM_API.GetCustomPriceValue then -- TSM sources
price = TSM_API.GetCustomPriceValue(source, "i:"..itemID)
end
Expand Down Expand Up @@ -1722,7 +1724,7 @@ do
local function InitPriceSources(menu)
for i=#menu,1,-1 do
local arg = menu[i].arg1
if (arg =='Atr' and not Atr_GetAuctionPrice and not Auctionator) or (arg =='TSM' and not TSM_API) or (arg == 'Aux' and not aux_frame) then
if (arg =='Atr' and not Atr_GetAuctionPrice and not Auctionator) or (arg =='TSM' and not TSM_API) or (arg == 'Aux' and not aux_frame) or (arg == 'REC' and not RECrystallize_PriceCheck) then
tremove(menu,i)
end
end
Expand Down Expand Up @@ -1830,17 +1832,18 @@ do
sources[info.value] = (not sources[info.value]) or nil
end
menuQualitySources = {
{ text = L['Vendor Price'], value = 'vendor', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Auctionator: Market Value'], value = 'Atr:DBMarket', arg1 = 'Atr', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Auctionator: Disenchant'], value = 'Atr:Destroy' , arg1 = 'Atr', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Market Value'], value = 'DBMarket', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Historical'], value = 'DBHistorical', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Recent'], value = 'DBRecent', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Min Buyout'], value = 'DBMinBuyout', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Disenchant'], value = 'Destroy', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Aux: Market Value'], value = 'Aux:Market', arg1 = 'Aux', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Aux: Min Buyout'], value = 'Aux:MinBuyout', arg1 = 'Aux', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Aux: Disenchant'], value = 'Aux:Disenchant', arg1 = 'Aux', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Vendor Price'], value = 'vendor', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Auctionator: Market Value'], value = 'Atr:DBMarket', arg1 = 'Atr', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Auctionator: Disenchant'], value = 'Atr:Destroy' , arg1 = 'Atr', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Market Value'], value = 'DBMarket', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Historical'], value = 'DBHistorical', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Recent'], value = 'DBRecent', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Min Buyout'], value = 'DBMinBuyout', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Disenchant'], value = 'Destroy', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Aux: Market Value'], value = 'Aux:Market', arg1 = 'Aux', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Aux: Min Buyout'], value = 'Aux:MinBuyout', arg1 = 'Aux', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Aux: Disenchant'], value = 'Aux:Disenchant', arg1 = 'Aux', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['RECrystallize: Market Value'], value = 'REC:Market', arg1 = 'REC', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
init = InitPriceSources
}
end
Expand Down Expand Up @@ -1913,18 +1916,19 @@ do
end
-- submenu: item price sources
menuItemSources = {
{ text = getText, value = 'user', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Vendor Price'], value = 'vendor', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Auctionator: Market Value'], value = 'Atr:DBMarket', arg1 = 'Atr', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Auctionator: Disenchant'], value = 'Atr:Destroy' , arg1 = 'Atr', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Market Value'], value = 'DBMarket', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Historical'], value = 'DBHistorical', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Recent'], value = 'DBRecent', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Min Buyout'], value = 'DBMinBuyout', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Disenchant'], value = 'Destroy', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Aux: Market Value'], value = 'Aux:Market', arg1 = 'Aux', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Aux: Min Buyout'], value = 'Aux:MinBuyout', arg1 = 'Aux', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Aux: Disenchant'], value = 'Aux:Disenchant', arg1 = 'Aux', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = getText, value = 'user', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Vendor Price'], value = 'vendor', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Auctionator: Market Value'], value = 'Atr:DBMarket', arg1 = 'Atr', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Auctionator: Disenchant'], value = 'Atr:Destroy' , arg1 = 'Atr', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Market Value'], value = 'DBMarket', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Historical'], value = 'DBHistorical', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Recent'], value = 'DBRecent', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Min Buyout'], value = 'DBMinBuyout', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['TSM: Disenchant'], value = 'Destroy', arg1 = 'TSM', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Aux: Market Value'], value = 'Aux:Market', arg1 = 'Aux', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Aux: Min Buyout'], value = 'Aux:MinBuyout', arg1 = 'Aux', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['Aux: Disenchant'], value = 'Aux:Disenchant', arg1 = 'Aux', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
{ text = L['RECrystallize: Market Value'], value = 'REC:Market', arg1 = 'REC', isNotRadio = true, keepShownOnClick = 1, checked = checked, func = set },
init = InitPriceSources,
}
-- submenu: individual items prices
Expand Down

0 comments on commit 5ce4519

Please sign in to comment.