* db link

You can now alt right click items to open them to there ascensionDB page in your browser.

* updates

-updated Hyjal Summit loot tables
-added new right click context menu to items
-added crafting source to crafting tooltips
-crafting recipes now get a green highlight if current char knows that recipe or a blue one if you have an alt with the recipe
-crafting tooltips now show what chars you have that know that recipe

* Update burningcrusade.lua
This commit is contained in:
Anch
2023-08-29 10:41:29 +12:00
committed by GitHub
parent 23924acbeb
commit 31fc1ffe06
45 changed files with 27614 additions and 17254 deletions
@@ -5,22 +5,18 @@ AtlasLoot:DewDropSubMenuClick(tablename)
AtlasLoot:DewdropExpansionMenuClick(tablename, text)
AtlasLoot_DefaultFrame_OnShow()
AtlasLootDefaultFrame_OnHide()
AtlasLoot:DewdropExpansionMenuRegister(loottable)
AtlasLoot:DewdropSubMenuRegister(loottable)
AtlasLoot:DewdropRegister()
AtlasLoot:DewdropExpansionMenuOpen(loottable)
AtlasLoot:DewdropSubMenuOpen(loottable)
AtlasLoot:DewdropOpen()
AtlasLoot:SetNewStyle(style)
]]
--Include all needed libraries
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
local BabbleBoss = AtlasLoot_GetLocaleLibBabble("LibBabble-Boss-3.0")
local BabbleFaction = AtlasLoot_GetLocaleLibBabble("LibBabble-Faction-3.0")
local BabbleZone = AtlasLoot_GetLocaleLibBabble("LibBabble-Zone-3.0")
--Load the 2 dewdrop menus
AtlasLoot_Dewdrop = AceLibrary("Dewdrop-2.0");
AtlasLoot_DewdropSubMenu = AceLibrary("Dewdrop-2.0");
AtlasLoot_DewdropExpansionMenu = AceLibrary("Dewdrop-2.0");
ItemindexID = 2;
@@ -44,11 +40,10 @@ function AtlasLootDefaultFrame_OnShow()
elseif lastboss and lastboss[4] then
ATLASLOOT_CURRENTTABLE = lastboss[5];
ATLASLOOT_LASTMODULE = lastboss[4];
ATLASLOOT_MODUELNAME = lastboss[6];
AtlasLoot:IsLootTableAvailable(lastboss[4]);
AtlasLootDefaultFrame_Menu:SetText(ATLASLOOT_MODUELNAME);
AtlasLoot:ShowItemsFrame(lastboss[1], "AtlasLoot_Data", lastboss[3]);
AtlasLoot_DewdropSubMenu:Unregister(AtlasLootDefaultFrame_SubMenu);
AtlasLoot:DewdropSubMenuRegister(AtlasLoot_SubMenus[lastboss[5]]);
AtlasLoot:WishListOptionsRegister();
else
AtlasLoot:ShowItemsFrame("EmptyTable", "AtlasLoot_Data", 1);
end
@@ -63,9 +58,6 @@ function AtlasLoot:ShowInstance()
ATLASLOOT_LASTMODULE = v.Module;
AtlasLoot:IsLootTableAvailable(ATLASLOOT_LASTMODULE);
AtlasLoot:ShowItemsFrame(t[2], "AtlasLoot_Data", 1);
AtlasLoot_DewdropSubMenu:Unregister(AtlasLootDefaultFrame_SubMenu);
AtlasLoot:DewdropSubMenuRegister(AtlasLoot_SubMenus[ATLASLOOT_CURRENTTABLE]);
AtlasLoot:WishListOptionsRegister();
return true;
end
end
@@ -79,8 +71,6 @@ and close all Dewdrop menus
]]
function AtlasLootDefaultFrame_OnHide()
AtlasLoot_Dewdrop:Close(1);
AtlasLoot_DewdropSubMenu:Close(1);
AtlasLoot_DewdropExpansionMenu:Close(1);
end
--[[
@@ -92,6 +82,7 @@ Called when a button in AtlasLoot_Dewdrop is clicked
function AtlasLoot:DewDropClick(tablename, text, tablenum)
ATLASLOOT_FILTER_ENABLE = false;
ATLASLOOT_BACKENABLED = false;
ATLASLOOT_MODUELNAME = text;
AtlasLootFilterCheck:SetChecked(false);
tablename = tablename .. AtlasLoot_Expac;
ATLASLOOT_CURRENTTABLE = tablename;
@@ -99,21 +90,17 @@ function AtlasLoot:DewDropClick(tablename, text, tablenum)
ATLASLOOT_LASTMODULE = AtlasLoot_SubMenus[tablename].Module;
AtlasLootDefaultFrame_Menu:SetText(text);
AtlasLoot:IsLootTableAvailable(AtlasLoot_SubMenus[tablename].Module);
AtlasLoot_DewdropSubMenu:Unregister(AtlasLootDefaultFrame_SubMenu);
AtlasLoot:DewdropSubMenuRegister(AtlasLoot_SubMenus[tablename]);
local lasttable = AtlasLoot.db.profile[ATLASLOOT_CURRENTTABLE];
if lasttable then
AtlasLoot:ShowItemsFrame(lasttable[1], lasttable[2], lasttable[3]);
else
AtlasLoot:ShowItemsFrame(AtlasLoot_SubMenus[tablename][tablenum][2], "AtlasLoot_Data", tablenum);
end
AtlasLoot_Dewdrop:Close(1);
end
--[[
AtlasLoot:DewDropSubMenuClick(tablename):
tablename - Name of the loot table in the database
text - Heading for the loot table
Called when a button in AtlasLoot_DewdropSubMenu is clicked
]]
function AtlasLoot:DewDropSubMenuClick(tablename)
@@ -122,7 +109,33 @@ function AtlasLoot:DewDropSubMenuClick(tablename)
local tablenum = AtlasLoot_Data[tablename].Loadfirst or 1;
--Show the table that has been selected
AtlasLoot:ShowItemsFrame(tablename, "AtlasLoot_Data", tablenum);
AtlasLoot_DewdropSubMenu:Close(1);
end
local WHITE = "|cffFFFFFF";
function AtlasLoot:AddDividerLine(maxLenght)
local text = WHITE.."----------------------------------------------------------------------------------------------------"
AtlasLoot_Dewdrop:AddLine(
'text' , text:sub(1, maxLenght),
'textHeight', 12,
'textWidth', 12,
'isTitle', true,
"notCheckable", true
);
end
function AtlasLoot:CloseDewDrop(divider, maxLenght)
if divider then
AtlasLoot:AddDividerLine(maxLenght)
end
AtlasLoot_Dewdrop:AddLine(
'text', AL["Close Menu"],
'textR', 0,
'textG', 1,
'textB', 1,
'textHeight', 12,
'textWidth', 12,
'closeWhenClicked', true,
'notCheckable', true
)
end
--[[
@@ -134,15 +147,12 @@ Called when a button in DewdropExpansionMenuClick is clicked
function AtlasLoot:DewdropExpansionMenuClick(expansion, name)
ATLASLOOT_BACKENABLED = false;
AtlasLootDefaultFrame_ExpansionMenu:SetText(name);
AtlasLoot_DewdropExpansionMenu:Close(1);
AtlasLoot_Expac = expansion;
if ATLASLOOT_CURRENTTABLE then
ATLASLOOT_CURRENTTABLE = AtlasLoot:CleandataID(ATLASLOOT_CURRENTTABLE, 1) .. AtlasLoot_Expac;
AtlasLoot:IsLootTableAvailable(AtlasLoot_SubMenus[ATLASLOOT_CURRENTTABLE].Module);
local tablename = AtlasLoot_SubMenus[ATLASLOOT_CURRENTTABLE][1][2];
local lasttable = AtlasLoot.db.profile[ATLASLOOT_CURRENTTABLE];
AtlasLoot_DewdropSubMenu:Unregister(AtlasLootDefaultFrame_SubMenu);
AtlasLoot:DewdropSubMenuRegister(AtlasLoot_SubMenus[ATLASLOOT_CURRENTTABLE]);
if lasttable then
AtlasLoot:ShowItemsFrame(lasttable[1], lasttable[2], lasttable[3]);
else
@@ -150,15 +160,16 @@ function AtlasLoot:DewdropExpansionMenuClick(expansion, name)
AtlasLoot:ShowItemsFrame(tablename, "AtlasLoot_Data", tablenum);
end
end
end
--[[
AtlasLoot:DewdropExpansionMenuRegister():
AtlasLoot:DewdropExpansionMenuOpen():
Adds expansion menu from expansion table in mainmenus.lua
]]
function AtlasLoot:DewdropExpansionMenuRegister()
AtlasLoot_DewdropExpansionMenu:Register(AtlasLootDefaultFrame_ExpansionMenu,
function AtlasLoot:DewdropExpansionMenuOpen()
local frame = AtlasLootDefaultFrame_ExpansionMenu;
if AtlasLoot_Dewdrop:IsOpen(frame) then AtlasLoot_Dewdrop:Close() return end
AtlasLoot_Dewdrop:Register(frame,
'point', function(parent)
return "TOP", "BOTTOM"
end,
@@ -172,36 +183,32 @@ function AtlasLoot:DewdropExpansionMenuRegister()
'textR', 1,
'textG', 0.82,
'textB', 0,
'func', function(arg1, arg2, arg3) AtlasLoot:DewdropExpansionMenuClick(arg1, arg2, arg3) end,
'arg1', v[2],
'arg2', v[1],
'arg3', k,
'func', function() AtlasLoot:DewdropExpansionMenuClick(v[2], v[1]) end,
'textHeight', 12,
'textWidth', 12,
'closeWhenClicked', true,
'notCheckable', true
)
end
end
end
--Close button
AtlasLoot_Dewdrop:AddLine(
'text', AL["Close Menu"],
'textR', 0,
'textG', 1,
'textB', 1,
'func', function() AtlasLoot_Dewdrop:Close() end,
'notCheckable', true
)
AtlasLoot:CloseDewDrop(true,35)
end,
'dontHook', true
)
AtlasLoot_Dewdrop:Open(frame)
end
--[[
AtlasLoot:DewdropSubMenuRegister(loottable):
AtlasLoot:DewdropSubMenuOpen(loottable):
loottable - Table defining the sub menu
Generates the sub menu needed by passing a table of loot tables and titles
]]
function AtlasLoot:DewdropSubMenuRegister(loottable)
AtlasLoot_DewdropSubMenu:Register(AtlasLootDefaultFrame_SubMenu,
function AtlasLoot:DewdropSubMenuOpen(loottable)
local frame = AtlasLootDefaultFrame_SubMenu
if AtlasLoot_Dewdrop:IsOpen(frame) then AtlasLoot_Dewdrop:Close() return end
AtlasLoot_Dewdrop:Register(frame,
'point', function(parent)
return "TOP", "BOTTOM"
end,
@@ -209,77 +216,76 @@ function AtlasLoot:DewdropSubMenuRegister(loottable)
for k, v in pairs(loottable) do
if type(v) == "table" then
if v[3] == "Header" then
AtlasLoot_DewdropSubMenu:AddLine(
if k ~= 1 then AtlasLoot:AddDividerLine(40) end
AtlasLoot_Dewdrop:AddLine(
'text', v[1],
'textR', 0.2,
'textG', 0.82,
'textB', 0.5,
'textHeight', 13,
'textWidth', 13,
'func', function(arg1) AtlasLoot:DewDropSubMenuClick(arg1) end,
'arg1', v[2],
'notCheckable', true
)
else
AtlasLoot_DewdropSubMenu:AddLine(
AtlasLoot_Dewdrop:AddLine(
'text', AtlasLoot_Data[v[2]].Name,
'func', function(arg1, arg2) AtlasLoot:DewDropSubMenuClick(arg1) end,
'func', function(arg1) AtlasLoot:DewDropSubMenuClick(arg1) end,
'arg1', v[2],
'textHeight', 12,
'textWidth', 12,
'closeWhenClicked', true,
'notCheckable', true
)
end
end
end
--Close button
AtlasLoot_DewdropSubMenu:AddLine(
'text', AL["Close Menu"],
'textR', 0,
'textG', 1,
'textB', 1,
'func', function() AtlasLoot_DewdropSubMenu:Close() end,
'notCheckable', true
)
AtlasLoot:CloseDewDrop(true,40)
end,
'dontHook', true
)
AtlasLoot_Dewdrop:Open(frame)
end
--[[
AtlasLoot:DewdropRegister:
AtlasLoot:DewdropOpen:
Constructs the main category menu from a tiered table
]]
function AtlasLoot:DewdropRegister()
AtlasLoot_Dewdrop:Register(AtlasLootDefaultFrame_Menu,
'point', function(parent)
return "TOP", "BOTTOM"
end,
'children', function(level, value)
if AtlasLoot_Modules then
for k, v in ipairs(AtlasLoot_Modules) do
--If a link to show a submenu
AtlasLoot_Dewdrop:AddLine(
'text', v[1],
'textR', 1,
'textG', 0.82,
'textB', 0,
'func', function(arg1, arg2, arg3) AtlasLoot:DewDropClick(arg1, arg2, arg3) end,
'arg1', v[2],
'arg2', v[1],
'arg3', v[3],
'notCheckable', true
)
function AtlasLoot:DewdropOpen()
local frame = AtlasLootDefaultFrame_Menu
if AtlasLoot_Dewdrop:IsOpen(frame) then AtlasLoot_Dewdrop:Close() return end
local loaded
if not loaded then
AtlasLoot_Dewdrop:Register(frame,
'point', function(parent)
return "TOP", "BOTTOM"
end,
'children', function(level, value)
if AtlasLoot_Modules then
for k, v in ipairs(AtlasLoot_Modules) do
--If a link to show a submenu
AtlasLoot_Dewdrop:AddLine(
'text', v[1],
'textR', 1,
'textG', 0.82,
'textB', 0,
'func', function() AtlasLoot:DewDropClick(v[2], v[1], v[3]) end,
'textHeight', 12,
'textWidth', 12,
'closeWhenClicked', true,
'notCheckable', true
)
end
end
end
--Close button
AtlasLoot_Dewdrop:AddLine(
'text', AL["Close Menu"],
'textR', 0,
'textG', 1,
'textB', 1,
'func', function() AtlasLoot_Dewdrop:Close() end,
'notCheckable', true
)
end,
'dontHook', true
)
--Close button
AtlasLoot:CloseDewDrop(true,35)
end,
'dontHook', true
)
end
AtlasLoot_Dewdrop:Open(frame)
end
--[[
@@ -313,6 +319,7 @@ function AtlasLoot:SetNewStyle(style)
"AtlasLootDefaultFrame_MapButton",
"AtlasLootDefaultFrame_MapSelectButton",
"AtlasLootDefaultFrame_LoadInstanceButton",
"AtlasLootDefaultFrame_LoadInstanceDBButton",
}
if style == "new" then
@@ -350,7 +357,7 @@ function AtlasLoot:SetNewStyle(style)
tex2:SetHeight(32)
end
for k, v in pairs(buttons) do
for _, v in pairs(buttons) do
SetButtons(v)
end
elseif style == "old" then
@@ -391,7 +398,7 @@ function AtlasLoot:SetNewStyle(style)
tex2:SetHeight(20)
end
for k, v in pairs(buttons) do
for _, v in pairs(buttons) do
SetButtons(v)
end