diff --git a/BossData.lua b/BossData.lua index 62f420d..6f1234f 100755 --- a/BossData.lua +++ b/BossData.lua @@ -185,11 +185,16 @@ function AddShadowlands() local criteria = { level = 60 } + local antrosCriteria = { + ['Alliance'] = 64230, + ['Horde'] = 64230 + } category.name = _G["EXPANSION_NAME8"] category.title = category.name.." "..L["Bosses"] category.expansion = 8 category.bosses = { + GetWorldBoss({worldQuestID = 65143, encounterID = 2468, prerequisite = antrosCriteria }), -- Antros GetWorldBoss({worldQuestID = 61813, encounterID = 2430, prerequisite = criteria }), -- Valinor, the Light of Eons GetWorldBoss({worldQuestID = 61816, encounterID = 2431, prerequisite = criteria }), -- Mortanis GetWorldBoss({worldQuestID = 61815, encounterID = 2432, prerequisite = criteria }), -- Oranonomos, the Everbreaching diff --git a/Libs/Ace3.lua b/Libs/Ace3.lua new file mode 100644 index 0000000..3461a23 --- /dev/null +++ b/Libs/Ace3.lua @@ -0,0 +1,110 @@ + +-- This file is only there in standalone Ace3 and provides handy dev tool stuff I guess +-- for now only /rl to reload your UI :) +-- note the complete overkill use of AceAddon and console, ain't it cool? + +-- GLOBALS: next, loadstring, ReloadUI, geterrorhandler +-- GLOBALS: BINDING_HEADER_ACE3, BINDING_NAME_RELOADUI, Ace3, LibStub + +-- BINDINGs labels +BINDING_HEADER_ACE3 = "Ace3" +BINDING_NAME_RELOADUI = "ReloadUI" +-- + +local gui = LibStub("AceGUI-3.0") +local reg = LibStub("AceConfigRegistry-3.0") +local dialog = LibStub("AceConfigDialog-3.0") + +Ace3 = LibStub("AceAddon-3.0"):NewAddon("Ace3", "AceConsole-3.0") +local Ace3 = Ace3 + +local selectedgroup +local frame +local select +local status = {} +local configs = {} + +local function frameOnClose() + gui:Release(frame) + frame = nil +end + +local function RefreshConfigs() + for name in reg:IterateOptionsTables() do + configs[name] = name + end +end + +local function ConfigSelected(widget, event, value) + selectedgroup = value + dialog:Open(value, widget) +end + +local old_CloseSpecialWindows + +-- GLOBALS: CloseSpecialWindows, next +function Ace3:Open() + if not old_CloseSpecialWindows then + old_CloseSpecialWindows = CloseSpecialWindows + CloseSpecialWindows = function() + local found = old_CloseSpecialWindows() + if frame then + frame:Hide() + return true + end + return found + end + end + RefreshConfigs() + if next(configs) == nil then + self:Print("No Configs are Registered") + return + end + + if not frame then + frame = gui:Create("Frame") + frame:ReleaseChildren() + frame:SetTitle("Ace3 Options") + frame:SetLayout("FILL") + frame:SetCallback("OnClose", frameOnClose) + + select = gui:Create("DropdownGroup") + select:SetGroupList(configs) + select:SetCallback("OnGroupSelected", ConfigSelected) + frame:AddChild(select) + end + if not selectedgroup then + selectedgroup = next(configs) + end + select:SetGroup(selectedgroup) + frame:Show() +end + +local function RefreshOnUpdate(this) + select:SetGroup(selectedgroup) + this:SetScript("OnUpdate", nil) +end + +function Ace3:ConfigTableChanged(event, appName) + if selectedgroup == appName and frame then + frame.frame:SetScript("OnUpdate", RefreshOnUpdate) + end +end + +reg.RegisterCallback(Ace3, "ConfigTableChange", "ConfigTableChanged") + +function Ace3:PrintCmd(input) + input = input:trim():match("^(.-);*$") + local func, err = loadstring("LibStub(\"AceConsole-3.0\"):Print(" .. input .. ")") + if not func then + LibStub("AceConsole-3.0"):Print("Error: " .. err) + else + func() + end +end + +function Ace3:OnInitialize() + self:RegisterChatCommand("ace3", function() self:Open() end) + self:RegisterChatCommand("rl", function() ReloadUI() end) + self:RegisterChatCommand("print", "PrintCmd") +end diff --git a/Libs/Ace3.toc b/Libs/Ace3.toc new file mode 100644 index 0000000..5619a0a --- /dev/null +++ b/Libs/Ace3.toc @@ -0,0 +1,28 @@ +## Interface: 90200 + +## Title: Lib: Ace3 +## Notes: AddOn development framework +## Author: Ace3 Development Team +## X-Website: http://www.wowace.com +## X-Category: Library +## X-License: Limited BSD +## Version: Release-r1259 + +LibStub\LibStub.lua +CallbackHandler-1.0\CallbackHandler-1.0.xml +AceAddon-3.0\AceAddon-3.0.xml +AceEvent-3.0\AceEvent-3.0.xml +AceTimer-3.0\AceTimer-3.0.xml +AceBucket-3.0\AceBucket-3.0.xml +AceHook-3.0\AceHook-3.0.xml +AceDB-3.0\AceDB-3.0.xml +AceDBOptions-3.0\AceDBOptions-3.0.xml +AceLocale-3.0\AceLocale-3.0.xml +AceConsole-3.0\AceConsole-3.0.xml +AceGUI-3.0\AceGUI-3.0.xml +AceConfig-3.0\AceConfig-3.0.xml +AceComm-3.0\AceComm-3.0.xml +AceTab-3.0\AceTab-3.0.xml +AceSerializer-3.0\AceSerializer-3.0.xml + +Ace3.lua diff --git a/Libs/AceAddon-3.0/AceAddon-3.0.lua b/Libs/AceAddon-3.0/AceAddon-3.0.lua index 4e3b40b..1b63bd1 100755 --- a/Libs/AceAddon-3.0/AceAddon-3.0.lua +++ b/Libs/AceAddon-3.0/AceAddon-3.0.lua @@ -28,9 +28,9 @@ -- end -- @class file -- @name AceAddon-3.0.lua --- @release $Id: AceAddon-3.0.lua 980 2010-10-27 14:20:11Z nevcairiel $ +-- @release $Id: AceAddon-3.0.lua 1238 2020-08-28 16:18:42Z nevcairiel $ -local MAJOR, MINOR = "AceAddon-3.0", 10 +local MAJOR, MINOR = "AceAddon-3.0", 13 local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not AceAddon then return end -- No Upgrade needed. @@ -62,43 +62,12 @@ local function errorhandler(err) return geterrorhandler()(err) end -local function CreateDispatcher(argCount) - local code = [[ - local xpcall, eh = ... - local method, ARGS - local function call() return method(ARGS) end - - local function dispatch(func, ...) - method = func - if not method then return end - ARGS = ... - return xpcall(call, eh) - end - - return dispatch - ]] - - local ARGS = {} - for i = 1, argCount do ARGS[i] = "arg"..i end - code = code:gsub("ARGS", tconcat(ARGS, ", ")) - return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler) -end - -local Dispatchers = setmetatable({}, {__index=function(self, argCount) - local dispatcher = CreateDispatcher(argCount) - rawset(self, argCount, dispatcher) - return dispatcher -end}) -Dispatchers[0] = function(func) - return xpcall(func, errorhandler) -end - local function safecall(func, ...) -- we check to see if the func is passed is actually a function here and don't error when it isn't -- this safecall is used for optional functions like OnInitialize OnEnable etc. When they are not -- present execution should continue without hinderance if type(func) == "function" then - return Dispatchers[select('#', ...)](func, ...) + return xpcall(func, errorhandler, ...) end end @@ -108,6 +77,16 @@ local Enable, Disable, EnableModule, DisableModule, Embed, NewModule, GetModule, -- used in the addon metatable local function addontostring( self ) return self.name end +-- Check if the addon is queued for initialization +local function queuedForInitialization(addon) + for i = 1, #AceAddon.initializequeue do + if AceAddon.initializequeue[i] == addon then + return true + end + end + return false +end + --- Create a new AceAddon-3.0 addon. -- Any libraries you specified will be embeded, and the addon will be scheduled for -- its OnInitialize and OnEnable callbacks. @@ -314,7 +293,12 @@ end -- MyModule:Enable() function Enable(self) self:SetEnabledState(true) - return AceAddon:EnableAddon(self) + + -- nevcairiel 2013-04-27: don't enable an addon/module if its queued for init still + -- it'll be enabled after the init process + if not queuedForInitialization(self) then + return AceAddon:EnableAddon(self) + end end --- Disables the Addon, if possible, return true or false depending on success. @@ -617,9 +601,20 @@ function AceAddon:IterateAddonStatus() return pairs(self.statuses) end function AceAddon:IterateEmbedsOnAddon(addon) return pairs(self.embeds[addon]) end function AceAddon:IterateModulesOfAddon(addon) return pairs(addon.modules) end +-- Blizzard AddOns which can load very early in the loading process and mess with Ace3 addon loading +local BlizzardEarlyLoadAddons = { + Blizzard_DebugTools = true, + Blizzard_TimeManager = true, + Blizzard_BattlefieldMap = true, + Blizzard_MapCanvas = true, + Blizzard_SharedMapDataProviders = true, + Blizzard_CombatLog = true, +} + -- Event Handling local function onEvent(this, event, arg1) - if event == "ADDON_LOADED" or event == "PLAYER_LOGIN" then + -- 2020-08-28 nevcairiel - ignore the load event of Blizzard addons which occur early in the loading process + if (event == "ADDON_LOADED" and (arg1 == nil or not BlizzardEarlyLoadAddons[arg1])) or event == "PLAYER_LOGIN" then -- if a addon loads another addon, recursion could happen here, so we need to validate the table on every iteration while(#AceAddon.initializequeue > 0) do local addon = tremove(AceAddon.initializequeue, 1) diff --git a/Libs/AceAddon-3.0/AceAddon-3.0.xml b/Libs/AceAddon-3.0/AceAddon-3.0.xml index e6ad639..dcf24c7 100755 --- a/Libs/AceAddon-3.0/AceAddon-3.0.xml +++ b/Libs/AceAddon-3.0/AceAddon-3.0.xml @@ -1,4 +1,4 @@