converted the reset of atlasloot xml to lua removed old atlas intergration code
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
|
||||
<Script file="instances.en.lua"/>
|
||||
<Script file="Battlegrounds.en.lua"/>
|
||||
<Script file="worldbosses.en.lua"/>
|
||||
</Ui>
|
||||
@@ -1,155 +0,0 @@
|
||||
--[[
|
||||
Battlegrounds.en.lua
|
||||
This file defines the loot buttons in the Atlas interface for the battleground maps.
|
||||
]]
|
||||
------------
|
||||
-- Layout --
|
||||
------------
|
||||
|
||||
AtlasLootBattlegrounds = {
|
||||
|
||||
AlteracValleyNorth = {
|
||||
"AlteracFactions";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"AVMisc";
|
||||
"AVBlue_A";
|
||||
};
|
||||
|
||||
AlteracValleySouth = {
|
||||
"AlteracFactions";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"AVMisc";
|
||||
"AVBlue_A";
|
||||
};
|
||||
|
||||
ArathiBasin = {
|
||||
"MiscFactions";
|
||||
"MiscFactions";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"ABMisc_A";
|
||||
"AB2039_A";
|
||||
"AB4049_A";
|
||||
"";
|
||||
"ABSets1_A";
|
||||
};
|
||||
|
||||
WarsongGulch = {
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"WSGMisc";
|
||||
"WSGAccessories_A";
|
||||
"WSGWeapons_A";
|
||||
"WSGArmor_A";
|
||||
};
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,70 +0,0 @@
|
||||
--[[
|
||||
worldbosses.en.lua
|
||||
This file defines the loot buttons in the Atlas interface for the WorldBosses maps.
|
||||
]]
|
||||
|
||||
AtlasLootWBBossButtons = {
|
||||
|
||||
FourDragons = {
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"WorldBossesCLASSIC";
|
||||
"WorldBossesCLASSIC";
|
||||
"WorldBossesCLASSIC";
|
||||
"WorldBossesCLASSIC";
|
||||
};
|
||||
|
||||
Azuregos = {
|
||||
"WorldBossesCLASSIC";
|
||||
};
|
||||
|
||||
Kazzak = {
|
||||
"WorldBossesCLASSIC";
|
||||
};
|
||||
|
||||
Setis = {
|
||||
"WorldBossesCLASSIC";
|
||||
};
|
||||
|
||||
DoomLordKazzak = {
|
||||
"WorldBossesTBC";
|
||||
};
|
||||
Doomwalker = {
|
||||
"WorldBossesTBC";
|
||||
};
|
||||
|
||||
Skettis = {
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"";
|
||||
"Terokk";
|
||||
"";
|
||||
"";
|
||||
"SkettisTalonpriestIshaal";
|
||||
"";
|
||||
"";
|
||||
"SkettisHazziksPackage";
|
||||
"";
|
||||
"";
|
||||
"DarkscreecherAkkarai";
|
||||
"GezzaraktheHuntress";
|
||||
"Karrog";
|
||||
"VakkiztheWindrager";
|
||||
};
|
||||
|
||||
};
|
||||
@@ -26,22 +26,20 @@
|
||||
## Notes-ruRU: Отображает весю возможную добычу с боссов
|
||||
## SavedVariables: AtlasLootOptions, AtlasLootDB, AtlasLootWishList
|
||||
## SavedVariablesPerCharacter: AtlasLootCharDB, AtlasLootFilterDB
|
||||
## OptionalDeps: Alphamap, LootLink, ItemSync, DewdropLib, FuBarPlugin-3.0, FuBar, Ace3, LibBabble-Boss-3.0, LibBabble-Faction-3.0, LibBabble-Inventory-3.0, LibBabble-Zone-3.0
|
||||
## X-Curse-Packaged-Version: v6.0.0
|
||||
## X-Curse-Project-Name: Atlasloot Enhanced
|
||||
## X-Curse-Project-ID: atlasloot-enhanced
|
||||
## X-Curse-Repository-ID: wow/atlasloot-enhanced/mainline
|
||||
## OptionalDeps: LootLink, ItemSync, DewdropLib, FuBarPlugin-3.0, FuBar, Ace3, LibBabble-Boss-3.0, LibBabble-Faction-3.0, LibBabble-Inventory-3.0, LibBabble-Zone-3.0
|
||||
|
||||
|
||||
embeds.xml
|
||||
|
||||
|
||||
Locales\Locales.xml
|
||||
AtlasLayout\AtlasLayout.xml
|
||||
Add_Ons\Addons.xml
|
||||
|
||||
Core\AtlasLoot.xml
|
||||
Menus\Menus.xml
|
||||
DefaultFrame\AtlaslootDefaultFrame.lua
|
||||
|
||||
DefaultFrame\AtlaslootDefaultFrameCreate.lua
|
||||
DefaultFrame\AtlaslootDefaultFrame.lua
|
||||
DefaultFrame\AtlaslootAdvancedSearchCreate.lua
|
||||
|
||||
modules.xml
|
||||
|
||||
+62
-150
@@ -11,19 +11,18 @@ AtlasLoot_OnVariablesLoaded()
|
||||
AtlasLoot_SlashCommand(msg)
|
||||
AtlasLootOptions_Toggle()
|
||||
AtlasLoot_OnLoad()
|
||||
AtlasLoot_ShowItemsFrame()
|
||||
AtlasLoot_SetItemInfoFrame()
|
||||
AtlasLoot_NavButton_OnClick()
|
||||
AtlasLoot_IsLootTableAvailable(dataID)
|
||||
AtlasLoot_GetLODModule(dataSource)
|
||||
AtlasLoot_LoadAllModules()
|
||||
AtlasLoot_ShowQuickLooks(button)
|
||||
AtlasLoot_RefreshQuickLookButtons()
|
||||
AtlasLoot_AddTooltip(frameb, tooltiptext)
|
||||
AL_FindId(name, difficulty)
|
||||
AtlasLoot:ShowItemsFrame()
|
||||
AtlasLoot:NavButton_OnClick()
|
||||
AtlasLoot:IsLootTableAvailable(dataID)
|
||||
AtlasLoot:GetLODModule(dataSource)
|
||||
AtlasLoot:LoadAllModules()
|
||||
AtlasLoot:ShowQuickLooks(button)
|
||||
AtlasLoot:RefreshQuickLookButtons()
|
||||
AtlasLoot:AddTooltip(frameb, tooltiptext)
|
||||
AtlasLoot:FindId(name, difficulty)
|
||||
]]
|
||||
|
||||
AtlasLoot = LibStub("AceAddon-3.0"):NewAddon("AtlasLoot");
|
||||
AtlasLoot = LibStub("AceAddon-3.0"):NewAddon("AtlasLoot", "AceEvent-3.0");
|
||||
|
||||
--Instance required libraries
|
||||
local BabbleBoss = AtlasLoot_GetLocaleLibBabble("LibBabble-Boss-3.0")
|
||||
@@ -77,7 +76,6 @@ local AtlasLootDBDefaults = {
|
||||
LootlinkTT = false,
|
||||
ItemSyncTT = false,
|
||||
EquipCompare = false,
|
||||
ItemAutoQuery = false,
|
||||
Opaque = false,
|
||||
ItemIDs = false,
|
||||
ItemSpam = false,
|
||||
@@ -85,17 +83,13 @@ local AtlasLootDBDefaults = {
|
||||
FuBarAttached = true,
|
||||
FuBarText = true,
|
||||
FuBarIcon = true,
|
||||
HidePanel = false,
|
||||
LastBoss = "EmptyTable",
|
||||
AtlasLootVersion = "1",
|
||||
AtlasNaggedVersion = "",
|
||||
FuBarPosition = 1,
|
||||
SubtablePosition = false,
|
||||
AutoQuery = false,
|
||||
LoadAllLoDStartup = false,
|
||||
PartialMatching = true,
|
||||
LootBrowserStyle = 1,
|
||||
CraftingLink = 1,
|
||||
MinimapButtonAngle = 240,
|
||||
MinimapButtonRadius = 75,
|
||||
LootBrowserScale = 1.0,
|
||||
@@ -127,26 +121,6 @@ StaticPopupDialogs["ATLASLOOT_SETUP"] = {
|
||||
hideOnEscape = 1
|
||||
};
|
||||
|
||||
--[[
|
||||
AtlasLoot_OnEvent(event):
|
||||
event - Name of the event, passed from the API
|
||||
Invoked whenever a relevant event is detected by the engine. The function then
|
||||
decides what action to take depending on the event.
|
||||
]]
|
||||
function AtlasLoot_OnEvent(event)
|
||||
--Addons all loaded
|
||||
if(event == "VARIABLES_LOADED") then
|
||||
AtlasLoot_OnVariablesLoaded();
|
||||
--Taint errors
|
||||
elseif(event == "PLAYER_ENTERING_WORLD") then
|
||||
AtlasLootOptions_MinimapToggle();
|
||||
AtlasLootOptions_MinimapToggle();
|
||||
elseif(arg1 == "AtlasLoot") then
|
||||
--Junk command to suppress taint message
|
||||
local i=3;
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_ShowMenu:
|
||||
Legacy function used in Cosmos integration to open the loot browser
|
||||
@@ -160,7 +134,7 @@ AtlasLoot_OnVariablesLoaded:
|
||||
Invoked by the VARIABLES_LOADED event. Now that we are sure all the assets
|
||||
the addon needs are in place, we can properly set up the mod
|
||||
]]
|
||||
function AtlasLoot_OnVariablesLoaded()
|
||||
function AtlasLoot:OnEnable()
|
||||
AtlasLoot.db = LibStub("AceDB-3.0"):New("AtlasLootDB");
|
||||
AtlasLoot.db:RegisterDefaults(AtlasLootDBDefaults);
|
||||
if not AtlasLootCharDB then AtlasLootCharDB = {} end
|
||||
@@ -186,13 +160,10 @@ function AtlasLoot_OnVariablesLoaded()
|
||||
AtlasLootOptions_OnLoad();
|
||||
AtlasLoot_CreateOptionsInfoTooltips();
|
||||
--Set visual style for the loot browser
|
||||
if( not AtlasLoot.db.profile.CraftingLink ) then
|
||||
AtlasLoot.db.profile.CraftingLink = 1;
|
||||
end
|
||||
if( AtlasLoot.db.profile.LootBrowserStyle == 1 ) then
|
||||
AtlasLoot_SetNewStyle("new");
|
||||
AtlasLoot:SetNewStyle("new");
|
||||
else
|
||||
AtlasLoot_SetNewStyle("old");
|
||||
AtlasLoot:SetNewStyle("old");
|
||||
end
|
||||
--Disable options that don't have the supporting mods
|
||||
if( not LootLink_SetTooltip and (AtlasLoot.db.profile.LootlinkTT == true)) then
|
||||
@@ -224,7 +195,7 @@ function AtlasLoot_OnVariablesLoaded()
|
||||
end
|
||||
if #idsToSearch > 0 then
|
||||
--Let's do this
|
||||
AtlasLoot_LoadAllModules();
|
||||
AtlasLoot:LoadAllModules();
|
||||
for _, dataSource in ipairs(AtlasLoot_SearchTables) do
|
||||
if AtlasLoot_Data[dataSource] then
|
||||
for dataID, lootTable in pairs(AtlasLoot_Data[dataSource]) do
|
||||
@@ -244,7 +215,6 @@ function AtlasLoot_OnVariablesLoaded()
|
||||
end
|
||||
if((AtlasLootCharDB.AtlasLootVersion == nil) or (tonumber(AtlasLootCharDB.AtlasLootVersion) < 40301)) then
|
||||
AtlasLootCharDB.AtlasLootVersion = VERSION_MAJOR..VERSION_MINOR..VERSION_BOSSES;
|
||||
AtlasLootCharDB.AutoQuery = false;
|
||||
AtlasLootOptions_Init();
|
||||
end
|
||||
--Adds an AtlasLoot button to the Feature Frame in Cosmos
|
||||
@@ -271,15 +241,15 @@ function AtlasLoot_OnVariablesLoaded()
|
||||
);
|
||||
end
|
||||
--Set up the menu in the loot browser
|
||||
AtlasLoot_DewdropRegister();
|
||||
AtlasLoot_DewdropExpansionMenuRegister();
|
||||
AtlasLoot:DewdropRegister();
|
||||
AtlasLoot:DewdropExpansionMenuRegister();
|
||||
--If EquipCompare is available, use it
|
||||
if((EquipCompare_RegisterTooltip) and (AtlasLoot.db.profile.EquipCompare == true)) then
|
||||
EquipCompare_RegisterTooltip(AtlasLootTooltip);
|
||||
end
|
||||
|
||||
if (AtlasLoot.db.profile.LoadAllLoDStartup == true) then
|
||||
AtlasLoot_LoadAllModules();
|
||||
AtlasLoot:LoadAllModules();
|
||||
else
|
||||
collectgarbage("collect");
|
||||
end
|
||||
@@ -301,9 +271,6 @@ end
|
||||
|
||||
function AtlasLoot_Reset(data)
|
||||
AtlasLootDefaultFrame:Hide();
|
||||
if AtlasFrame then
|
||||
AtlasFrame:Hide();
|
||||
end
|
||||
if data == "frames" then
|
||||
AtlasLootDefaultFrame:ClearAllPoints();
|
||||
AtlasLootDefaultFrame:SetPoint("CENTER", "UIParent", "CENTER", 0, 0);
|
||||
@@ -316,7 +283,7 @@ function AtlasLoot_Reset(data)
|
||||
AtlasLoot_UpdateLootBrowserScale();
|
||||
elseif data == "quicklooks" then
|
||||
AtlasLootCharDB["QuickLooks"] = {};
|
||||
AtlasLoot_RefreshQuickLookButtons();
|
||||
AtlasLoot:RefreshQuickLookButtons();
|
||||
elseif data == "wishlist" then
|
||||
AtlasLootCharDB["WishList"] = {};
|
||||
AtlasLootCharDB["SearchResult"] = {};
|
||||
@@ -332,7 +299,7 @@ function AtlasLoot_Reset(data)
|
||||
AtlasLoot.db.profile.LootBrowserScale = 1.0;
|
||||
AtlasLoot_UpdateLootBrowserScale();
|
||||
AtlasLootCharDB["QuickLooks"] = {};
|
||||
AtlasLoot_RefreshQuickLookButtons();
|
||||
AtlasLoot:RefreshQuickLookButtons();
|
||||
AtlasLootCharDB["WishList"] = {};
|
||||
AtlasLootCharDB["SearchResult"] = {};
|
||||
AtlasLootCharDB.LastSearchedText = "";
|
||||
@@ -381,10 +348,7 @@ AtlasLoot_OnLoad:
|
||||
Performs inital setup of the mod and registers it for further setup when
|
||||
the required resources are in place
|
||||
]]
|
||||
function AtlasLoot_OnLoad()
|
||||
this:RegisterEvent("VARIABLES_LOADED");
|
||||
this:RegisterEvent("ADDON_ACTION_FORBIDDEN");
|
||||
this:RegisterEvent("ADDON_ACTION_BLOCKED");
|
||||
function AtlasLoot:OnInitialize()
|
||||
--Enable the use of /al or /atlasloot to open the loot browser
|
||||
SLASH_ATLASLOOT1 = "/atlasloot";
|
||||
SLASH_ATLASLOOT2 = "/al";
|
||||
@@ -447,7 +411,7 @@ function AtlasLoot:CreateToken(dataID)
|
||||
end
|
||||
end)
|
||||
if #AtlasLoot_Data[dataID] == n and #t == c then
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4]);
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4]);
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -455,15 +419,14 @@ function AtlasLoot:CreateToken(dataID)
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_ShowItemsFrame(dataID, dataSource, pFrame, tablenum):
|
||||
AtlasLoot:ShowItemsFrame(dataID, dataSource, pFrame, tablenum):
|
||||
dataID - Name of the loot table
|
||||
dataSource - Table in the database where the loot table is stored
|
||||
pFrame - Data structure describing how and where to anchor the item frame (more details, see the function AtlasLoot_SetItemInfoFrame)
|
||||
tablenum - Number of the table with the loot in it
|
||||
tablenum - Table number of the loot table being displayed
|
||||
It is the workhorse of the mod and allows the loot tables to be displayed any way anywhere in any mod.
|
||||
]]
|
||||
function AtlasLoot_ShowItemsFrame(dataID, dataSource, pFrame, tablenum)
|
||||
function AtlasLoot:ShowItemsFrame(dataID, dataSource, pFrame, tablenum)
|
||||
--Set up local variables needed for GetItemInfo, etc
|
||||
local itemName, itemLink, itemQuality, itemLevel, itemType, itemSubType, itemCount, itemEquipLoc, itemTexture, itemColor;
|
||||
local iconFrame, nameFrame, extraFrame, itemButton;
|
||||
@@ -489,6 +452,7 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, pFrame, tablenum)
|
||||
--Hide Map and reshow lootbackground
|
||||
AtlasLootDefaultFrame_Map:Hide();
|
||||
AtlasLootDefaultFrame_LootBackground:Show();
|
||||
AtlasLootItemsFrame:Show();
|
||||
|
||||
-- Hide the Filter Check-Box
|
||||
AtlasLootFilterCheck:Hide();
|
||||
@@ -570,11 +534,11 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, pFrame, tablenum)
|
||||
toShow = false;
|
||||
end
|
||||
end
|
||||
IDfound = AL_FindId(item[2], min(AtlasLoot_Difficulty:getMaxDifficulty(dataSource[dataID].Type), itemDif)) or item[2];
|
||||
IDfound = AtlasLoot:FindId(item[2], min(AtlasLoot_Difficulty:getMaxDifficulty(dataSource[dataID].Type), itemDif)) or item[2];
|
||||
end
|
||||
|
||||
if string.sub(IDfound, 1, 1) == "s" then
|
||||
IDfound = AL_FindId(item[2], itemDif) or item[2];
|
||||
IDfound = AtlasLoot:FindId(item[2], itemDif) or item[2];
|
||||
else
|
||||
isItem = true;
|
||||
end
|
||||
@@ -588,10 +552,10 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, pFrame, tablenum)
|
||||
if tonumber(item[AtlasLoot_Difficulty.MAX_DIF]) < itemDif then itemDif = item[AtlasLoot_Difficulty.MAX_DIF] end;
|
||||
end
|
||||
--If something was found in itemID database show that if not show default table item
|
||||
IDfound = AL_FindId(item[2], itemDif) or item[2];
|
||||
IDfound = AtlasLoot:FindId(item[2], itemDif) or item[2];
|
||||
|
||||
if ItemindexID ~= "" and dataID == "SearchResult" then
|
||||
IDfound = AL_FindId(item[9], itemDif) or item[2];
|
||||
IDfound = AtlasLoot:FindId(item[9], itemDif) or item[2];
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -696,7 +660,7 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, pFrame, tablenum)
|
||||
extraFrame:Show();
|
||||
--For convenience, we store information about the objects in the objects so that it can be easily accessed later
|
||||
if((string.sub(IDfound, 1, 1) == "s") and (ItemindexID ~= "Pattern") and (tonumber(dataSource[dataID][tablenum][i][3]))) then
|
||||
IDfound = AL_FindId(tonumber(dataSource[dataID][tablenum][i][3]), ItemindexID) or tonumber(dataSource[dataID][tablenum][i][3]);
|
||||
IDfound = AtlasLoot:FindId(tonumber(dataSource[dataID][tablenum][i][3]), ItemindexID) or tonumber(dataSource[dataID][tablenum][i][3]);
|
||||
itemButton.itemID = IDfound;
|
||||
itemButton.spellitemID = dataSource[dataID][tablenum][i][3];
|
||||
else
|
||||
@@ -802,103 +766,53 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, pFrame, tablenum)
|
||||
end
|
||||
|
||||
--Anchor the item frame where it is supposed to be
|
||||
AtlasLoot_SetItemInfoFrame(pFrame);
|
||||
if ATLASLOOT_FILTER_ENABLE and dataID ~= "FilterList" then
|
||||
AtlasLoot_HideNoUsableItems();
|
||||
end
|
||||
|
||||
AtlasLoot_QueryLootPage();
|
||||
AtlasLoot:QueryLootPage();
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_SetItemInfoFrame(pFrame):
|
||||
pFrame - Data structure with anchor info. Format: {Anchor Point, Relative Frame, Relative Point, X Offset, Y Offset }
|
||||
This function anchors the item frame where appropriate. The main Atlas frame can be passed instead of a custom pFrame.
|
||||
If no pFrame is specified, the Atlas Frame is used if Atlas is installed.
|
||||
]]
|
||||
function AtlasLoot_SetItemInfoFrame(pFrame)
|
||||
if ( pFrame ) then
|
||||
--Load pFrame
|
||||
AtlasLootItemsFrame:ClearAllPoints();
|
||||
AtlasLootItemsFrame:SetParent(pFrame[2]);
|
||||
AtlasLootItemsFrame:ClearAllPoints();
|
||||
AtlasLootItemsFrame:SetPoint(pFrame[1], pFrame[2], pFrame[3], pFrame[4], pFrame[5]);
|
||||
else
|
||||
--Last resort, dump the items frame in the middle of the screen
|
||||
AtlasLootItemsFrame:ClearAllPoints();
|
||||
AtlasLootItemsFrame:SetParent(UIParent);
|
||||
AtlasLootItemsFrame:SetPoint("CENTER", "UIParent", "CENTER", 0, 0);
|
||||
end
|
||||
AtlasLootItemsFrame:Show();
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_NavButton_OnClick:
|
||||
AtlasLoot:NavButton_OnClick:
|
||||
Called when <-, -> are pressed and calls up the appropriate loot page
|
||||
]]
|
||||
function AtlasLoot_NavButton_OnClick(self)
|
||||
function AtlasLoot:NavButton_OnClick(self)
|
||||
local tablenum, dataID, dataSource = self.tablenum, self.tablebase[1], self.tablebase[2];
|
||||
AtlasLoot_ShowItemsFrame(dataID, dataSource, AtlasLootItemsFrame.refresh[3], tablenum);
|
||||
AtlasLoot:ShowItemsFrame(dataID, dataSource, AtlasLootItemsFrame.refresh[3], tablenum);
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_NavButton_OnClick:
|
||||
AtlasLoot:NavButton_OnClick:
|
||||
Called when 'Back'Button is pressed and calls up the appropriate loot page
|
||||
]]
|
||||
function AtlasLoot_BackButton_OnClick()
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4]);
|
||||
function AtlasLoot:BackButton_OnClick()
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4]);
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_IsLootTableAvailable(dataID):
|
||||
AtlasLoot:IsLootTableAvailable(dataID):
|
||||
Checks if a loot table is in memory and attempts to load the correct LoD module if it isn't
|
||||
dataID: Loot table dataID
|
||||
]]
|
||||
function AtlasLoot_IsLootTableAvailable(dataSource)
|
||||
function AtlasLoot:IsLootTableAvailable(dataSource)
|
||||
|
||||
local moduleName = nil;
|
||||
moduleName = AtlasLoot_GetLODModule(dataSource);
|
||||
moduleName = AtlasLoot:GetLODModule(dataSource);
|
||||
|
||||
if IsAddOnLoaded(moduleName) then
|
||||
return true;
|
||||
else
|
||||
LoadAddOn(moduleName);
|
||||
--[[ if moduleName then
|
||||
if not IsAddOnLoaded(moduleName) then
|
||||
loaded, reason=LoadAddOn(moduleName);
|
||||
if not loaded then
|
||||
if (reason == "MISSING") or (reason == "DISABLED") then
|
||||
DEFAULT_CHAT_FRAME:AddMessage(GREEN..AL["AtlasLoot"]..": "..ORANGE..AtlasLoot_TableNames[dataID][1]..WHITE..AL[" is unavailable, the following load on demand module is required: "]..ORANGE..moduleName);
|
||||
return false;
|
||||
else
|
||||
DEFAULT_CHAT_FRAME:AddMessage(RED..AL["AtlasLoot Error!"].." "..WHITE..AL["Status of the following module could not be determined: "]..ORANGE..moduleName);
|
||||
return false;
|
||||
end
|
||||
end
|
||||
end
|
||||
if AtlasLoot_Data[dataID] then
|
||||
if ATLASLOOT_DEBUGMESSAGES then
|
||||
DEFAULT_CHAT_FRAME:AddMessage(GREEN..AL["AtlasLoot"]..": "..ORANGE..moduleName..WHITE.." "..AL["sucessfully loaded."]);
|
||||
end
|
||||
collectgarbage("collect");
|
||||
return true;
|
||||
else
|
||||
DEFAULT_CHAT_FRAME:AddMessage(RED..AL["AtlasLoot Error!"].." "..ORANGE..AtlasLoot_TableNames[dataID][1]..WHITE..AL[" could not be accessed, the following module may be out of date: "]..ORANGE..moduleName);
|
||||
return false;
|
||||
end
|
||||
else
|
||||
DEFAULT_CHAT_FRAME:AddMessage(RED..AL["AtlasLoot Error!"].." "..ORANGE..AL["Loot module returned as nil!"]);
|
||||
return false;
|
||||
end ]]
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_GetLODModule(dataSource)
|
||||
AtlasLoot:GetLODModule(dataSource)
|
||||
Returns the name of the module that needs to be loaded
|
||||
dataSource: Location of the loot table
|
||||
]]
|
||||
function AtlasLoot_GetLODModule(dataSource)
|
||||
function AtlasLoot:GetLODModule(dataSource)
|
||||
if (dataSource=="AtlasLootOriginalWoW") then
|
||||
return "AtlasLoot_OriginalWoW";
|
||||
elseif (dataSource=="AtlasLootBurningCrusade") then
|
||||
@@ -913,10 +827,10 @@ function AtlasLoot_GetLODModule(dataSource)
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_LoadAllModules()
|
||||
AtlasLoot:LoadAllModules()
|
||||
Used to load all available LoD modules
|
||||
]]
|
||||
function AtlasLoot_LoadAllModules()
|
||||
function AtlasLoot:LoadAllModules()
|
||||
local orig, bc, wotlk, craft, world;
|
||||
orig, _ = LoadAddOn("AtlasLoot_OriginalWoW");
|
||||
bc, _ = LoadAddOn("AtlasLoot_BurningCrusade");
|
||||
@@ -953,11 +867,11 @@ function AtlasLoot_LoadAllModules()
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_ShowQuickLooks(button)
|
||||
AtlasLoot:ShowQuickLooks(button)
|
||||
button: Identity of the button pressed to trigger the function
|
||||
Shows the GUI for setting Quicklooks
|
||||
]]
|
||||
function AtlasLoot_ShowQuickLooks(button)
|
||||
function AtlasLoot:ShowQuickLooks(button)
|
||||
local dewdrop = AceLibrary("Dewdrop-2.0");
|
||||
if dewdrop:IsOpen(button) then
|
||||
dewdrop:Close(1);
|
||||
@@ -969,7 +883,7 @@ function AtlasLoot_ShowQuickLooks(button)
|
||||
"tooltipText", AL["Assign this loot table\n to QuickLook"].." 1",
|
||||
"func", function()
|
||||
AtlasLootCharDB["QuickLooks"][1]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLoot_RefreshQuickLookButtons();
|
||||
AtlasLoot:RefreshQuickLookButtons();
|
||||
dewdrop:Close(1);
|
||||
end
|
||||
);
|
||||
@@ -979,7 +893,7 @@ function AtlasLoot_ShowQuickLooks(button)
|
||||
"tooltipText", AL["Assign this loot table\n to QuickLook"].." 2",
|
||||
"func", function()
|
||||
AtlasLootCharDB["QuickLooks"][2]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLoot_RefreshQuickLookButtons();
|
||||
AtlasLoot:RefreshQuickLookButtons();
|
||||
dewdrop:Close(1);
|
||||
end
|
||||
);
|
||||
@@ -989,7 +903,7 @@ function AtlasLoot_ShowQuickLooks(button)
|
||||
"tooltipText", AL["Assign this loot table\n to QuickLook"].." 3",
|
||||
"func", function()
|
||||
AtlasLootCharDB["QuickLooks"][3]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLoot_RefreshQuickLookButtons();
|
||||
AtlasLoot:RefreshQuickLookButtons();
|
||||
dewdrop:Close(1);
|
||||
end
|
||||
);
|
||||
@@ -999,7 +913,7 @@ function AtlasLoot_ShowQuickLooks(button)
|
||||
"tooltipText", AL["Assign this loot table\n to QuickLook"].." 4",
|
||||
"func", function()
|
||||
AtlasLootCharDB["QuickLooks"][4]={AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4], ATLASLOOT_LASTMODULE, ATLASLOOT_CURRENTTABLE};
|
||||
AtlasLoot_RefreshQuickLookButtons();
|
||||
AtlasLoot:RefreshQuickLookButtons();
|
||||
dewdrop:Close(1);
|
||||
end
|
||||
);
|
||||
@@ -1014,17 +928,15 @@ function AtlasLoot_ShowQuickLooks(button)
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_RefreshQuickLookButtons()
|
||||
AtlasLoot:RefreshQuickLookButtons()
|
||||
Enables/disables the quicklook buttons depending on what is assigned
|
||||
]]
|
||||
function AtlasLoot_RefreshQuickLookButtons()
|
||||
i=1;
|
||||
function AtlasLoot:RefreshQuickLookButtons()
|
||||
local i=1;
|
||||
while i<5 do
|
||||
if ((not AtlasLootCharDB["QuickLooks"][i]) or (not AtlasLootCharDB["QuickLooks"][i][1])) or (AtlasLootCharDB["QuickLooks"][i][1]==nil) then
|
||||
getglobal("AtlasLootPanel_Preset"..i):Disable();
|
||||
getglobal("AtlasLootDefaultFrame_Preset"..i):Disable();
|
||||
else
|
||||
getglobal("AtlasLootPanel_Preset"..i):Enable();
|
||||
getglobal("AtlasLootDefaultFrame_Preset"..i):Enable();
|
||||
end
|
||||
i=i+1;
|
||||
@@ -1032,7 +944,7 @@ function AtlasLoot_RefreshQuickLookButtons()
|
||||
end
|
||||
|
||||
|
||||
function AtlasLoot_QueryLootPage()
|
||||
function AtlasLoot:QueryLootPage()
|
||||
local START = 1;
|
||||
local MAX_BUTTONS = 30;
|
||||
local COUNTED = 0;
|
||||
@@ -1051,7 +963,7 @@ function AtlasLoot_QueryLootPage()
|
||||
COUNTED = COUNTED + 1;
|
||||
if not REFRESHED and (COUNTED == MAX_BUTTONS) then
|
||||
REFRESHED = true;
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4]);
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4]);
|
||||
end
|
||||
end)
|
||||
else
|
||||
@@ -1067,10 +979,10 @@ function AtlasLoot_QueryLootPage()
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_QueryLootPage()
|
||||
AtlasLoot:QueryLootPage()
|
||||
Querys all valid items on the current loot page.
|
||||
]]
|
||||
function AtlasLoot_QueryLootPageOLD()
|
||||
function AtlasLoot:QueryLootPageOLD()
|
||||
local lastitem
|
||||
for t = 1, 30, 1 do
|
||||
local xbutton = getglobal("AtlasLootItem_"..t);
|
||||
@@ -1087,7 +999,7 @@ local lastitem
|
||||
if not (item:GetInfo()) then
|
||||
item:ContinueOnLoad(function(itemId)
|
||||
if i == lastitem then
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4]);
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4]);
|
||||
end
|
||||
end)
|
||||
end
|
||||
@@ -1096,14 +1008,14 @@ local lastitem
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_AddTooltip(frameb, tooltiptext)
|
||||
AtlasLoot:AddTooltip(frameb, tooltiptext)
|
||||
Adds explanatory tooltips to UI objects.
|
||||
]]
|
||||
function AtlasLoot_AddTooltip(frameb, tooltiptext)
|
||||
function AtlasLoot:AddTooltip(frameb, tooltiptext)
|
||||
if not tooltiptext or not frameb then return end
|
||||
local frame = getglobal(frameb)
|
||||
frame:SetScript("OnEnter", function()
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
|
||||
GameTooltip:SetOwner(frame, "ANCHOR_RIGHT")
|
||||
GameTooltip:SetText(tooltiptext)
|
||||
GameTooltip:Show()
|
||||
end)
|
||||
@@ -1111,11 +1023,11 @@ function AtlasLoot_AddTooltip(frameb, tooltiptext)
|
||||
end
|
||||
|
||||
--[[
|
||||
AL_FindId(id, difficulty)
|
||||
AtlasLoot:FindId(id, difficulty)
|
||||
Finds the Ids of other difficulties based on the normal id of the item and the difficulty parameter given.
|
||||
On the form of {ID, {normal, heroic, mythic, mythic1, mythic2, ... ,mythicN}}
|
||||
]]
|
||||
function AL_FindId(id, difficulty)
|
||||
function AtlasLoot:FindId(id, difficulty)
|
||||
if ItemIDsDatabase[id] ~= nil then
|
||||
return ItemIDsDatabase[id][difficulty], true
|
||||
end
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -28,7 +28,7 @@ function AtlasLoot:MapOnShow()
|
||||
if AtlasLootDefaultFrame_Map:IsVisible() then
|
||||
AtlasLootDefaultFrame_Map:Hide();
|
||||
AtlasLootDefaultFrame_LootBackground:Show();
|
||||
AtlasLoot_BackButton_OnClick();
|
||||
AtlasLoot:BackButton_OnClick();
|
||||
AtlasLoot_BossName:Show();
|
||||
Atlasloot_HeaderLabel:Hide();
|
||||
AtlasLoot:ScrollFrameUpdate();
|
||||
|
||||
@@ -208,13 +208,13 @@ function AtlasLoot_HideNoUsableItems()
|
||||
end
|
||||
end
|
||||
|
||||
AtlasLoot_ShowItemsFrame("FilterList", AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4])
|
||||
AtlasLoot:ShowItemsFrame("FilterList", AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4])
|
||||
end
|
||||
|
||||
function AtlasLoot_FilterEnableButton()
|
||||
if ATLASLOOT_FILTER_ENABLE == true then
|
||||
ATLASLOOT_FILTER_ENABLE = false;
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4]);
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refreshOri[1], AtlasLootItemsFrame.refreshOri[2], AtlasLootItemsFrame.refreshOri[3], AtlasLootItemsFrame.refreshOri[4]);
|
||||
else
|
||||
ATLASLOOT_FILTER_ENABLE = true
|
||||
AtlasLoot_HideNoUsableItems();
|
||||
|
||||
@@ -34,7 +34,7 @@ end
|
||||
-- Item OnEnter
|
||||
-- Called when a loot item is moused over
|
||||
--------------------------------------------------------------------------------
|
||||
function AtlasLootItem_OnEnter()
|
||||
function AtlasLootItem_OnEnter(self)
|
||||
local isItem;
|
||||
AtlasLootTooltip:ClearLines();
|
||||
for i=1, 30, 1 do
|
||||
@@ -42,17 +42,17 @@ function AtlasLootItem_OnEnter()
|
||||
getglobal("AtlasLootTooltipTextRight"..i):SetText("");
|
||||
end
|
||||
end
|
||||
if this.itemID and (this.itemID ~= 0) then
|
||||
if string.sub(this.itemID, 1, 1) == "s" then
|
||||
if self.itemID and (self.itemID ~= 0) then
|
||||
if string.sub(self.itemID, 1, 1) == "s" then
|
||||
isItem = false;
|
||||
else
|
||||
isItem = true;
|
||||
end
|
||||
if isItem then
|
||||
local color = strsub(getglobal("AtlasLootItem_"..this:GetID().."_Name"):GetText(), 3, 10);
|
||||
local name = strsub(getglobal("AtlasLootItem_"..this:GetID().."_Name"):GetText(), 11);
|
||||
if(this.itemID ~= 0 and this.itemID ~= "" and this.itemID ~= nil and AtlasLootDKPValues and AtlasLootClassPriority) then
|
||||
Identifier = "Item"..this.itemID;
|
||||
local color = strsub(getglobal("AtlasLootItem_"..self:GetID().."_Name"):GetText(), 3, 10);
|
||||
local name = strsub(getglobal("AtlasLootItem_"..self:GetID().."_Name"):GetText(), 11);
|
||||
if(self.itemID ~= 0 and self.itemID ~= "" and self.itemID ~= nil and AtlasLootDKPValues and AtlasLootClassPriority) then
|
||||
Identifier = "Item"..self.itemID;
|
||||
DKP = AtlasLootDKPValues[Identifier];
|
||||
priority = AtlasLootClassPriority[Identifier];
|
||||
else
|
||||
@@ -62,15 +62,15 @@ function AtlasLootItem_OnEnter()
|
||||
--Lootlink tooltips
|
||||
if( AtlasLoot.db.profile.LootlinkTT ) then
|
||||
--If we have seen the item, use the game tooltip to minimise same name item problems
|
||||
if(GetItemInfo(this.itemID) ~= nil) then
|
||||
getglobal(this:GetName().."_Unsafe"):Hide();
|
||||
AtlasLootTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 24);
|
||||
AtlasLootTooltip:SetHyperlink("item:"..this.itemID..":0:0:0");
|
||||
if(GetItemInfo(self.itemID) ~= nil) then
|
||||
getglobal(self:GetName().."_Unsafe"):Hide();
|
||||
AtlasLootTooltip:SetOwner(self, "ANCHOR_RIGHT", -(self:GetWidth() / 2), 24);
|
||||
AtlasLootTooltip:SetHyperlink("item:"..self.itemID..":0:0:0");
|
||||
if ( AtlasLoot.db.profile.ItemIDs ) then
|
||||
AtlasLootTooltip:AddLine(BLUE..AL["ItemID:"].." "..this.itemID, nil, nil, nil, 1);
|
||||
AtlasLootTooltip:AddLine(BLUE..AL["ItemID:"].." "..self.itemID, nil, nil, nil, 1);
|
||||
end
|
||||
if( this.droprate ~= nil) then
|
||||
AtlasLootTooltip:AddLine(AL["Drop Rate: "]..this.droprate, 1, 1, 0);
|
||||
if( self.droprate ~= nil) then
|
||||
AtlasLootTooltip:AddLine(AL["Drop Rate: "]..self.droprate, 1, 1, 0);
|
||||
end
|
||||
if( DKP ~= nil and DKP ~= "" ) then
|
||||
AtlasLootTooltip:AddLine(RED..DKP.." "..AL["DKP"], 1, 1, 0, 1);
|
||||
@@ -80,24 +80,24 @@ function AtlasLootItem_OnEnter()
|
||||
end
|
||||
AtlasLootTooltip:Show();
|
||||
if((AtlasLoot.db.profile.EquipCompare and ((not EquipCompare_RegisterTooltip) or (not EquipCompare_Enabled)))) or IsShiftKeyDown() then
|
||||
AtlasLootItem_ShowCompareItem(); --- CALL MISSING METHOD TO SHOW 2 TOOLTIPS (Item Compare)
|
||||
AtlasLootItem_ShowCompareItem(self); --- CALL MISSING METHOD TO SHOW 2 TOOLTIPS (Item Compare)
|
||||
end
|
||||
if (LootLink_AddItem) then
|
||||
LootLink_AddItem(name, this.itemID..":0:0:0", color);
|
||||
LootLink_AddItem(name, self.itemID..":0:0:0", color);
|
||||
end
|
||||
else
|
||||
getglobal(this:GetName().."_Unsafe"):Show();
|
||||
AtlasLootTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 24);
|
||||
if (LootLink_Database and LootLink_Database[this.itemID]) then
|
||||
LootLink_SetTooltip(AtlasLootTooltip, LootLink_Database[this.itemID][1], 1);
|
||||
getglobal(self:GetName().."_Unsafe"):Show();
|
||||
AtlasLootTooltip:SetOwner(self, "ANCHOR_RIGHT", -(self:GetWidth() / 2), 24);
|
||||
if (LootLink_Database and LootLink_Database[self.itemID]) then
|
||||
LootLink_SetTooltip(AtlasLootTooltip, LootLink_Database[self.itemID][1], 1);
|
||||
else
|
||||
LootLink_SetTooltip(AtlasLootTooltip,strsub(getglobal("AtlasLootItem_"..this:GetID().."_Name"):GetText(), 11), 1);
|
||||
LootLink_SetTooltip(AtlasLootTooltip,strsub(getglobal("AtlasLootItem_"..self:GetID().."_Name"):GetText(), 11), 1);
|
||||
end
|
||||
if ( AtlasLoot.db.profile.ItemIDs ) then
|
||||
AtlasLootTooltip:AddLine(BLUE..AL["ItemID:"].." "..this.itemID, nil, nil, nil, 1);
|
||||
AtlasLootTooltip:AddLine(BLUE..AL["ItemID:"].." "..self.itemID, nil, nil, nil, 1);
|
||||
end
|
||||
if( this.droprate ~= nil) then
|
||||
AtlasLootTooltip:AddLine(AL["Drop Rate: "]..this.droprate, 1, 1, 0, 1);
|
||||
if( self.droprate ~= nil) then
|
||||
AtlasLootTooltip:AddLine(AL["Drop Rate: "]..self.droprate, 1, 1, 0, 1);
|
||||
end
|
||||
if( DKP ~= nil and DKP ~= "" ) then
|
||||
AtlasLootTooltip:AddLine(RED..DKP.." "..AL["DKP"], 1, 1, 0);
|
||||
@@ -111,15 +111,15 @@ function AtlasLootItem_OnEnter()
|
||||
end
|
||||
--Item Sync tooltips
|
||||
elseif( AtlasLoot.db.profile.ItemSyncTT ) then
|
||||
if(GetItemInfo(this.itemID) ~= nil) then
|
||||
getglobal(this:GetName().."_Unsafe"):Hide();
|
||||
if(GetItemInfo(self.itemID) ~= nil) then
|
||||
getglobal(self:GetName().."_Unsafe"):Hide();
|
||||
end
|
||||
ItemSync:ButtonEnter();
|
||||
if ( AtlasLoot.db.profile.ItemIDs ) then
|
||||
GameTooltip:AddLine(BLUE..AL["ItemID:"].." "..this.itemID, nil, nil, nil, 1);
|
||||
GameTooltip:AddLine(BLUE..AL["ItemID:"].." "..self.itemID, nil, nil, nil, 1);
|
||||
end
|
||||
if( this.droprate ~= nil) then
|
||||
GameTooltip:AddLine(AL["Drop Rate: "]..this.droprate, 1, 1, 0);
|
||||
if( self.droprate ~= nil) then
|
||||
GameTooltip:AddLine(AL["Drop Rate: "]..self.droprate, 1, 1, 0);
|
||||
end
|
||||
if( DKP ~= nil and DKP ~= "" ) then
|
||||
GameTooltip:AddLine(RED..DKP.." "..AL["DKP"], 1, 1, 0);
|
||||
@@ -133,16 +133,16 @@ function AtlasLootItem_OnEnter()
|
||||
end
|
||||
--Default game tooltips
|
||||
else
|
||||
if(this.itemID ~= nil) then
|
||||
if(GetItemInfo(this.itemID) ~= nil) then
|
||||
getglobal(this:GetName().."_Unsafe"):Hide();
|
||||
AtlasLootTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 24);
|
||||
AtlasLootTooltip:SetHyperlink("item:"..this.itemID..":0:0:0");
|
||||
if(self.itemID ~= nil) then
|
||||
if(GetItemInfo(self.itemID) ~= nil) then
|
||||
getglobal(self:GetName().."_Unsafe"):Hide();
|
||||
AtlasLootTooltip:SetOwner(self, "ANCHOR_RIGHT", -(self:GetWidth() / 2), 24);
|
||||
AtlasLootTooltip:SetHyperlink("item:"..self.itemID..":0:0:0");
|
||||
if ( AtlasLoot.db.profile.ItemIDs ) then
|
||||
AtlasLootTooltip:AddLine(BLUE..AL["ItemID:"].." "..this.itemID, nil, nil, nil, 1);
|
||||
AtlasLootTooltip:AddLine(BLUE..AL["ItemID:"].." "..self.itemID, nil, nil, nil, 1);
|
||||
end
|
||||
if( this.droprate ~= nil) then
|
||||
AtlasLootTooltip:AddLine(AL["Drop Rate: "]..this.droprate, 1, 1, 0);
|
||||
if( self.droprate ~= nil) then
|
||||
AtlasLootTooltip:AddLine(AL["Drop Rate: "]..self.droprate, 1, 1, 0);
|
||||
end
|
||||
if( DKP ~= nil and DKP ~= "" ) then
|
||||
AtlasLootTooltip:AddLine(RED..DKP.." "..AL["DKP"], 1, 1, 0);
|
||||
@@ -152,14 +152,14 @@ function AtlasLootItem_OnEnter()
|
||||
end
|
||||
AtlasLootTooltip:Show();
|
||||
if((AtlasLoot.db.profile.EquipCompare and ((not EquipCompare_RegisterTooltip) or (not EquipCompare_Enabled)))) or IsShiftKeyDown() then
|
||||
AtlasLootItem_ShowCompareItem(); --- CALL MISSING METHOD TO SHOW 2 TOOLTIPS (Item Compare)
|
||||
AtlasLootItem_ShowCompareItem(self); --- CALL MISSING METHOD TO SHOW 2 TOOLTIPS (Item Compare)
|
||||
end
|
||||
else
|
||||
AtlasLootTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 24);
|
||||
AtlasLootTooltip:SetOwner(self, "ANCHOR_RIGHT", -(self:GetWidth() / 2), 24);
|
||||
AtlasLootTooltip:ClearLines();
|
||||
AtlasLootTooltip:AddLine(RED..AL["Item Unavailable"], nil, nil, nil, 1);
|
||||
AtlasLootTooltip:AddLine(BLUE..AL["ItemID:"].." "..this.itemID, nil, nil, nil, 1);
|
||||
AtlasLootTooltip:AddLine(AL["This item is unsafe. To view this item without the risk of disconnection, you need to have first seen it in the game world. This is a restriction enforced by Blizzard since Patch 1.10."], nil, nil, nil, 1);
|
||||
AtlasLootTooltip:AddLine(BLUE..AL["ItemID:"].." "..self.itemID, nil, nil, nil, 1);
|
||||
AtlasLootTooltip:AddLine(AL["self item is unsafe. To view self item without the risk of disconnection, you need to have first seen it in the game world. This is a restriction enforced by Blizzard since Patch 1.10."], nil, nil, nil, 1);
|
||||
AtlasLootTooltip:AddLine(" ");
|
||||
AtlasLootTooltip:AddLine(AL["You can right-click to attempt to query the server. You may be disconnected."], nil, nil, nil, 1);
|
||||
AtlasLootTooltip:Show();
|
||||
@@ -167,13 +167,13 @@ function AtlasLootItem_OnEnter()
|
||||
end
|
||||
end
|
||||
else
|
||||
spellID = string.sub(this.itemID, 2);
|
||||
AtlasLootTooltip:SetOwner(this, "ANCHOR_RIGHT", -(this:GetWidth() / 2), 24);
|
||||
spellID = string.sub(self.itemID, 2);
|
||||
AtlasLootTooltip:SetOwner(self, "ANCHOR_RIGHT", -(self:GetWidth() / 2), 24);
|
||||
AtlasLootTooltip:ClearLines();
|
||||
AtlasLootTooltip:SetHyperlink(AtlasLoot_GetEnchantLink(spellID));
|
||||
AtlasLootTooltip:Show();
|
||||
if(this.spellitemID and ((AtlasLoot.db.profile.EquipCompare and ((not EquipCompare_RegisterTooltip) or (not EquipCompare_Enabled))) or IsShiftKeyDown())) then
|
||||
AtlasLootItem_ShowCompareItem(); --- CALL MISSING METHOD TO SHOW 2 TOOLTIPS (Item Compare)
|
||||
if(self.spellitemID and ((AtlasLoot.db.profile.EquipCompare and ((not EquipCompare_RegisterTooltip) or (not EquipCompare_Enabled))) or IsShiftKeyDown())) then
|
||||
AtlasLootItem_ShowCompareItem(self); --- CALL MISSING METHOD TO SHOW 2 TOOLTIPS (Item Compare)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -183,7 +183,7 @@ end
|
||||
-- Item OnLeave
|
||||
-- Called when the mouse cursor leaves a loot item
|
||||
--------------------------------------------------------------------------------
|
||||
function AtlasLootItem_OnLeave()
|
||||
function AtlasLootItem_OnLeave(self)
|
||||
--Hide the necessary tooltips
|
||||
if( AtlasLoot.db.profile.LootlinkTT ) then
|
||||
AtlasLootTooltip:Hide();
|
||||
@@ -192,7 +192,7 @@ function AtlasLootItem_OnLeave()
|
||||
GameTooltip:Hide();
|
||||
end
|
||||
else
|
||||
if(this.itemID ~= nil) then
|
||||
if(self.itemID ~= nil) then
|
||||
AtlasLootTooltip:Hide();
|
||||
GameTooltip:Hide();
|
||||
end
|
||||
@@ -207,22 +207,22 @@ end
|
||||
-- Item OnClick
|
||||
-- Called when a loot item is clicked on
|
||||
--------------------------------------------------------------------------------
|
||||
function AtlasLootItem_OnClick(arg1)
|
||||
function AtlasLootItem_OnClick(self ,arg1)
|
||||
local isItem;
|
||||
local color = strsub(getglobal("AtlasLootItem_"..this:GetID().."_Name"):GetText(), 1, 10);
|
||||
local id = this:GetID();
|
||||
local name = strsub(getglobal("AtlasLootItem_"..this:GetID().."_Name"):GetText(), 11);
|
||||
if string.sub(this.itemID, 1, 1) == "s" then
|
||||
local color = strsub(getglobal("AtlasLootItem_"..self:GetID().."_Name"):GetText(), 1, 10);
|
||||
local id = self:GetID();
|
||||
local name = strsub(getglobal("AtlasLootItem_"..self:GetID().."_Name"):GetText(), 11);
|
||||
if string.sub(self.itemID, 1, 1) == "s" then
|
||||
isItem = false;
|
||||
else
|
||||
isItem = true;
|
||||
end
|
||||
if isItem then
|
||||
local iteminfo = GetItemInfo(this.itemID);
|
||||
local itemName, itemLink, itemQuality, itemLevel, itemMinLevel, itemType, itemSubType, itemCount, itemEquipLoc, itemTexture = GetItemInfo(this.itemID);
|
||||
local iteminfo = GetItemInfo(self.itemID);
|
||||
local itemName, itemLink, itemQuality, itemLevel, itemMinLevel, itemType, itemSubType, itemCount, itemEquipLoc, itemTexture = GetItemInfo(self.itemID);
|
||||
--If shift-clicked, link in the chat window
|
||||
if(arg1=="RightButton" and not iteminfo and this.itemID ~= 0) then
|
||||
AtlasLootTooltip:SetHyperlink("item:"..this.itemID..":0:0:0:0:0:0:0");
|
||||
if(arg1=="RightButton" and not iteminfo and self.itemID ~= 0) then
|
||||
AtlasLootTooltip:SetHyperlink("item:"..self.itemID..":0:0:0:0:0:0:0");
|
||||
if not AtlasLoot.db.profile.ItemSpam then
|
||||
DEFAULT_CHAT_FRAME:AddMessage(AL["Server queried for "]..color.."["..name.."]".."|r"..AL[". Right click on any other item to refresh the loot page."]);
|
||||
end
|
||||
@@ -233,49 +233,49 @@ function AtlasLootItem_OnClick(arg1)
|
||||
elseif(IsShiftKeyDown() and iteminfo and (AtlasLoot.db.profile.SafeLinks or AtlasLoot.db.profile.AllLinks)) then
|
||||
ChatEdit_InsertLink(itemLink);
|
||||
elseif(IsShiftKeyDown() and AtlasLoot.db.profile.AllLinks) then
|
||||
ChatEdit_InsertLink(color.."|Hitem:"..this.itemID..":0:0:0:0:0:0:0|h["..name.."]|h|r");
|
||||
ChatEdit_InsertLink(color.."|Hitem:"..self.itemID..":0:0:0:0:0:0:0|h["..name.."]|h|r");
|
||||
elseif(ChatFrameEditBox and ChatFrameEditBox:IsVisible() and IsShiftKeyDown()) then
|
||||
ChatFrameEditBox:Insert(name); -- <-- this line just inserts plain text, does not need any adjustment
|
||||
--If control-clicked, use the dressing room
|
||||
elseif(IsControlKeyDown() and iteminfo) then
|
||||
DressUpItemLink(itemLink);
|
||||
elseif(IsAltKeyDown() and (this.itemID ~= 0)) then
|
||||
elseif(IsAltKeyDown() and (self.itemID ~= 0)) then
|
||||
if AtlasLootItemsFrame.refresh[1] == "WishList" then
|
||||
AtlasLoot_DeleteFromWishList(this.itemID);
|
||||
AtlasLoot_DeleteFromWishList(self.itemID);
|
||||
else
|
||||
AtlasLoot_ShowWishListDropDown(this.itemID, this.itemTexture, getglobal("AtlasLootItem_"..this:GetID().."_Name"):GetText(), AtlasLoot_BossName:GetText(), "", this);
|
||||
AtlasLoot_ShowWishListDropDown(self.itemID, self.itemTexture, getglobal("AtlasLootItem_"..self:GetID().."_Name"):GetText(), AtlasLoot_BossName:GetText(), "", self);
|
||||
end
|
||||
elseif((AtlasLootItemsFrame.refresh[1] == "SearchResult") and this.sourcePage) then
|
||||
local dataID, dataSource = strsplit("|", this.sourcePage);
|
||||
elseif((AtlasLootItemsFrame.refresh[1] == "SearchResult") and self.sourcePage) then
|
||||
local dataID, dataSource = strsplit("|", self.sourcePage);
|
||||
if(dataID and dataSource) then
|
||||
AtlasLoot_ShowItemsFrame(dataID, AtlasLoot_Data, AtlasLootItemsFrame.refresh[3], 1);
|
||||
AtlasLoot:ShowItemsFrame(dataID, AtlasLoot_Data, AtlasLootItemsFrame.refresh[3], 1);
|
||||
end
|
||||
elseif (arg1=="LeftButton") and this.sourcePage ~= nil then
|
||||
elseif (arg1=="LeftButton") and self.sourcePage ~= nil then
|
||||
--Create token table if there isnt one
|
||||
if AtlasLoot_TokenData[this.sourcePage] == nil then
|
||||
AtlasLoot:CreateToken(this.sourcePage)
|
||||
if AtlasLoot_TokenData[self.sourcePage] == nil then
|
||||
AtlasLoot:CreateToken(self.sourcePage)
|
||||
end
|
||||
--Show token table
|
||||
AtlasLoot_ShowItemsFrame(this.sourcePage, AtlasLoot_TokenData, AtlasLootItemsFrame.refresh[3], 1);
|
||||
AtlasLoot:ShowItemsFrame(self.sourcePage, AtlasLoot_TokenData, AtlasLootItemsFrame.refresh[3], 1);
|
||||
end
|
||||
else
|
||||
if IsShiftKeyDown() then
|
||||
spellID = string.sub(this.itemID, 2);
|
||||
spellID = string.sub(self.itemID, 2);
|
||||
ChatEdit_InsertLink(AtlasLoot_GetEnchantLink(spellID));
|
||||
elseif(IsAltKeyDown() and (this.itemID ~= 0)) then
|
||||
elseif(IsAltKeyDown() and (self.itemID ~= 0)) then
|
||||
if AtlasLootItemsFrame.refresh[1] == "WishList" then
|
||||
AtlasLoot_DeleteFromWishList(this.itemID);
|
||||
AtlasLoot_DeleteFromWishList(self.itemID);
|
||||
else
|
||||
spellName, _, _, _, _, _, _, _, _ = GetSpellInfo(string.sub(this.itemID, 2));
|
||||
--spellIcon = GetItemIcon(this.dressingroomID);
|
||||
AtlasLoot_ShowWishListDropDown(this.itemID, this.dressingroomID, "=ds="..spellName, AtlasLootItemsFrame.refresh[1].."|"..AtlasLootItemsFrame.refresh[2],this);
|
||||
spellName, _, _, _, _, _, _, _, _ = GetSpellInfo(string.sub(self.itemID, 2));
|
||||
--spellIcon = GetItemIcon(self.dressingroomID);
|
||||
AtlasLoot_ShowWishListDropDown(self.itemID, self.dressingroomID, "=ds="..spellName, AtlasLootItemsFrame.refresh[1].."|"..AtlasLootItemsFrame.refresh[2],self);
|
||||
end
|
||||
elseif(IsControlKeyDown()) then
|
||||
DressUpItemLink("item:"..this.dressingroomID..":0:0:0:0:0:0:0");
|
||||
elseif((AtlasLootItemsFrame.refresh[1] == "SearchResult" or AtlasLootItemsFrame.refresh[1] == "WishList") and this.sourcePage) then
|
||||
local dataID, dataSource = strsplit("|", this.sourcePage);
|
||||
if(dataID and dataSource and AtlasLoot_IsLootTableAvailable(dataID)) then
|
||||
AtlasLoot_ShowItemsFrame(dataID, dataSource, AtlasLootItemsFrame.refresh[3]);
|
||||
DressUpItemLink("item:"..self.dressingroomID..":0:0:0:0:0:0:0");
|
||||
elseif((AtlasLootItemsFrame.refresh[1] == "SearchResult" or AtlasLootItemsFrame.refresh[1] == "WishList") and self.sourcePage) then
|
||||
local dataID, dataSource = strsplit("|", self.sourcePage);
|
||||
if(dataID and dataSource and AtlasLoot:IsLootTableAvailable(dataID)) then
|
||||
AtlasLoot:ShowItemsFrame(dataID, dataSource, AtlasLootItemsFrame.refresh[3]);
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -283,14 +283,14 @@ end
|
||||
|
||||
-------
|
||||
-- Missing GameToolTip method
|
||||
-- Enables item comparing. I've ripped this method directly from GameTooltip.lua and modified to work with AtlasLootTooltip /siena
|
||||
-- Enables item comparing. I've ripped self method directly from GameTooltip.lua and modified to work with AtlasLootTooltip /siena
|
||||
-------
|
||||
function AtlasLootItem_ShowCompareItem()
|
||||
function AtlasLootItem_ShowCompareItem(self)
|
||||
local shift = 1;
|
||||
local item,link = nil,nil
|
||||
if this.spellitemID and this.spellitemID ~= "" and this.spellitemID ~= 0 then
|
||||
if self.spellitemID and self.spellitemID ~= "" and self.spellitemID ~= 0 then
|
||||
item = AtlasLootTooltip:GetSpell()
|
||||
_,link = GetItemInfo(this.spellitemID)
|
||||
_,link = GetItemInfo(self.spellitemID)
|
||||
else
|
||||
item,link = AtlasLootTooltip:GetItem();
|
||||
end
|
||||
|
||||
+163
-77
@@ -12,7 +12,6 @@ AtlasLootOptions_ItemSyncTTToggle()
|
||||
AtlasLootOptions_EquipCompareToggle()
|
||||
AtlasLootOptions_OpaqueToggle()
|
||||
AtlasLootOptions_ItemIDToggle()
|
||||
AtlasLootOptions_ItemSpam()
|
||||
AtlasLootOptions_MinimapToggle()
|
||||
AtlasLootOptions_LoDSpam()
|
||||
AtlasLootOptions_LoDStartup()
|
||||
@@ -47,9 +46,7 @@ function AtlasLootOptions_Init()
|
||||
AtlasLootOptionsFrameEquipCompare:SetChecked(AtlasLoot.db.profile.EquipCompare);
|
||||
AtlasLootOptionsFrameOpaque:SetChecked(AtlasLoot.db.profile.Opaque);
|
||||
AtlasLootOptionsFrameItemID:SetChecked(AtlasLoot.db.profile.ItemIDs);
|
||||
AtlasLootOptionsFrameItemSpam:SetChecked(AtlasLoot.db.profile.ItemSpam);
|
||||
AtlasLootOptionsFrameLoDStartup:SetChecked(AtlasLoot.db.profile.LoadAllLoDStartup);
|
||||
AtlasLootOptionsFrameHidePanel:SetChecked(AtlasLoot.db.profile.HidePanel);
|
||||
AtlasLootOptionsFrameLootBrowserScale:SetValue(AtlasLoot.db.profile.LootBrowserScale);
|
||||
end
|
||||
|
||||
@@ -64,7 +61,6 @@ function AtlasLootOptions_OnLoad()
|
||||
AtlasLootOptionsFrameItemSyncTTText:SetText(AL["|cff9d9d9dItemSync Tooltips|r"]);
|
||||
end
|
||||
AtlasLootOptions_Init();
|
||||
AtlasLootOptions_SubtablePositionToggle()
|
||||
temp=AtlasLoot.db.profile.SafeLinks;
|
||||
end
|
||||
|
||||
@@ -110,15 +106,6 @@ function AtlasLootOptions_OpaqueToggle()
|
||||
AtlasLootOptions_Init();
|
||||
end
|
||||
|
||||
function AtlasLootOptions_ItemSpam()
|
||||
if (AtlasLoot.db.profile.ItemSpam) then
|
||||
AtlasLoot.db.profile.ItemSpam = false;
|
||||
else
|
||||
AtlasLoot.db.profile.ItemSpam = true;
|
||||
end
|
||||
AtlasLootOptions_Init();
|
||||
end
|
||||
|
||||
function AtlasLootOptions_LoDStartup()
|
||||
if (AtlasLoot.db.profile.LoadAllLoDStartup) then
|
||||
AtlasLoot.db.profile.LoadAllLoDStartup = false;
|
||||
@@ -133,10 +120,6 @@ function AtlasLootOptions_ItemIDToggle()
|
||||
AtlasLootOptions_Init();
|
||||
end
|
||||
|
||||
function AtlasLootOptions_SubtablePositionToggle()
|
||||
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);
|
||||
@@ -185,8 +168,6 @@ function AtlasLoot_DisplayHelp()
|
||||
WHITE..AL["If you have AtlasLootFu enabled, click the minimap button, or alternatively a button generated by a mod like Titan or FuBar. Finally, you can type '/al' in the chat window."].."\n\n"..
|
||||
ORANGE..AL["How to link an item to someone else:"].."\n"..
|
||||
WHITE..AL["Shift+Left Click the item like you would for any other in-game item"].."\n\n"..
|
||||
ORANGE..AL["How to view an 'unsafe' item:"].."\n"..
|
||||
WHITE..AL["Unsafe items have a red border around the icon and are marked because you have not seen the item since the last patch or server restart. Right-click the item, then move your mouse back over the item or click the 'Query Server' button at the bottom of the loot page. This will also load any Bloodforged items."].."\n\n"..
|
||||
ORANGE..AL["How to view an item in the Dressing Room:"].."\n"..
|
||||
WHITE..AL["Simply Ctrl+Left Click on the item. Sometimes the dressing room window is hidden behind the Atlas or AtlasLoot windows, so if nothing seems to happen move your Atlas or AtlasLoot windows and see if anything is hidden."].."\n\n"..
|
||||
ORANGE..AL["How to add an item to the wishlist:"].."\n"..
|
||||
@@ -197,8 +178,6 @@ function AtlasLoot_DisplayHelp()
|
||||
WHITE..AL["If you Left Click any item on the wishlist, you can jump to the loot page the item comes from. Also, on a loot page any item already in your wishlist is marked with a yellow star."].."\n\n"..
|
||||
ORANGE..AL["HELP!! I have broken the mod somehow!"].."\n"..
|
||||
WHITE..AL["Use the reset buttons available in the options menu, or type '/al reset' in your chat window."].."\n\n"..
|
||||
ORANGE..AL["How do I view Bloodforged items?"].."\n"..
|
||||
WHITE..AL["You must have 'Safe Chat Links' enabled in your options, and the Bloodforged item in your item cache. When viewing a page, click the 'Query Server' button to load the items and Bloodforged equivalents, then right click on an item to display item links for the original and Bloodforged versions in your chat."].."\n\n"..
|
||||
GREY..AL["For further help, see our website and forums: "]..GREEN.."https://discord.gg/uYCE2X2FgA"
|
||||
);
|
||||
Text:SetWidth(framewidht-80)
|
||||
@@ -212,38 +191,25 @@ AtlasLoot_CreateOptionsInfoTooltips()
|
||||
Adds explanatory tooltips to Atlasloot options
|
||||
]]
|
||||
function AtlasLoot_CreateOptionsInfoTooltips()
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrameDefaultTT", nil) -- AL["Default Tooltips"]
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrameLootlinkTT", nil) -- AL["Lootlink Tooltips"]
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrameItemSyncTT", nil) -- AL["ItemSync Tooltips"]
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrameOpaque", nil) -- AL["Make Loot Table Opaque"]
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrameItemID", nil) -- AL["Show itemIDs at all times"]
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrameSafeLinks", nil) -- AL["Safe Chat Links |cff1eff00(recommended)|r"]
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrameEquipCompare", nil) -- AL["Show Comparison Tooltips"]
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrameHidePanel", nil) -- AL["Hide AtlasLoot Panel"]
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrameItemSpam", nil) -- AL["Suppress Item Query Text"]
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrameLoDSpam", nil) -- AL["Notify on LoD Module Load"]
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrameLootBrowserScale", nil) -- Scale SLIDER
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrame_ResetAtlasLoot", nil) -- AL["Reset Frames"]
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrame_ResetWishlist", nil) -- AL["Reset Wishlist"]
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrame_ResetQuicklooks", nil) -- AL["Reset Quicklooks"]
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrame_FuBarShow", nil) -- AL["Show FuBar Plugin"]
|
||||
AtlasLoot_AddTooltip("AtlasLootOptionsFrame_FuBarHide", nil) -- AL["Hide FuBar Plugin"]
|
||||
AtlasLoot_AddTooltip("AtlasLoot_SelectLootBrowserStyle", nil)
|
||||
|
||||
AtlasLoot:AddTooltip("AtlasLootOptionsFrameDefaultTT", nil) -- AL["Default Tooltips"]
|
||||
AtlasLoot:AddTooltip("AtlasLootOptionsFrameLootlinkTT", nil) -- AL["Lootlink Tooltips"]
|
||||
AtlasLoot:AddTooltip("AtlasLootOptionsFrameItemSyncTT", nil) -- AL["ItemSync Tooltips"]
|
||||
AtlasLoot:AddTooltip("AtlasLootOptionsFrameOpaque", nil) -- AL["Make Loot Table Opaque"]
|
||||
AtlasLoot:AddTooltip("AtlasLootOptionsFrameItemID", nil) -- AL["Show itemIDs at all times"]
|
||||
AtlasLoot:AddTooltip("AtlasLootOptionsFrameSafeLinks", nil) -- AL["Safe Chat Links |cff1eff00(recommended)|r"]
|
||||
AtlasLoot:AddTooltip("AtlasLootOptionsFrameEquipCompare", nil) -- AL["Show Comparison Tooltips"]
|
||||
AtlasLoot:AddTooltip("AtlasLootOptionsFrameLoDSpam", nil) -- AL["Notify on LoD Module Load"]
|
||||
AtlasLoot:AddTooltip("AtlasLootOptionsFrameLootBrowserScale", nil) -- Scale SLIDER
|
||||
AtlasLoot:AddTooltip("AtlasLootOptionsFrame_ResetAtlasLoot", nil) -- AL["Reset Frames"]
|
||||
AtlasLoot:AddTooltip("AtlasLootOptionsFrame_ResetWishlist", nil) -- AL["Reset Wishlist"]
|
||||
AtlasLoot:AddTooltip("AtlasLootOptionsFrame_ResetQuicklooks", nil) -- AL["Reset Quicklooks"]
|
||||
AtlasLoot:AddTooltip("AtlasLootOptionsFrame_FuBarShow", nil) -- AL["Show FuBar Plugin"]
|
||||
AtlasLoot:AddTooltip("AtlasLootOptionsFrame_FuBarHide", nil) -- AL["Hide FuBar Plugin"]
|
||||
AtlasLoot:AddTooltip("AtlasLoot_SelectLootBrowserStyle", nil)
|
||||
end
|
||||
|
||||
function AtlasLoot_OptionsOnShow()
|
||||
AtlasLoot_SelectLootBrowserStyle_Label:SetText(AL["Loot Browser Style:"]);
|
||||
UIDropDownMenu_Initialize(AtlasLoot_SelectLootBrowserStyle, AtlasLoot_SelectLootBrowserStyle_Initialize);
|
||||
UIDropDownMenu_SetSelectedID(AtlasLoot_SelectLootBrowserStyle, AtlasLoot.db.profile.LootBrowserStyle);
|
||||
UIDropDownMenu_SetWidth(AtlasLoot_SelectLootBrowserStyle, 150);
|
||||
AtlasLoot_CraftingLink_Label:SetText(AL["Treat Crafted Items:"]);
|
||||
UIDropDownMenu_Initialize(AtlasLoot_CraftingLink, AtlasLoot_CraftingLink_Initialize);
|
||||
UIDropDownMenu_SetSelectedID(AtlasLoot_CraftingLink, AtlasLoot.db.profile.CraftingLink);
|
||||
UIDropDownMenu_SetWidth(AtlasLoot_CraftingLink, 150);
|
||||
end
|
||||
|
||||
function AtlasLoot_SelectLootBrowserStyle_Initialize()
|
||||
local function AtlasLoot_SelectLootBrowserStyle_Initialize()
|
||||
local info;
|
||||
info = {
|
||||
text = AL["New Style"];
|
||||
@@ -257,38 +223,23 @@ function AtlasLoot_SelectLootBrowserStyle_Initialize()
|
||||
UIDropDownMenu_AddButton(info);
|
||||
end
|
||||
|
||||
function AtlasLoot_OptionsOnShow()
|
||||
AtlasLoot_SelectLootBrowserStyle_Label:SetText(AL["Loot Browser Style:"]);
|
||||
UIDropDownMenu_Initialize(AtlasLoot_SelectLootBrowserStyle, AtlasLoot_SelectLootBrowserStyle_Initialize);
|
||||
UIDropDownMenu_SetSelectedID(AtlasLoot_SelectLootBrowserStyle, AtlasLoot.db.profile.LootBrowserStyle);
|
||||
UIDropDownMenu_SetWidth(AtlasLoot_SelectLootBrowserStyle, 150);
|
||||
end
|
||||
|
||||
|
||||
|
||||
function AtlasLoot_SelectLootBrowserStyle_OnClick()
|
||||
local thisID = this:GetID();
|
||||
UIDropDownMenu_SetSelectedID(AtlasLoot_SelectLootBrowserStyle, thisID);
|
||||
AtlasLoot.db.profile.LootBrowserStyle = thisID;
|
||||
if( AtlasLoot.db.profile.LootBrowserStyle == 1 ) then
|
||||
AtlasLoot_SetNewStyle("new");
|
||||
AtlasLoot:SetNewStyle("new");
|
||||
else
|
||||
AtlasLoot_SetNewStyle("old");
|
||||
end
|
||||
AtlasLoot_OptionsOnShow();
|
||||
end
|
||||
|
||||
function AtlasLoot_CraftingLink_Initialize()
|
||||
local info;
|
||||
info = {
|
||||
text = AL["As Crafting Spells"];
|
||||
func = AtlasLoot_CraftingLink_OnClick;
|
||||
};
|
||||
UIDropDownMenu_AddButton(info);
|
||||
info = {
|
||||
text = AL["As Items"];
|
||||
func = AtlasLoot_CraftingLink_OnClick;
|
||||
};
|
||||
UIDropDownMenu_AddButton(info);
|
||||
end
|
||||
|
||||
function AtlasLoot_CraftingLink_OnClick()
|
||||
local thisID = this:GetID();
|
||||
UIDropDownMenu_SetSelectedID(AtlasLoot_CraftingLink, thisID);
|
||||
AtlasLoot.db.profile.CraftingLink = thisID;
|
||||
if AtlasLootItemsFrame:IsVisible() and AtlasLootItemsFrame.refresh then
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4]);
|
||||
AtlasLoot:SetNewStyle("old");
|
||||
end
|
||||
AtlasLoot_OptionsOnShow();
|
||||
end
|
||||
@@ -316,3 +267,138 @@ function AtlasLoot_UnitTarget()
|
||||
end
|
||||
end
|
||||
GameTooltip:HookScript("OnTooltipSetUnit", AtlasLoot_UnitTarget)
|
||||
|
||||
|
||||
|
||||
local helpframe = CreateFrame("Frame", "AtlasLootHelpFrame")
|
||||
helpframe:SetSize(425,450);
|
||||
helpframe:Hide();
|
||||
helpframe:SetPoint("CENTER");
|
||||
helpframe.title = helpframe:CreateFontString("AtlasLootHelpFrame_Title", "OVERLAY", "GameFontHighlightLarge");
|
||||
helpframe.title:SetJustifyH("CENTER");
|
||||
helpframe.title:SetSize(400,30);
|
||||
helpframe.title:SetPoint("TOP", "AtlasLootHelpFrame","TOP");
|
||||
helpframe.title:SetText(AL["AtlasLoot Help"]);
|
||||
helpframe:SetScript("OnShow", function() AtlasLoot_DisplayHelp() end);
|
||||
|
||||
local optframe = CreateFrame("Frame", "AtlasLootOptionsFrame");
|
||||
optframe:Hide();
|
||||
optframe:SetSize(425,405);
|
||||
optframe:SetPoint("CENTER");
|
||||
optframe.title = optframe:CreateFontString("AtlasLoot_OptionsTitle", "OVERLAY", "GameFontHighlightLarge");
|
||||
optframe.title:SetJustifyH("CENTER");
|
||||
optframe.title:SetSize(400,30);
|
||||
optframe.title:SetPoint("TOP", "AtlasLootOptionsFrame","TOP");
|
||||
optframe.title:SetText(ATLASLOOT_VERSION);
|
||||
optframe.foobar = optframe:CreateFontString("AtlasLootOptionsFrame_FuBarNotice", "OVERLAY", "GameFontNormal");
|
||||
optframe.foobar:SetPoint("BOTTOM",0,45);
|
||||
optframe.foobar:SetText(AL["The Minimap Button is generated by the FuBar Plugin."].."\n"..AL["This is automatic, you do not need FuBar installed."]);
|
||||
optframe:SetScript("OnShow", function() AtlasLoot_OptionsOnShow() end);
|
||||
|
||||
local deftt = CreateFrame("CheckButton", "AtlasLootOptionsFrameDefaultTT", AtlasLootOptionsFrame, "OptionsCheckButtonTemplate");
|
||||
deftt:SetPoint("TOPLEFT",5,-40);
|
||||
AtlasLootOptionsFrameDefaultTTText:SetText(AL["Default Tooltips"]);
|
||||
deftt:SetScript("OnClick", function() AtlasLootOptions_DefaultTTToggle() end);
|
||||
|
||||
local lootlnk = CreateFrame("CheckButton", "AtlasLootOptionsFrameLootlinkTT", AtlasLootOptionsFrame, "OptionsCheckButtonTemplate");
|
||||
lootlnk:SetPoint("TOPLEFT",5,-70);
|
||||
AtlasLootOptionsFrameLootlinkTTText:SetText(AL["Lootlink Tooltips"]);
|
||||
lootlnk:SetScript("OnClick", function() AtlasLootOptions_LootlinkTTToggle() end);
|
||||
|
||||
local itemsync = CreateFrame("CheckButton", "AtlasLootOptionsFrameItemSyncTT", AtlasLootOptionsFrame, "OptionsCheckButtonTemplate");
|
||||
itemsync:SetPoint("TOPLEFT",5,-100);
|
||||
AtlasLootOptionsFrameItemSyncTTText:SetText(AL["ItemSync Tooltips"]);
|
||||
itemsync:SetScript("OnClick", function() AtlasLootOptions_ItemSyncTTToggle() end);
|
||||
|
||||
local opaque = CreateFrame("CheckButton", "AtlasLootOptionsFrameOpaque", AtlasLootOptionsFrame, "OptionsCheckButtonTemplate");
|
||||
opaque:SetPoint("TOPLEFT",5,-130);
|
||||
AtlasLootOptionsFrameOpaqueText:SetText(AL["Make Loot Table Opaque"]);
|
||||
opaque:SetScript("OnClick", function() AtlasLootOptions_OpaqueToggle() end);
|
||||
|
||||
local itemid = CreateFrame("CheckButton", "AtlasLootOptionsFrameItemID", AtlasLootOptionsFrame, "OptionsCheckButtonTemplate");
|
||||
itemid:SetPoint("TOP",5,-130);
|
||||
AtlasLootOptionsFrameItemIDText:SetText(AL["Show itemIDs at all times"]);
|
||||
itemid:SetScript("OnClick", function() AtlasLootOptions_ItemIDToggle() end);
|
||||
|
||||
local lod = CreateFrame("CheckButton", "AtlasLootOptionsFrameLoDStartup", AtlasLootOptionsFrame, "OptionsCheckButtonTemplate");
|
||||
lod:SetPoint("TOP",5,-40);
|
||||
AtlasLootOptionsFrameLoDStartupText:SetText(AL["Load Loot Modules at Startup"]);
|
||||
lod:SetScript("OnClick", function() AtlasLootOptions_LoDStartup() end);
|
||||
|
||||
local safe = CreateFrame("CheckButton", "AtlasLootOptionsFrameSafeLinks", AtlasLootOptionsFrame, "OptionsCheckButtonTemplate");
|
||||
safe:SetPoint("TOP",5,-70);
|
||||
AtlasLootOptionsFrameSafeLinksText:SetText(AL["Safe Chat Links"]);
|
||||
safe:SetScript("OnClick", function() AtlasLootOptions_SafeLinksToggle() end);
|
||||
|
||||
local equip = CreateFrame("CheckButton", "AtlasLootOptionsFrameEquipCompare", AtlasLootOptionsFrame, "OptionsCheckButtonTemplate");
|
||||
equip:SetPoint("TOP",5,-100);
|
||||
AtlasLootOptionsFrameEquipCompareText:SetText(AL["Show Comparison Tooltips"]);
|
||||
equip:SetScript("OnClick", function()
|
||||
if(AtlasLoot.db.profile.EquipCompare) then
|
||||
AtlasLoot.db.profile.EquipCompare = false;
|
||||
if (EquipCompare_UnregisterTooltip) then
|
||||
EquipCompare_UnregisterTooltip(AtlasLootTooltip);
|
||||
end
|
||||
else
|
||||
AtlasLoot.db.profile.EquipCompare = true;
|
||||
if (EquipCompare_RegisterTooltip) then
|
||||
EquipCompare_RegisterTooltip(AtlasLootTooltip);
|
||||
end
|
||||
end
|
||||
end);
|
||||
|
||||
local sStyle = CreateFrame("Button", "AtlasLoot_SelectLootBrowserStyle", AtlasLootOptionsFrame, "UIDropDownMenuTemplate");
|
||||
sStyle.lable = sStyle:CreateFontString("AtlasLoot_SelectLootBrowserStyle_Label", "BACKGROUND", "GameFontNormalSmall");
|
||||
sStyle.lable:SetPoint("RIGHT", "AtlasLoot_SelectLootBrowserStyle", "LEFT",15,2);
|
||||
sStyle:SetPoint("TOP",30,-220);
|
||||
|
||||
local bscale = CreateFrame("Slider", "AtlasLootOptionsFrameLootBrowserScale", AtlasLootOptionsFrame,"OptionsSliderTemplate");
|
||||
bscale:SetSize(240,16);
|
||||
bscale:SetPoint("TOP", 0,-300);
|
||||
bscale:SetScript("OnLoad", function(self) AtlasLoot_SetupLootBrowserSlider(self, 0.25, 1.5, 0.01) end);
|
||||
bscale:SetScript("OnValueChanged", function(self)
|
||||
AtlasLoot_UpdateLootBrowserSlider(self);
|
||||
AtlasLoot.db.profile.LootBrowserScale = self:GetValue();
|
||||
AtlasLoot_UpdateLootBrowserScale();
|
||||
end);
|
||||
|
||||
local resetwish = CreateFrame("Button", "AtlasLootOptionsFrame_ResetWishlist", AtlasLootOptionsFrame, "OptionsButtonTemplate");
|
||||
resetwish:SetSize(130,25);
|
||||
resetwish:SetPoint("TOP", 0, -325);
|
||||
resetwish:SetText(AL["Reset Wishlist"]);
|
||||
resetwish:SetScript("OnClick", function() AtlasLoot_Reset("wishlist") end);
|
||||
resetwish:SetScript("OnShow", function() resetwish:SetWidth(AtlasLootOptionsFrame_ResetWishlist:GetTextWidth()+20) end);
|
||||
|
||||
local resetAtlas = CreateFrame("Button", "AtlasLootOptionsFrame_ResetAtlasLoot", AtlasLootOptionsFrame, "OptionsButtonTemplate");
|
||||
resetAtlas:SetSize(130,25);
|
||||
resetAtlas:SetText(AL["Reset Frames"]);
|
||||
resetAtlas:SetPoint("RIGHT", "AtlasLootOptionsFrame_ResetWishlist", "LEFT", -10, 0);
|
||||
resetAtlas:SetScript("OnClick", function() AtlasLoot_Reset("frames") end);
|
||||
resetAtlas:SetScript("OnShow", function() resetAtlas:SetWidth(AtlasLootOptionsFrame_ResetAtlasLoot:GetTextWidth()+20) end)
|
||||
|
||||
local resetquick = CreateFrame("Button", "AtlasLootOptionsFrame_ResetQuicklooks", AtlasLootOptionsFrame, "OptionsButtonTemplate");
|
||||
resetquick:SetSize(130,25);
|
||||
resetquick:SetText(AL["Reset Quicklooks"]);
|
||||
resetquick:SetPoint("LEFT", "AtlasLootOptionsFrame_ResetWishlist", "RIGHT", 10, 0);
|
||||
resetquick:SetScript("OnClick", function() AtlasLoot_Reset("quicklooks") end);
|
||||
resetquick:SetScript("OnShow", function() resetquick:SetWidth(AtlasLootOptionsFrame_ResetQuicklooks:GetTextWidth()+20) end)
|
||||
|
||||
local fooshow = CreateFrame("Button", "AtlasLootOptionsFrame_FuBarShow", AtlasLootOptionsFrame, "OptionsButtonTemplate");
|
||||
fooshow:SetSize(150,25);
|
||||
fooshow:SetText(AL["Show FuBar Plugin"]);
|
||||
fooshow:SetPoint("TOP", "AtlasLootOptionsFrame", "TOP", -85, -390);
|
||||
fooshow:SetScript("OnClick", function()
|
||||
if AtlasLootFu then
|
||||
AtlasLootFu:Show();
|
||||
end
|
||||
end);
|
||||
|
||||
local foohide = CreateFrame("Button", "AtlasLootOptionsFrame_FuBarShow", AtlasLootOptionsFrame, "OptionsButtonTemplate");
|
||||
foohide:SetSize(150,25);
|
||||
foohide:SetText(AL["Hide FuBar Plugin"]);
|
||||
foohide:SetPoint("TOP", "AtlasLootOptionsFrame", "TOP", 85, -390);
|
||||
foohide:SetScript("OnClick", function()
|
||||
if AtlasLootFu then
|
||||
AtlasLootFu:Hide();
|
||||
end
|
||||
end);
|
||||
@@ -663,7 +663,7 @@ local function DoSearch(searchText)
|
||||
if type(itemId) == "number" and itemId > 0 then
|
||||
local itemIdBackup = itemId;
|
||||
local difficultyCap = min(AtlasLoot_Difficulty:getMaxDifficulty(data.Type), ItemindexID);
|
||||
itemId = AL_FindId(itemId, difficultyCap) or 2;
|
||||
itemId = AtlasLoot:FindId(itemId, difficultyCap) or 2;
|
||||
|
||||
local item = Item:CreateFromID(itemId);
|
||||
|
||||
@@ -693,7 +693,7 @@ local function DoSearch(searchText)
|
||||
end
|
||||
|
||||
function AtlasLoot:ShowSearchResult()
|
||||
AtlasLoot_ShowItemsFrame("SearchResult", AtlasLootCharDB, pFrame, 1);
|
||||
AtlasLoot:ShowItemsFrame("SearchResult", AtlasLootCharDB, pFrame, 1);
|
||||
end
|
||||
|
||||
function AtlasLoot:Search(Text)
|
||||
@@ -720,7 +720,7 @@ function AtlasLoot:Search(Text)
|
||||
return;
|
||||
end
|
||||
if self.db.profile.SearchOn.All then
|
||||
AtlasLoot_LoadAllModules();
|
||||
AtlasLoot:LoadAllModules();
|
||||
else
|
||||
for k, v in pairs(self.db.profile.SearchOn) do
|
||||
if k ~= "All" and v == true and not IsAddOnLoaded(k) and LoadAddOn(k) and self.db.profile.LoDNotify then
|
||||
@@ -745,7 +745,7 @@ function AtlasLoot:Search(Text)
|
||||
DEFAULT_CHAT_FRAME:AddMessage(RED .. AL["AtlasLoot"] .. ": " .. WHITE .. AL["No match found for"] .. " \"" .. Text .. "\"." .. itemFilterErrorMessage);
|
||||
else
|
||||
--SearchResult = AtlasLoot_CategorizeWishList(AtlasLootCharDB["SearchResult"]);
|
||||
AtlasLoot_ShowItemsFrame("SearchResult", AtlasLootCharDB, pFrame, 1);
|
||||
AtlasLoot:ShowItemsFrame("SearchResult", AtlasLootCharDB, pFrame, 1);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -205,8 +205,6 @@ function AtlasLoot_AdvancedSearchShow()
|
||||
return;
|
||||
end
|
||||
|
||||
pFrame = {"TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2"};
|
||||
|
||||
-- Hide all elements that could be in the AtlasTable
|
||||
getglobal("AtlasLootItemsFrame_NEXT"):Hide();
|
||||
getglobal("AtlasLootItemsFrame_PREV"):Hide();
|
||||
@@ -228,10 +226,10 @@ function AtlasLoot_AdvancedSearchShow()
|
||||
|
||||
AtlasLoot_BossName:SetText("Advanced Search");
|
||||
|
||||
AtlasLootDefaultFrame_AdvancedSearchPanel:ClearAllPoints();
|
||||
AtlasLootDefaultFrame_AdvancedSearchPanel:SetParent(pFrame[2]);
|
||||
AtlasLootDefaultFrame_AdvancedSearchPanel:ClearAllPoints();
|
||||
AtlasLootDefaultFrame_AdvancedSearchPanel:SetPoint(pFrame[1], pFrame[2], pFrame[3], pFrame[4], pFrame[5]);
|
||||
--AtlasLootDefaultFrame_AdvancedSearchPanel:ClearAllPoints();
|
||||
--AtlasLootDefaultFrame_AdvancedSearchPanel:SetParent(pFrame[2]);
|
||||
-- AtlasLootDefaultFrame_AdvancedSearchPanel:ClearAllPoints();
|
||||
--AtlasLootDefaultFrame_AdvancedSearchPanel:SetPoint(pFrame[1], pFrame[2], pFrame[3], pFrame[4], pFrame[5]);
|
||||
AtlasLootDefaultFrame_AdvancedSearchPanel:Show();
|
||||
|
||||
ATLASLOOT_CURRENTTYPE = "Search";
|
||||
@@ -242,7 +240,7 @@ function AtlasLoot_AdvancedSearchClose()
|
||||
AtlasLootDefaultFrame_AdvancedSearchPanel:Hide();
|
||||
|
||||
if (SearchPrevData[1] ~= "") then
|
||||
AtlasLoot_ShowItemsFrame(SearchPrevData[1], SearchPrevData[2], SearchPrevData[3], SearchPrevData[4]);
|
||||
AtlasLoot:ShowItemsFrame(SearchPrevData[1], SearchPrevData[2], SearchPrevData[3], SearchPrevData[4]);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -68,21 +68,21 @@ function AtlasLoot_ShowWishList()
|
||||
AtlasLootWishList["WishList"].Name = "Wish List";
|
||||
AtlasLootWishList["WishList"].Back = true;
|
||||
AtlasLootWishList["WishList"][1].Name = AtlasLootWishList["Own"][playerName][lastWishListarg2]["info"][1];
|
||||
AtlasLoot_ShowItemsFrame("WishList", AtlasLootWishList, pFrame, 1);
|
||||
AtlasLoot:ShowItemsFrame("WishList", AtlasLootWishList, pFrame, 1);
|
||||
elseif lastWishListtyp == "addOther" then
|
||||
AtlasLootWishList["WishList"] = AtlasLootWishList["Own"][lastWishListarg2];
|
||||
sort();
|
||||
AtlasLootWishList["WishList"].Name = "Wish List";
|
||||
AtlasLootWishList["WishList"].Back = true;
|
||||
AtlasLootWishList["WishList"][1].Name = AtlasLootWishList["Own"][lastWishListarg2][lastWishListarg3]["info"][1];
|
||||
AtlasLoot_ShowItemsFrame("WishList", AtlasLootWishList, pFrame, 1);
|
||||
AtlasLoot:ShowItemsFrame("WishList", AtlasLootWishList, pFrame, 1);
|
||||
elseif lastWishListtyp == "addShared" then
|
||||
AtlasLootWishList["WishList"] = AtlasLootWishList["Shared"][lastWishListarg2];
|
||||
sort();
|
||||
AtlasLootWishList["WishList"].Name = "Wish List";
|
||||
AtlasLootWishList["WishList"].Back = true;
|
||||
AtlasLootWishList["WishList"][1].Name = AtlasLootWishList["Shared"][lastWishListarg2][lastWishListarg3]["info"][1];
|
||||
AtlasLoot_ShowItemsFrame("WishList", AtlasLootWishList, pFrame, 1);
|
||||
AtlasLoot:ShowItemsFrame("WishList", AtlasLootWishList, pFrame, 1);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ local framename = "AtlasLootDefaultFrame_AdvancedSearchPanel";
|
||||
|
||||
--Create Main Search Panel
|
||||
local searchpanel = CreateFrame("FRAME", framename, AtlasLootDefaultFrame, nil);
|
||||
searchpanel:SetPoint("CENTER", 0, 0);
|
||||
searchpanel:SetPoint("TOPLEFT", AtlasLootDefaultFrame_LootBackground, "TOPLEFT", 2, -2);
|
||||
searchpanel:SetSize(510, 510);
|
||||
searchpanel.closebtn = CreateFrame("Button", framename.."_CloseButton", searchpanel, "UIPanelCloseButton");
|
||||
searchpanel.closebtn:SetPoint("TOPRIGHT", searchpanel, "TOPRIGHT", -10, -10);
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
--[[
|
||||
Functions:
|
||||
AtlasLoot_DewDropClick(tablename, text, tabletype, tabletype2)
|
||||
AtlasLoot_DewDropSubMenuClick(tablename, text)
|
||||
AtlasLoot_DewdropExpansionMenuClick(tablename, text)
|
||||
AtlasLoot:DewDropClick(tablename, text, tabletype, tabletype2)
|
||||
AtlasLoot:DewDropSubMenuClick(tablename, text)
|
||||
AtlasLoot:DewdropExpansionMenuClick(tablename, text)
|
||||
AtlasLoot_DefaultFrame_OnShow()
|
||||
AtlasLootDefaultFrame_OnHide()
|
||||
AtlasLoot_DewdropExpansionMenuRegister(loottable)
|
||||
AtlasLoot_DewdropSubMenuRegister(loottable)
|
||||
AtlasLoot_DewdropRegister()
|
||||
AtlasLoot_SetNewStyle(style)
|
||||
AtlasLoot:DewdropExpansionMenuRegister(loottable)
|
||||
AtlasLoot:DewdropSubMenuRegister(loottable)
|
||||
AtlasLoot:DewdropRegister()
|
||||
AtlasLoot:SetNewStyle(style)
|
||||
]]
|
||||
|
||||
--Include all needed libraries
|
||||
@@ -35,27 +35,20 @@ Called whenever the loot browser is shown and sets up buttons and loot tables
|
||||
]]
|
||||
function AtlasLootDefaultFrame_OnShow()
|
||||
--Definition of where I want the loot table to be shown
|
||||
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" };
|
||||
--Having the Atlas and loot browser frames shown at the same time would
|
||||
--cause conflicts, so I hide the Atlas frame when the loot browser appears
|
||||
if AtlasFrame then
|
||||
AtlasFrame:Hide();
|
||||
end
|
||||
--Remove the selection of a loot table in Atlas
|
||||
AtlasLootItemsFrame.activeBoss = nil;
|
||||
--Set the item table to the loot table
|
||||
AtlasLoot_SetItemInfoFrame(pFrame);
|
||||
--Show the last displayed loot table
|
||||
local lastboss = AtlasLoot.db.profile.LastBoss;
|
||||
if lastboss and lastboss[5] then
|
||||
ATLASLOOT_CURRENTTABLE = lastboss[6];
|
||||
ATLASLOOT_LASTMODULE = lastboss[5];
|
||||
AtlasLoot_IsLootTableAvailable(lastboss[5]);
|
||||
AtlasLoot_ShowItemsFrame(lastboss[1], AtlasLoot_Data, pFrame, lastboss[4]);
|
||||
AtlasLoot:IsLootTableAvailable(lastboss[5]);
|
||||
AtlasLoot:ShowItemsFrame(lastboss[1], AtlasLoot_Data, pFrame, lastboss[4]);
|
||||
AtlasLoot_DewdropSubMenu:Unregister(AtlasLootDefaultFrame_SubMenu);
|
||||
AtlasLoot_DewdropSubMenuRegister(AtlasLoot_SubMenus[lastboss[6]]);
|
||||
AtlasLoot:DewdropSubMenuRegister(AtlasLoot_SubMenus[lastboss[6]]);
|
||||
else
|
||||
AtlasLoot_ShowItemsFrame("EmptyTable", AtlasLoot_Data, pFrame,1);
|
||||
AtlasLoot:ShowItemsFrame("EmptyTable", AtlasLoot_Data, pFrame,1);
|
||||
end
|
||||
end
|
||||
|
||||
@@ -71,12 +64,12 @@ function AtlasLootDefaultFrame_OnHide()
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_DewDropClick(tablename, text, tabletype):
|
||||
AtlasLoot:DewDropClick(tablename, text, tabletype):
|
||||
tablename - Name of the loot table in the database
|
||||
text - Heading for the loot table
|
||||
Called when a button in AtlasLoot_Dewdrop is clicked
|
||||
]]
|
||||
function AtlasLoot_DewDropClick(tablename, text, tablenum)
|
||||
function AtlasLoot:DewDropClick(tablename, text, tablenum)
|
||||
ATLASLOOT_FILTER_ENABLE = false;
|
||||
AtlasLootFilterCheck:SetChecked(false);
|
||||
tablename = tablename .. AtlasLoot_Expac;
|
||||
@@ -84,53 +77,52 @@ function AtlasLoot_DewDropClick(tablename, text, tablenum)
|
||||
tablenum = tablenum or 1;
|
||||
ATLASLOOT_LASTMODULE = AtlasLoot_SubMenus[tablename].Module;
|
||||
AtlasLootDefaultFrame_Menu:SetText(text);
|
||||
AtlasLoot_IsLootTableAvailable(AtlasLoot_SubMenus[tablename].Module);
|
||||
AtlasLoot:IsLootTableAvailable(AtlasLoot_SubMenus[tablename].Module);
|
||||
AtlasLoot_DewdropSubMenu:Unregister(AtlasLootDefaultFrame_SubMenu);
|
||||
AtlasLoot_DewdropSubMenuRegister(AtlasLoot_SubMenus[tablename]);
|
||||
AtlasLoot_DewDropSubMenuClick(AtlasLoot_SubMenus[tablename][tablenum][2])
|
||||
AtlasLoot:DewdropSubMenuRegister(AtlasLoot_SubMenus[tablename]);
|
||||
AtlasLoot:DewDropSubMenuClick(AtlasLoot_SubMenus[tablename][tablenum][2])
|
||||
AtlasLoot_Dewdrop:Close(1);
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_DewDropSubMenuClick(tablename, text):
|
||||
AtlasLoot:DewDropSubMenuClick(tablename, text):
|
||||
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)
|
||||
function AtlasLoot:DewDropSubMenuClick(tablename)
|
||||
--Definition of where I want the loot table to be shown
|
||||
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" };
|
||||
--Show the select loot table
|
||||
local tablenum = AtlasLoot_Data[tablename].Loadfirst or 1;
|
||||
|
||||
--Show the table that has been selected
|
||||
AtlasLoot_ShowItemsFrame(tablename, AtlasLoot_Data, pFrame, tablenum);
|
||||
AtlasLoot:ShowItemsFrame(tablename, AtlasLoot_Data, pFrame, tablenum);
|
||||
AtlasLoot_DewdropSubMenu:Close(1);
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_DewdropExpansionMenuClick(expansion, name):
|
||||
AtlasLoot:DewdropExpansionMenuClick(expansion, name):
|
||||
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_DewdropExpansionMenuClick(expansion, name)
|
||||
function AtlasLoot:DewdropExpansionMenuClick(expansion, name)
|
||||
AtlasLootDefaultFrame_ExpansionMenu:SetText(name);
|
||||
AtlasLoot_DewdropExpansionMenu:Close(1);
|
||||
AtlasLoot_Expac = expansion;
|
||||
if ATLASLOOT_CURRENTTABLE then
|
||||
local tablename = AtlasLoot:CleandataID(ATLASLOOT_CURRENTTABLE, 1) .. AtlasLoot_Expac;
|
||||
AtlasLoot_IsLootTableAvailable(AtlasLoot_SubMenus[tablename].Module);
|
||||
AtlasLoot:IsLootTableAvailable(AtlasLoot_SubMenus[tablename].Module);
|
||||
AtlasLoot_DewdropSubMenu:Unregister(AtlasLootDefaultFrame_SubMenu);
|
||||
AtlasLoot_DewdropSubMenuRegister(AtlasLoot_SubMenus[tablename]);
|
||||
AtlasLoot:DewdropSubMenuRegister(AtlasLoot_SubMenus[tablename]);
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_DewdropExpansionMenuRegister():
|
||||
AtlasLoot:DewdropExpansionMenuRegister():
|
||||
Adds expansion menu from expansion table in mainmenus.lua
|
||||
]]
|
||||
function AtlasLoot_DewdropExpansionMenuRegister()
|
||||
function AtlasLoot:DewdropExpansionMenuRegister()
|
||||
AtlasLoot_DewdropExpansionMenu:Register(AtlasLootDefaultFrame_ExpansionMenu,
|
||||
'point', function(parent)
|
||||
return "TOP", "BOTTOM"
|
||||
@@ -146,7 +138,7 @@ function AtlasLoot_DewdropExpansionMenuRegister()
|
||||
'textR', 1,
|
||||
'textG', 0.82,
|
||||
'textB', 0,
|
||||
'func', AtlasLoot_DewdropExpansionMenuClick,
|
||||
'func', function(arg1,arg2,arg3) AtlasLoot:DewdropExpansionMenuClick(arg1,arg2,arg3) end,
|
||||
'arg1', v[2],
|
||||
'arg2', v[1],
|
||||
'arg3', k,
|
||||
@@ -170,11 +162,11 @@ function AtlasLoot_DewdropExpansionMenuRegister()
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_DewdropSubMenuRegister(loottable):
|
||||
AtlasLoot:DewdropSubMenuRegister(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)
|
||||
function AtlasLoot:DewdropSubMenuRegister(loottable)
|
||||
AtlasLoot_DewdropSubMenu:Register(AtlasLootDefaultFrame_SubMenu,
|
||||
'point', function(parent)
|
||||
return "TOP", "BOTTOM"
|
||||
@@ -188,7 +180,7 @@ function AtlasLoot_DewdropSubMenuRegister(loottable)
|
||||
'textR', 0.2,
|
||||
'textG', 0.82,
|
||||
'textB', 0.5,
|
||||
'func', AtlasLoot_DewDropSubMenuClick,
|
||||
'func', function(arg1,arg2) AtlasLoot:DewDropSubMenuClick(arg1,arg2) end,
|
||||
'arg1', v[2],
|
||||
'arg2', v[1],
|
||||
'arg2', v[3],
|
||||
@@ -197,7 +189,7 @@ function AtlasLoot_DewdropSubMenuRegister(loottable)
|
||||
else
|
||||
AtlasLoot_DewdropSubMenu:AddLine(
|
||||
'text', AtlasLoot_Data[v[2]].Name,
|
||||
'func', AtlasLoot_DewDropSubMenuClick,
|
||||
'func', function(arg1,arg2) AtlasLoot:DewDropSubMenuClick(arg1,arg2) end,
|
||||
'arg1', v[2],
|
||||
'arg2', AtlasLoot_Data[v[2]].Name,
|
||||
'notCheckable', true
|
||||
@@ -220,10 +212,10 @@ function AtlasLoot_DewdropSubMenuRegister(loottable)
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_DewdropRegister:
|
||||
AtlasLoot:DewdropRegister:
|
||||
Constructs the main category menu from a tiered table
|
||||
]]
|
||||
function AtlasLoot_DewdropRegister()
|
||||
function AtlasLoot:DewdropRegister()
|
||||
AtlasLoot_Dewdrop:Register(AtlasLootDefaultFrame_Menu,
|
||||
'point', function(parent)
|
||||
return "TOP", "BOTTOM"
|
||||
@@ -238,7 +230,7 @@ function AtlasLoot_DewdropRegister()
|
||||
'textR', 1,
|
||||
'textG', 0.82,
|
||||
'textB', 0,
|
||||
'func', AtlasLoot_DewDropClick,
|
||||
'func', function(arg1,arg2,arg3) AtlasLoot:DewDropClick(arg1,arg2,arg3) end,
|
||||
'arg1', v[2],
|
||||
'arg2', v[1],
|
||||
'arg3', v[3],
|
||||
@@ -261,12 +253,12 @@ function AtlasLoot_DewdropRegister()
|
||||
end
|
||||
|
||||
--[[
|
||||
AtlasLoot_SetNewStyle:
|
||||
AtlasLoot:SetNewStyle:
|
||||
Create the new Default Frame style
|
||||
style = "new"
|
||||
style = "old"
|
||||
]]
|
||||
function AtlasLoot_SetNewStyle(style)
|
||||
function AtlasLoot:SetNewStyle(style)
|
||||
|
||||
local buttons = {
|
||||
"AtlasLootDefaultFrame_Options",
|
||||
@@ -294,7 +286,8 @@ function AtlasLoot_SetNewStyle(style)
|
||||
|
||||
if style == "new" then
|
||||
AtlasLootDefaultFrame_LootBackground:SetBackdrop({bgFile = "Interface/AchievementFrame/UI-Achievement-StatsBackground"});
|
||||
AtlasLootDefaultFrame_LootBackground:SetBackdropColor(1,1,1,0.5)
|
||||
AtlasLootDefaultFrame_LootBackground:SetBackdropColor(1,1,1,0.5);
|
||||
|
||||
AtlasLootDefaultFrame:SetBackdrop({bgFile = "Interface/AchievementFrame/UI-Achievement-AchievementBackground",
|
||||
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
|
||||
edgeSize = 16,
|
||||
@@ -332,7 +325,7 @@ function AtlasLoot_SetNewStyle(style)
|
||||
elseif style == "old" then
|
||||
|
||||
AtlasLootDefaultFrame_LootBackground:SetBackdrop({bgFile = ""});
|
||||
AtlasLootDefaultFrame_LootBackground:SetBackdropColor(0,0,0.5,0.5)
|
||||
AtlasLootDefaultFrame_LootBackground:SetBackdropColor(0,0,0.5,0.5);
|
||||
|
||||
AtlasLootDefaultFrame:SetBackdrop({bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
|
||||
edgeFile = "Interface/DialogFrame/UI-DialogBox-Border",
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
local AL = LibStub("AceLocale-3.0"):GetLocale("AtlasLoot");
|
||||
|
||||
--Main AtlasLoot Frame
|
||||
local mainframe = CreateFrame("FRAME", "AtlasLootDefaultFrame", UIParent);
|
||||
local mainframe = CreateFrame("FRAME", "AtlasLootDefaultFrame", UIParent);
|
||||
mainframe:SetPoint("CENTER",0,0);
|
||||
mainframe:SetSize(880,690);
|
||||
mainframe:EnableMouse(true);
|
||||
mainframe:SetMovable(1);
|
||||
mainframe:SetFrameStrata("HIGH");
|
||||
mainframe:SetBackdropColor(0.75,0,0,0.75);
|
||||
mainframe:RegisterForDrag("LeftButton");
|
||||
mainframe:SetMovable(true);
|
||||
mainframe:EnableKeyboard(true)
|
||||
@@ -42,19 +41,186 @@ local mainframe = CreateFrame("FRAME", "AtlasLootDefaultFrame", UIParent);
|
||||
mainframe.header.notice = mainframe:CreateFontString("AtlasLootDefaultFrame_Notice","ARTWORK","GameFontNormal");
|
||||
mainframe.header.notice:SetPoint("BOTTOM",0,17);
|
||||
|
||||
--Loot Background
|
||||
local lootbground = CreateFrame("Frame", "AtlasLootDefaultFrame_LootBackground",AtlasLootDefaultFrame);
|
||||
lootbground:SetSize(540,515);
|
||||
lootbground:SetPoint("BOTTOMLEFT", AtlasLootDefaultFrame, "BOTTOMLEFT",40,90);
|
||||
lootbground.Back = lootbground:CreateTexture("AtlasLootDefaultFrame_LootBackground_Back", "BACKGROUND");
|
||||
lootbground.Back:SetAllPoints();
|
||||
lootbground.Back:SetPoint("TOPLEFT","AtlasLootDefaultFrame_LootBackground","TOPLEFT");
|
||||
lootbground.Back:SetPoint("BOTTOMRIGHT","AtlasLootDefaultFrame_LootBackground","BOTTOMRIGHT");
|
||||
lootbground:SetBackdropColor(0,0,0.5,0.5);
|
||||
lootbground:EnableMouse();
|
||||
lootbground:SetScript("OnMouseDown",function(self, button)
|
||||
if AtlasLootItemsFrame.refresh[2][AtlasLootItemsFrame.refresh[1]].Back and button == "RightButton" then
|
||||
AtlasLoot:BackButton_OnClick()
|
||||
end
|
||||
end);
|
||||
|
||||
----------------------------------- Item Loot Panel -------------------------------------------
|
||||
local itemframe = CreateFrame("Frame", "AtlasLootItemsFrame", AtlasLootDefaultFrame_LootBackground);
|
||||
itemframe:SetSize(535,510);
|
||||
itemframe:Hide();
|
||||
itemframe:SetPoint("TOPLEFT", AtlasLootDefaultFrame_LootBackground, "TOPLEFT", 2, -2);
|
||||
itemframe.Label = itemframe:CreateFontString("AtlasLoot_BossName","OVERLAY","GameFontHighlightLarge");
|
||||
itemframe.Label:SetPoint("TOP", "AtlasLootItemsFrame", "TOP");
|
||||
itemframe.Label:SetSize(512,30);
|
||||
itemframe.Label:SetJustifyH("CENTER");
|
||||
itemframe.Back = itemframe:CreateTexture("AtlasLootItemsFrame_Back", "BACKGROUND");
|
||||
itemframe.Back:SetAllPoints();
|
||||
itemframe.Back:SetPoint("TOPLEFT","AtlasLootDefaultFrame_LootBackground","TOPLEFT");
|
||||
itemframe.Back:SetPoint("BOTTOMRIGHT","AtlasLootDefaultFrame_LootBackground","BOTTOMRIGHT");
|
||||
itemframe:SetBackdropColor(0,0,0,0.7);
|
||||
itemframe:EnableMouseWheel(true);
|
||||
itemframe:SetScript("OnMouseWheel", function(self,delta)
|
||||
if AtlasLootItemsFrame_NEXT:IsVisible() and delta == -1 then
|
||||
AtlasLootItemsFrame_NEXT:Click();
|
||||
end
|
||||
if AtlasLootItemsFrame_PREV:IsVisible() and delta == 1 then
|
||||
AtlasLootItemsFrame_PREV:Click();
|
||||
end
|
||||
end);
|
||||
|
||||
local function createLootItemButtons(num)
|
||||
local button = CreateFrame("Button","AtlasLootItem_"..num, AtlasLootItemsFrame);
|
||||
button:SetID(num);
|
||||
button:SetSize(236,28);
|
||||
button:SetHighlightTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD");
|
||||
button.icon = button:CreateTexture("AtlasLootItem_"..num.."_Icon","ARTWORK");
|
||||
button.icon:SetSize(25,25);
|
||||
button.icon:SetPoint("TOPLEFT", "AtlasLootItem_"..num,"TOPLEFT",1,-1);
|
||||
button.name = button:CreateFontString("AtlasLootItem_"..num.."_Name","ARTWORK","GameFontNormal");
|
||||
button.name:SetSize(205,12);
|
||||
button.name:SetPoint("TOPLEFT","AtlasLootItem_"..num.."_Icon","TOPRIGHT",3,0);
|
||||
button.name:SetJustifyH("LEFT");
|
||||
button.extra = button:CreateFontString("AtlasLootItem_"..num.."_Extra","ARTWORK","GameFontNormal");
|
||||
button.extra:SetSize(205,10);
|
||||
button.extra:SetPoint("TOPLEFT","AtlasLootItem_"..num.."_Name","BOTTOMLEFT",0,-1);
|
||||
button.extra:SetJustifyH("LEFT");
|
||||
button:RegisterForClicks("AnyDown");
|
||||
button:SetScript("OnEnter", function(self) AtlasLootItem_OnEnter(self) end);
|
||||
button:SetScript("OnLeave", function(self) AtlasLootItem_OnLeave(self) end);
|
||||
button:SetScript("OnClick", function(self, arg1) AtlasLootItem_OnClick(self, arg1) end);
|
||||
button.unsafe = button:CreateTexture("AtlasLootItem_"..num.."_Unsafe","BACKGROUND");
|
||||
button.unsafe:Hide();
|
||||
button.unsafe:SetSize(27,27);
|
||||
button.unsafe:SetPoint("TOPLEFT","AtlasLootItem_"..num,"TOPLEFT");
|
||||
button.unsafe:SetVertexColor(1,0,0,1);
|
||||
if num == 1 then
|
||||
button:SetPoint("TOPLEFT", "AtlasLootItemsFrame", "TOPLEFT",25,-35);
|
||||
elseif num == 16 then
|
||||
button:SetPoint("TOPLEFT", "AtlasLootItem_1", "TOPRIGHT",0,0);
|
||||
else
|
||||
button:SetPoint("TOPLEFT", "AtlasLootItem_"..(num - 1), "BOTTOMLEFT");
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, 30 do
|
||||
createLootItemButtons(i);
|
||||
end
|
||||
|
||||
-- LootInfo
|
||||
local lootinfo = CreateFrame("Frame", "AtlasLootInfo")
|
||||
lootinfo:SetSize(128,75);
|
||||
lootinfo.text1 = lootinfo:CreateFontString("AtlasLootInfo_Text1", "OVERLAY", "GameFontNormal");
|
||||
lootinfo.text1:SetSize(180,10);
|
||||
lootinfo.text1:SetText("ATLASLOOT_VERSION");
|
||||
lootinfo.text1:SetJustifyH("LEFT");
|
||||
lootinfo.text1:SetPoint("TOPLEFT", "AtlasLootInfo", "TOPLEFT",0,25);
|
||||
lootinfo.text2 = lootinfo:CreateFontString("AtlasLootInfo_Text2", "OVERLAY", "GameFontNormal");
|
||||
lootinfo.text2:SetSize(180,10);
|
||||
lootinfo.text2:SetJustifyH("LEFT");
|
||||
lootinfo.text2:SetText(AL["Click boss name to view loot."]);
|
||||
lootinfo.text2:SetPoint("TOPLEFT", "AtlasLootInfo", "TOPLEFT",0,-2);
|
||||
|
||||
-- Next Button
|
||||
local nextbtn = CreateFrame("Button", "AtlasLootItemsFrame_NEXT", AtlasLootItemsFrame);
|
||||
nextbtn:SetPoint("BOTTOMRIGHT", "AtlasLootItemsFrame", "BOTTOMRIGHT",-5,5);
|
||||
nextbtn:SetSize(32,32);
|
||||
nextbtn.texture = nextbtn:CreateTexture(nil, "BACKGROUND");
|
||||
nextbtn.texture:SetTexture("Interface\\Buttons\\UI-PageButton-Background");
|
||||
nextbtn.texture:SetSize(32,32);
|
||||
nextbtn.texture:SetPoint("CENTER",0,0);
|
||||
nextbtn:SetNormalTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Up");
|
||||
nextbtn:SetPushedTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Down");
|
||||
nextbtn:SetDisabledTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Disabled");
|
||||
nextbtn:SetHighlightTexture("Interface\\Buttons\\UI-Common-MouseHilight", "ADD");
|
||||
nextbtn:SetScript("OnClick", function(self) AtlasLoot:NavButton_OnClick(self) end)
|
||||
nextbtn:Hide();
|
||||
|
||||
-- Previous button
|
||||
local prevbtn = CreateFrame("Button", "AtlasLootItemsFrame_PREV", AtlasLootItemsFrame);
|
||||
prevbtn:SetPoint("BOTTOMLEFT", "AtlasLootItemsFrame", "BOTTOMLEFT",5,5);
|
||||
prevbtn:SetSize(32,32);
|
||||
prevbtn:SetFrameStrata("HIGH");
|
||||
prevbtn.texture = prevbtn:CreateTexture(nil, "BACKGROUND");
|
||||
prevbtn.texture:SetTexture("Interface\\Buttons\\UI-PageButton-Background");
|
||||
prevbtn.texture:SetSize(32,32);
|
||||
prevbtn.texture:SetPoint("CENTER",0,0);
|
||||
prevbtn:SetNormalTexture("Interface\\Buttons\\UI-SpellbookIcon-PrevPage-Up");
|
||||
prevbtn:SetPushedTexture("Interface\\Buttons\\UI-SpellbookIcon-PrevPage-Down");
|
||||
prevbtn:SetDisabledTexture("Interface\\Buttons\\UI-SpellbookIcon-PrevPage-Disabled");
|
||||
prevbtn:SetHighlightTexture("Interface\\Buttons\\UI-Common-MouseHilight", "ADD");
|
||||
prevbtn:SetScript("OnClick", function(self) AtlasLoot:NavButton_OnClick(self) end)
|
||||
prevbtn:Hide();
|
||||
|
||||
-- Back button
|
||||
local backbtn = CreateFrame("Button", "AtlasLootItemsFrame_BACK", AtlasLootItemsFrame, "OptionsButtonTemplate");
|
||||
backbtn:SetPoint("BOTTOM", "AtlasLootItemsFrame", "BOTTOM",0,4);
|
||||
backbtn:SetFrameStrata("HIGH");
|
||||
backbtn:SetText(AL["Back"]);
|
||||
backbtn.texture = backbtn:CreateTexture("AtlasLootItemsFrame_Back", "BACKGROUND");
|
||||
backbtn.texture:SetPoint("TOPLEFT","AtlasLootItemsFrame","TOPLEFT");
|
||||
backbtn.texture:SetPoint("BOTTOMRIGHT","AtlasLootItemsFrame","BOTTOMRIGHT");
|
||||
backbtn.texture:SetVertexColor(0,0,0,0.7);
|
||||
backbtn:SetScript("OnClick", function(self) AtlasLoot:BackButton_OnClick() end)
|
||||
backbtn:Hide();
|
||||
|
||||
-- Filter Button
|
||||
local filterbtn = CreateFrame("CheckButton","AtlasLootFilterCheck",AtlasLootItemsFrame,"OptionsCheckButtonTemplate");
|
||||
filterbtn:SetPoint("BOTTOM", "AtlasLootItemsFrame", "BOTTOM",85 ,27);
|
||||
filterbtn.Label = filterbtn:CreateFontString("AtlasLootFilterCheckText","OVERLAY","GameFontNormal");
|
||||
filterbtn.Label:SetText(AL["Filter"]);
|
||||
filterbtn.Label:SetPoint("RIGHT", AtlasLootFilterCheck, 30, 2);
|
||||
filterbtn:SetScript("OnClick", function() AtlasLoot_FilterEnableButton() end);
|
||||
|
||||
-- Quick Looks Button
|
||||
local looksbtn = CreateFrame("Button", "AtlasLootQuickLooksButton", AtlasLootItemsFrame);
|
||||
looksbtn:SetPoint("BOTTOM", "AtlasLootItemsFrame", "BOTTOM",58,28);
|
||||
looksbtn:SetSize(25,25);
|
||||
looksbtn:SetFrameStrata("HIGH");
|
||||
looksbtn.Label = nextbtn:CreateFontString("AtlasLoot_QuickLooks","OVERLAY","GameFontNormal");
|
||||
looksbtn.Label:SetSize(200,25);
|
||||
looksbtn.Label:SetText(AL["Add to QuickLooks:"]);
|
||||
looksbtn.Label:SetPoint("BOTTOM", "AtlasLootItemsFrame","BOTTOM", -57, 28);
|
||||
looksbtn.Label:SetJustifyH("RIGHT");
|
||||
looksbtn:SetNormalTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Up");
|
||||
looksbtn:SetPushedTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Down");
|
||||
looksbtn:SetDisabledTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Disabled");
|
||||
looksbtn:SetHighlightTexture("Interface\\Buttons\\UI-Common-MouseHilight", "ADD");
|
||||
looksbtn:SetScript("OnClick", function(self) AtlasLoot:ShowQuickLooks(self) end)
|
||||
looksbtn:SetScript("OnShow", function(self)
|
||||
if (AtlasLootItemsFrame.refresh) and ((AtlasLootItemsFrame.refresh[1] == "SearchResult") or (AtlasLootItemsFrame.refresh[1] == "WishList")) then
|
||||
self:Disable();
|
||||
else
|
||||
self:Enable();
|
||||
end
|
||||
end)
|
||||
looksbtn:Hide();
|
||||
|
||||
------------------------------------ Buttons at the top of the frame ---------------------------------------
|
||||
|
||||
--Close Button
|
||||
local closebtn = CreateFrame("Button", "AtlasLootDefaultFrame_CloseButton", AtlasLootDefaultFrame, "UIPanelCloseButton");
|
||||
closebtn:SetPoint("TOPRIGHT", AtlasLootDefaultFrame, "TOPRIGHT",-10,-10);
|
||||
closebtn:SetScript("OnClick", function() AtlasLootDefaultFrame:Hide() end);
|
||||
closebtn:SetFrameLevel( (closebtn:GetParent()):GetFrameLevel() + 1 );
|
||||
|
||||
--Load All Addon Moduels Button
|
||||
local loadModulebtn = CreateFrame("Button", "AtlasLootDefaultFrame_LoadModules", AtlasLootDefaultFrame, "OptionsButtonTemplate");
|
||||
loadModulebtn:SetSize(105,20);
|
||||
loadModulebtn:SetPoint("TOPRIGHT", AtlasLootDefaultFrame, "TOPRIGHT",-38,-15);
|
||||
loadModulebtn:SetText(AL["Load Modules"]);
|
||||
loadModulebtn:SetScript("OnClick", function() AtlasLoot_LoadAllModules() end);
|
||||
loadModulebtn:SetFrameLevel( (loadModulebtn:GetParent()):GetFrameLevel() + 1 );
|
||||
loadModulebtn:SetScript("OnClick", function() AtlasLoot:LoadAllModules() end);
|
||||
|
||||
--Options Button
|
||||
local optionsbtn = CreateFrame("Button", "AtlasLootDefaultFrame_Options", AtlasLootDefaultFrame, "OptionsButtonTemplate");
|
||||
@@ -62,7 +228,6 @@ local optionsbtn = CreateFrame("Button", "AtlasLootDefaultFrame_Options", AtlasL
|
||||
optionsbtn:SetPoint("TOPLEFT", AtlasLootDefaultFrame, "TOPLEFT",40,-15);
|
||||
optionsbtn:SetText(AL["Options"]);
|
||||
optionsbtn:SetScript("OnClick", function() AtlasLootOptions_Toggle() end);
|
||||
optionsbtn:SetFrameLevel( (optionsbtn:GetParent()):GetFrameLevel() + 1 );
|
||||
|
||||
--Moduel Menu Button
|
||||
local menubtn = CreateFrame("Button", "AtlasLootDefaultFrame_Menu", AtlasLootDefaultFrame, "OptionsButtonTemplate");
|
||||
@@ -80,7 +245,6 @@ local menubtn = CreateFrame("Button", "AtlasLootDefaultFrame_Menu", AtlasLootDef
|
||||
AtlasLoot_Dewdrop:Open(self);
|
||||
end
|
||||
end);
|
||||
menubtn:SetFrameLevel( (menubtn:GetParent()):GetFrameLevel() + 1 );
|
||||
|
||||
--SubMenu Button
|
||||
local submenubtn = CreateFrame("Button", "AtlasLootDefaultFrame_SubMenu", AtlasLootDefaultFrame, "OptionsButtonTemplate");
|
||||
@@ -91,7 +255,6 @@ local submenubtn = CreateFrame("Button", "AtlasLootDefaultFrame_SubMenu", AtlasL
|
||||
submenubtn.Lable:SetText("Select Subcategory");
|
||||
submenubtn.Lable:Show();
|
||||
submenubtn:SetText(AL["Select Sub-Table"]);
|
||||
submenubtn:SetFrameLevel( (submenubtn:GetParent()):GetFrameLevel() + 1 );
|
||||
submenubtn:SetScript("OnClick", function(self)
|
||||
if AtlasLoot_DewdropSubMenu:IsOpen() then
|
||||
AtlasLoot_DewdropSubMenu:Close();
|
||||
@@ -116,23 +279,8 @@ local expansionmenubtn = CreateFrame("Button", "AtlasLootDefaultFrame_ExpansionM
|
||||
AtlasLoot_DewdropExpansionMenu:Open(self);
|
||||
end
|
||||
end);
|
||||
expansionmenubtn:SetFrameLevel( (expansionmenubtn:GetParent()):GetFrameLevel() + 1 );
|
||||
|
||||
--Loot Background
|
||||
local lootbground = CreateFrame("Frame", "AtlasLootDefaultFrame_LootBackground", AtlasLootDefaultFrame);
|
||||
lootbground:SetSize(540,515);
|
||||
lootbground:SetPoint("BOTTOMLEFT", AtlasLootDefaultFrame, "BOTTOMLEFT",40,90);
|
||||
lootbground:SetFrameStrata("HIGH");
|
||||
lootbground.Back = lootbground:CreateTexture("AtlasLootDefaultFrame_LootBackground_Back", "BACKGROUND");
|
||||
lootbground.Back:SetAllPoints();
|
||||
lootbground.Back:SetPoint("TOPLEFT","AtlasLootDefaultFrame_LootBackground","TOPLEFT");
|
||||
lootbground.Back:SetPoint("BOTTOMRIGHT","AtlasLootDefaultFrame_LootBackground","BOTTOMRIGHT");
|
||||
lootbground:EnableMouse();
|
||||
lootbground:SetScript("OnMouseDown",function(self, button)
|
||||
if AtlasLootItemsFrame.refresh[2][AtlasLootItemsFrame.refresh[1]].Back and button == "RightButton" then
|
||||
AtlasLoot_BackButton_OnClick()
|
||||
end
|
||||
end);
|
||||
--------------------------------- Atlas Map and map buttons -----------------------------------------------
|
||||
|
||||
--Atlas Map
|
||||
local map = CreateFrame("Frame", "AtlasLootDefaultFrame_Map", AtlasLootDefaultFrame);
|
||||
@@ -147,15 +295,36 @@ local map = CreateFrame("Frame", "AtlasLootDefaultFrame_Map", AtlasLootDefaultFr
|
||||
end
|
||||
end);
|
||||
|
||||
-- Map Button
|
||||
local mapbtn = CreateFrame("Button","AtlasLootDefaultFrame_MapButton", AtlasLootDefaultFrame,"OptionsButtonTemplate");
|
||||
mapbtn:SetSize(90,24);
|
||||
mapbtn:SetPoint("BOTTOMLEFT",Atlasloot_SubTableFrame,0,-27.5);
|
||||
mapbtn:SetText("Map");
|
||||
mapbtn:SetScript("OnClick", function() AtlasLoot:MapOnShow(); end)
|
||||
mapbtn:Hide();
|
||||
|
||||
-- Map Select Button
|
||||
local mapSelbtn = CreateFrame("Button","AtlasLootDefaultFrame_MapSelectButton", AtlasLootDefaultFrame,"OptionsButtonTemplate");
|
||||
mapSelbtn:SetSize(180,24);
|
||||
mapSelbtn:SetPoint("BOTTOMRIGHT",Atlasloot_SubTableFrame,5,-27.5);
|
||||
mapSelbtn:SetScript("OnClick", function(self)
|
||||
if AtlasLoot_MapMenu:IsOpen() then
|
||||
AtlasLoot_MapMenu:Close();
|
||||
else
|
||||
AtlasLoot_MapMenu:Open(self);
|
||||
end
|
||||
end);
|
||||
mapSelbtn:SetText("No Map");
|
||||
mapSelbtn:Hide();
|
||||
|
||||
---------------------------------------- Buttons Under the loot and subtable frames -------------------------------------------
|
||||
|
||||
--Wish List Button
|
||||
local wishbtn = CreateFrame("Button", "AtlasLootDefaultFrameWishListButton", AtlasLootDefaultFrame, "OptionsButtonTemplate");
|
||||
wishbtn:SetPoint("BOTTOMLEFT", "AtlasLootDefaultFrame", "BOTTOMLEFT", 40, 63);
|
||||
wishbtn:SetSize(105,20);
|
||||
wishbtn:SetScript("OnClick", function(self)AtlasLoot_ShowWishListDropDown("","","","","",self,true) end);
|
||||
wishbtn:SetScript("OnShow", function(self)
|
||||
self:SetText(AL["Wishlist"]);
|
||||
self:SetFrameLevel( (self:GetParent()):GetFrameLevel() + 1 );
|
||||
end);
|
||||
wishbtn:SetText(AL["Wishlist"]);
|
||||
|
||||
--Quick Look Buttons
|
||||
local function presetcreate(preset,num)
|
||||
@@ -174,16 +343,14 @@ local function presetcreate(preset,num)
|
||||
end
|
||||
end);
|
||||
preset:SetScript("OnClick", function()
|
||||
if AtlasLoot_IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][num][6]) then
|
||||
pFrame = { "TOPLEFT", "AtlasLootDefaultFrame_LootBackground", "TOPLEFT", "2", "-2" };
|
||||
ATLASLOOT_LASTMODULE = AtlasLootCharDB["QuickLooks"][num][6];
|
||||
ATLASLOOT_CURRENTTABLE = AtlasLootCharDB["QuickLooks"][num][7];
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootCharDB["QuickLooks"][num][1], AtlasLootCharDB["QuickLooks"][num][2], pFrame, AtlasLootCharDB["QuickLooks"][num][5]);
|
||||
if AtlasLoot:IsLootTableAvailable(AtlasLootCharDB["QuickLooks"][num][5]) then
|
||||
ATLASLOOT_LASTMODULE = AtlasLootCharDB["QuickLooks"][num][5];
|
||||
ATLASLOOT_CURRENTTABLE = AtlasLootCharDB["QuickLooks"][num][6];
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootCharDB["QuickLooks"][num][1], AtlasLootCharDB["QuickLooks"][num][2], pFrame, AtlasLootCharDB["QuickLooks"][num][4]);
|
||||
end
|
||||
end);
|
||||
preset:SetScript("OnShow", function(self)
|
||||
self:SetText(AL["QuickLook"].." "..num);
|
||||
self:SetFrameLevel( (self:GetParent()):GetFrameLevel() + 1 );
|
||||
if ((not AtlasLootCharDB["QuickLooks"][num]) or (not AtlasLootCharDB["QuickLooks"][num][1])) or (AtlasLootCharDB["QuickLooks"][num][1]==nil) then
|
||||
self:Disable();
|
||||
end
|
||||
@@ -226,7 +393,6 @@ local searchbtn = CreateFrame("Button","AtlasLootDefaultFrameSearchButton",Atlas
|
||||
searchbtn:SetSize(69,32);
|
||||
searchbtn:SetPoint("LEFT","AtlasLootDefaultFrameSearchBox","RIGHT",2,0);
|
||||
searchbtn:SetText(AL["Search"]);
|
||||
searchbtn:SetFrameLevel( (searchbtn:GetParent()):GetFrameLevel() + 1 );
|
||||
searchbtn:SetScript("OnClick", function()
|
||||
AtlasLoot:Search(AtlasLootDefaultFrameSearchBox:GetText());
|
||||
AtlasLootDefaultFrameSearchBox:ClearFocus();
|
||||
@@ -240,7 +406,6 @@ local searchopt = CreateFrame("Button", "AtlasLootDefaultFrameSearchOptionsButto
|
||||
searchopt:SetPushedTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Down");
|
||||
searchopt:SetDisabledTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Disabled");
|
||||
searchopt:SetHighlightTexture("Interface\\Buttons\\UI-Common-MouseHilight","ADD");
|
||||
searchopt:SetFrameLevel( (searchopt:GetParent()):GetFrameLevel() + 1 );
|
||||
searchopt:SetScript("OnClick", function(self) AtlasLoot:ShowSearchOptions(self) end)
|
||||
|
||||
--Clear Search Button
|
||||
@@ -248,7 +413,6 @@ local searchclear = CreateFrame("Button","AtlasLootDefaultFrameSearchClearButton
|
||||
searchclear:SetSize(58,32);
|
||||
searchclear:SetPoint("LEFT",AtlasLootDefaultFrameSearchOptionsButton,"RIGHT",-2,0);
|
||||
searchclear:SetText(AL["Clear"]);
|
||||
searchclear:SetFrameLevel( (searchclear:GetParent()):GetFrameLevel() + 1 );
|
||||
searchclear:SetScript("OnClick", function()
|
||||
AtlasLootDefaultFrameSearchBox:SetText("");
|
||||
AtlasLootDefaultFrameSearchBox:ClearFocus();
|
||||
@@ -259,7 +423,6 @@ local lastresult = CreateFrame("Button","AtlasLootDefaultFrameLastResultButton",
|
||||
lastresult:SetSize(100,32);
|
||||
lastresult:SetPoint("LEFT",AtlasLootDefaultFrameSearchClearButton,"RIGHT",1,0);
|
||||
lastresult:SetText(AL["Last Result"]);
|
||||
lastresult:SetFrameLevel( (lastresult:GetParent()):GetFrameLevel() + 1 );
|
||||
lastresult:SetScript("OnClick", function() AtlasLoot:ShowSearchResult() end);
|
||||
|
||||
-- Advanced Search Button
|
||||
@@ -267,13 +430,12 @@ local advSearch = CreateFrame("Button","AtlasLootDefaultFrameAdvancedSearchButto
|
||||
advSearch:SetSize(95,32);
|
||||
advSearch:SetPoint("LEFT",AtlasLootDefaultFrameLastResultButton,"RIGHT",2);
|
||||
advSearch:SetText("Advanced");
|
||||
advSearch:SetFrameLevel( (advSearch:GetParent()):GetFrameLevel() + 1 );
|
||||
advSearch:SetScript("OnClick", function()
|
||||
AtlasLoot_AdvancedSearchShow();
|
||||
AtlasLootDefaultFrameSearchBox:ClearFocus();
|
||||
end)
|
||||
|
||||
---------------------ScrollFrame----------------------------------
|
||||
--------------------- Diffcuility ScrollFrame ----------------------------------
|
||||
local ROW_HEIGHT = 16; -- How tall is each row?
|
||||
local MAX_ROWS = 5; -- How many rows can be shown at once?
|
||||
|
||||
@@ -337,7 +499,7 @@ local rows = setmetatable({}, { __index = function(t, i)
|
||||
row:SetScript("OnClick", function()
|
||||
ItemindexID = row.itemIndex;
|
||||
if not AtlasLootDefaultFrame_AdvancedSearchPanel:IsVisible() then
|
||||
AtlasLoot_ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4]);
|
||||
AtlasLoot:ShowItemsFrame(AtlasLootItemsFrame.refresh[1], AtlasLootItemsFrame.refresh[2], AtlasLootItemsFrame.refresh[3], AtlasLootItemsFrame.refresh[4]);
|
||||
end
|
||||
AtlasLoot:ScrollFrameUpdate();
|
||||
end)
|
||||
@@ -415,7 +577,7 @@ local rows2 = setmetatable({}, { __index = function(t, i)
|
||||
row:SetCheckedTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight", "ADD");
|
||||
row:SetScript("OnClick", function()
|
||||
if row.dataSource ~= AtlasLoot_MapData then
|
||||
AtlasLoot_ShowItemsFrame(row.tablename, row.dataSource, row.pFrame, row.tablenum);
|
||||
AtlasLoot:ShowItemsFrame(row.tablename, row.dataSource, row.pFrame, row.tablenum);
|
||||
else
|
||||
row:SetChecked(false);
|
||||
end
|
||||
@@ -431,27 +593,3 @@ local rows2 = setmetatable({}, { __index = function(t, i)
|
||||
end })
|
||||
|
||||
subtableFrame.rows = rows2
|
||||
|
||||
-- Map Button
|
||||
local mapbtn = CreateFrame("Button","AtlasLootDefaultFrame_MapButton", AtlasLootDefaultFrame,"OptionsButtonTemplate");
|
||||
mapbtn:SetSize(90,24);
|
||||
mapbtn:SetPoint("BOTTOMLEFT",Atlasloot_SubTableFrame,0,-27.5);
|
||||
mapbtn:SetText("Map");
|
||||
mapbtn:SetFrameLevel( (mapbtn:GetParent()):GetFrameLevel() + 1 );
|
||||
mapbtn:SetScript("OnClick", function() AtlasLoot:MapOnShow(); end)
|
||||
mapbtn:Hide();
|
||||
|
||||
-- Map Select Button
|
||||
local mapSelbtn = CreateFrame("Button","AtlasLootDefaultFrame_MapSelectButton", AtlasLootDefaultFrame,"OptionsButtonTemplate");
|
||||
mapSelbtn:SetSize(180,24);
|
||||
mapSelbtn:SetPoint("BOTTOMRIGHT",Atlasloot_SubTableFrame,5,-27.5);
|
||||
mapSelbtn:SetFrameLevel( (mapSelbtn:GetParent()):GetFrameLevel() + 1 );
|
||||
mapSelbtn:SetScript("OnClick", function(self)
|
||||
if AtlasLoot_MapMenu:IsOpen() then
|
||||
AtlasLoot_MapMenu:Close();
|
||||
else
|
||||
AtlasLoot_MapMenu:Open(self);
|
||||
end
|
||||
end);
|
||||
mapSelbtn:SetText("No Map");
|
||||
mapSelbtn:Hide();
|
||||
@@ -0,0 +1,126 @@
|
||||
--- AceEvent-3.0 provides event registration and secure dispatching.
|
||||
-- All dispatching is done using **CallbackHandler-1.0**. AceEvent is a simple wrapper around
|
||||
-- CallbackHandler, and dispatches all game events or addon message to the registrees.
|
||||
--
|
||||
-- **AceEvent-3.0** can be embeded into your addon, either explicitly by calling AceEvent:Embed(MyAddon) or by
|
||||
-- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
|
||||
-- and can be accessed directly, without having to explicitly call AceEvent itself.\\
|
||||
-- It is recommended to embed AceEvent, otherwise you'll have to specify a custom `self` on all calls you
|
||||
-- make into AceEvent.
|
||||
-- @class file
|
||||
-- @name AceEvent-3.0
|
||||
-- @release $Id: AceEvent-3.0.lua 877 2009-11-02 15:56:50Z nevcairiel $
|
||||
local MAJOR, MINOR = "AceEvent-3.0", 3
|
||||
local AceEvent = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not AceEvent then return end
|
||||
|
||||
-- Lua APIs
|
||||
local pairs = pairs
|
||||
|
||||
local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0")
|
||||
|
||||
AceEvent.frame = AceEvent.frame or CreateFrame("Frame", "AceEvent30Frame") -- our event frame
|
||||
AceEvent.embeds = AceEvent.embeds or {} -- what objects embed this lib
|
||||
|
||||
-- APIs and registry for blizzard events, using CallbackHandler lib
|
||||
if not AceEvent.events then
|
||||
AceEvent.events = CallbackHandler:New(AceEvent,
|
||||
"RegisterEvent", "UnregisterEvent", "UnregisterAllEvents")
|
||||
end
|
||||
|
||||
function AceEvent.events:OnUsed(target, eventname)
|
||||
AceEvent.frame:RegisterEvent(eventname)
|
||||
end
|
||||
|
||||
function AceEvent.events:OnUnused(target, eventname)
|
||||
AceEvent.frame:UnregisterEvent(eventname)
|
||||
end
|
||||
|
||||
|
||||
-- APIs and registry for IPC messages, using CallbackHandler lib
|
||||
if not AceEvent.messages then
|
||||
AceEvent.messages = CallbackHandler:New(AceEvent,
|
||||
"RegisterMessage", "UnregisterMessage", "UnregisterAllMessages"
|
||||
)
|
||||
AceEvent.SendMessage = AceEvent.messages.Fire
|
||||
end
|
||||
|
||||
--- embedding and embed handling
|
||||
local mixins = {
|
||||
"RegisterEvent", "UnregisterEvent",
|
||||
"RegisterMessage", "UnregisterMessage",
|
||||
"SendMessage",
|
||||
"UnregisterAllEvents", "UnregisterAllMessages",
|
||||
}
|
||||
|
||||
--- Register for a Blizzard Event.
|
||||
-- The callback will always be called with the event as the first argument, and if supplied, the `arg` as second argument.
|
||||
-- Any arguments to the event will be passed on after that.
|
||||
-- @name AceEvent:RegisterEvent
|
||||
-- @class function
|
||||
-- @paramsig event[, callback [, arg]]
|
||||
-- @param event The event to register for
|
||||
-- @param callback The callback function to call when the event is triggered (funcref or method, defaults to a method with the event name)
|
||||
-- @param arg An optional argument to pass to the callback function
|
||||
|
||||
--- Unregister an event.
|
||||
-- @name AceEvent:UnregisterEvent
|
||||
-- @class function
|
||||
-- @paramsig event
|
||||
-- @param event The event to unregister
|
||||
|
||||
--- Register for a custom AceEvent-internal message.
|
||||
-- The callback will always be called with the event as the first argument, and if supplied, the `arg` as second argument.
|
||||
-- Any arguments to the event will be passed on after that.
|
||||
-- @name AceEvent:RegisterMessage
|
||||
-- @class function
|
||||
-- @paramsig message[, callback [, arg]]
|
||||
-- @param message The message to register for
|
||||
-- @param callback The callback function to call when the message is triggered (funcref or method, defaults to a method with the event name)
|
||||
-- @param arg An optional argument to pass to the callback function
|
||||
|
||||
--- Unregister a message
|
||||
-- @name AceEvent:UnregisterMessage
|
||||
-- @class function
|
||||
-- @paramsig message
|
||||
-- @param message The message to unregister
|
||||
|
||||
--- Send a message over the AceEvent-3.0 internal message system to other addons registered for this message.
|
||||
-- @name AceEvent:SendMessage
|
||||
-- @class function
|
||||
-- @paramsig message, ...
|
||||
-- @param message The message to send
|
||||
-- @param ... Any arguments to the message
|
||||
|
||||
|
||||
-- Embeds AceEvent into the target object making the functions from the mixins list available on target:..
|
||||
-- @param target target object to embed AceEvent in
|
||||
function AceEvent:Embed(target)
|
||||
for k, v in pairs(mixins) do
|
||||
target[v] = self[v]
|
||||
end
|
||||
self.embeds[target] = true
|
||||
return target
|
||||
end
|
||||
|
||||
-- AceEvent:OnEmbedDisable( target )
|
||||
-- target (object) - target object that is being disabled
|
||||
--
|
||||
-- Unregister all events messages etc when the target disables.
|
||||
-- this method should be called by the target manually or by an addon framework
|
||||
function AceEvent:OnEmbedDisable(target)
|
||||
target:UnregisterAllEvents()
|
||||
target:UnregisterAllMessages()
|
||||
end
|
||||
|
||||
-- Script to fire blizzard events into the event listeners
|
||||
local events = AceEvent.events
|
||||
AceEvent.frame:SetScript("OnEvent", function(this, event, ...)
|
||||
events:Fire(event, ...)
|
||||
end)
|
||||
|
||||
--- Finally: upgrade our old embeds
|
||||
for target, v in pairs(AceEvent.embeds) do
|
||||
AceEvent:Embed(target)
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="AceEvent-3.0.lua"/>
|
||||
</Ui>
|
||||
@@ -112,7 +112,7 @@ local BabbleZone = AtlasLoot_GetLocaleLibBabble("LibBabble-Zone-3.0")
|
||||
{ 17, "MountsHorde1", "achievement_pvp_h_16", "=ds="..AL["Horde Mounts"], ""};
|
||||
{ 18, "MountsPvP1", "ability_mount_netherdrakeelite", "=ds="..AL["PvP Mounts"], ""};
|
||||
{ 19, "MountsCraftQuestPromotion1", "INV_Misc_QirajiCrystal_05", "=ds="..AL["Quest"].." / "..AL["Promotional"].." / "..AL["Crafted Mounts"], ""};
|
||||
Back = "SETMENU"..AtlasLoot_Expac;
|
||||
Back = "SETMENU";
|
||||
Submenu = "Expansion";
|
||||
};
|
||||
|
||||
@@ -124,7 +124,7 @@ local BabbleZone = AtlasLoot_GetLocaleLibBabble("LibBabble-Zone-3.0")
|
||||
{ 17, "PetsQuestCrafted1", "inv_drink_19", "=ds="..AL["Quest"].." / "..AL["Crafted"], ""};
|
||||
{ 18, "PetsEvent1", "inv_pet_egbert", "=ds="..AL["World Events"], ""};
|
||||
{ 19, "PetsPetStore1", "INV_Misc_Coin_01", "=ds="..AL["Pet Store"], ""};
|
||||
Back = "SETMENU"..AtlasLoot_Expac;
|
||||
Back = "SETMENU";
|
||||
Submenu = "Expansion";
|
||||
};
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<Include file="Libs\AceSerializer-3.0\AceSerializer-3.0.xml"/>
|
||||
<Include file="Libs\AceComm-3.0\AceComm-3.0.xml"/>
|
||||
<Include file="Libs\AceTimer-3.0\AceTimer-3.0.xml"/>
|
||||
<Include file="Libs\AceEvent-3.0\AceEvent-3.0.xml"/>
|
||||
|
||||
<Include file="Libs\DewdropLib\embeds.xml"/>
|
||||
<Script file="Libs\DewdropLib\Dewdrop-2.0\Dewdrop-2.0.lua"/>
|
||||
|
||||
@@ -10524,7 +10524,7 @@ local BabbleZone = AtlasLoot_GetLocaleLibBabble("LibBabble-Zone-3.0")
|
||||
{ 24, 22630, "", "=q5=Atiesh, Greatstaff of the Guardian", "=ds=#m4#, =q1=#m1# =ds=#c8#"},
|
||||
{ 26, 49623, "", "=q5=Shadowmourne", "=ds=#h2# #w1#", "" };
|
||||
{ 27, 46017, "", "=q5=Val'anyr, Hammer of Ancient Kings", "=ds=#h3# #w6#", "" };
|
||||
Back = "SETMENU"..AtlasLoot_Expac;
|
||||
Back = "SETMENU";
|
||||
Type = "BCRaid";
|
||||
};
|
||||
|
||||
@@ -11318,7 +11318,7 @@ local BabbleZone = AtlasLoot_GetLocaleLibBabble("LibBabble-Zone-3.0")
|
||||
{ 29, 42947, "", "=q7=Dignified Headmaster's Charge", "=ds=#w9#", "65 #eofheroism# / 95 #champseal#"};
|
||||
{ 30, 42946, "", "=q7=Charmed Ancient Bone Bow", "=ds=#w2#", "65 #eofheroism# / 95 #champseal#"};
|
||||
Next = "Heirloom2";
|
||||
Back = "SETMENU"..AtlasLoot_Expac;
|
||||
Back = "SETMENU";
|
||||
};
|
||||
|
||||
AtlasLoot_Data["Heirloom2"] = {
|
||||
@@ -11339,7 +11339,7 @@ local BabbleZone = AtlasLoot_GetLocaleLibBabble("LibBabble-Zone-3.0")
|
||||
{ 20, 44095, "", "=q7=Grand Staff of Jordan", "=ds=#w9#", "325 #wintergrasp#"};
|
||||
{ 21, 44093, "", "=q7=Upgraded Dwarven Hand Cannon", "=ds=#w5#", "325 #wintergrasp#"};
|
||||
Prev = "Heirloom";
|
||||
Back = "SETMENU"..AtlasLoot_Expac;
|
||||
Back = "SETMENU";
|
||||
};
|
||||
|
||||
-------------------------------
|
||||
|
||||
Reference in New Issue
Block a user