diff --git a/ItemConditions.lua b/ItemConditions.lua index 1017a25..875a401 100644 --- a/ItemConditions.lua +++ b/ItemConditions.lua @@ -213,7 +213,7 @@ local function IsItemUsable(itemID, playerClass, isMe) -- If item is class-locked then make sure this class is listed -- Also make sure the item is not unique if I already own one if not LootReserve.TooltipScanner then - LootReserve.TooltipScanner = CreateFrame("GameTooltip", "LootReserveTooltipScanner", UIParent, "GameTooltipTemplate"); + LootReserve.TooltipScanner = CreateFrame("GameTooltip", "LootReserveTooltipScanner", nil, "GameTooltipTemplate"); LootReserve.TooltipScanner:Hide(); end if not LootReserve.TooltipScanner.Unique then @@ -226,7 +226,7 @@ local function IsItemUsable(itemID, playerClass, isMe) LootReserve.TooltipScanner.ProfessionAllowed = format("^%s$", ITEM_MIN_SKILL:gsub("%d+%$",""):gsub("%%s ", "([%%u%%l%%s]+) "):gsub("%(%%d%)", "%%((%%d+)%%)")); end - LootReserve.TooltipScanner:SetOwner(UIParent, "ANCHOR_NONE"); + LootReserve.TooltipScanner:SetOwner(WorldFrame, "ANCHOR_NONE"); LootReserve.TooltipScanner:SetHyperlink("item:" .. itemID); for i = 1, LootReserve.TooltipScanner:NumLines() do local line = _G[LootReserve.TooltipScanner:GetName() .. "TextLeft" .. i]; diff --git a/LootReserve.lua b/LootReserve.lua index 640be06..d3bf364 100644 --- a/LootReserve.lua +++ b/LootReserve.lua @@ -881,11 +881,11 @@ end function LootReserve:IsItemSoulbound(bag, slot) if not self.TooltipScanner then - self.TooltipScanner = CreateFrame("GameTooltip", "LootReserveTooltipScanner", UIParent, "GameTooltipTemplate"); + self.TooltipScanner = CreateFrame("GameTooltip", "LootReserveTooltipScanner", nil, "GameTooltipTemplate"); self.TooltipScanner:Hide(); end - self.TooltipScanner:SetOwner(UIParent, "ANCHOR_NONE"); + self.TooltipScanner:SetOwner(WorldFrame, "ANCHOR_NONE"); self.TooltipScanner:SetBagItem(bag, slot); for i = LootReserve.TooltipScanner:NumLines(), 1, -1 do local line = _G[self.TooltipScanner:GetName() .. "TextLeft" .. i]; @@ -900,7 +900,7 @@ end function LootReserve:IsItemSoulboundTradeable(bag, slot) if not self.TooltipScanner then - self.TooltipScanner = CreateFrame("GameTooltip", "LootReserveTooltipScanner", UIParent, "GameTooltipTemplate"); + self.TooltipScanner = CreateFrame("GameTooltip", "LootReserveTooltipScanner", nil, "GameTooltipTemplate"); self.TooltipScanner:Hide(); end @@ -908,7 +908,7 @@ function LootReserve:IsItemSoulboundTradeable(bag, slot) self.TooltipScanner.SoulboundTradeable = BIND_TRADE_TIME_REMAINING:gsub("%.", "%%."):gsub("%%s", "(.+)"); end - self.TooltipScanner:SetOwner(UIParent, "ANCHOR_NONE"); + self.TooltipScanner:SetOwner(WorldFrame, "ANCHOR_NONE"); self.TooltipScanner:SetBagItem(bag, slot); for i = LootReserve.TooltipScanner:NumLines(), 1, -1 do local line = _G[self.TooltipScanner:GetName() .. "TextLeft" .. i]; diff --git a/Server.lua b/Server.lua index c71f876..179cb5a 100644 --- a/Server.lua +++ b/Server.lua @@ -977,10 +977,10 @@ function LootReserve.Server:AddRecentLoot(item, acceptAllQualities) -- try to get the tooltip to cache if not LootReserve.TooltipScanner then - LootReserve.TooltipScanner = CreateFrame("GameTooltip", "LootReserveTooltipScanner", UIParent, "GameTooltipTemplate"); + LootReserve.TooltipScanner = CreateFrame("GameTooltip", "LootReserveTooltipScanner", nil, "GameTooltipTemplate"); LootReserve.TooltipScanner:Hide(); end - LootReserve.TooltipScanner:SetOwner(UIParent, "ANCHOR_NONE"); + LootReserve.TooltipScanner:SetOwner(WorldFrame, "ANCHOR_NONE"); LootReserve.TooltipScanner:SetHyperlink(item:GetString()); LootReserve.TooltipScanner:Hide(); end