auto load instance loottable
-Added a system for autoloading the loottable of the instance you are currently in it can be enabled/disabled in the settings page
This commit is contained in:
@@ -36,10 +36,27 @@ function AtlasLootDefaultFrame_OnShow()
|
||||
--Definition of where I want the loot table to be shown
|
||||
--Remove the selection of a loot table in Atlas
|
||||
AtlasLootItemsFrame.activeBoss = nil;
|
||||
-- checks to see if there is an instance to auto load its loottable
|
||||
local function findInstance()
|
||||
for i,v in pairs(AtlasLoot_SubMenus) do
|
||||
for n,t in ipairs(v) do
|
||||
if t[4] == BabbleZone[GetRealZoneText()] then
|
||||
ATLASLOOT_CURRENTTABLE = v.SubMenu;
|
||||
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
|
||||
end
|
||||
end
|
||||
--Set the item table to the loot table
|
||||
--Show the last displayed loot table
|
||||
--Show the last displayed loot table
|
||||
local lastboss = AtlasLoot.db.profile.LastBoss;
|
||||
if lastboss and lastboss[4] then
|
||||
if AtlasLoot.db.profile.AutoCurrentInstance and findInstance() then elseif lastboss and lastboss[4] then
|
||||
ATLASLOOT_CURRENTTABLE = lastboss[5];
|
||||
ATLASLOOT_LASTMODULE = lastboss[4];
|
||||
AtlasLoot:IsLootTableAvailable(lastboss[4]);
|
||||
|
||||
Reference in New Issue
Block a user