dont use GameTooltip for caching
This commit is contained in:
+9
-11
@@ -1069,7 +1069,7 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
|
|||||||
text = itemColor..itemName;
|
text = itemColor..itemName;
|
||||||
else
|
else
|
||||||
if ( itemID and itemID ~= 0 ) then
|
if ( itemID and itemID ~= 0 ) then
|
||||||
GameTooltip:SetHyperlink("item:"..itemID)
|
AtlasLootCacheTooltip:SetHyperlink("item:"..itemID)
|
||||||
AtlasLootItemsFrame.refreshTime = refreshTimeout
|
AtlasLootItemsFrame.refreshTime = refreshTimeout
|
||||||
AtlasLootItemsFrame.queue[itemID] = true
|
AtlasLootItemsFrame.queue[itemID] = true
|
||||||
end
|
end
|
||||||
@@ -1083,10 +1083,8 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
|
|||||||
spellName = SpellInfo(spellID)
|
spellName = SpellInfo(spellID)
|
||||||
else
|
else
|
||||||
if ( spellID and spellID ~= 0 ) then
|
if ( spellID and spellID ~= 0 ) then
|
||||||
GameTooltip:SetOwner(WorldFrame, "ANCHOR_NONE")
|
AtlasLootCacheTooltip:SetHyperlink("enchant:"..spellID)
|
||||||
GameTooltip:SetHyperlink("enchant:"..spellID)
|
spellName = AtlasLootCacheTooltipTextLeft1:GetText()
|
||||||
spellName = GameTooltipTextLeft1:GetText()
|
|
||||||
GameTooltip:Hide()
|
|
||||||
end
|
end
|
||||||
if ( not (spellName and spellName ~= "") ) then
|
if ( not (spellName and spellName ~= "") ) then
|
||||||
spellName = GetSpellInfoAtlasLootDB["enchants"][spellID]["name"]
|
spellName = GetSpellInfoAtlasLootDB["enchants"][spellID]["name"]
|
||||||
@@ -1098,7 +1096,7 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
|
|||||||
text, _, quality = GetItemInfo(craftItem)
|
text, _, quality = GetItemInfo(craftItem)
|
||||||
if ( not text ) then
|
if ( not text ) then
|
||||||
if ( craftItem and craftItem ~= 0 ) then
|
if ( craftItem and craftItem ~= 0 ) then
|
||||||
GameTooltip:SetHyperlink("item:"..craftItem)
|
AtlasLootCacheTooltip:SetHyperlink("item:"..craftItem)
|
||||||
AtlasLootItemsFrame.refreshTime = refreshTimeout
|
AtlasLootItemsFrame.refreshTime = refreshTimeout
|
||||||
AtlasLootItemsFrame.queue[craftItem] = true
|
AtlasLootItemsFrame.queue[craftItem] = true
|
||||||
end
|
end
|
||||||
@@ -1126,7 +1124,7 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
|
|||||||
text, _, quality = GetItemInfo(craftItem)
|
text, _, quality = GetItemInfo(craftItem)
|
||||||
if ( not text ) then
|
if ( not text ) then
|
||||||
if ( craftItem ~= 0 ) then
|
if ( craftItem ~= 0 ) then
|
||||||
GameTooltip:SetHyperlink("item:"..craftItem)
|
AtlasLootCacheTooltip:SetHyperlink("item:"..craftItem)
|
||||||
text = AtlasLoot_FixText(spellName);
|
text = AtlasLoot_FixText(spellName);
|
||||||
AtlasLootItemsFrame.refreshTime = refreshTimeout
|
AtlasLootItemsFrame.refreshTime = refreshTimeout
|
||||||
AtlasLootItemsFrame.queue[craftItem] = true
|
AtlasLootItemsFrame.queue[craftItem] = true
|
||||||
@@ -1287,7 +1285,7 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
|
|||||||
for j = 1, table.getn(reagents) do
|
for j = 1, table.getn(reagents) do
|
||||||
local reagent = GetSpellInfoAtlasLootDB["craftspells"][spellID]["reagents"][j]
|
local reagent = GetSpellInfoAtlasLootDB["craftspells"][spellID]["reagents"][j]
|
||||||
if ( not GetItemInfo(reagent[1]) ) then
|
if ( not GetItemInfo(reagent[1]) ) then
|
||||||
GameTooltip:SetHyperlink("item:"..reagent[1]);
|
AtlasLootCacheTooltip:SetHyperlink("item:"..reagent[1]);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -3284,7 +3282,7 @@ function AtlasLoot_CacheItem(linkOrID)
|
|||||||
if GetItemInfo(linkOrID) then
|
if GetItemInfo(linkOrID) then
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
GameTooltip:SetHyperlink("item:"..linkOrID)
|
AtlasLootCacheTooltip:SetHyperlink("item:"..linkOrID)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -3296,7 +3294,7 @@ function AtlasLoot_CacheItem(linkOrID)
|
|||||||
if ( GetItemInfo(item) ) then
|
if ( GetItemInfo(item) ) then
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
GameTooltip:SetHyperlink(item)
|
AtlasLootCacheTooltip:SetHyperlink(item)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -3448,7 +3446,7 @@ function AtlasLoot_QueryLootPage()
|
|||||||
if ( (queryitem) and (queryitem ~= "") and (queryitem ~= 0) and
|
if ( (queryitem) and (queryitem ~= "") and (queryitem ~= 0) and
|
||||||
(string.sub(queryitem, 1, 1) ~= "s") and (string.sub(queryitem, 1, 1) ~= "e") ) then
|
(string.sub(queryitem, 1, 1) ~= "s") and (string.sub(queryitem, 1, 1) ~= "e") ) then
|
||||||
if ( not GetItemInfo(queryitem) ) then
|
if ( not GetItemInfo(queryitem) ) then
|
||||||
GameTooltip:SetHyperlink("item:"..queryitem..":0:0:0");
|
AtlasLootCacheTooltip:SetHyperlink("item:"..queryitem..":0:0:0");
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+11
-12
@@ -37,7 +37,7 @@
|
|||||||
<Size x="105" y="20"/>
|
<Size x="105" y="20"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Frame name="AtlasLootDefaultFrame" toplevel="true" frameStrata="HIGH" movable="true" enableMouseClicks="true" hidden="true" parent="UIParent" enableKeyboard="true">
|
<Frame name="AtlasLootDefaultFrame" toplevel="true" frameStrata="HIGH" movable="true" enableMouse="true" hidden="true" parent="UIParent">
|
||||||
<Size x="600" y="690"/>
|
<Size x="600" y="690"/>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="CENTER"/>
|
<Anchor point="CENTER"/>
|
||||||
@@ -50,22 +50,14 @@
|
|||||||
<Frames>
|
<Frames>
|
||||||
<Button name="$parent_CloseButton" inherits="UIPanelCloseButton">
|
<Button name="$parent_CloseButton" inherits="UIPanelCloseButton">
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOPRIGHT" relativeTo="AtlasLootDefaultFrame" relativePoint="TOPRIGHT">
|
<Anchor point="TOPRIGHT">
|
||||||
<Offset x="-10" y="-10"/>
|
<Offset x="-10" y="-10"/>
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</Anchors>
|
</Anchors>
|
||||||
<Scripts>
|
|
||||||
<OnClick>
|
|
||||||
AtlasLootDefaultFrame:Hide();
|
|
||||||
</OnClick>
|
|
||||||
<OnShow>
|
|
||||||
this:SetFrameLevel((this:GetParent()):GetFrameLevel() + 1);
|
|
||||||
</OnShow>
|
|
||||||
</Scripts>
|
|
||||||
</Button>
|
</Button>
|
||||||
<Button name="$parent_Atlas" inherits="AtlasLootDefaultFrameButtonTemplate">
|
<Button name="$parent_Atlas" inherits="AtlasLootDefaultFrameButtonTemplate">
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOPRIGHT" relativeTo="$parent" relativePoint="TOPRIGHT">
|
<Anchor point="TOPRIGHT">
|
||||||
<Offset x="-38" y="-15"/>
|
<Offset x="-38" y="-15"/>
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</Anchors>
|
</Anchors>
|
||||||
@@ -81,7 +73,6 @@
|
|||||||
<OnShow>
|
<OnShow>
|
||||||
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
|
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
|
||||||
this:SetText(AL["Atlas"]);
|
this:SetText(AL["Atlas"]);
|
||||||
this:SetFrameLevel((this:GetParent()):GetFrameLevel() + 1);
|
|
||||||
if IsAddOnLoaded("Atlas") then
|
if IsAddOnLoaded("Atlas") then
|
||||||
this:Enable();
|
this:Enable();
|
||||||
else
|
else
|
||||||
@@ -452,6 +443,14 @@
|
|||||||
<GameTooltip name="AtlasLootTooltip" inherits="GameTooltipTemplate" parent="UIParent" hidden="true"/>
|
<GameTooltip name="AtlasLootTooltip" inherits="GameTooltipTemplate" parent="UIParent" hidden="true"/>
|
||||||
|
|
||||||
<GameTooltip name="AtlasLootTooltip2" inherits="GameTooltipTemplate" parent="UIParent" hidden="true"/>
|
<GameTooltip name="AtlasLootTooltip2" inherits="GameTooltipTemplate" parent="UIParent" hidden="true"/>
|
||||||
|
|
||||||
|
<GameTooltip name="AtlasLootCacheTooltip" inherits="GameTooltipTemplate" parent="UIParent" hidden="true">
|
||||||
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
this:SetOwner(WorldFrame, "ANCHOR_NONE")
|
||||||
|
</OnLoad>
|
||||||
|
</Scripts>
|
||||||
|
</GameTooltip>
|
||||||
|
|
||||||
<Button name="AtlasLootNewBossLineTemplate" virtual="true" hidden="true">
|
<Button name="AtlasLootNewBossLineTemplate" virtual="true" hidden="true">
|
||||||
<Size x="336" y="15"/>
|
<Size x="336" y="15"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user