Broken in 10.0.2
sthdevilish opened this issue ยท 3 comments
Errors showing on logging in:
"4x Interface/AddOns/Molinari/Molinari.lua:241: GameTooltip doesn't have a "OnTooltipSetItem" script
[string "=[C]"]: in function `HookScript'
[string "@Interface/AddOns/Molinari/Molinari.lua"]:241: in main chunk
Locals:
(*temporary) = GameTooltip {
0 = <userdata>
SetQuestLogRewardSpell = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetQuestPartyProgress = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
ProcessLineData = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:303
SetPvpTalent = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetRuneforgeResultItem = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetHyperlink = <function> defined =[C]:-1
SetUnit = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetAzeriteEssence = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetVoidDepositItem = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetVoidWithdrawalItem = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
ClearLines = <function> defined =[C]:-1
SetInfoBackdropStyle = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:338
ItemTooltip = Frame {
}
shoppingTooltips = <table> {
}
SetSocketGem = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
updateTooltipTimer = 0.200000
Show = <function> defined =[C]:-1
StatusBar = GameTooltipStatusBar {
}
SetLootCurrency = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetSlottedKeystone = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetWorldCursor = <function> defined @Interface/FrameXML/GameTooltip.lua:952
SetLootItem = <function> defined =[C]:-1
SetMerchantCostItem = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
GetUnit = <function> defined @Interface/FrameXML/GameTooltip.lua:994
SetOwnedItemByID = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetItemInteractionItem = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetQuestLogSpecialItem = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
TextRight1 = GameTooltipTextRight1 {
}
SetEnhancedConduit = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetRecipeReagentItem = <function> defined =[C]:-1
SetQuestCurrency = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
supportsDataRefresh = true
SetWeeklyReward = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetMerchantItem = <function> defined =[C]:-1
SetPvpBrawl = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetAchievementByID = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
BottomOverlay = Texture {
}
SetSpellByID = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
supportsItemComparison = true
SetSocketedRelic = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
ProcessInfo = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:236
ProcessLines = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:293
NineSlice = Frame {
}
SetInventoryItem = <function> defined =[C]:-1
RefreshData = <function> defined @Interface/FrameXML/GameTooltip.lua:933
SetTransmogrifyItem = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetLootRollItem = <function> defined =[C]:-1
OnLoad = <function> defined @Interface/FrameXML/GameTooltip.lua:927
SetQuestLogCurrency = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetUnitDebuffByAuraInstanceID = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetBagItem = <function> defined =[C]:-1
GetSpell = <function> defined @Interface/FrameXML/GameTooltip.lua:990
SetAction = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetItemKey = <function> defined @Interface/SharedXML/Tooltip/TooltipDataHandler.lua:444
SetCompanionPet = <function> defined @Interface/Sh"
"4x FrameXML\Bindings.xml:1 Interface/AddOns/Molinari/Molinari.lua:1 (null)"
"4x Interface/AddOns/Molinari/Molinari.lua:1 (null)"
`
local function OnTooltipSetItem(self)
if self:GetOwner() == Molinari then
-- avoid triggering on ourselves
return
end
local _, itemLink = self:GetItem()
if not shouldActivate(itemLink) then
-- there are a lot of conditions that we look for to _not_ activate
return
end
local itemID = GetItemInfoFromHyperlink(itemLink)
if not itemID or addon.db.profile.blocklist.items[itemID] then
-- don't activate on invalid items
return
end
local isMillable, millingSpellID, useMortar = LibProcessable:IsMillable(itemID)
if isMillable and GetItemCount(itemID) >= 5 then
if useMortar then
Molinari:ApplyItem(itemLink, 114942, 1/2, 1, 1/2)
elseif CLASSIC then
Molinari:ApplySpell(itemLink, 51005, 1/2, 1, 1/2)
elseif millingSpellID then
Molinari:ApplyTradeSkill(itemLink, millingSpellID, 773, 1/2, 1, 1/2)
end
return
end
local isProspectable, prospectingSpellID = LibProcessable:IsProspectable(itemID)
if isProspectable and GetItemCount(itemID) >= 5 then
if CLASSIC then
Molinari:ApplySpell(itemLink, 31252, 1, 1/3, 1/3)
elseif prospectingSpellID then
Molinari:ApplyTradeSkill(itemLink, prospectingSpellID, 755, 1, 1/3, 1/3)
end
return
end
if LibProcessable:IsDisenchantable(itemLink) then
Molinari:ApplySpell(itemLink, 13262, 1/2, 1/2, 1)
return
end
local isOpenable, spellID = LibProcessable:IsOpenable(itemID)
if isOpenable then
Molinari:ApplySpell(itemLink, spellID, 0, 1, 1)
return
end
local isOpenableProfession, keyItemID = LibProcessable:IsOpenableProfession(itemID)
if isOpenableProfession then
Molinari:ApplyItem(itemLink, keyItemID, 0, 1, 1)
return
end
end
TooltipDataProcessor.AddTooltipPostCall(Enum.TooltipDataType.Item, OnTooltipSetItem)
`
LUA Errors on "Shift-Click" (Item Compare), fix with this:
if (not self) or (not self.GetItem) then
return
end