Merge branch 'pr/21'
This commit is contained in:
@@ -341,6 +341,7 @@ function AtlasLootOptions_Init()
|
||||
AtlasLootOptionsFrameLootlinkTT:SetChecked(AtlasLootCharDB.LootlinkTT);
|
||||
AtlasLootOptionsFrameItemSyncTT:SetChecked(AtlasLootCharDB.ItemSyncTT);
|
||||
AtlasLootOptionsFrameShowSource:SetChecked(AtlasLootCharDB.ShowSource);
|
||||
AtlasLootOptionsFrameWishlistGroupedByDungeon:SetChecked(AtlasLootCharDB.WishlistGroupedByDungeon);
|
||||
AtlasLootOptionsFrameEquipCompare:SetChecked(AtlasLootCharDB.EquipCompare);
|
||||
AtlasLootOptionsFrameOpaque:SetChecked(AtlasLootCharDB.Opaque);
|
||||
AtlasLootOptionsFrameItemID:SetChecked(AtlasLootCharDB.ItemIDs);
|
||||
@@ -369,6 +370,7 @@ function AtlasLootOptions_Fresh()
|
||||
AtlasLootCharDB.LootlinkTT = false;
|
||||
AtlasLootCharDB.ItemSyncTT = false;
|
||||
AtlasLootCharDB.ShowSource = true;
|
||||
AtlasLootCharDB.WishlistGroupedByDungeon = true;
|
||||
AtlasLootCharDB.EquipCompare = false;
|
||||
AtlasLootCharDB.Opaque = false;
|
||||
AtlasLootCharDB.ItemIDs = false;
|
||||
@@ -880,6 +882,21 @@ function AtlasLootOptions_ShowSourceToggle()
|
||||
AtlasLootOptions_Init();
|
||||
end
|
||||
|
||||
function AtlasLootOptions_WishlistGroupedByDungeonToggle()
|
||||
if(AtlasLootCharDB.WishlistGroupedByDungeon) then
|
||||
AtlasLootCharDB.WishlistGroupedByDungeon = false;
|
||||
else
|
||||
AtlasLootCharDB.WishlistGroupedByDungeon = true;
|
||||
end
|
||||
AtlasLootOptions_Init();
|
||||
AtlasLoot_WishList = AtlasLoot_CategorizeWishList(AtlasLootCharDB["WishList"]);
|
||||
local dataID = AtlasLootItemsFrame.refresh[1];
|
||||
|
||||
if (dataID == 'WishList') then
|
||||
AtlasLoot_ShowWishList();
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLootOptions_EquipCompareToggle:
|
||||
Toggles EquipCompare. Adds a tooltip with the equipped item (if it's the case) next to the default one.
|
||||
@@ -1320,7 +1337,23 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if wishDataSource == "AtlasLootItems" and AtlasLootCharDB.WishlistGroupedByDungeon then
|
||||
-- Set boss
|
||||
if wishDataID and AtlasLoot_IsLootTableAvailable(wishDataID) then
|
||||
for _, v in ipairs(AtlasLoot_Data[wishDataSource][wishDataID]) do
|
||||
if dataSource[dataID][i][1] == v[1] then
|
||||
local boss = AtlasLoot_GetWishListSubheadingBoss(wishDataID)
|
||||
|
||||
if boss then
|
||||
extraFrame:SetText(extra .. " - "..boss)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--For convenience, we store information about the objects in the objects so that it can be easily accessed later
|
||||
itemButton.itemID = dataSource[dataID][i][1];
|
||||
itemButton.itemIDName = dataSource[dataID][i][3];
|
||||
|
||||
+21
-3
@@ -1366,7 +1366,7 @@
|
||||
|
||||
<Frame name="AtlasLootOptionsFrame" toplevel="true" frameStrata="DIALOG" movable="true" enableMouse="true" hidden="true" parent="UIParent" enableKeyboard="true">
|
||||
<Size>
|
||||
<AbsDimension x="650" y="370"/>
|
||||
<AbsDimension x="650" y="400"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER"/>
|
||||
@@ -1516,7 +1516,7 @@
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<CheckButton name="$parentEquipCompare" inherits="OptionsCheckButtonTemplate">
|
||||
<CheckButton name="$parentWishlistGroupedByDungeon" inherits="OptionsCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
@@ -1524,6 +1524,24 @@
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
|
||||
getglobal(this:GetName().."Text"):SetText("Group wishlist by dungeon");
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
AtlasLootOptions_WishlistGroupedByDungeonToggle();
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<CheckButton name="$parentEquipCompare" inherits="OptionsCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="20" y="-280"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot");
|
||||
@@ -1538,7 +1556,7 @@
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="20" y="-280"/>
|
||||
<AbsDimension x="20" y="-310"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
|
||||
+20
-1
@@ -214,6 +214,21 @@ function GetLootTableParent(dataID)
|
||||
return parentID;
|
||||
end
|
||||
|
||||
local function GetWishListSubheadingDungeon(dataID)
|
||||
if not AtlasLoot_TableNames then return end
|
||||
local zoneID ;
|
||||
for i, v in pairs(AtlasLoot_TableNamesBoss) do
|
||||
for j,k in pairs(v) do
|
||||
if dataID == j then
|
||||
zoneID = i
|
||||
break;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return zoneID;
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_CategorizeWishList(wlTable):
|
||||
Group items with zone/event name etc, and format them by adding subheadings and empty lines
|
||||
@@ -228,7 +243,11 @@ function AtlasLoot_CategorizeWishList(wlTable)
|
||||
local _, _, dataID = strfind(v[5], "^(.+)|.+");
|
||||
-- Build subheading table
|
||||
if not subheadings[dataID] then
|
||||
subheadings[dataID] = AtlasLoot_GetWishListSubheadingBoss(dataID);
|
||||
if AtlasLootCharDB.WishlistGroupedByDungeon then
|
||||
subheadings[dataID] = GetWishListSubheadingDungeon(dataID);
|
||||
else
|
||||
subheadings[dataID] = AtlasLoot_GetWishListSubheadingBoss(dataID);
|
||||
end
|
||||
-- If search failed, replace ID like "Aldor2" to "Aldor1" and try again
|
||||
if not subheadings[dataID] and string.find(dataID, "^%a+%d?$") then
|
||||
subheadings[dataID] = AtlasLoot_GetWishListSubheading(string.sub(dataID, 1, string.len(dataID) - 1).."1");
|
||||
|
||||
Reference in New Issue
Block a user