menu swap / color if there not default
added menu swap switcher to options added extra check if unloaded item isnt same as the default table removed odd bits of unused code
This commit is contained in:
@@ -20,7 +20,6 @@ AtlasLoot_SetItemInfoFrame()
|
||||
AtlasLootItemsFrame_OnCloseButton()
|
||||
AtlasLootMenuItem_OnClick()
|
||||
AtlasLoot_NavButton_OnClick()
|
||||
AtlasLoot_HeroicModeToggle()
|
||||
AtlasLoot_IsLootTableAvailable(dataID)
|
||||
AtlasLoot_GetLODModule(dataSource)
|
||||
AtlasLoot_LoadAllModules()
|
||||
@@ -108,13 +107,10 @@ local AtlasLootDBDefaults = {
|
||||
FuBarIcon = true,
|
||||
HidePanel = false,
|
||||
LastBoss = "EmptyTable",
|
||||
HeroicMode = false,
|
||||
BigraidHeroic = false,
|
||||
Bigraid = false,
|
||||
AtlasLootVersion = "1",
|
||||
AtlasNaggedVersion = "",
|
||||
FuBarPosition = 1,
|
||||
MythicPlussTier = 1,
|
||||
SubtablePosition = false,
|
||||
AutoQuery = false,
|
||||
LoadAllLoDStartup = false,
|
||||
PartialMatching = true,
|
||||
@@ -392,10 +388,6 @@ function AtlasLoot_OnVariablesLoaded()
|
||||
LibStub("LibAboutPanel").new(AL["AtlasLoot"], "AtlasLoot");
|
||||
end
|
||||
AtlasLoot_UpdateLootBrowserScale();
|
||||
|
||||
AtlasLoot.db.profile.Bigraid = false
|
||||
AtlasLoot.db.profile.BigraidHeroic = false
|
||||
AtlasLoot.db.profile.HeroicMode = false
|
||||
end
|
||||
|
||||
function AtlasLoot_Reset(data)
|
||||
@@ -608,6 +600,11 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
|
||||
dataID = gsub(dataID, lastReference, ""); -- removes old table reference before adding a new 1 if needed
|
||||
end
|
||||
|
||||
if dataID:match("MENU") and ATLASLOOT_FILTER_ENABLE then
|
||||
AtlasLootFilterCheck:SetChecked(false);
|
||||
ATLASLOOT_FILTER_ENABLE = false
|
||||
end
|
||||
|
||||
if Type == nil and ATLASLOOT_FILTER_ENABLE == false or dataID:match("MENU") or ATLASLOOT_FILTER_ENABLE and dataSource[AtlasLoot_CurrentBoss].Type == nil then -- disable difficulty menu
|
||||
AtlasLoot_DifficultyDisable()
|
||||
AtlasLoot_CurrentBoss = dataID;
|
||||
@@ -690,26 +687,16 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
|
||||
if(GetItemInfo(IDfound)) then
|
||||
_, _, _, itemColor = GetItemQualityColor(itemQuality);
|
||||
text = itemColor..itemName;
|
||||
else
|
||||
if(GetItemInfo(IDfound)) or not dataSource[dataID][i][2] == IDfound then
|
||||
_, _, _, itemColor = GetItemQualityColor(itemQuality);
|
||||
text = itemColor..itemName;
|
||||
elseif dataSource[dataID][i][2] ~= IDfound then
|
||||
elseif dataSource[dataID][i][2] ~= IDfound and itemDefaultColour ~= nil and not dataSource[dataID][i][4]:match("=q5=") then
|
||||
--If the item is not in cache, use the saved value and process it
|
||||
if tonumber(ItemindexID) and not dataSource[dataID][i][4]:match("=q5=") then
|
||||
text = (string.sub(dataSource[dataID][i][4], 5));
|
||||
text = "=q4=" .. text;
|
||||
text = itemDefaultColour .. text;
|
||||
text = AtlasLoot_FixText(text);
|
||||
else
|
||||
text = dataSource[dataID][i][4];
|
||||
text = AtlasLoot_FixText(text);
|
||||
end
|
||||
else
|
||||
--If the item is not in cache, use the saved value and process it
|
||||
text = dataSource[dataID][i][4];
|
||||
text = AtlasLoot_FixText(text);
|
||||
end
|
||||
end
|
||||
else
|
||||
spellName, _, spellIcon, _, _, _, _, _, _ = GetSpellInfo(string.sub(IDfound, 2));
|
||||
if spellName then
|
||||
@@ -1378,13 +1365,3 @@ function AL_FindId(name, difficulty)
|
||||
return nil;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
function GetDifficultyTier()
|
||||
return AtlasLoot.db.profile.MythicPlussTier
|
||||
end
|
||||
|
||||
function SetDifficultyTier(difficulty)
|
||||
AtlasLoot.db.profile.MythicPlussTier = difficulty;
|
||||
end
|
||||
|
||||
@@ -875,6 +875,24 @@
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<CheckButton name="$parentSubtablePosition" inherits="OptionsCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="5" y="-190"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
getglobal(this:GetName().."Text"):SetText("Swap Subtable/Difficuilty Menus");
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
AtlasLootOptions_SubtablePositionToggle();
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
<CheckButton name="$parentLoDStartup" inherits="OptionsCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
@@ -1026,7 +1044,7 @@
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="30" y="-190"/>
|
||||
<AbsDimension x="30" y="-220"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
@@ -1048,7 +1066,7 @@
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="30" y="-220"/>
|
||||
<AbsDimension x="30" y="-250"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
|
||||
@@ -49,6 +49,7 @@ function AtlasLootOptions_Init()
|
||||
AtlasLootOptionsFrameItemAutoQuery:SetChecked(AtlasLoot.db.profile.ItemAutoQuery);
|
||||
AtlasLootOptionsFrameOpaque:SetChecked(AtlasLoot.db.profile.Opaque);
|
||||
AtlasLootOptionsFrameItemID:SetChecked(AtlasLoot.db.profile.ItemIDs);
|
||||
AtlasLootOptionsFrameSubtablePosition:SetChecked(AtlasLoot.db.profile.SubtablePosition);
|
||||
AtlasLootOptionsFrameItemSpam:SetChecked(AtlasLoot.db.profile.ItemSpam);
|
||||
AtlasLootOptionsFrameLoDStartup:SetChecked(AtlasLoot.db.profile.LoadAllLoDStartup);
|
||||
AtlasLootOptionsFrameHidePanel:SetChecked(AtlasLoot.db.profile.HidePanel);
|
||||
@@ -66,6 +67,7 @@ function AtlasLootOptions_OnLoad()
|
||||
AtlasLootOptionsFrameItemSyncTTText:SetText(AL["|cff9d9d9dItemSync Tooltips|r"]);
|
||||
end
|
||||
AtlasLootOptions_Init();
|
||||
AtlasLootOptions_SubtablePositionToggle()
|
||||
temp=AtlasLoot.db.profile.SafeLinks;
|
||||
end
|
||||
|
||||
@@ -143,6 +145,19 @@ function AtlasLootOptions_ItemIDToggle()
|
||||
AtlasLootOptions_Init();
|
||||
end
|
||||
|
||||
function AtlasLootOptions_SubtablePositionToggle()
|
||||
if AtlasLootOptionsFrameSubtablePosition:GetChecked() then
|
||||
AtlasLootDefaultFrame_SubMenu2:SetPoint("TOP", 160, -40);
|
||||
AtlasLootDefaultFrame_SubMenu:SetPoint("TOP", 0, -40);
|
||||
AtlasLoot.db.profile.SubtablePosition = AtlasLootOptionsFrameSubtablePosition:GetChecked();
|
||||
else
|
||||
AtlasLootDefaultFrame_SubMenu:SetPoint("TOP", 160, -40);
|
||||
AtlasLootDefaultFrame_SubMenu2:SetPoint("TOP", 0, -40);
|
||||
AtlasLoot.db.profile.SubtablePosition = AtlasLootOptionsFrameSubtablePosition:GetChecked();
|
||||
end
|
||||
AtlasLootOptions_Init();
|
||||
end
|
||||
|
||||
function AtlasLoot_SetupLootBrowserSlider(frame, mymin, mymax, step)
|
||||
getglobal(frame:GetName().."Text"):SetText(AL["Loot Browser Scale: "].." ("..frame:GetValue()..")");
|
||||
frame:SetMinMaxValues(mymin, mymax);
|
||||
|
||||
@@ -133,13 +133,13 @@ function AtlasLootDefaultFrame_OnHide()
|
||||
AtlasLoot_DewdropSubMenu:Close(1);
|
||||
end
|
||||
|
||||
function AtlasLoot_DewDropSubMenu2Click(raidtablename, itemID)
|
||||
function AtlasLoot_DewDropSubMenu2Click(raidtablename, itemID, itemColour)
|
||||
if ATLASLOOT_FILTER_ENABLE == true then
|
||||
AtlasLoot_FilterEnableButton()
|
||||
ReEnableFilter = true
|
||||
end
|
||||
-- gets itemID reference
|
||||
AtlasLootDefaultFrame_GetRaidDifficulty(raidtablename, itemID)
|
||||
AtlasLootDefaultFrame_GetRaidDifficulty(raidtablename, itemID, itemColour)
|
||||
--Show the select loot table
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4]);
|
||||
--Set text for difficulty
|
||||
@@ -173,11 +173,13 @@ function AtlasLoot_DifficultyEnable(dataID, dataSource)
|
||||
SelectedTable2TextSet = true
|
||||
end
|
||||
|
||||
function AtlasLootDefaultFrame_GetRaidDifficulty(raidtablename, itemID)
|
||||
function AtlasLootDefaultFrame_GetRaidDifficulty(raidtablename, itemID, itemColour)
|
||||
|
||||
if tonumber(itemID) then --used in itemID search feature for itemID database
|
||||
ItemindexID = itemID;
|
||||
isTablereference = false;
|
||||
notPattern = false;
|
||||
itemDefaultColour = itemColour;
|
||||
elseif itemID:match("=s=") then -- =s= infront of a table reference will make it show a normal crafting item instead of a crafting pattern
|
||||
newID = gsub(itemID, "=s=",""); -- removes =s= before passing the extra table addition
|
||||
newID = gsub(newID, "Normal","");
|
||||
@@ -209,6 +211,7 @@ function AtlasLoot_DewdropSubMenu2Register(loottable)
|
||||
'func', AtlasLoot_DewDropSubMenu2Click,
|
||||
'arg1', v[1],
|
||||
'arg2', v[2],
|
||||
'arg3', v[3],
|
||||
'notCheckable', true
|
||||
)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user