Bagnon

Bagnon

124M Downloads

Legion Beta Bag work

Torsin opened this issue ยท 1 comments

commented

A few changes I made to get it functional for Legion on my system, some of them may not be 100% correct, but it works fine so far.

LibItemSearch-1.2.lua, line 205 (Current):

    [select(10, GetAuctionItemClasses())] = ITEM_BIND_QUEST,

(Legion):

    [_G.GetItemClassInfo(LE_ITEM_CLASS_QUESTITEM)] = ITEM_BIND_QUEST,

Item.lua (common\components), lines 15, 43, & 48 (Current):

    local QUEST = select(10, GetAuctionItemClasses())

    fade:SetChange(-.8)

    fade:SetChange(.8)

(Legion) [Not 100% about the values for To/From]:

    local QUEST = _G.GetItemClassInfo(LE_ITEM_CLASS_QUESTITEM)

    fade:SetFromAlpha(0)
    fade:SetToAlpha(-.8)

    fade:SetFromAlpha(-.8)
    fade:SetToAlpha(0)

tooltipCounts.lua (common\components), lines 95-118 (Current):

local function OnTradeSkill(tooltip, recipe, reagent)
    if reagent then
        AddOwners(tooltip, GetTradeSkillReagentItemLink(recipe, reagent))
    else
        AddOwners(tooltip, GetTradeSkillItemLink(recipe))
    end
end

local function OnQuest(tooltip, type, quest)
    AddOwners(tooltip, GetQuestItemLink(type, quest))
end

local function OnClear(tooltip)
    tooltip.__tamedCounts = false
end

local function HookTip(tooltip)
    tooltip:HookScript('OnTooltipCleared', OnClear)
    tooltip:HookScript('OnTooltipSetItem', OnItem)

    hooksecurefunc(tooltip, 'SetTradeSkillItem', OnTradeSkill)
    hooksecurefunc(tooltip, 'SetQuestItem', OnQuest)
    hooksecurefunc(tooltip, 'SetQuestLogItem', OnQuest)
end

(Legion), lines 95-119 [seems like they changed TradeSkill with Recipe:

local function OnTradeSkill(tooltip, recipe, reagent)
    if reagent then
        AddOwners(tooltip, C_TradeSkillUI.GetRecipeReagentItemLink(recipe, reagent))
    else
        AddOwners(tooltip, C_TradeSkillUI.GetRecipeItemLink(recipe))
    end
end

local function OnQuest(tooltip, type, quest)
    AddOwners(tooltip, GetQuestItemLink(type, quest))
end

local function OnClear(tooltip)
    tooltip.__tamedCounts = false
end

local function HookTip(tooltip)
    tooltip:HookScript('OnTooltipCleared', OnClear)
    tooltip:HookScript('OnTooltipSetItem', OnItem)

    hooksecurefunc(tooltip, 'SetRecipeReagentItem', OnTradeSkill)
    hooksecurefunc(tooltip, 'SetRecipeResultItem', OnTradeSkill)
    hooksecurefunc(tooltip, 'SetQuestItem', OnQuest)
    hooksecurefunc(tooltip, 'SetQuestLogItem', OnQuest)
end
commented

Thanks! I've been working today on updating Bagnon, so that came just in the right time!