started to add atlas map system into atlasloot
This commit is contained in:
@@ -1,88 +0,0 @@
|
||||
--[[
|
||||
This file contains all the Atlas specific functions
|
||||
]]
|
||||
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
|
||||
--[[
|
||||
AtlasLoot_SetupForAtlas:
|
||||
This function sets up the Atlas specific XML objects
|
||||
]]
|
||||
function AtlasLoot_SetupForAtlas()
|
||||
--Position the frame with the AtlasLoot version details in the Atlas frame
|
||||
AtlasLootInfo:ClearAllPoints();
|
||||
AtlasLootInfo:SetParent(AtlasFrame);
|
||||
AtlasLootInfo:SetPoint("TOPLEFT", "AtlasFrame", "TOPLEFT", 546, -3);
|
||||
|
||||
--Anchor the bottom panel to the Atlas frame
|
||||
AtlasLootPanel:ClearAllPoints();
|
||||
AtlasLootPanel:SetParent(AtlasFrame);
|
||||
AtlasLootPanel:SetPoint("TOP", "AtlasFrame", "BOTTOM", 0, 9);
|
||||
|
||||
--Anchor the loot table to the Atlas frame
|
||||
AtlasLoot_SetItemInfoFrame();
|
||||
AtlasLootItemsFrame:Hide();
|
||||
AtlasLoot_AnchorFrame = AtlasFrame;
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLootBoss_OnClick:
|
||||
Invoked whenever a boss line in Atlas is clicked
|
||||
Shows a loot page if one is associated with the button
|
||||
]]
|
||||
function AtlasLootBoss_OnClick(name)
|
||||
|
||||
|
||||
|
||||
local zoneID = ATLAS_DROPDOWNS[AtlasOptions.AtlasType][AtlasOptions.AtlasZone];
|
||||
local id = this.idnum;
|
||||
|
||||
|
||||
--If the loot table was already shown and boss clicked again, hide the loot table and fix boss list icons
|
||||
if getglobal(name.."_Selected"):IsVisible() then
|
||||
getglobal(name.."_Selected"):Hide();
|
||||
getglobal(name.."_Loot"):Show();
|
||||
AtlasLootItemsFrame:Hide();
|
||||
AtlasLootItemsFrame.activeBoss = nil;
|
||||
else
|
||||
--If an loot table is associated with the button, show it. Note multiple tables need to be checked due to the database structure
|
||||
if (AtlasLootBossButtons[zoneID] ~= nil and AtlasLootBossButtons[zoneID][id] ~= nil and AtlasLootBossButtons[zoneID][id] ~= "") then
|
||||
if AtlasLoot_IsLootTableAvailable(AtlasLootBossButtons[zoneID][id]) then
|
||||
getglobal(name.."_Selected"):Show();
|
||||
getglobal(name.."_Loot"):Hide();
|
||||
local _,_,boss = string.find(getglobal(name.."_Text"):GetText(), "|c%x%x%x%x%x%x%x%x%s*[%dX']*[%) ]*(.*[^%,])[%,]?$");
|
||||
AtlasLoot_ShowBossLoot(AtlasLootBossButtons[zoneID][id], boss, AtlasFrame);
|
||||
AtlasLootItemsFrame.activeBoss = id;
|
||||
AtlasLoot_AtlasScrollBar_Update();
|
||||
AtlasLoot_Lastboss = AtlasLootBossButtons[zoneID][id];
|
||||
AtlasLoot_Hold = false;
|
||||
end
|
||||
elseif (AtlasLootWBBossButtons[zoneID] ~= nil and AtlasLootWBBossButtons[zoneID][id] ~= nil and AtlasLootWBBossButtons[zoneID][id] ~= "") then
|
||||
if AtlasLoot_IsLootTableAvailable(AtlasLootWBBossButtons[zoneID][id]) then
|
||||
getglobal(name.."_Selected"):Show();
|
||||
getglobal(name.."_Loot"):Hide();
|
||||
local _,_,boss = string.find(getglobal(name.."_Text"):GetText(), "|c%x%x%x%x%x%x%x%x%s*[%dX]*[%) ]*(.*[^%,])[%,]?$");
|
||||
AtlasLoot_ShowBossLoot(AtlasLootWBBossButtons[zoneID][id], boss, AtlasFrame);
|
||||
AtlasLootItemsFrame.activeBoss = id;
|
||||
AtlasLoot_AtlasScrollBar_Update();
|
||||
end
|
||||
elseif (AtlasLootBattlegrounds[zoneID] ~= nil and AtlasLootBattlegrounds[zoneID][id] ~= nil and AtlasLootBattlegrounds[zoneID][id] ~= "") then
|
||||
if AtlasLoot_IsLootTableAvailable(AtlasLootBattlegrounds[zoneID][id]) then
|
||||
getglobal(name.."_Selected"):Show();
|
||||
getglobal(name.."_Loot"):Hide();
|
||||
local _,_,boss = string.find(getglobal(name.."_Text"):GetText(), "|c%x%x%x%x%x%x%x%x%s*[%wX]*[%) ]*(.*[^%,])[%,]?$");
|
||||
AtlasLoot_ShowBossLoot(AtlasLootBattlegrounds[zoneID][id], boss, AtlasFrame);
|
||||
AtlasLootItemsFrame.activeBoss = id;
|
||||
AtlasLoot_AtlasScrollBar_Update();
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--This has been invoked from Atlas, so we remove any claim external mods have on the loot table
|
||||
AtlasLootItemsFrame.externalBoss = nil;
|
||||
|
||||
--Hide the AtlasQuest frame if present so that the AtlasLoot items frame is not stuck under it
|
||||
if (AtlasQuestInsideFrame) then
|
||||
HideUIPanel(AtlasQuestInsideFrame);
|
||||
end
|
||||
end
|
||||
@@ -66,8 +66,6 @@ local PURPLE = "|cff9F3FFF";
|
||||
local BLUE = "|cff0070dd";
|
||||
local ORANGE = "|cffFF8400";
|
||||
|
||||
notPattern = false;
|
||||
|
||||
--Search panel open and close save variables
|
||||
--dataID, dataSource, boss, pFrame, tablenumber
|
||||
SearchPrevData = {"", "", "", "", ""};
|
||||
|
||||
@@ -639,7 +639,6 @@ local function DoSearch(searchText)
|
||||
if type(itemId) == "number" and itemId > 0 then
|
||||
local itemIdBackup = itemId;
|
||||
itemId = AL_FindId(itemId, ItemindexID) or 2;
|
||||
--itemDetails[8] = ItemindexID;
|
||||
local item = Item:CreateFromID(itemId);
|
||||
item:ContinueOnLoad(function(itemId)
|
||||
local function GetItemDetails(itemId, atlasName)
|
||||
|
||||
@@ -292,11 +292,15 @@ function AtlasLoot_SetNewStyle(style)
|
||||
"AtlasLootDefaultFrameLastResultButton",
|
||||
"AtlasLootDefaultFrameWishListButton",
|
||||
"AtlasLootDefaultFrameAdvancedSearchButton",
|
||||
<<<<<<< Updated upstream
|
||||
"AtlasLootDefaultFrame_AdvancedSearchPanel_EquipButton",
|
||||
"AtlasLootDefaultFrame_AdvancedSearchPanel_EquipSubButton",
|
||||
"AtlasLootDefaultFrame_AdvancedSearchPanel_QualityButton",
|
||||
"AtlasLootDefaultFrame_AdvancedSearchPanel_SearchButton",
|
||||
"AtlasLootDefaultFrame_AdvancedSearchPanel_ClearButton",
|
||||
=======
|
||||
"AtlasLootDefaultFrame_MapButton",
|
||||
>>>>>>> Stashed changes
|
||||
}
|
||||
|
||||
if style == "new" then
|
||||
|
||||
@@ -364,7 +364,7 @@ local MAX_ROWS2 = 26; -- How many rows can be shown at once?
|
||||
local subtableFrame = CreateFrame("Frame", "Atlasloot_SubTableFrame", AtlasLootDefaultFrame);
|
||||
subtableFrame:EnableMouse(true);
|
||||
subtableFrame:SetSize(265, ROW_HEIGHT * MAX_ROWS2 + 23);
|
||||
subtableFrame:SetPoint("LEFT","Atlasloot_Difficulty_ScrollFrame","LEFT",0,-273);
|
||||
subtableFrame:SetPoint("BOTTOMLEFT","Atlasloot_Difficulty_ScrollFrame",0,-446);
|
||||
subtableFrame:SetBackdrop({
|
||||
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", tile = true, tileSize = 16,
|
||||
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", edgeSize = 16,
|
||||
@@ -435,3 +435,16 @@ local rows2 = setmetatable({}, { __index = function(t, i)
|
||||
end })
|
||||
|
||||
subtableFrame.rows = rows2
|
||||
|
||||
-- Map Button
|
||||
local mapbtn = CreateFrame("Button","AtlasLootDefaultFrame_MapButton", AtlasLootDefaultFrame,"UIPanelButtonTemplate2");
|
||||
mapbtn:SetSize(95,32);
|
||||
mapbtn:SetPoint("BOTTOMLEFT",Atlasloot_SubTableFrame,0,-30);
|
||||
mapbtn:SetScript("OnShow", function(self)
|
||||
self:SetText("Map");
|
||||
self:SetFrameLevel( (self:GetParent()):GetFrameLevel() + 1 );
|
||||
end)
|
||||
mapbtn:SetScript("OnClick", function()
|
||||
AtlasLoot_AdvancedSearchShow();
|
||||
AtlasLootDefaultFrameSearchBox:ClearFocus();
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user