fixed bugs after relogging/reloading UI when last opened page was WishList or Search
removed redundant menu of world epics, removed fashion table (I don't see the point of keeping it since you can preview everything in the turtle shop itself anyway)
tooltip source is now more accurate and lighter on performance
moved buttons in atlasloot panel in Atlas to save some space
This commit is contained in:
Spit
2025-05-06 19:21:51 +03:00
parent c2e2e84fc4
commit 815ad7141e
9 changed files with 306 additions and 458 deletions
+121 -65
View File
@@ -47,8 +47,9 @@ local DEFAULT = "|cffFFd200";
--Establish number of boss lines in the Atlas frame for scrolling
local ATLAS_LOOT_BOSS_LINES = 24;
--Set the default anchor for the loot frame to the AtlasLoot frame
AtlasLoot_AnchorFrame = AtlasLootDefaultFrame;
local Anchor_Atlas = { "TOPLEFT", "AtlasFrame", "TOPLEFT", 18, -84 }
local Anchor_AlphaMap = { "TOPLEFT", "AlphaMapAlphaMapFrame", "TOPLEFT", 0, 0 }
local Anchor_Default = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", 2, -2 }
--Variables to hold hooked Atlas functions
Hooked_Atlas_Refresh = nil;
@@ -115,7 +116,7 @@ Called whenever the loot browser is shown and sets up buttons and loot tables
]]
function AtlasLootDefaultFrame_OnShow()
--Definition of where I want the loot table to be shown
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" };
AtlasLoot_AnchorPoint = Anchor_Default;
--Having the Atlas and loot browser frames shown at the same time would
--cause conflicts, so I hide the Atlas frame when the loot browser appears
if AtlasFrame then
@@ -124,12 +125,19 @@ function AtlasLootDefaultFrame_OnShow()
--Remove the selection of a loot table in Atlas
AtlasLootItemsFrame.activeBoss = nil;
--Set the item table to the loot table
AtlasLoot_SetItemInfoFrame(pFrame);
-- AtlasLoot_SetItemInfoFrame(AtlasLoot_AnchorPoint);
--Show the last displayed loot table
if AtlasLootCharDB.LastBoss == "WishList" then
AtlasLoot_ShowWishList()
return
elseif AtlasLootCharDB.LastBoss == "SearchResult" then
AtlasLoot:ShowSearchResult()
return
end
if AtlasLootItemsFrame.refresh then
AtlasLoot_ShowBossLoot(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[3], pFrame)
AtlasLoot_ShowBossLoot(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[3], AtlasLoot_AnchorPoint)
else
AtlasLoot_ShowBossLoot(AtlasLootCharDB.LastBoss, AtlasLootCharDB.LastBossText, pFrame);
AtlasLoot_ShowBossLoot(AtlasLootCharDB.LastBoss, AtlasLootCharDB.LastBossText, AtlasLoot_AnchorPoint);
end
end
@@ -431,10 +439,8 @@ function AtlasLoot_SetupForAtlas()
AtlasLootPanel:ClearAllPoints();
AtlasLootPanel:SetParent(AtlasFrame);
AtlasLootPanel:SetPoint("TOP", "AtlasFrame", "BOTTOM", 0, 9);
--Anchor the loot table to the Atlas frame
AtlasLoot_SetItemInfoFrame();
AtlasLoot_AnchorPoint = Anchor_Atlas
AtlasLootItemsFrame:Hide();
AtlasLoot_AnchorFrame = AtlasFrame;
end
--[[
@@ -443,31 +449,30 @@ pFrame - Data structure with anchor info. Format: {Anchor Point, Relative Frame
This function anchors the item frame where appropriate. The main Atlas frame can be passed instead of a custom pFrame.
If no pFrame is specified, the Atlas Frame is used if Atlas is installed.
]]
function AtlasLoot_SetItemInfoFrame(pFrame)
if ( pFrame ) then
--If a pFrame is specified, use it
if(pFrame==AtlasFrame and AtlasFrame) then
AtlasLootItemsFrame:ClearAllPoints();
AtlasLootItemsFrame:SetParent(AtlasFrame);
AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasFrame", "TOPLEFT", 18, -84);
else
AtlasLootItemsFrame:ClearAllPoints();
AtlasLootItemsFrame:SetParent(pFrame[2]);
AtlasLootItemsFrame:ClearAllPoints();
AtlasLootItemsFrame:SetPoint(pFrame[1], pFrame[2], pFrame[3], pFrame[4], pFrame[5]);
end
elseif ( AtlasFrame ) then
--If no pFrame is specified and Atlas is installed, anchor in Atlas
AtlasLootItemsFrame:ClearAllPoints();
AtlasLootItemsFrame:SetParent(AtlasFrame);
AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasFrame", "TOPLEFT", 18, -84);
elseif ( AtlasDefaultFrame ) then
AtlasLootItemsFrame:ClearAllPoints();
AtlasLootItemsFrame:SetParent(AtlasLootDefaultFrame);
AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasLootDefaultFrame", "TOPLEFT", 0, 0);
end
AtlasLootItemsFrame:Show();
end
-- function AtlasLoot_SetItemInfoFrame(pFrame)
-- if ( pFrame ) then
-- --If a pFrame is specified, use it
-- if(pFrame==AtlasFrame and AtlasFrame) then
-- AtlasLootItemsFrame:ClearAllPoints();
-- AtlasLootItemsFrame:SetParent(AtlasFrame);
-- AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasFrame", "TOPLEFT", 18, -84);
-- else
-- AtlasLootItemsFrame:ClearAllPoints();
-- AtlasLootItemsFrame:SetParent(pFrame[2]);
-- AtlasLootItemsFrame:SetPoint(pFrame[1], pFrame[2], pFrame[3], pFrame[4], pFrame[5]);
-- end
-- elseif ( AtlasFrame ) then
-- --If no pFrame is specified and Atlas is installed, anchor in Atlas
-- AtlasLootItemsFrame:ClearAllPoints();
-- AtlasLootItemsFrame:SetParent(AtlasFrame);
-- AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasFrame", "TOPLEFT", 18, -84);
-- elseif ( AtlasLootDefaultFrame ) then
-- AtlasLootItemsFrame:ClearAllPoints();
-- AtlasLootItemsFrame:SetParent(AtlasLootDefaultFrame);
-- AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasLootDefaultFrame", "TOPLEFT", 0, 0);
-- end
-- AtlasLootItemsFrame:Show();
-- end
--[[
AtlasLoot_AtlasScrollBar_Update:
@@ -710,7 +715,6 @@ function AtlasLoot_Atlas_OnShow()
else
AtlasLootPanel:Show();
end
pFrame = AtlasFrame;
end
--[[
@@ -1429,11 +1433,10 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
end
end
--For Alphamap and Atlas integration, show a 'close' button to hide the loot table and restore the map view
if (AtlasLootItemsFrame:GetParent() == AlphaMapAlphaMapFrame or AtlasLootItemsFrame:GetParent() == AtlasFrame) then
AtlasLootItemsFrame_CloseButton:Show();
else
AtlasLootItemsFrame_CloseButton:Hide();
end
AtlasLootItemsFrame_CloseButton:Hide();
if (AtlasFrame and AtlasFrame:IsShown()) or (AlphaMapAlphaMapFrame and AlphaMapAlphaMapFrame:IsShown()) then
AtlasLootItemsFrame_CloseButton:Show();
end
local subMenu = nil
local bossName = ""
for k in pairs(AtlasLoot_HewdropDown_SubTables) do
@@ -1458,7 +1461,28 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
AtlasLootDefaultFrame_SelectedTable:Hide()
end
--Anchor the item frame where it is supposed to be
AtlasLoot_SetItemInfoFrame(pFrame);
if ( pFrame ) then
--If a pFrame is specified, use it
if(pFrame==AtlasFrame and AtlasFrame) then
AtlasLootItemsFrame:ClearAllPoints();
AtlasLootItemsFrame:SetParent(AtlasFrame);
AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasFrame", "TOPLEFT", 18, -84);
else
AtlasLootItemsFrame:ClearAllPoints();
AtlasLootItemsFrame:SetParent(pFrame[2]);
AtlasLootItemsFrame:SetPoint(pFrame[1], pFrame[2], pFrame[3], pFrame[4], pFrame[5]);
end
elseif ( AtlasFrame ) then
--If no pFrame is specified and Atlas is installed, anchor in Atlas
AtlasLootItemsFrame:ClearAllPoints();
AtlasLootItemsFrame:SetParent(AtlasFrame);
AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasFrame", "TOPLEFT", 18, -84);
elseif ( AtlasLootDefaultFrame ) then
AtlasLootItemsFrame:ClearAllPoints();
AtlasLootItemsFrame:SetParent(AtlasLootDefaultFrame);
AtlasLootItemsFrame:SetPoint("TOPLEFT", "AtlasLootDefaultFrame", "TOPLEFT", 0, 0);
end
AtlasLootItemsFrame:Show();
AtlasLootItemsFrameContainer:Hide()
end
@@ -1470,14 +1494,14 @@ tabletype - Whether the tablename indexes an actual table or needs to generate a
Called when a button in AtlasLoot_Hewdrop is clicked
]]
function AtlasLoot_HewdropClick(tablename, text, tabletype)
AtlasLootCharDB.LastMenu = { tablename, text, tabletype }
-- AtlasLootCharDB.LastMenu = { tablename, text, tabletype }
--Definition of where I want the loot table to be shown
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" };
AtlasLoot_AnchorPoint = Anchor_Default
--If the button clicked was linked to a loot table
if tabletype == "Table" then
--Show the loot table
AtlasLoot_ShowBossLoot(tablename, text, pFrame);
AtlasLoot_ShowBossLoot(tablename, text, AtlasLoot_AnchorPoint);
--Save needed info for fuure re-display of the table
AtlasLootCharDB.LastBoss = tablename;
AtlasLootCharDB.LastBossText = text;
@@ -1490,7 +1514,7 @@ function AtlasLoot_HewdropClick(tablename, text, tabletype)
--Enable the submenu button
AtlasLootDefaultFrame_SubMenu:Enable();
--Show the first loot table associated with the submenu
AtlasLoot_ShowBossLoot(AtlasLoot_HewdropDown_SubTables[tablename][1][2], AtlasLoot_HewdropDown_SubTables[tablename][1][1], pFrame);
AtlasLoot_ShowBossLoot(AtlasLoot_HewdropDown_SubTables[tablename][1][2], AtlasLoot_HewdropDown_SubTables[tablename][1][1], AtlasLoot_AnchorPoint);
--Save needed info for fuure re-display of the table
AtlasLootCharDB.LastBoss = AtlasLoot_HewdropDown_SubTables[tablename][1][2];
AtlasLootCharDB.LastBossText = AtlasLoot_HewdropDown_SubTables[tablename][1][1];
@@ -1515,9 +1539,9 @@ Called when a button in AtlasLoot_HewdropSubMenu is clicked
]]
function AtlasLoot_HewdropSubMenuClick(tablename, text)
--Definition of where I want the loot table to be shown
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" };
AtlasLoot_AnchorPoint = Anchor_Default
--Show the select loot table
AtlasLoot_ShowBossLoot(tablename, text, pFrame);
AtlasLoot_ShowBossLoot(tablename, text, AtlasLoot_AnchorPoint);
--Save needed info for fuure re-display of the table
AtlasLootCharDB.LastBoss = tablename;
AtlasLootCharDB.LastBossText = text;
@@ -1717,19 +1741,19 @@ function AtlasLoot_OpenMenu(menuName)
AtlasLootCharDB.LastBoss = this.lootpage;
AtlasLootCharDB.LastBossText = menuName;
if menuName == AL["Crafting"] then
AtlasLoot_ShowItemsFrame("CRAFTINGMENU", "dummy", "dummy", pFrame)
AtlasLoot_ShowItemsFrame("CRAFTINGMENU", "dummy", "dummy", AtlasLoot_AnchorPoint)
elseif menuName == AL["PvP Rewards"] then
AtlasLoot_ShowItemsFrame("PVPMENU", "dummy", "dummy", pFrame)
AtlasLoot_ShowItemsFrame("PVPMENU", "dummy", "dummy", AtlasLoot_AnchorPoint)
elseif menuName == AL["World Events"] then
AtlasLoot_ShowItemsFrame("WORLDEVENTMENU", "dummy", "dummy", pFrame)
AtlasLoot_ShowItemsFrame("WORLDEVENTMENU", "dummy", "dummy", AtlasLoot_AnchorPoint)
elseif menuName == AL["Collections"] then
AtlasLoot_ShowItemsFrame("SETMENU", "dummy", "dummy", pFrame)
AtlasLoot_ShowItemsFrame("SETMENU", "dummy", "dummy", AtlasLoot_AnchorPoint)
elseif menuName == AL["Factions"] then
AtlasLoot_ShowItemsFrame("REPMENU", "dummy", "dummy", pFrame)
AtlasLoot_ShowItemsFrame("REPMENU", "dummy", "dummy", AtlasLoot_AnchorPoint)
elseif menuName == AL["World Bosses"] then
AtlasLoot_ShowItemsFrame("WORLDBOSSMENU", "dummy", "dummy", pFrame)
AtlasLoot_ShowItemsFrame("WORLDBOSSMENU", "dummy", "dummy", AtlasLoot_AnchorPoint)
elseif menuName == AL["Dungeons & Raids"] then
AtlasLoot_ShowItemsFrame("DUNGEONSMENU1", "dummy", "dummy", pFrame)
AtlasLoot_ShowItemsFrame("DUNGEONSMENU1", "dummy", "dummy", AtlasLoot_AnchorPoint)
end
CloseDropDownMenus()
end
@@ -1791,7 +1815,7 @@ function AtlasLootMenuItem_OnClick()
CloseDropDownMenus()
AtlasLootCharDB.LastBoss = this.lootpage;
AtlasLootCharDB.LastBossText = pagename;
AtlasLoot_ShowBossLoot(this.lootpage, pagename, AtlasLoot_AnchorFrame);
AtlasLoot_ShowBossLoot(this.lootpage, pagename, AtlasLoot_AnchorPoint);
AtlasLootDefaultFrame_SelectedCategory:SetText(pagename);
AtlasLootDefaultFrame_SelectedCategory:Show();
end
@@ -1821,7 +1845,7 @@ function AtlasLoot_NavButton_OnClick()
else
AtlasLootCharDB.LastBoss = this.lootpage;
AtlasLootCharDB.LastBossText = this.title;
AtlasLoot_ShowItemsFrame(this.lootpage, AtlasLootItemsFrame.refresh[2], this.title, pFrame);
AtlasLoot_ShowItemsFrame(this.lootpage, AtlasLootItemsFrame.refresh[2], this.title, AtlasLoot_AnchorPoint);
if AtlasLootDefaultFrame_SelectedTable:GetText()~=nil then
AtlasLootDefaultFrame_SelectedTable:SetText(AtlasLoot_BossName:GetText())
else
@@ -1829,10 +1853,10 @@ function AtlasLoot_NavButton_OnClick()
end
end
elseif AtlasLootItemsFrame.refresh and AtlasLootItemsFrame.refresh[2] then
AtlasLoot_ShowItemsFrame(this.lootpage, AtlasLootItemsFrame.refresh[2], this.title, pFrame);
AtlasLoot_ShowItemsFrame(this.lootpage, AtlasLootItemsFrame.refresh[2], this.title, AtlasLoot_AnchorPoint);
else
--Fallback for if the requested loot page is a menu and does not have a .refresh instance
AtlasLoot_ShowItemsFrame(this.lootpage, "dummy", this.title, pFrame);
AtlasLoot_ShowItemsFrame(this.lootpage, "dummy", this.title, AtlasLoot_AnchorPoint);
end
for k,v in pairs(AtlasLoot_MenuList) do
if this.lootpage == v then
@@ -1943,16 +1967,14 @@ AtlasLoot_RefreshQuickLookButtons()
Enables/disables the quicklook buttons depending on what is assigned
]]
function AtlasLoot_RefreshQuickLookButtons()
local i=1;
while i<5 do
if ((not AtlasLootCharDB["QuickLooks"][i]) or (not AtlasLootCharDB["QuickLooks"][i][1])) or (AtlasLootCharDB["QuickLooks"][i][1]==nil) then
for i = 1, 4 do
if (not AtlasLootCharDB["QuickLooks"][i]) or (not AtlasLootCharDB["QuickLooks"][i][1]) then
getglobal("AtlasLootPanel_Preset"..i):Disable();
getglobal("AtlasLootDefaultFrame_Preset"..i):Disable();
else
getglobal("AtlasLootPanel_Preset"..i):Enable();
getglobal("AtlasLootDefaultFrame_Preset"..i):Enable();
end
i=i+1;
end
end
@@ -1961,7 +1983,7 @@ AtlasLoot_ClearQuickLookButton()
Clears a quicklook button.
]]
function AtlasLoot_ClearQuickLookButton(button)
if not button or button == nil then return end
if not button then return end
AtlasLootCharDB["QuickLooks"][button] = nil
AtlasLoot_RefreshQuickLookButtons()
DEFAULT_CHAT_FRAME:AddMessage(BLUE..AL["AtlasLoot"]..": "..WHITE..AL["QuickLook"].." "..button.." "..AL["has been reset!"]);
@@ -1985,8 +2007,7 @@ function AtlasLoot_ShowBossLoot(dataID, boss, pFrame)
else
--Use the original WoW instance data by default
local dataSource = AtlasLoot_TableNames[dataID][2];
--Set anchor point, set selected table and call AtlasLoot_ShowItemsFrame
AtlasLoot_AnchorFrame = pFrame;
--Set selected table and call AtlasLoot_ShowItemsFrame
AtlasLootItemsFrame.externalBoss = dataID;
AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame);
end
@@ -3618,3 +3639,38 @@ function AtlasLoot_GetChatLink(id)
color = string.sub(color, 2)
return "|"..color.."|H"..itemLink.."|h["..itemName.."]|h|r"
end
function AtlasLoot_QuickLook_OnClick(id)
if IsAltKeyDown() then
AtlasLoot_ClearQuickLookButton(id)
return
end
if this:GetParent() == AtlasLootPanel then
if AtlasLootPanel:GetParent() == AtlasFrame then
AtlasLoot_AnchorPoint = Anchor_Atlas
elseif AtlasLootPanel:GetParent() == AlphaMapAlphaMapFrame then
AtlasLoot_AnchorPoint = Anchor_AlphaMap
end
else
AtlasLoot_AnchorPoint = Anchor_Default
end
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][id][1], AtlasLootCharDB["QuickLooks"][id][2], AtlasLootCharDB["QuickLooks"][id][3], AtlasLoot_AnchorPoint);
end
function AtlasLoot_QuickLook_OnShow(id)
this:SetText(AL["QuickLook"].." "..id)
this:SetFrameLevel(this:GetParent():GetFrameLevel() + 1)
if (not AtlasLootCharDB["QuickLooks"][id]) or (not AtlasLootCharDB["QuickLooks"][id][1]) then
this:Disable()
end
end
function AtlasLoot_QuickLook_OnEnter(id)
if this:IsEnabled() then
GameTooltip:ClearLines()
GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5)
GameTooltip:AddLine(WHITE..AtlasLootCharDB["QuickLooks"][id][3].."|r")
GameTooltip:AddLine(AL["ALT+Click to clear"])
GameTooltip:Show()
end
end
+79 -294
View File
@@ -242,38 +242,16 @@
</Anchors>
<Scripts>
<OnEnter>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
if this:IsEnabled() then
GameTooltip:ClearLines();
GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5);
GameTooltip:AddLine("|cffFFFFFF"..AtlasLootCharDB["QuickLooks"][1][3].."|r");
GameTooltip:AddLine(AL["ALT+Click to clear"]);
GameTooltip:Show();
end
AtlasLoot_QuickLook_OnEnter(1)
</OnEnter>
<OnLeave>
if(GameTooltip:IsVisible()) then
GameTooltip:Hide();
end
GameTooltip:Hide()
</OnLeave>
<OnMouseUp>
if IsAltKeyDown() then
AtlasLoot_ClearQuickLookButton(1);
end
</OnMouseUp>
<OnClick>
if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][1][1]) then
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" };
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][1][1], AtlasLootCharDB["QuickLooks"][1][2], AtlasLootCharDB["QuickLooks"][1][3], pFrame);
end
AtlasLoot_QuickLook_OnClick(1)
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
this:SetText(AL["QuickLook"].." 1");
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
if ((not AtlasLootCharDB["QuickLooks"][1]) or (not AtlasLootCharDB["QuickLooks"][1][1])) or (AtlasLootCharDB["QuickLooks"][1][1]==nil) then
this:Disable();
end
AtlasLoot_QuickLook_OnShow(1)
</OnShow>
</Scripts>
</Button>
@@ -287,38 +265,16 @@
</Anchors>
<Scripts>
<OnEnter>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
if this:IsEnabled() then
GameTooltip:ClearLines();
GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5);
GameTooltip:AddLine("|cffFFFFFF"..AtlasLootCharDB["QuickLooks"][2][3].."|r");
GameTooltip:AddLine(AL["ALT+Click to clear"]);
GameTooltip:Show();
end
AtlasLoot_QuickLook_OnEnter(2)
</OnEnter>
<OnLeave>
if(GameTooltip:IsVisible()) then
GameTooltip:Hide();
end
GameTooltip:Hide()
</OnLeave>
<OnMouseUp>
if IsAltKeyDown() then
AtlasLoot_ClearQuickLookButton(2);
end
</OnMouseUp>
<OnClick>
if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][2][1]) then
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" };
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][2][1], AtlasLootCharDB["QuickLooks"][2][2], AtlasLootCharDB["QuickLooks"][2][3], pFrame);
end
AtlasLoot_QuickLook_OnClick(2)
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
this:SetText(AL["QuickLook"].." 2");
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
if ((not AtlasLootCharDB["QuickLooks"][2]) or (not AtlasLootCharDB["QuickLooks"][2][1])) or (AtlasLootCharDB["QuickLooks"][2][1]==nil) then
this:Disable();
end
AtlasLoot_QuickLook_OnShow(2)
</OnShow>
</Scripts>
</Button>
@@ -332,38 +288,16 @@
</Anchors>
<Scripts>
<OnEnter>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
if this:IsEnabled() then
GameTooltip:ClearLines();
GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5);
GameTooltip:AddLine("|cffFFFFFF"..AtlasLootCharDB["QuickLooks"][3][3].."|r");
GameTooltip:AddLine(AL["ALT+Click to clear"]);
GameTooltip:Show();
end
AtlasLoot_QuickLook_OnEnter(3)
</OnEnter>
<OnLeave>
if(GameTooltip:IsVisible()) then
GameTooltip:Hide();
end
GameTooltip:Hide()
</OnLeave>
<OnMouseUp>
if IsAltKeyDown() then
AtlasLoot_ClearQuickLookButton(3);
end
</OnMouseUp>
<OnClick>
if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][3][1]) then
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" };
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][3][1], AtlasLootCharDB["QuickLooks"][3][2], AtlasLootCharDB["QuickLooks"][3][3], pFrame);
end
AtlasLoot_QuickLook_OnClick(3)
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
this:SetText(AL["QuickLook"].." 3");
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
if ((not AtlasLootCharDB["QuickLooks"][3]) or (not AtlasLootCharDB["QuickLooks"][3][1])) or (AtlasLootCharDB["QuickLooks"][3][1]==nil) then
this:Disable();
end
AtlasLoot_QuickLook_OnShow(3)
</OnShow>
</Scripts>
</Button>
@@ -377,39 +311,16 @@
</Anchors>
<Scripts>
<OnEnter>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
if this:IsEnabled() then
GameTooltip:ClearLines();
GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5);
GameTooltip:AddLine("|cffFFFFFF"..AtlasLootCharDB["QuickLooks"][4][3].."|r");
GameTooltip:AddLine(AL["ALT+Click to clear"]);
GameTooltip:Show();
end
AtlasLoot_QuickLook_OnEnter(4)
</OnEnter>
<OnLeave>
if(GameTooltip:IsVisible()) then
GameTooltip:Hide();
end
GameTooltip:Hide()
</OnLeave>
<OnMouseUp>
if IsAltKeyDown() then
AtlasLoot_ClearQuickLookButton(4);
end
</OnMouseUp>
<OnClick>
if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][4][1]) then
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" };
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][4][1], AtlasLootCharDB["QuickLooks"][4][2], AtlasLootCharDB["QuickLooks"][4][3], pFrame);
end
AtlasLoot_QuickLook_OnClick(4)
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
this:SetText(AL["QuickLook"].." 4");
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
if ((not AtlasLootCharDB["QuickLooks"][4]) or (not AtlasLootCharDB["QuickLooks"][4][1])) or (AtlasLootCharDB["QuickLooks"][4][1]==nil) then
this:Disable();
end
AtlasLoot_QuickLook_OnShow(4)
</OnShow>
</Scripts>
</Button>
@@ -545,11 +456,6 @@
<Scripts>
<OnClick>
AtlasLoot_ShowWishList();
CloseDropDownMenus();
AtlasLootDefaultFrame_SubMenu:Disable()
AtlasLootDefaultFrame_SelectedTable:Hide()
AtlasLootQuickLooksButton:Hide()
AtlasLoot_QuickLooks:Hide()
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
@@ -1867,7 +1773,7 @@
<Frame name="AtlasLootPanel" parent="UIParent" hidden="true" enableMouse="true">
<Size>
<AbsDimension x="745" y="110"/>
<AbsDimension x="630" y="105"/>
</Size>
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<BackgroundInsets>
@@ -1889,7 +1795,7 @@
<Anchors>
<Anchor point="BOTTOM" relativeTo="$parent" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-35"/>
<AbsDimension x="0" y="-32"/>
</Offset>
</Anchor>
</Anchors>
@@ -1898,7 +1804,7 @@
<Anchors>
<Anchor point="BOTTOM" relativeTo="$parent_Title" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="34"/>
<AbsDimension x="0" y="35"/>
</Offset>
</Anchor>
</Anchors>
@@ -1918,7 +1824,7 @@
<OnClick>
AtlasLoot_QuickLooks:Hide();
AtlasLootQuickLooksButton:Hide();
AtlasLootWorldEventMenu();
AtlasLoot_ShowItemsFrame("WORLDEVENTMENU", "dummy", "dummy", AtlasLoot_AnchorPoint)
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
@@ -1939,7 +1845,7 @@
<OnClick>
AtlasLoot_QuickLooks:Hide();
AtlasLootQuickLooksButton:Hide();
AtlasLootSetMenu();
AtlasLoot_ShowItemsFrame("SETMENU", "dummy", "dummy", AtlasLoot_AnchorPoint)
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
@@ -1960,7 +1866,7 @@
<OnClick>
AtlasLoot_QuickLooks:Hide();
AtlasLootQuickLooksButton:Hide();
AtlasLootRepMenu();
AtlasLoot_ShowItemsFrame("REPMENU", "dummy", "dummy", AtlasLoot_AnchorPoint)
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
@@ -1981,7 +1887,7 @@
<OnClick>
AtlasLoot_QuickLooks:Hide();
AtlasLootQuickLooksButton:Hide();
AtlasLootPvPMenu();
AtlasLoot_ShowItemsFrame("PVPMENU", "dummy", "dummy", AtlasLoot_AnchorPoint)
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
@@ -2002,7 +1908,7 @@
<OnClick>
AtlasLoot_QuickLooks:Hide();
AtlasLootQuickLooksButton:Hide();
AtlasLoot_CraftingMenu();
AtlasLoot_ShowItemsFrame("CRAFTINGMENU", "dummy", "dummy", AtlasLoot_AnchorPoint)
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
@@ -2011,18 +1917,35 @@
</OnShow>
</Scripts>
</Button>
<Button name="$parent_WishList" inherits="AtlasLootPanelButtonTemplate">
<Button name="$parent_Options" inherits="AtlasLootPanelButtonTemplate">
<Anchors>
<Anchor point="LEFT" relativeTo="$parent_Crafting" relativePoint="RIGHT">
<Anchor point="TOP" relativeTo="$parent_WorldEvents" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="0"/>
<AbsDimension x="0" y="-2"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
AtlasLootOptions_Toggle();
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
this:SetText(AL["Options"]);
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
</OnShow>
</Scripts>
</Button>
<Button name="$parent_WishList" inherits="AtlasLootPanelButtonTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="$parent_Options" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-2"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
AtlasLoot_QuickLooks:Hide();
AtlasLootQuickLooksButton:Hide();
AtlasLoot_ShowWishList();
</OnClick>
<OnShow>
@@ -2045,26 +1968,30 @@
</OnLeave>
</Scripts>
</Button>
<Button name="$parent_Options" inherits="AtlasLootPanelButtonTemplate">
<Button name="$parent_Preset1" inherits="AtlasLootPanelButtonTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="$parent_WorldEvents" relativePoint="BOTTOM">
<Anchor point="TOP" relativeTo="$parent_Sets" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-2"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnEnter>
AtlasLoot_QuickLook_OnEnter(1)
</OnEnter>
<OnLeave>
GameTooltip:Hide()
</OnLeave>
<OnClick>
AtlasLootOptions_Toggle();
AtlasLoot_QuickLook_OnClick(1)
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
this:SetText(AL["Options"]);
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
AtlasLoot_QuickLook_OnShow(1)
</OnShow>
</Scripts>
</Button>
<Button name="$parent_Preset1" inherits="AtlasLootPanelButtonTemplate">
<Button name="$parent_Preset2" inherits="AtlasLootPanelButtonTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="$parent_Reputation" relativePoint="BOTTOM">
<Offset>
@@ -2074,48 +2001,20 @@
</Anchors>
<Scripts>
<OnEnter>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
if this:IsEnabled() then
GameTooltip:ClearLines();
GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5);
GameTooltip:AddLine("|cffFFFFFF"..AtlasLootCharDB["QuickLooks"][1][3].."|r");
GameTooltip:AddLine(AL["ALT+Click to clear"]);
GameTooltip:Show();
end
AtlasLoot_QuickLook_OnEnter(2)
</OnEnter>
<OnLeave>
if(GameTooltip:IsVisible()) then
GameTooltip:Hide();
end
GameTooltip:Hide()
</OnLeave>
<OnMouseUp>
if IsAltKeyDown() then
AtlasLoot_ClearQuickLookButton(1);
end
</OnMouseUp>
<OnClick>
if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][1][1]) then
if AtlasLootPanel:GetParent() == AtlasFrame then
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][1][1], AtlasLootCharDB["QuickLooks"][1][2], AtlasLootCharDB["QuickLooks"][1][3], nil);
elseif AtlasLootPanel:GetParent() == AlphaMapAlphaMapFrame then
pFrame = { "TOPLEFT", AlphaMapAlphaMapFrame, "TOPLEFT", 0, 0 };
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][1][1], AtlasLootCharDB["QuickLooks"][1][2], AtlasLootCharDB["QuickLooks"][1][3], pFrame);
else
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][1][1], AtlasLootCharDB["QuickLooks"][1][2], AtlasLootCharDB["QuickLooks"][1][3], AtlasLootCharDB["QuickLooks"][1][4]);
end
end
AtlasLoot_QuickLook_OnClick(2)
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
this:SetText(AL["QuickLook"].." 1");
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
if ((not AtlasLootCharDB["QuickLooks"][1]) or (not AtlasLootCharDB["QuickLooks"][1][1])) or (AtlasLootCharDB["QuickLooks"][1][1]==nil) then
this:Disable();
end
AtlasLoot_QuickLook_OnShow(2)
</OnShow>
</Scripts>
</Button>
<Button name="$parent_Preset2" inherits="AtlasLootPanelButtonTemplate">
<Button name="$parent_Preset3" inherits="AtlasLootPanelButtonTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="$parent_PvP" relativePoint="BOTTOM">
<Offset>
@@ -2125,48 +2024,20 @@
</Anchors>
<Scripts>
<OnEnter>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
if this:IsEnabled() then
GameTooltip:ClearLines();
GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5);
GameTooltip:AddLine("|cffFFFFFF"..AtlasLootCharDB["QuickLooks"][2][3].."|r");
GameTooltip:AddLine(AL["ALT+Click to clear"]);
GameTooltip:Show();
end
AtlasLoot_QuickLook_OnEnter(3)
</OnEnter>
<OnLeave>
if(GameTooltip:IsVisible()) then
GameTooltip:Hide();
end
GameTooltip:Hide()
</OnLeave>
<OnMouseUp>
if IsAltKeyDown() then
AtlasLoot_ClearQuickLookButton(2);
end
</OnMouseUp>
<OnClick>
if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][2][1]) then
if AtlasLootPanel:GetParent() == AtlasFrame then
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][2][1], AtlasLootCharDB["QuickLooks"][2][2], AtlasLootCharDB["QuickLooks"][2][3], nil);
elseif AtlasLootPanel:GetParent() == AlphaMapAlphaMapFrame then
pFrame = { "TOPLEFT", AlphaMapAlphaMapFrame, "TOPLEFT", 0, 0 };
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][2][1], AtlasLootCharDB["QuickLooks"][2][2], AtlasLootCharDB["QuickLooks"][2][3], pFrame);
else
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][2][1], AtlasLootCharDB["QuickLooks"][2][2], AtlasLootCharDB["QuickLooks"][2][3], AtlasLootCharDB["QuickLooks"][2][4]);
end
end
AtlasLoot_QuickLook_OnClick(3)
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
this:SetText(AL["QuickLook"].." 2");
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
if ((not AtlasLootCharDB["QuickLooks"][2]) or (not AtlasLootCharDB["QuickLooks"][2][1])) or (AtlasLootCharDB["QuickLooks"][2][1]==nil) then
this:Disable();
end
AtlasLoot_QuickLook_OnShow(3)
</OnShow>
</Scripts>
</Button>
<Button name="$parent_Preset3" inherits="AtlasLootPanelButtonTemplate">
<Button name="$parent_Preset4" inherits="AtlasLootPanelButtonTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="$parent_Crafting" relativePoint="BOTTOM">
<Offset>
@@ -2176,120 +2047,34 @@
</Anchors>
<Scripts>
<OnEnter>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
if this:IsEnabled() then
GameTooltip:ClearLines();
GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5);
GameTooltip:AddLine("|cffFFFFFF"..AtlasLootCharDB["QuickLooks"][3][3].."|r");
GameTooltip:AddLine(AL["ALT+Click to clear"]);
GameTooltip:Show();
end
AtlasLoot_QuickLook_OnEnter(4)
</OnEnter>
<OnLeave>
if(GameTooltip:IsVisible()) then
GameTooltip:Hide();
end
GameTooltip:Hide()
</OnLeave>
<OnMouseUp>
if IsAltKeyDown() then
AtlasLoot_ClearQuickLookButton(3);
end
</OnMouseUp>
<OnClick>
if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][3][1]) then
if AtlasLootPanel:GetParent() == AtlasFrame then
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][3][1], AtlasLootCharDB["QuickLooks"][3][2], AtlasLootCharDB["QuickLooks"][3][3], nil);
elseif AtlasLootPanel:GetParent() == AlphaMapAlphaMapFrame then
pFrame = { "TOPLEFT", AlphaMapAlphaMapFrame, "TOPLEFT", 0, 0 };
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][3][1], AtlasLootCharDB["QuickLooks"][3][2], AtlasLootCharDB["QuickLooks"][3][3], pFrame);
else
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][3][1], AtlasLootCharDB["QuickLooks"][3][2], AtlasLootCharDB["QuickLooks"][3][3], AtlasLootCharDB["QuickLooks"][3][4]);
end
end
AtlasLoot_QuickLook_OnClick(4)
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
this:SetText(AL["QuickLook"].." 3");
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
if ((not AtlasLootCharDB["QuickLooks"][3]) or (not AtlasLootCharDB["QuickLooks"][3][1])) or (AtlasLootCharDB["QuickLooks"][3][1]==nil) then
this:Disable();
end
AtlasLoot_QuickLook_OnShow(4)
</OnShow>
</Scripts>
</Button>
<Button name="$parent_Preset4" inherits="AtlasLootPanelButtonTemplate">
<EditBox name="AtlasLootSearchBox" inherits="InputBoxTemplate" letters="100" toplevel="true" autoFocus="false">
<Size x="200" y="35"/>
<TextInsets left="0" right="8" top="0" bottom="0"/>
<Anchors>
<Anchor point="TOP" relativeTo="$parent_WishList" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="-2"/>
</Offset>
<Anchor point="LEFT" relativeTo="$parent_WishList" relativePoint="RIGHT">
<Offset x="8" y="0"/>
</Anchor>
</Anchors>
<Scripts>
<OnEnter>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
if this:IsEnabled() then
GameTooltip:ClearLines();
GameTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 5);
GameTooltip:AddLine("|cffFFFFFF"..AtlasLootCharDB["QuickLooks"][4][3].."|r");
GameTooltip:AddLine(AL["ALT+Click to clear"]);
GameTooltip:Show();
end
</OnEnter>
<OnLeave>
if(GameTooltip:IsVisible()) then
GameTooltip:Hide();
end
</OnLeave>
<OnMouseUp>
if IsAltKeyDown() then
AtlasLoot_ClearQuickLookButton(4);
end
</OnMouseUp>
<OnClick>
if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][4][1]) then
if AtlasLootPanel:GetParent() == AtlasFrame then
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][4][1], AtlasLootCharDB["QuickLooks"][4][2], AtlasLootCharDB["QuickLooks"][4][3], nil);
elseif AtlasLootPanel:GetParent() == AlphaMapAlphaMapFrame then
pFrame = { "TOPLEFT", AlphaMapAlphaMapFrame, "TOPLEFT", 0, 0 };
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][4][1], AtlasLootCharDB["QuickLooks"][4][2], AtlasLootCharDB["QuickLooks"][4][3], pFrame);
else
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][4][1], AtlasLootCharDB["QuickLooks"][4][2], AtlasLootCharDB["QuickLooks"][4][3], AtlasLootCharDB["QuickLooks"][4][4]);
end
end
</OnClick>
<OnShow>
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
this:SetText(AL["QuickLook"].." 4");
this:SetFrameLevel( (this:GetParent()):GetFrameLevel() + 1 );
if ((not AtlasLootCharDB["QuickLooks"][4]) or (not AtlasLootCharDB["QuickLooks"][4][1])) or (AtlasLootCharDB["QuickLooks"][4][1]==nil) then
this:Disable();
end
</OnShow>
</Scripts>
</Button>
<EditBox name="AtlasLootSearchBox" inherits="InputBoxTemplate" letters="100" toplevel="true">
<Size>
<AbsDimension x="240" y="35"></AbsDimension>
</Size>
<Anchors>
<Anchor point="BOTTOM" relativeTo="$parent" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="-123" y="20"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
this:SetAutoFocus(false);
this:SetTextInsets(0, 8, 0, 0);
</OnLoad>
<OnEnterPressed>
AtlasLoot:Search(this:GetText());
this:ClearFocus();
AtlasLoot:Search(this:GetText())
this:ClearFocus()
</OnEnterPressed>
</Scripts>
<FontString name="AtlasLootSearchString" inherits="GameFontNormal"></FontString>
<FontString inherits="GameFontNormal"/>
</EditBox>
<Button name="AtlasLootSearchButton" inherits="UIPanelButtonTemplate2" parent="AtlasLootSearchBox">
<Size>
+1 -1
View File
@@ -3,7 +3,7 @@ local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
function AtlasLootRepMenu()
AtlasLoot_PrepMenu(nil, AL["Factions"])
AtlasLootCharDB.LastBoss = "REPMENU"
AtlasLootCharDB.LastBossText = "Factions"
AtlasLootCharDB.LastBossText = AL["Factions"]
--Argent Dawn
AtlasLootMenuItem_1_Name:SetText(AL["Argent Dawn"]);
AtlasLootMenuItem_1_Extra:SetText("");
+64 -62
View File
@@ -11,7 +11,7 @@ local currentPage = 1;
local SearchResult = nil;
function AtlasLoot:ShowSearchResult()
AtlasLoot_ShowItemsFrame("SearchResult", "SearchResultPage"..currentPage, string.format((AL["Search Result: %s"]), AtlasLootCharDB.LastSearchedText or ""), pFrame);
AtlasLoot_ShowItemsFrame("SearchResult", "SearchResultPage"..currentPage, string.format((AL["Search Result: %s"]), AtlasLootCharDB.LastSearchedText or ""), AtlasLoot_AnchorPoint);
end
local function strtrim(s)
@@ -27,66 +27,68 @@ function AtlasLoot:Search(Text)
if dataSource == "AtlasLootFallback" then return end
local partial = AtlasLootCharDB.PartialMatching;
for dataID, data in pairs(AtlasLoot_Data[dataSource]) do
for _, v in ipairs(data) do
if type(v[1]) ~= "table" then
-- item
if type(v[1]) == "number" and v[1] > 0 then
local itemName = GetItemInfo(v[1]);
if not itemName then itemName = gsub(v[3], "=q%d=", "") end
local found;
if partial then
found = string.find(string.lower(itemName), text);
else
found = string.lower(itemName) == text;
end
if found then
local _, _, quality = string.find(v[3], "=q(%d)=");
if quality then itemName = "=q"..quality.."="..itemName end
table.insert(AtlasLootCharDB["SearchResult"], { v[1], v[2], itemName, v[4], dataID.."|"..dataSource });
end
-- spell
elseif (v[1] ~= nil) and (v[1] ~= "") and (string.sub(v[1], 1, 1) == "s") then
local spellName
if not spellName then
if (string.sub(v[3], 1, 2) == "=d") then
spellName = gsub(v[3], "=ds=", "");
else
spellName = gsub(v[3], "=q%d=", "");
end
end
local found;
if partial then
found = string.find(string.lower(spellName), text);
else
found = string.lower(spellName) == text;
end
if found then
spellName = string.sub(v[3], 1, 4)..spellName;
table.insert(AtlasLootCharDB["SearchResult"], { v[1], v[2], spellName, v[4], dataID.."|"..dataSource });
end
-- enchant
elseif (v[1] ~= nil) and (v[1] ~= "") and (string.sub(v[1], 1, 1) == "e") then
local spellName
if not spellName then
if (string.sub(v[3], 1, 2) == "=d") then
spellName = gsub(v[3], "=ds=", "");
else
spellName = gsub(v[3], "=q%d=", "");
end
end
local found;
if partial then
found = string.find(string.lower(spellName), text);
else
found = string.lower(spellName) == text;
end
if found then
spellName = string.sub(v[3], 1, 4)..spellName;
table.insert(AtlasLootCharDB["SearchResult"], { v[1], v[2], spellName, v[4], dataID.."|"..dataSource });
end
end
end
end
if type(data) == "table" then
for _, v in ipairs(data) do
if type(v[1]) ~= "table" then
-- item
if type(v[1]) == "number" and v[1] > 0 then
local itemName = GetItemInfo(v[1]);
if not itemName then itemName = gsub(v[3], "=q%d=", "") end
local found;
if partial then
found = string.find(string.lower(itemName), text);
else
found = string.lower(itemName) == text;
end
if found then
local _, _, quality = string.find(v[3], "=q(%d)=");
if quality then itemName = "=q"..quality.."="..itemName end
table.insert(AtlasLootCharDB["SearchResult"], { v[1], v[2], itemName, v[4], dataID.."|"..dataSource });
end
-- spell
elseif (v[1] ~= nil) and (v[1] ~= "") and (string.sub(v[1], 1, 1) == "s") then
local spellName
if not spellName then
if (string.sub(v[3], 1, 2) == "=d") then
spellName = gsub(v[3], "=ds=", "");
else
spellName = gsub(v[3], "=q%d=", "");
end
end
local found;
if partial then
found = string.find(string.lower(spellName), text);
else
found = string.lower(spellName) == text;
end
if found then
spellName = string.sub(v[3], 1, 4)..spellName;
table.insert(AtlasLootCharDB["SearchResult"], { v[1], v[2], spellName, v[4], dataID.."|"..dataSource });
end
-- enchant
elseif (v[1] ~= nil) and (v[1] ~= "") and (string.sub(v[1], 1, 1) == "e") then
local spellName
if not spellName then
if (string.sub(v[3], 1, 2) == "=d") then
spellName = gsub(v[3], "=ds=", "");
else
spellName = gsub(v[3], "=q%d=", "");
end
end
local found;
if partial then
found = string.find(string.lower(spellName), text);
else
found = string.lower(spellName) == text;
end
if found then
spellName = string.sub(v[3], 1, 4)..spellName;
table.insert(AtlasLootCharDB["SearchResult"], { v[1], v[2], spellName, v[4], dataID.."|"..dataSource });
end
end
end
end
end
end
end
@@ -99,7 +101,7 @@ function AtlasLoot:Search(Text)
else
currentPage = 1;
SearchResult = AtlasLoot_CategorizeWishList(AtlasLootCharDB["SearchResult"]);
AtlasLoot_ShowItemsFrame("SearchResult", "SearchResultPage1", string.format((AL["Search Result: %s"]), AtlasLootCharDB.LastSearchedText or ""), pFrame);
AtlasLoot_ShowItemsFrame("SearchResult", "SearchResultPage1", string.format((AL["Search Result: %s"]), AtlasLootCharDB.LastSearchedText or ""), AtlasLoot_AnchorPoint);
end
end
+2 -2
View File
@@ -46,13 +46,13 @@ function AtlasLoot_PrepMenu(backPage, title)
getglobal("AtlasLootMenuItem_" .. i .. "_Extra"):Show();
end
AtlasLoot_BossName:SetText("|cffFFFFFF" .. title);
AtlasLoot_SetItemInfoFrame(AtlasLoot_AnchorFrame);
-- AtlasLoot_SetItemInfoFrame(AtlasLoot_AnchorPoint);
end
function AtlasLootSetMenu()
AtlasLoot_PrepMenu(nil, AL["Collections"])
AtlasLootCharDB.LastBoss = "SETMENU"
AtlasLootCharDB.LastBossText = "Collections"
AtlasLootCharDB.LastBossText = AL["Collections"]
--ZG
AtlasLootMenuItem_3_Name:SetText(AL["Zul'Gurub Sets"]);
AtlasLootMenuItem_3_Extra:SetText("");
+11 -11
View File
@@ -555,16 +555,16 @@ function AtlasLoot_FixText(text)
text = gsub(text, "#pvps2#", AL["Rare Set"]);
--Text colouring
text = gsub(text, "=q0=", "|cff9d9d9d");
text = gsub(text, "=q1=", "|cffFFFFFF");
text = gsub(text, "=q2=", "|cff1eff00");
text = gsub(text, "=q3=", "|cff0070dd");
text = gsub(text, "=q4=", "|cffa335ee");
text = gsub(text, "=q5=", "|cffFF8000");
text = gsub(text, "=q6=", "|cffFF0000");
text = gsub(text, "=q7=", "|cff03c0f6"); -- "dropped by" colour
text = gsub(text, "=q8=", "|cff2773ff"); -- alliance colour, alliance rank colour
text = gsub(text, "=q9=", "|cffffffff"); -- priest colour
text = gsub(text, "=q0=", "|cff9d9d9d"); -- poor
text = gsub(text, "=q1=", "|cffFFFFFF"); -- common
text = gsub(text, "=q2=", "|cff1eff00"); -- uncommon
text = gsub(text, "=q3=", "|cff0070dd"); -- rare
text = gsub(text, "=q4=", "|cffa335ee"); -- epic
text = gsub(text, "=q5=", "|cffFF8000"); -- legendary
text = gsub(text, "=q6=", "|cffFF0000"); -- red
text = gsub(text, "=q7=", "|cff03c0f6"); -- "dropped by" colour
text = gsub(text, "=q8=", "|cff2773ff"); -- alliance colour, alliance rank colour
text = gsub(text, "=q9=", "|cffffffff"); -- priest colour
text = gsub(text, "=q10=", "|cff68ccef"); -- mage colour
text = gsub(text, "=q11=", "|cff9382c9"); -- warlock colour
text = gsub(text, "=q12=", "|cfffff468"); -- rogue colour
@@ -576,7 +576,7 @@ function AtlasLoot_FixText(text)
text = gsub(text, "=q18=", "|cffff3100"); -- horde rank colour
text = gsub(text, "=q19=", "|cffe6cc80"); -- horde rank colour
text = gsub(text, "=ec1=", "|cffFF8400");
text = gsub(text, "=ds=", "|cffFFd200");
text = gsub(text, "=ds=", "|cffFFd200"); -- default gold color
--Dropped by names
text = gsub(text, "#db1#", AL["Patchwerk"]);
+20 -20
View File
@@ -102,7 +102,7 @@ local function ExtendTooltip(tooltip)
if not AtlasLootCharDB.ShowSource then
return
end
local tooltipName = tooltip:GetName()
-- local tooltipName = tooltip:GetName()
local itemID = tonumber(tooltip.itemID)
if itemID and itemID ~= 51217 then -- 51217 Fashion Coin
if itemID ~= lastItemID then
@@ -302,10 +302,10 @@ AtlasLootTip:SetScript("OnShow", function()
if GetMouseFocus():GetParent().row then
if GetMouseFocus():GetParent().row.record.item_id then
GameTooltip.itemID = GetMouseFocus():GetParent().row.record.item_id
ExtendTooltip(GameTooltip)
end
end
end
ExtendTooltip(GameTooltip)
end
end)
@@ -2661,8 +2661,8 @@ AtlasLoot_Data["AtlasLootSources"] = {
[17623] = AL["PvP"].." "..AL["Rank"].." 13",
[17624] = AL["PvP"].." "..AL["Rank"].." 13",
[17625] = AL["PvP"].." "..AL["Rank"].." 12",
[17690] = AL["Frostwolf Clan"]..AL["Neutral"],
[17691] = AL["Stormpike Guard"]..AL["Neutral"],
[17690] = AL["Frostwolf Clan"].." - "..AL["Neutral"],
[17691] = AL["Stormpike Guard"].." - "..AL["Neutral"],
[17704] = AL["Blacksmithing"].." ("..AL["Skill:"].." 190+)",
[17706] = AL["Feast of Winter Veil"],
[17707] = AL["Maraudon"].." - "..AL["Princess Theradras"].." (14%)",
@@ -2716,16 +2716,16 @@ AtlasLoot_Data["AtlasLootSources"] = {
[17771] = AL["Smelting"].." ("..AL["Skill:"].." 300)",
[17780] = AL["Maraudon"].." - "..AL["Princess Theradras"].." (1%)",
[17782] = AL["Molten Core"].." - "..AL["Garr"].." (5%)",
[17900] = AL["Stormpike Guard"]..AL["Friendly"],
[17901] = AL["Stormpike Guard"]..AL["Honored"],
[17902] = AL["Stormpike Guard"]..AL["Revered"],
[17903] = AL["Stormpike Guard"]..AL["Exalted"],
[17904] = AL["Stormpike Guard"]..AL["Exalted"],
[17905] = AL["Frostwolf Clan"]..AL["Friendly"],
[17906] = AL["Frostwolf Clan"]..AL["Honored"],
[17907] = AL["Frostwolf Clan"]..AL["Revered"],
[17908] = AL["Frostwolf Clan"]..AL["Exalted"],
[17909] = AL["Frostwolf Clan"]..AL["Exalted"],
[17900] = AL["Stormpike Guard"].." - "..AL["Friendly"],
[17901] = AL["Stormpike Guard"].." - "..AL["Honored"],
[17902] = AL["Stormpike Guard"].." - "..AL["Revered"],
[17903] = AL["Stormpike Guard"].." - "..AL["Exalted"],
[17904] = AL["Stormpike Guard"].." - "..AL["Exalted"],
[17905] = AL["Frostwolf Clan"].." - "..AL["Friendly"],
[17906] = AL["Frostwolf Clan"].." - "..AL["Honored"],
[17907] = AL["Frostwolf Clan"].." - "..AL["Revered"],
[17908] = AL["Frostwolf Clan"].." - "..AL["Exalted"],
[17909] = AL["Frostwolf Clan"].." - "..AL["Exalted"],
[17943] = AL["Maraudon"].." - "..AL["Landslide"].." (25%)",
[17962] = AL["Tanaris"].." - "..AL["Ostarius"].." (100%)",
[17966] = AL["Onyxia's Lair"].." - "..AL["Onyxia"].." (100%)",
@@ -2740,12 +2740,12 @@ AtlasLoot_Data["AtlasLootSources"] = {
[18103] = AL["Upper Blackrock Spire"].." - "..AL["Warchief Rend Blackhand"].." (23%)",
[18104] = AL["Upper Blackrock Spire"].." - "..AL["Warchief Rend Blackhand"].." (17%)",
[18168] = AL["Engineering"].." ("..AL["Skill:"].." 300)",
[18169] = AL["Argent Dawn"]..AL["Revered"],
[18170] = AL["Argent Dawn"]..AL["Revered"],
[18171] = AL["Argent Dawn"]..AL["Revered"],
[18172] = AL["Argent Dawn"]..AL["Revered"],
[18173] = AL["Argent Dawn"]..AL["Revered"],
[18182] = AL["Argent Dawn"]..AL["Revered"],
[18169] = AL["Argent Dawn"].." - "..AL["Revered"],
[18170] = AL["Argent Dawn"].." - "..AL["Revered"],
[18171] = AL["Argent Dawn"].." - "..AL["Revered"],
[18172] = AL["Argent Dawn"].." - "..AL["Revered"],
[18173] = AL["Argent Dawn"].." - "..AL["Revered"],
[18182] = AL["Argent Dawn"].." - "..AL["Revered"],
[18202] = AL["Azshara"].." - "..AL["Azuregos"].." (10%)",
[18203] = AL["Molten Core"].." - "..AL["Magmadar"].." (20%)",
[18204] = AL["Blasted Lands"].." - "..AL["Lord Kazzak"].." (20%)",
+7 -2
View File
@@ -19,7 +19,12 @@ AtlasLoot_ShowWishList()
Displays the WishList
]]
function AtlasLoot_ShowWishList()
AtlasLoot_ShowItemsFrame("WishList", "WishListPage"..currentPage, AL["WishList"], pFrame);
AtlasLoot_ShowItemsFrame("WishList", "WishListPage"..currentPage, AL["WishList"], AtlasLoot_AnchorPoint);
CloseDropDownMenus();
AtlasLootDefaultFrame_SubMenu:Disable()
AtlasLootDefaultFrame_SelectedTable:Hide()
AtlasLootQuickLooksButton:Hide()
AtlasLoot_QuickLooks:Hide()
end
--[[
@@ -53,7 +58,7 @@ function AtlasLoot_DeleteFromWishList(itemID)
end
AtlasLoot_WishList = AtlasLoot_CategorizeWishList(AtlasLootCharDB["WishList"]);
AtlasLootItemsFrame:Hide();
AtlasLoot_ShowItemsFrame("WishList", "WishListPage"..currentPage, AL["WishList"], pFrame);
AtlasLoot_ShowItemsFrame("WishList", "WishListPage"..currentPage, AL["WishList"], AtlasLoot_AnchorPoint);
end
--[[