flickerstreak@22: --[[ flickerstreak@1: Name: AceAddon-2.0 flickerstreak@22: Revision: $Rev: 46764 $ flickerstreak@1: Developed by: The Ace Development Team (http://www.wowace.com/index.php/The_Ace_Development_Team) flickerstreak@1: Inspired By: Ace 1.x by Turan (turan@gryphon.com) flickerstreak@1: Website: http://www.wowace.com/ flickerstreak@22: Documentation: http://www.wowace.com/wiki/AceAddon-2.0 flickerstreak@22: SVN: http://svn.wowace.com/wowace/trunk/Ace2/AceAddon-2.0 flickerstreak@1: Description: Base for all Ace addons to inherit from. flickerstreak@1: Dependencies: AceLibrary, AceOO-2.0, AceEvent-2.0, (optional) AceConsole-2.0 flickerstreak@22: License: LGPL v2.1 flickerstreak@1: ]] flickerstreak@1: flickerstreak@1: local MAJOR_VERSION = "AceAddon-2.0" flickerstreak@22: local MINOR_VERSION = "$Revision: 46764 $" flickerstreak@1: flickerstreak@1: -- This ensures the code is only executed if the libary doesn't already exist, or is a newer version flickerstreak@1: if not AceLibrary then error(MAJOR_VERSION .. " requires AceLibrary.") end flickerstreak@1: if not AceLibrary:IsNewVersion(MAJOR_VERSION, MINOR_VERSION) then return end flickerstreak@1: flickerstreak@1: if not AceLibrary:HasInstance("AceOO-2.0") then error(MAJOR_VERSION .. " requires AceOO-2.0.") end flickerstreak@1: flickerstreak@1: local function safecall(func,...) flickerstreak@1: local success, err = pcall(func,...) flickerstreak@22: if not success then geterrorhandler()(err:find("%.lua:%d+:") and err or (debugstack():match("\n(.-: )in.-\n") or "") .. err) end flickerstreak@1: end flickerstreak@1: -- Localization flickerstreak@22: local STANDBY, TITLE, NOTES, VERSION, AUTHOR, DATE, CATEGORY, EMAIL, CREDITS, WEBSITE, CATEGORIES, ABOUT, LICENSE, PRINT_ADDON_INFO, DONATE, DONATE_DESC, HOWTO_DONATE_WINDOWS, HOWTO_DONATE_MAC flickerstreak@1: if GetLocale() == "deDE" then flickerstreak@1: STANDBY = "|cffff5050(Standby)|r" -- capitalized flickerstreak@1: flickerstreak@1: TITLE = "Titel" flickerstreak@1: NOTES = "Anmerkung" flickerstreak@1: VERSION = "Version" flickerstreak@1: AUTHOR = "Autor" flickerstreak@1: DATE = "Datum" flickerstreak@1: CATEGORY = "Kategorie" flickerstreak@22: EMAIL = "E-Mail" flickerstreak@1: WEBSITE = "Webseite" flickerstreak@1: CREDITS = "Credits" -- fix flickerstreak@22: LICENSE = "License" -- fix flickerstreak@22: flickerstreak@22: ABOUT = "Über" flickerstreak@1: PRINT_ADDON_INFO = "Gibt Addondaten aus" flickerstreak@22: DONATE = "Donate" -- fix flickerstreak@22: DONATE_DESC = "Give a much-needed donation to the author of this addon." -- fix flickerstreak@22: HOWTO_DONATE_WINDOWS = "Press Ctrl-A to select the link, then Ctrl-C to copy, then Alt-Tab out of the game, open your favorite web browser, and paste the link into the address bar." -- fix flickerstreak@22: HOWTO_DONATE_MAC = "Press Cmd-A to select the link, then Cmd-C to copy, then Cmd-Tab out of the game, open your favorite web browser, and paste the link into the address bar." -- fix flickerstreak@1: flickerstreak@1: CATEGORIES = { flickerstreak@1: ["Action Bars"] = "Aktionsleisten", flickerstreak@1: ["Auction"] = "Auktion", flickerstreak@1: ["Audio"] = "Audio", flickerstreak@1: ["Battlegrounds/PvP"] = "Schlachtfeld/PvP", flickerstreak@22: ["Buffs"] = "Stärkungszauber", flickerstreak@1: ["Chat/Communication"] = "Chat/Kommunikation", flickerstreak@1: ["Druid"] = "Druide", flickerstreak@22: ["Hunter"] = "Jäger", flickerstreak@1: ["Mage"] = "Magier", flickerstreak@1: ["Paladin"] = "Paladin", flickerstreak@1: ["Priest"] = "Priester", flickerstreak@1: ["Rogue"] = "Schurke", flickerstreak@1: ["Shaman"] = "Schamane", flickerstreak@1: ["Warlock"] = "Hexenmeister", flickerstreak@1: ["Warrior"] = "Krieger", flickerstreak@1: ["Healer"] = "Heiler", flickerstreak@22: ["Tank"] = "Tank", flickerstreak@22: ["Caster"] = "Zauberer", flickerstreak@1: ["Combat"] = "Kampf", flickerstreak@22: ["Compilations"] = "Zusammenstellungen", flickerstreak@1: ["Data Export"] = "Datenexport", flickerstreak@1: ["Development Tools"] = "Entwicklungs Tools", flickerstreak@1: ["Guild"] = "Gilde", flickerstreak@22: ["Frame Modification"] = "Frame Veränderungen", flickerstreak@1: ["Interface Enhancements"] = "Interface Verbesserungen", flickerstreak@1: ["Inventory"] = "Inventar", flickerstreak@22: ["Library"] = "Bibliotheken", flickerstreak@22: ["Map"] = "Karte", flickerstreak@22: ["Mail"] = "Post", flickerstreak@1: ["Miscellaneous"] = "Diverses", flickerstreak@1: ["Quest"] = "Quest", flickerstreak@1: ["Raid"] = "Schlachtzug", flickerstreak@22: ["Tradeskill"] = "Beruf", flickerstreak@22: ["UnitFrame"] = "Einheiten-Fenster", flickerstreak@1: } flickerstreak@1: elseif GetLocale() == "frFR" then flickerstreak@1: STANDBY = "|cffff5050(attente)|r" flickerstreak@22: flickerstreak@1: TITLE = "Titre" flickerstreak@1: NOTES = "Notes" flickerstreak@1: VERSION = "Version" flickerstreak@1: AUTHOR = "Auteur" flickerstreak@1: DATE = "Date" flickerstreak@22: CATEGORY = "Catégorie" flickerstreak@1: EMAIL = "E-mail" flickerstreak@1: WEBSITE = "Site web" flickerstreak@1: CREDITS = "Credits" -- fix flickerstreak@22: LICENSE = "License" -- fix flickerstreak@22: flickerstreak@1: ABOUT = "A propos" flickerstreak@1: PRINT_ADDON_INFO = "Afficher les informations sur l'addon" flickerstreak@22: DONATE = "Donate" -- fix flickerstreak@22: DONATE_DESC = "Give a much-needed donation to the author of this addon." -- fix flickerstreak@22: HOWTO_DONATE_WINDOWS = "Press Ctrl-A to select the link, then Ctrl-C to copy, then Alt-Tab out of the game, open your favorite web browser, and paste the link into the address bar." -- fix flickerstreak@22: HOWTO_DONATE_MAC = "Press Cmd-A to select the link, then Cmd-C to copy, then Cmd-Tab out of the game, open your favorite web browser, and paste the link into the address bar." -- fix flickerstreak@22: flickerstreak@1: CATEGORIES = { flickerstreak@1: ["Action Bars"] = "Barres d'action", flickerstreak@22: ["Auction"] = "Hôtel des ventes", flickerstreak@1: ["Audio"] = "Audio", flickerstreak@1: ["Battlegrounds/PvP"] = "Champs de bataille/JcJ", flickerstreak@1: ["Buffs"] = "Buffs", flickerstreak@1: ["Chat/Communication"] = "Chat/Communication", flickerstreak@1: ["Druid"] = "Druide", flickerstreak@1: ["Hunter"] = "Chasseur", flickerstreak@1: ["Mage"] = "Mage", flickerstreak@1: ["Paladin"] = "Paladin", flickerstreak@22: ["Priest"] = "Prêtre", flickerstreak@1: ["Rogue"] = "Voleur", flickerstreak@1: ["Shaman"] = "Chaman", flickerstreak@22: ["Warlock"] = "Démoniste", flickerstreak@1: ["Warrior"] = "Guerrier", flickerstreak@1: ["Healer"] = "Soigneur", flickerstreak@1: ["Tank"] = "Tank", flickerstreak@1: ["Caster"] = "Casteur", flickerstreak@1: ["Combat"] = "Combat", flickerstreak@1: ["Compilations"] = "Compilations", flickerstreak@22: ["Data Export"] = "Exportation de données", flickerstreak@22: ["Development Tools"] = "Outils de développement", flickerstreak@1: ["Guild"] = "Guilde", flickerstreak@22: ["Frame Modification"] = "Modification des fenêtres", flickerstreak@22: ["Interface Enhancements"] = "Améliorations de l'interface", flickerstreak@1: ["Inventory"] = "Inventaire", flickerstreak@22: ["Library"] = "Bibliothèques", flickerstreak@1: ["Map"] = "Carte", flickerstreak@1: ["Mail"] = "Courrier", flickerstreak@1: ["Miscellaneous"] = "Divers", flickerstreak@22: ["Quest"] = "Quêtes", flickerstreak@1: ["Raid"] = "Raid", flickerstreak@22: ["Tradeskill"] = "Métiers", flickerstreak@22: ["UnitFrame"] = "Fenêtres d'unité", flickerstreak@1: } flickerstreak@1: elseif GetLocale() == "koKR" then flickerstreak@22: STANDBY = "|cffff5050(사용가능)|r" flickerstreak@22: flickerstreak@22: TITLE = "제목" flickerstreak@22: NOTES = "노트" flickerstreak@22: VERSION = "버전" flickerstreak@22: AUTHOR = "저작자" flickerstreak@22: DATE = "날짜" flickerstreak@22: CATEGORY = "분류" flickerstreak@22: EMAIL = "전자 우편" flickerstreak@22: WEBSITE = "웹 사이트" flickerstreak@22: CREDITS = "공로자" flickerstreak@22: LICENSE = "라이센스" flickerstreak@22: flickerstreak@22: ABOUT = "정보" flickerstreak@22: PRINT_ADDON_INFO = "애드온에 대한 정보를 출력합니다." flickerstreak@22: DONATE = "기부" flickerstreak@22: DONATE_DESC = "이 애드온의 저작자에게 기부를 합니다." flickerstreak@22: HOWTO_DONATE_WINDOWS = "Ctrl-A를 눌려 링크를 선택후, Ctrl-C로 복사합니다. Alt-Tab 눌려 게임으로 부터 나간후 웹 브라우저를 엽니다. 복사된 링크를 주소 창에 붙여넣기 합니다." flickerstreak@22: HOWTO_DONATE_MAC = "Cmd-A를 눌려 링크를 선택후, Cmd-C로 복사합니다. Cmd-Tab 눌려 게임으로 부터 나간후 웹 브라우저를 엽니다. 복사된 링크를 주소 창에 붙여넣기 합니다." flickerstreak@22: flickerstreak@1: CATEGORIES = { flickerstreak@22: ["Action Bars"] = "액션바", flickerstreak@22: ["Auction"] = "경매", flickerstreak@22: ["Audio"] = "음향", flickerstreak@22: ["Battlegrounds/PvP"] = "전장/PvP", flickerstreak@22: ["Buffs"] = "버프", flickerstreak@22: ["Chat/Communication"] = "대화/의사소통", flickerstreak@22: ["Druid"] = "드루이드", flickerstreak@22: ["Hunter"] = "사냥꾼", flickerstreak@22: ["Mage"] = "마법사", flickerstreak@22: ["Paladin"] = "성기사", flickerstreak@22: ["Priest"] = "사제", flickerstreak@22: ["Rogue"] = "도적", flickerstreak@22: ["Shaman"] = "주술사", flickerstreak@22: ["Warlock"] = "흑마법사", flickerstreak@22: ["Warrior"] = "전사", flickerstreak@22: ["Healer"] = "힐러", flickerstreak@22: ["Tank"] = "탱커", flickerstreak@22: ["Caster"] = "캐스터", flickerstreak@22: ["Combat"] = "전투", flickerstreak@22: ["Compilations"] = "복합", flickerstreak@22: ["Data Export"] = "자료 출력", flickerstreak@22: ["Development Tools"] = "개발 도구", flickerstreak@22: ["Guild"] = "길드", flickerstreak@22: ["Frame Modification"] = "구조 변경", flickerstreak@22: ["Interface Enhancements"] = "인터페이스 강화", flickerstreak@22: ["Inventory"] = "인벤토리", flickerstreak@22: ["Library"] = "라이브러리", flickerstreak@22: ["Map"] = "지도", flickerstreak@22: ["Mail"] = "우편", flickerstreak@22: ["Miscellaneous"] = "기타", flickerstreak@22: ["Quest"] = "퀘스트", flickerstreak@22: ["Raid"] = "공격대", flickerstreak@22: ["Tradeskill"] = "전문기술", flickerstreak@22: ["UnitFrame"] = "유닛 프레임", flickerstreak@1: } flickerstreak@1: elseif GetLocale() == "zhTW" then flickerstreak@22: STANDBY = "|cffff5050(待命)|r" flickerstreak@22: flickerstreak@22: TITLE = "標題" flickerstreak@22: NOTES = "註記" flickerstreak@22: VERSION = "版本" flickerstreak@22: AUTHOR = "作者" flickerstreak@22: DATE = "日期" flickerstreak@22: CATEGORY = "類別" flickerstreak@22: EMAIL = "電子郵件" flickerstreak@22: WEBSITE = "網站" flickerstreak@22: CREDITS = "特別感謝" flickerstreak@22: LICENSE = "版權" flickerstreak@22: flickerstreak@22: ABOUT = "關於" flickerstreak@22: PRINT_ADDON_INFO = "顯示插件資訊。" flickerstreak@22: DONATE = "捐贈" flickerstreak@22: DONATE_DESC = "捐贈金錢給插件作者。" flickerstreak@22: HOWTO_DONATE_WINDOWS = "請按Ctrl-A選擇網站連結,Ctrl-C複製網址,Alt-Tab切換到電腦桌面,打開瀏覽器,在網址列貼上網址。" flickerstreak@22: HOWTO_DONATE_MAC = "請按Cmd-A選擇網站連結,Cmd-C複製網址,Cmd-Tab切換到電腦桌面,打開瀏覽器,在網址列貼上網址。" flickerstreak@22: flickerstreak@1: CATEGORIES = { flickerstreak@22: ["Action Bars"] = "動作條", flickerstreak@22: ["Auction"] = "拍賣", flickerstreak@22: ["Audio"] = "音效", flickerstreak@22: ["Battlegrounds/PvP"] = "戰場/PvP", flickerstreak@22: ["Buffs"] = "增益", flickerstreak@22: ["Chat/Communication"] = "聊天/通訊", flickerstreak@22: ["Druid"] = "德魯伊", flickerstreak@22: ["Hunter"] = "獵人", flickerstreak@22: ["Mage"] = "法師", flickerstreak@22: ["Paladin"] = "聖騎士", flickerstreak@22: ["Priest"] = "牧師", flickerstreak@22: ["Rogue"] = "盜賊", flickerstreak@22: ["Shaman"] = "薩滿", flickerstreak@22: ["Warlock"] = "術士", flickerstreak@22: ["Warrior"] = "戰士", flickerstreak@22: ["Healer"] = "治療者", flickerstreak@22: ["Tank"] = "坦克", flickerstreak@22: ["Caster"] = "施法者", flickerstreak@22: ["Combat"] = "戰鬥", flickerstreak@22: ["Compilations"] = "整合", flickerstreak@22: ["Data Export"] = "資料匯出", flickerstreak@22: ["Development Tools"] = "開發工具", flickerstreak@22: ["Guild"] = "公會", flickerstreak@22: ["Frame Modification"] = "框架修改", flickerstreak@22: ["Interface Enhancements"] = "介面增強", flickerstreak@22: ["Inventory"] = "庫存", flickerstreak@22: ["Library"] = "程式庫", flickerstreak@22: ["Map"] = "地圖", flickerstreak@22: ["Mail"] = "郵件", flickerstreak@22: ["Miscellaneous"] = "雜項", flickerstreak@22: ["Quest"] = "任務", flickerstreak@22: ["Raid"] = "團隊", flickerstreak@22: ["Tradeskill"] = "交易技能", flickerstreak@22: ["UnitFrame"] = "單位框架", flickerstreak@1: } flickerstreak@1: elseif GetLocale() == "zhCN" then flickerstreak@22: STANDBY = "|cffff5050(暂挂)|r" flickerstreak@22: flickerstreak@22: TITLE = "标题" flickerstreak@22: NOTES = "附注" flickerstreak@22: VERSION = "版本" flickerstreak@22: AUTHOR = "作者" flickerstreak@22: DATE = "日期" flickerstreak@22: CATEGORY = "分类" flickerstreak@22: EMAIL = "电子邮件" flickerstreak@22: WEBSITE = "网站" flickerstreak@1: CREDITS = "Credits" -- fix flickerstreak@22: LICENSE = "License" -- fix flickerstreak@22: flickerstreak@22: ABOUT = "关于" flickerstreak@22: PRINT_ADDON_INFO = "印列出插件信息" flickerstreak@22: DONATE = "Donate" -- fix flickerstreak@22: DONATE_DESC = "Give a much-needed donation to the author of this addon." -- fix flickerstreak@22: HOWTO_DONATE_WINDOWS = "Press Ctrl-A to select the link, then Ctrl-C to copy, then Alt-Tab out of the game, open your favorite web browser, and paste the link into the address bar." -- fix flickerstreak@22: HOWTO_DONATE_MAC = "Press Cmd-A to select the link, then Cmd-C to copy, then Cmd-Tab out of the game, open your favorite web browser, and paste the link into the address bar." -- fix flickerstreak@22: flickerstreak@1: CATEGORIES = { flickerstreak@22: ["Action Bars"] = "动作条", flickerstreak@22: ["Auction"] = "拍卖", flickerstreak@22: ["Audio"] = "音频", flickerstreak@22: ["Battlegrounds/PvP"] = "战场/PvP", flickerstreak@22: ["Buffs"] = "增益魔法", flickerstreak@22: ["Chat/Communication"] = "聊天/交流", flickerstreak@22: ["Druid"] = "德鲁伊", flickerstreak@22: ["Hunter"] = "猎人", flickerstreak@22: ["Mage"] = "法师", flickerstreak@22: ["Paladin"] = "圣骑士", flickerstreak@22: ["Priest"] = "牧师", flickerstreak@22: ["Rogue"] = "盗贼", flickerstreak@22: ["Shaman"] = "萨满祭司", flickerstreak@22: ["Warlock"] = "术士", flickerstreak@22: ["Warrior"] = "战士", flickerstreak@22: -- ["Healer"] = "治疗保障", flickerstreak@22: -- ["Tank"] = "近战控制", flickerstreak@22: -- ["Caster"] = "远程输出", flickerstreak@22: ["Combat"] = "战斗", flickerstreak@22: ["Compilations"] = "编译", flickerstreak@22: ["Data Export"] = "数据导出", flickerstreak@22: ["Development Tools"] = "开发工具", flickerstreak@22: ["Guild"] = "公会", flickerstreak@22: ["Frame Modification"] = "框架修改", flickerstreak@22: ["Interface Enhancements"] = "界面增强", flickerstreak@22: ["Inventory"] = "背包", flickerstreak@22: ["Library"] = "库", flickerstreak@22: ["Map"] = "地图", flickerstreak@22: ["Mail"] = "邮件", flickerstreak@22: ["Miscellaneous"] = "杂项", flickerstreak@22: ["Quest"] = "任务", flickerstreak@22: ["Raid"] = "团队", flickerstreak@22: ["Tradeskill"] = "商业技能", flickerstreak@22: ["UnitFrame"] = "头像框架", flickerstreak@22: } flickerstreak@22: elseif GetLocale() == "esES" then flickerstreak@22: STANDBY = "|cffff5050(espera)|r" flickerstreak@22: flickerstreak@22: TITLE = "Título" flickerstreak@22: NOTES = "Notas" flickerstreak@22: VERSION = "Versión" flickerstreak@22: AUTHOR = "Autor" flickerstreak@22: DATE = "Fecha" flickerstreak@22: CATEGORY = "Categoría" flickerstreak@22: EMAIL = "E-mail" flickerstreak@22: WEBSITE = "Web" flickerstreak@22: CREDITS = "Créditos" flickerstreak@22: LICENSE = "License" -- fix flickerstreak@22: flickerstreak@22: ABOUT = "Acerca de" flickerstreak@22: PRINT_ADDON_INFO = "Muestra información acerca del accesorio." flickerstreak@22: DONATE = "Donate" -- fix flickerstreak@22: DONATE_DESC = "Give a much-needed donation to the author of this addon." -- fix flickerstreak@22: HOWTO_DONATE_WINDOWS = "Press Ctrl-A to select the link, then Ctrl-C to copy, then Alt-Tab out of the game, open your favorite web browser, and paste the link into the address bar." -- fix flickerstreak@22: HOWTO_DONATE_MAC = "Press Cmd-A to select the link, then Cmd-C to copy, then Cmd-Tab out of the game, open your favorite web browser, and paste the link into the address bar." -- fix flickerstreak@22: flickerstreak@22: CATEGORIES = { flickerstreak@22: ["Action Bars"] = "Barras de Acción", flickerstreak@22: ["Auction"] = "Subasta", flickerstreak@22: ["Audio"] = "Audio", flickerstreak@22: ["Battlegrounds/PvP"] = "Campos de Batalla/JcJ", flickerstreak@22: ["Buffs"] = "Buffs", flickerstreak@22: ["Chat/Communication"] = "Chat/Comunicación", flickerstreak@22: ["Druid"] = "Druida", flickerstreak@22: ["Hunter"] = "Cazador", flickerstreak@22: ["Mage"] = "Mago", flickerstreak@22: ["Paladin"] = "Paladín", flickerstreak@22: ["Priest"] = "Sacerdote", flickerstreak@22: ["Rogue"] = "Pícaro", flickerstreak@22: ["Shaman"] = "Chamán", flickerstreak@22: ["Warlock"] = "Brujo", flickerstreak@22: ["Warrior"] = "Guerrero", flickerstreak@22: ["Healer"] = "Sanador", flickerstreak@22: ["Tank"] = "Tanque", flickerstreak@22: ["Caster"] = "Conjurador", flickerstreak@22: ["Combat"] = "Combate", flickerstreak@22: ["Compilations"] = "Compilaciones", flickerstreak@22: ["Data Export"] = "Exportar Datos", flickerstreak@22: ["Development Tools"] = "Herramientas de Desarrollo", flickerstreak@22: ["Guild"] = "Hermandad", flickerstreak@22: ["Frame Modification"] = "Modificación de Marcos", flickerstreak@22: ["Interface Enhancements"] = "Mejoras de la Interfaz", flickerstreak@22: ["Inventory"] = "Inventario", flickerstreak@22: ["Library"] = "Biblioteca", flickerstreak@22: ["Map"] = "Mapa", flickerstreak@22: ["Mail"] = "Correo", flickerstreak@22: ["Miscellaneous"] = "Misceláneo", flickerstreak@22: ["Quest"] = "Misión", flickerstreak@22: ["Raid"] = "Banda", flickerstreak@22: ["Tradeskill"] = "Habilidad de Comercio", flickerstreak@22: ["UnitFrame"] = "Marco de Unidades", flickerstreak@1: } flickerstreak@1: else -- enUS flickerstreak@1: STANDBY = "|cffff5050(standby)|r" flickerstreak@22: flickerstreak@1: TITLE = "Title" flickerstreak@1: NOTES = "Notes" flickerstreak@1: VERSION = "Version" flickerstreak@1: AUTHOR = "Author" flickerstreak@1: DATE = "Date" flickerstreak@1: CATEGORY = "Category" flickerstreak@1: EMAIL = "E-mail" flickerstreak@1: WEBSITE = "Website" flickerstreak@1: CREDITS = "Credits" flickerstreak@22: LICENSE = "License" flickerstreak@22: flickerstreak@1: ABOUT = "About" flickerstreak@1: PRINT_ADDON_INFO = "Show information about the addon." flickerstreak@22: DONATE = "Donate" flickerstreak@22: DONATE_DESC = "Give a much-needed donation to the author of this addon." flickerstreak@22: HOWTO_DONATE_WINDOWS = "Press Ctrl-A to select the link, then Ctrl-C to copy, then Alt-Tab out of the game, open your favorite web browser, and paste the link into the address bar." flickerstreak@22: HOWTO_DONATE_MAC = "Press Cmd-A to select the link, then Cmd-C to copy, then Cmd-Tab out of the game, open your favorite web browser, and paste the link into the address bar." flickerstreak@22: flickerstreak@1: CATEGORIES = { flickerstreak@1: ["Action Bars"] = "Action Bars", flickerstreak@1: ["Auction"] = "Auction", flickerstreak@1: ["Audio"] = "Audio", flickerstreak@1: ["Battlegrounds/PvP"] = "Battlegrounds/PvP", flickerstreak@1: ["Buffs"] = "Buffs", flickerstreak@1: ["Chat/Communication"] = "Chat/Communication", flickerstreak@1: ["Druid"] = "Druid", flickerstreak@1: ["Hunter"] = "Hunter", flickerstreak@1: ["Mage"] = "Mage", flickerstreak@1: ["Paladin"] = "Paladin", flickerstreak@1: ["Priest"] = "Priest", flickerstreak@1: ["Rogue"] = "Rogue", flickerstreak@1: ["Shaman"] = "Shaman", flickerstreak@1: ["Warlock"] = "Warlock", flickerstreak@1: ["Warrior"] = "Warrior", flickerstreak@1: ["Healer"] = "Healer", flickerstreak@1: ["Tank"] = "Tank", flickerstreak@1: ["Caster"] = "Caster", flickerstreak@1: ["Combat"] = "Combat", flickerstreak@1: ["Compilations"] = "Compilations", flickerstreak@1: ["Data Export"] = "Data Export", flickerstreak@1: ["Development Tools"] = "Development Tools", flickerstreak@1: ["Guild"] = "Guild", flickerstreak@1: ["Frame Modification"] = "Frame Modification", flickerstreak@1: ["Interface Enhancements"] = "Interface Enhancements", flickerstreak@1: ["Inventory"] = "Inventory", flickerstreak@1: ["Library"] = "Library", flickerstreak@1: ["Map"] = "Map", flickerstreak@1: ["Mail"] = "Mail", flickerstreak@1: ["Miscellaneous"] = "Miscellaneous", flickerstreak@1: ["Quest"] = "Quest", flickerstreak@1: ["Raid"] = "Raid", flickerstreak@1: ["Tradeskill"] = "Tradeskill", flickerstreak@1: ["UnitFrame"] = "UnitFrame", flickerstreak@1: } flickerstreak@1: end flickerstreak@1: flickerstreak@1: setmetatable(CATEGORIES, { __index = function(self, key) -- case-insensitive flickerstreak@1: local lowerKey = key:lower() flickerstreak@1: for k,v in pairs(CATEGORIES) do flickerstreak@1: if k:lower() == lowerKey then flickerstreak@1: return v flickerstreak@1: end flickerstreak@1: end flickerstreak@1: end }) flickerstreak@1: flickerstreak@1: -- Create the library object flickerstreak@1: flickerstreak@1: local AceOO = AceLibrary("AceOO-2.0") flickerstreak@1: local AceAddon = AceOO.Class() flickerstreak@1: local AceEvent flickerstreak@1: local AceConsole flickerstreak@1: local AceModuleCore flickerstreak@1: flickerstreak@1: function AceAddon:GetLocalizedCategory(name) flickerstreak@1: self:argCheck(name, 2, "string") flickerstreak@1: return CATEGORIES[name] or UNKNOWN flickerstreak@1: end flickerstreak@1: flickerstreak@1: function AceAddon:ToString() flickerstreak@1: return "AceAddon" flickerstreak@1: end flickerstreak@1: flickerstreak@1: local function print(text) flickerstreak@1: DEFAULT_CHAT_FRAME:AddMessage(text) flickerstreak@1: end flickerstreak@1: flickerstreak@1: function AceAddon:ADDON_LOADED(name) flickerstreak@22: local unregister = true flickerstreak@22: local initAddon = {} flickerstreak@22: while #self.nextAddon > 0 do flickerstreak@1: local addon = table.remove(self.nextAddon, 1) flickerstreak@22: if addon.possibleNames[name] then flickerstreak@22: table.insert(initAddon, addon) flickerstreak@22: else flickerstreak@22: unregister = nil flickerstreak@22: table.insert(self.skipAddon, addon) flickerstreak@22: end flickerstreak@22: end flickerstreak@22: self.nextAddon, self.skipAddon = self.skipAddon, self.nextAddon flickerstreak@22: if unregister then flickerstreak@22: AceAddon:UnregisterEvent("ADDON_LOADED") flickerstreak@22: end flickerstreak@22: while #initAddon > 0 do flickerstreak@22: local addon = table.remove(initAddon, 1) flickerstreak@1: table.insert(self.addons, addon) flickerstreak@1: if not self.addons[name] then flickerstreak@1: self.addons[name] = addon flickerstreak@1: end flickerstreak@22: addon.possibleNames = nil flickerstreak@1: self:InitializeAddon(addon, name) flickerstreak@1: end flickerstreak@1: end flickerstreak@1: flickerstreak@1: local function RegisterOnEnable(self) flickerstreak@1: if DEFAULT_CHAT_FRAME and DEFAULT_CHAT_FRAME.defaultLanguage then -- HACK flickerstreak@1: AceAddon.playerLoginFired = true flickerstreak@1: end flickerstreak@1: if AceAddon.playerLoginFired then flickerstreak@1: AceAddon.addonsStarted[self] = true flickerstreak@1: if (type(self.IsActive) ~= "function" or self:IsActive()) and (not AceModuleCore or not AceModuleCore:IsModule(self) or AceModuleCore:IsModuleActive(self)) then flickerstreak@22: AceAddon:ManualEnable(self) flickerstreak@1: end flickerstreak@1: else flickerstreak@1: if not AceAddon.addonsToOnEnable then flickerstreak@1: AceAddon.addonsToOnEnable = {} flickerstreak@1: end flickerstreak@1: table.insert(AceAddon.addonsToOnEnable, self) flickerstreak@1: end flickerstreak@1: end flickerstreak@1: flickerstreak@1: function AceAddon:InitializeAddon(addon, name) flickerstreak@1: if addon.name == nil then flickerstreak@1: addon.name = name flickerstreak@1: end flickerstreak@1: if GetAddOnMetadata then flickerstreak@1: -- TOC checks flickerstreak@1: if addon.title == nil then flickerstreak@1: addon.title = GetAddOnMetadata(name, "Title") flickerstreak@1: end flickerstreak@1: if type(addon.title) == "string" then flickerstreak@1: local num = addon.title:find(" |cff7fff7f %-Ace2%-|r$") flickerstreak@1: if num then flickerstreak@1: addon.title = addon.title:sub(1, num - 1) flickerstreak@1: end flickerstreak@1: addon.title = addon.title:trim() flickerstreak@1: end flickerstreak@1: if addon.notes == nil then flickerstreak@1: addon.notes = GetAddOnMetadata(name, "Notes") flickerstreak@1: end flickerstreak@1: if type(addon.notes) == "string" then flickerstreak@1: addon.notes = addon.notes:trim() flickerstreak@1: end flickerstreak@1: if addon.version == nil then flickerstreak@1: addon.version = GetAddOnMetadata(name, "Version") flickerstreak@22: end flickerstreak@1: if type(addon.version) == "string" then flickerstreak@1: if addon.version:find("%$Revision: (%d+) %$") then flickerstreak@1: addon.version = addon.version:gsub("%$Revision: (%d+) %$", "%1") flickerstreak@1: elseif addon.version:find("%$Rev: (%d+) %$") then flickerstreak@1: addon.version = addon.version:gsub("%$Rev: (%d+) %$", "%1") flickerstreak@1: elseif addon.version:find("%$LastChangedRevision: (%d+) %$") then flickerstreak@1: addon.version = addon.version:gsub("%$LastChangedRevision: (%d+) %$", "%1") flickerstreak@1: end flickerstreak@1: addon.version = addon.version:trim() flickerstreak@1: end flickerstreak@1: if addon.author == nil then flickerstreak@1: addon.author = GetAddOnMetadata(name, "Author") flickerstreak@1: end flickerstreak@1: if type(addon.author) == "string" then flickerstreak@1: addon.author = addon.author:trim() flickerstreak@1: end flickerstreak@1: if addon.credits == nil then flickerstreak@1: addon.credits = GetAddOnMetadata(name, "X-Credits") flickerstreak@1: end flickerstreak@1: if type(addon.credits) == "string" then flickerstreak@1: addon.credits = addon.credits:trim() flickerstreak@1: end flickerstreak@22: if addon.donate == nil then flickerstreak@22: addon.donate = GetAddOnMetadata(name, "X-Donate") flickerstreak@22: end flickerstreak@22: if type(addon.donate) == "string" then flickerstreak@22: addon.donate = addon.donate:trim() flickerstreak@22: end flickerstreak@1: if addon.date == nil then flickerstreak@1: addon.date = GetAddOnMetadata(name, "X-Date") or GetAddOnMetadata(name, "X-ReleaseDate") flickerstreak@1: end flickerstreak@1: if type(addon.date) == "string" then flickerstreak@1: if addon.date:find("%$Date: (.-) %$") then flickerstreak@1: addon.date = addon.date:gsub("%$Date: (.-) %$", "%1") flickerstreak@1: elseif addon.date:find("%$LastChangedDate: (.-) %$") then flickerstreak@1: addon.date = addon.date:gsub("%$LastChangedDate: (.-) %$", "%1") flickerstreak@1: end flickerstreak@1: addon.date = addon.date:trim() flickerstreak@1: end flickerstreak@1: flickerstreak@1: if addon.category == nil then flickerstreak@1: addon.category = GetAddOnMetadata(name, "X-Category") flickerstreak@1: end flickerstreak@1: if type(addon.category) == "string" then flickerstreak@1: addon.category = addon.category:trim() flickerstreak@1: end flickerstreak@1: if addon.email == nil then flickerstreak@1: addon.email = GetAddOnMetadata(name, "X-eMail") or GetAddOnMetadata(name, "X-Email") flickerstreak@1: end flickerstreak@1: if type(addon.email) == "string" then flickerstreak@1: addon.email = addon.email:trim() flickerstreak@1: end flickerstreak@22: if addon.license == nil then flickerstreak@22: addon.license = GetAddOnMetadata(name, "X-License") flickerstreak@22: end flickerstreak@22: if type(addon.license) == "string" then flickerstreak@22: addon.license = addon.license:trim() flickerstreak@22: end flickerstreak@1: if addon.website == nil then flickerstreak@1: addon.website = GetAddOnMetadata(name, "X-Website") flickerstreak@1: end flickerstreak@1: if type(addon.website) == "string" then flickerstreak@1: addon.website = addon.website:trim() flickerstreak@1: end flickerstreak@1: end flickerstreak@1: local current = addon.class flickerstreak@1: while true do flickerstreak@22: if current == AceOO.Class or not current then flickerstreak@1: break flickerstreak@1: end flickerstreak@1: if current.mixins then flickerstreak@1: for mixin in pairs(current.mixins) do flickerstreak@1: if type(mixin.OnEmbedInitialize) == "function" then flickerstreak@1: mixin:OnEmbedInitialize(addon, name) flickerstreak@1: end flickerstreak@1: end flickerstreak@1: end flickerstreak@1: current = current.super flickerstreak@1: end flickerstreak@22: local n = AceAddon.addonsToOnEnable and #AceAddon.addonsToOnEnable or 0 flickerstreak@22: flickerstreak@1: if type(addon.OnInitialize) == "function" then flickerstreak@1: safecall(addon.OnInitialize, addon, name) flickerstreak@1: end flickerstreak@1: if AceEvent then flickerstreak@1: AceEvent:TriggerEvent("Ace2_AddonInitialized", addon) flickerstreak@1: end flickerstreak@1: RegisterOnEnable(addon) flickerstreak@22: local n2 = AceAddon.addonsToOnEnable and #AceAddon.addonsToOnEnable or 0 flickerstreak@22: if n2 - n > 1 then flickerstreak@22: local mine = table.remove(AceAddon.addonsToOnEnable) flickerstreak@22: table.insert(AceAddon.addonsToOnEnable, n+1, mine) flickerstreak@22: end flickerstreak@1: end flickerstreak@1: flickerstreak@22: local aboutFrame flickerstreak@22: local function createAboutFrame() flickerstreak@22: aboutFrame = CreateFrame("Frame", "AceAddon20AboutFrame", UIParent, "DialogBoxFrame") flickerstreak@22: aboutFrame:SetWidth(500) flickerstreak@22: aboutFrame:SetHeight(400) flickerstreak@22: aboutFrame:SetPoint("CENTER") flickerstreak@22: aboutFrame:SetBackdrop({ flickerstreak@22: bgFile = [[Interface\DialogFrame\UI-DialogBox-Background]], flickerstreak@22: edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], flickerstreak@22: tile = true, tileSize = 16, edgeSize = 16, flickerstreak@22: insets = { left = 5, right = 5, top = 5, bottom = 5 } flickerstreak@22: }) flickerstreak@22: aboutFrame:SetBackdropColor(0,0,0,1) flickerstreak@22: flickerstreak@22: local donateButton = CreateFrame("Button", "AceAddon20AboutFrameDonateButton", aboutFrame, "UIPanelButtonTemplate2") flickerstreak@22: aboutFrame.donateButton = donateButton flickerstreak@22: donateButton:SetPoint("BOTTOMRIGHT", -20, 20) flickerstreak@22: _G.AceAddon20AboutFrameDonateButtonText:SetText(DONATE) flickerstreak@22: donateButton:SetWidth(_G.AceAddon20AboutFrameDonateButtonText:GetWidth()+20) flickerstreak@22: donateButton:SetScript("OnClick", function() flickerstreak@22: aboutFrame.currentAddon:OpenDonationFrame() flickerstreak@22: end) flickerstreak@22: flickerstreak@22: local text = aboutFrame:CreateFontString(nil, "OVERLAY", "GameFontHighlightLarge") flickerstreak@22: aboutFrame.title = text flickerstreak@22: text:SetPoint("TOP", 0, -5) flickerstreak@22: flickerstreak@22: aboutFrame:Hide() flickerstreak@22: flickerstreak@22: aboutFrame.lefts = {} flickerstreak@22: aboutFrame.rights = {} flickerstreak@22: aboutFrame.textLefts = {} flickerstreak@22: aboutFrame.textRights = {} flickerstreak@22: function aboutFrame:Clear() flickerstreak@22: self.title:SetText("") flickerstreak@22: for i = 1, #self.lefts do flickerstreak@22: self.lefts[i] = nil flickerstreak@22: self.rights[i] = nil flickerstreak@22: end flickerstreak@22: end flickerstreak@22: flickerstreak@22: function aboutFrame:AddLine(left, right) flickerstreak@22: aboutFrame.lefts[#aboutFrame.lefts+1] = left flickerstreak@22: aboutFrame.rights[#aboutFrame.rights+1] = right flickerstreak@22: end flickerstreak@22: flickerstreak@22: local aboutFrame_Show = aboutFrame.Show flickerstreak@22: function aboutFrame:Show(...) flickerstreak@22: local maxLeftWidth = 0 flickerstreak@22: local maxRightWidth = 0 flickerstreak@22: local textHeight = 0 flickerstreak@22: for i = 1, #self.lefts do flickerstreak@22: if not self.textLefts[i] then flickerstreak@22: local left = aboutFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal") flickerstreak@22: self.textLefts[i] = left flickerstreak@22: local right = aboutFrame:CreateFontString(nil, "OVERLAY", "GameFontHighlight") flickerstreak@22: self.textRights[i] = right flickerstreak@22: if i == 1 then flickerstreak@22: left:SetPoint("TOPRIGHT", aboutFrame, "TOPLEFT", 75, -35) flickerstreak@22: else flickerstreak@22: left:SetPoint("TOPRIGHT", self.textLefts[i-1], "BOTTOMRIGHT", 0, -5) flickerstreak@22: end flickerstreak@22: right:SetPoint("LEFT", left, "RIGHT", 5, 0) flickerstreak@22: end flickerstreak@22: self.textLefts[i]:SetText(self.lefts[i] .. ":") flickerstreak@22: self.textRights[i]:SetText(self.rights[i]) flickerstreak@22: local leftWidth = self.textLefts[i]:GetWidth() flickerstreak@22: local rightWidth = self.textRights[i]:GetWidth() flickerstreak@22: textHeight = self.textLefts[i]:GetHeight() flickerstreak@22: if maxLeftWidth < leftWidth then flickerstreak@22: maxLeftWidth = leftWidth flickerstreak@22: end flickerstreak@22: if maxRightWidth < rightWidth then flickerstreak@22: maxRightWidth = rightWidth flickerstreak@22: end flickerstreak@22: end flickerstreak@22: for i = #self.lefts+1, #self.textLefts do flickerstreak@22: self.textLefts[i]:SetText('') flickerstreak@22: self.textRights[i]:SetText('') flickerstreak@22: end flickerstreak@22: aboutFrame:SetWidth(75 + maxRightWidth + 20) flickerstreak@22: aboutFrame:SetHeight(#self.lefts * (textHeight + 5) + 100) flickerstreak@22: flickerstreak@22: aboutFrame_Show(self, ...) flickerstreak@22: end flickerstreak@22: aboutFrame:Hide() flickerstreak@22: flickerstreak@22: createAboutFrame = nil flickerstreak@22: end flickerstreak@22: local donateFrame flickerstreak@22: flickerstreak@22: local function unobfuscateEmail(email) flickerstreak@22: return email:gsub(" AT ", "@"):gsub(" DOT ", ".") flickerstreak@22: end flickerstreak@22: flickerstreak@22: local function isGoodVariable(var) flickerstreak@22: return type(var) == "string" or type(var) == "number" flickerstreak@22: end flickerstreak@1: function AceAddon.prototype:PrintAddonInfo() flickerstreak@22: if createAboutFrame then flickerstreak@22: createAboutFrame() flickerstreak@22: end flickerstreak@22: aboutFrame:Clear() flickerstreak@1: local x flickerstreak@22: if isGoodVariable(self.title) then flickerstreak@22: x = tostring(self.title) flickerstreak@22: elseif isGoodVariable(self.name) then flickerstreak@22: x = tostring(self.name) flickerstreak@1: else flickerstreak@22: x = "<" .. tostring(self.class) .. " instance>" flickerstreak@1: end flickerstreak@1: if type(self.IsActive) == "function" then flickerstreak@1: if not self:IsActive() then flickerstreak@1: x = x .. " " .. STANDBY flickerstreak@1: end flickerstreak@1: end flickerstreak@22: aboutFrame.title:SetText(x) flickerstreak@22: flickerstreak@22: if isGoodVariable(self.version) then flickerstreak@22: aboutFrame:AddLine(VERSION, tostring(self.version)) flickerstreak@1: end flickerstreak@22: if isGoodVariable(self.notes) then flickerstreak@22: aboutFrame:AddLine(NOTES, tostring(self.notes)) flickerstreak@1: end flickerstreak@22: if isGoodVariable(self.author) then flickerstreak@22: aboutFrame:AddLine(AUTHOR, tostring(self.author)) flickerstreak@1: end flickerstreak@22: if isGoodVariable(self.credits) then flickerstreak@22: aboutFrame:AddLine(CREDITS, tostring(self.credits)) flickerstreak@1: end flickerstreak@22: if isGoodVariable(self.date) then flickerstreak@22: aboutFrame:AddLine(DATE, tostring(self.date)) flickerstreak@1: end flickerstreak@1: if self.category then flickerstreak@1: local category = CATEGORIES[self.category] flickerstreak@1: if category then flickerstreak@22: aboutFrame:AddLine(CATEGORY, tostring(self.category)) flickerstreak@1: end flickerstreak@1: end flickerstreak@22: if isGoodVariable(self.email) then flickerstreak@22: aboutFrame:AddLine(EMAIL, unobfuscateEmail(tostring(self.email))) flickerstreak@1: end flickerstreak@22: if isGoodVariable(self.website) then flickerstreak@22: aboutFrame:AddLine(WEBSITE, tostring(self.website)) flickerstreak@1: end flickerstreak@22: if isGoodVariable(self.license) then flickerstreak@22: aboutFrame:AddLine(LICENSE, tostring(self.license)) flickerstreak@22: end flickerstreak@22: flickerstreak@22: if donateFrame and donateFrame:IsShown() then flickerstreak@22: donateFrame:Hide() flickerstreak@22: end flickerstreak@22: flickerstreak@22: aboutFrame.currentAddon = self flickerstreak@22: flickerstreak@22: aboutFrame:Show() flickerstreak@22: flickerstreak@22: if self.donate then flickerstreak@22: aboutFrame.donateButton:Show() flickerstreak@22: else flickerstreak@22: aboutFrame.donateButton:Hide() flickerstreak@22: end flickerstreak@22: end flickerstreak@22: flickerstreak@22: local function createDonateFrame() flickerstreak@22: donateFrame = CreateFrame("Frame", "AceAddon20Frame", UIParent, "DialogBoxFrame") flickerstreak@22: flickerstreak@22: donateFrame:SetWidth(500) flickerstreak@22: donateFrame:SetHeight(200) flickerstreak@22: donateFrame:SetPoint("CENTER") flickerstreak@22: donateFrame:SetBackdrop({ flickerstreak@22: bgFile = [[Interface\DialogFrame\UI-DialogBox-Background]], flickerstreak@22: edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], flickerstreak@22: tile = true, tileSize = 16, edgeSize = 16, flickerstreak@22: insets = { left = 5, right = 5, top = 5, bottom = 5 } flickerstreak@22: }) flickerstreak@22: donateFrame:SetBackdropColor(0,0,0,1) flickerstreak@22: flickerstreak@22: local text = donateFrame:CreateFontString(nil, "OVERLAY", "GameFontHighlightLarge") flickerstreak@22: text:SetPoint("TOP", 0, -5) flickerstreak@22: text:SetText(DONATE) flickerstreak@22: flickerstreak@22: local howto = donateFrame:CreateFontString(nil, "OVERLAY", "GameFontHighlight") flickerstreak@22: howto:SetPoint("TOP", text, "BOTTOM", 0, -5) flickerstreak@22: howto:SetPoint("LEFT", 16, 0) flickerstreak@22: howto:SetPoint("RIGHT", -16, 0) flickerstreak@22: if not IsMacClient() then flickerstreak@22: -- Windows or Linux flickerstreak@22: howto:SetText(HOWTO_DONATE_WINDOWS) flickerstreak@22: else flickerstreak@22: howto:SetText(HOWTO_DONATE_MAC) flickerstreak@22: end flickerstreak@22: flickerstreak@22: local scrollFrame = CreateFrame("ScrollFrame", "AceAddon20FrameScrollFrame", donateFrame, "UIPanelScrollFrameTemplate") flickerstreak@22: scrollFrame:SetToplevel(true) flickerstreak@22: scrollFrame:SetPoint("TOP", -10, -76) flickerstreak@22: scrollFrame:SetWidth(455) flickerstreak@22: scrollFrame:SetHeight(70) flickerstreak@22: howto:SetPoint("BOTTOM", scrollFrame, "TOP") flickerstreak@22: flickerstreak@22: local editBox = CreateFrame("EditBox", nil, scrollFrame) flickerstreak@22: donateFrame.editBox = editBox flickerstreak@22: scrollFrame:SetScrollChild(editBox) flickerstreak@22: editBox:SetFontObject(ChatFontNormal) flickerstreak@22: editBox:SetMultiLine(true) flickerstreak@22: editBox:SetMaxLetters(99999) flickerstreak@22: editBox:SetWidth(450) flickerstreak@22: editBox:SetHeight(54) flickerstreak@22: editBox:SetPoint("BOTTOM", 5, 0) flickerstreak@22: editBox:SetJustifyH("LEFT") flickerstreak@22: editBox:SetJustifyV("TOP") flickerstreak@22: editBox:SetAutoFocus(false) flickerstreak@22: editBox:SetScript("OnTextChanged", function(this) flickerstreak@22: if this:GetText() ~= this.text then flickerstreak@22: this:SetText(this.text) flickerstreak@22: end flickerstreak@22: end) flickerstreak@22: editBox:SetScript("OnEscapePressed", function(this) flickerstreak@22: this:ClearFocus() flickerstreak@22: end) flickerstreak@22: createDonateFrame = nil flickerstreak@22: end flickerstreak@22: flickerstreak@22: local function fix(char) flickerstreak@22: return ("%%%02x"):format(char:byte()) flickerstreak@22: end flickerstreak@22: flickerstreak@22: local function urlencode(text) flickerstreak@22: return text:gsub("[^0-9A-Za-z]", fix) flickerstreak@22: end flickerstreak@22: flickerstreak@22: function AceAddon.prototype:OpenDonationFrame() flickerstreak@22: if createDonateFrame then flickerstreak@22: createDonateFrame() flickerstreak@22: end flickerstreak@22: local donate = self.donate flickerstreak@22: if type(donate) ~= "string" then flickerstreak@22: donate = "Wowace" flickerstreak@22: end flickerstreak@22: local style, data = (":"):split(donate, 2) flickerstreak@22: style = style:lower() flickerstreak@22: if style ~= "website" and style ~= "paypal" then flickerstreak@22: style = "wowace" flickerstreak@22: end flickerstreak@22: if style == "wowace" then flickerstreak@22: donateFrame.editBox.text = "http://www.wowace.com/wiki/Donations" flickerstreak@22: elseif style == "website" then flickerstreak@22: donateFrame.editBox.text = data flickerstreak@22: else -- PayPal flickerstreak@22: local text = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" .. urlencode(unobfuscateEmail(data)) flickerstreak@22: local name flickerstreak@22: if type(self.title) == "string" then flickerstreak@22: name = self.title flickerstreak@22: elseif type(self.name) == "string" then flickerstreak@22: name = self.name flickerstreak@22: end flickerstreak@22: if name then flickerstreak@22: name = name:gsub("|c%x%x%x%x%x%x%x%x", ""):gsub("|r", "") flickerstreak@22: text = text .. "&item_name=" .. urlencode(name) flickerstreak@22: end flickerstreak@22: donateFrame.editBox.text = text flickerstreak@22: end flickerstreak@22: donateFrame.editBox:SetText(donateFrame.editBox.text) flickerstreak@22: flickerstreak@22: if aboutFrame and aboutFrame:IsShown() then flickerstreak@22: aboutFrame:Hide() flickerstreak@22: end flickerstreak@22: flickerstreak@22: donateFrame:Show() flickerstreak@22: flickerstreak@22: donateFrame.editBox:SetFocus() flickerstreak@1: end flickerstreak@1: flickerstreak@1: local options flickerstreak@1: function AceAddon:GetAceOptionsDataTable(target) flickerstreak@22: return { flickerstreak@22: about = { flickerstreak@22: name = ABOUT, flickerstreak@22: desc = PRINT_ADDON_INFO, flickerstreak@22: type = "execute", flickerstreak@22: func = "PrintAddonInfo", flickerstreak@22: order = -1, flickerstreak@22: }, flickerstreak@22: donate = { flickerstreak@22: name = DONATE, flickerstreak@22: desc = DONATE_DESC, flickerstreak@22: type = "execute", flickerstreak@22: func = "OpenDonationFrame", flickerstreak@22: order = -1, flickerstreak@22: hidden = function() flickerstreak@22: return not target.donate flickerstreak@22: end flickerstreak@1: } flickerstreak@22: } flickerstreak@1: end flickerstreak@1: flickerstreak@1: function AceAddon:PLAYER_LOGIN() flickerstreak@1: self.playerLoginFired = true flickerstreak@1: if self.addonsToOnEnable then flickerstreak@22: while #self.addonsToOnEnable > 0 do flickerstreak@1: local addon = table.remove(self.addonsToOnEnable, 1) flickerstreak@1: self.addonsStarted[addon] = true flickerstreak@1: if (type(addon.IsActive) ~= "function" or addon:IsActive()) and (not AceModuleCore or not AceModuleCore:IsModule(addon) or AceModuleCore:IsModuleActive(addon)) then flickerstreak@22: AceAddon:ManualEnable(addon) flickerstreak@1: end flickerstreak@1: end flickerstreak@1: self.addonsToOnEnable = nil flickerstreak@1: end flickerstreak@1: end flickerstreak@1: flickerstreak@1: function AceAddon.prototype:Inject(t) flickerstreak@1: AceAddon:argCheck(t, 2, "table") flickerstreak@1: for k,v in pairs(t) do flickerstreak@1: self[k] = v flickerstreak@1: end flickerstreak@1: end flickerstreak@1: flickerstreak@1: function AceAddon.prototype:init() flickerstreak@1: if not AceEvent then flickerstreak@1: error(MAJOR_VERSION .. " requires AceEvent-2.0", 4) flickerstreak@1: end flickerstreak@1: AceAddon.super.prototype.init(self) flickerstreak@22: flickerstreak@1: self.super = self.class.prototype flickerstreak@22: flickerstreak@22: AceAddon:RegisterEvent("ADDON_LOADED", "ADDON_LOADED") flickerstreak@22: local names = {} flickerstreak@22: for i = 1, GetNumAddOns() do flickerstreak@22: if IsAddOnLoaded(i) then names[GetAddOnInfo(i)] = true end flickerstreak@22: end flickerstreak@22: self.possibleNames = names flickerstreak@1: table.insert(AceAddon.nextAddon, self) flickerstreak@1: end flickerstreak@1: flickerstreak@1: function AceAddon.prototype:ToString() flickerstreak@1: local x flickerstreak@1: if type(self.title) == "string" then flickerstreak@1: x = self.title flickerstreak@1: elseif type(self.name) == "string" then flickerstreak@1: x = self.name flickerstreak@1: else flickerstreak@1: x = "<" .. tostring(self.class) .. " instance>" flickerstreak@1: end flickerstreak@1: if (type(self.IsActive) == "function" and not self:IsActive()) or (AceModuleCore and AceModuleCore:IsModule(addon) and AceModuleCore:IsModuleActive(addon)) then flickerstreak@1: x = x .. " " .. STANDBY flickerstreak@1: end flickerstreak@1: return x flickerstreak@1: end flickerstreak@1: flickerstreak@1: AceAddon.new = function(self, ...) flickerstreak@1: local class = AceAddon:pcall(AceOO.Classpool, self, ...) flickerstreak@1: return class:new() flickerstreak@1: end flickerstreak@1: flickerstreak@22: function AceAddon:ManualEnable(addon) flickerstreak@22: AceAddon:argCheck(addon, 2, "table") flickerstreak@22: local first = nil flickerstreak@22: if AceOO.inherits(addon, "AceAddon-2.0") then flickerstreak@22: if AceAddon.addonsEnabled and not AceAddon.addonsEnabled[addon] then flickerstreak@22: first = true flickerstreak@22: AceAddon.addonsEnabled[addon] = true flickerstreak@22: end flickerstreak@22: end flickerstreak@22: local current = addon.class flickerstreak@22: while current and current ~= AceOO.Class do flickerstreak@22: if current.mixins then flickerstreak@22: for mixin in pairs(current.mixins) do flickerstreak@22: if type(mixin.OnEmbedEnable) == "function" then flickerstreak@22: safecall(mixin.OnEmbedEnable, mixin, addon, first) flickerstreak@22: end flickerstreak@22: end flickerstreak@22: end flickerstreak@22: current = current.super flickerstreak@22: end flickerstreak@22: if type(addon.OnEnable) == "function" then flickerstreak@22: safecall(addon.OnEnable, addon, first) flickerstreak@22: end flickerstreak@22: if AceEvent then flickerstreak@22: AceEvent:TriggerEvent("Ace2_AddonEnabled", addon, first) flickerstreak@22: end flickerstreak@22: end flickerstreak@22: flickerstreak@22: function AceAddon:ManualDisable(addon) flickerstreak@22: AceAddon:argCheck(addon, 2, "table") flickerstreak@22: local current = addon.class flickerstreak@22: while current and current ~= AceOO.Class do flickerstreak@22: if current.mixins then flickerstreak@22: for mixin in pairs(current.mixins) do flickerstreak@22: if type(mixin.OnEmbedDisable) == "function" then flickerstreak@22: safecall(mixin.OnEmbedDisable, mixin, addon) flickerstreak@22: end flickerstreak@22: end flickerstreak@22: end flickerstreak@22: current = current.super flickerstreak@22: end flickerstreak@22: if type(module.OnDisable) == "function" then flickerstreak@22: safecall(module.OnDisable, addon) flickerstreak@22: end flickerstreak@22: if AceEvent then flickerstreak@22: AceEvent:TriggerEvent("Ace2_AddonDisabled", addon) flickerstreak@22: end flickerstreak@22: end flickerstreak@22: flickerstreak@1: local function external(self, major, instance) flickerstreak@1: if major == "AceEvent-2.0" then flickerstreak@1: AceEvent = instance flickerstreak@22: flickerstreak@1: AceEvent:embed(self) flickerstreak@22: flickerstreak@1: self:RegisterEvent("PLAYER_LOGIN", "PLAYER_LOGIN", true) flickerstreak@1: elseif major == "AceConsole-2.0" then flickerstreak@1: AceConsole = instance flickerstreak@22: flickerstreak@1: local slashCommands = { "/ace2" } flickerstreak@1: local _,_,_,enabled,loadable = GetAddOnInfo("Ace") flickerstreak@1: if not enabled or not loadable then flickerstreak@1: table.insert(slashCommands, "/ace") flickerstreak@1: end flickerstreak@1: local function listAddon(addon, depth) flickerstreak@1: if not depth then flickerstreak@1: depth = 0 flickerstreak@1: end flickerstreak@22: flickerstreak@1: local s = (" "):rep(depth) .. " - " .. tostring(addon) flickerstreak@1: if rawget(addon, 'version') then flickerstreak@1: s = s .. " - |cffffff7f" .. tostring(addon.version) .. "|r" flickerstreak@1: end flickerstreak@1: if rawget(addon, 'slashCommand') then flickerstreak@1: s = s .. " |cffffff7f(" .. tostring(addon.slashCommand) .. ")|r" flickerstreak@1: end flickerstreak@1: print(s) flickerstreak@1: if type(rawget(addon, 'modules')) == "table" then flickerstreak@1: local i = 0 flickerstreak@1: for k,v in pairs(addon.modules) do flickerstreak@1: i = i + 1 flickerstreak@1: if i == 6 then flickerstreak@1: print((" "):rep(depth + 1) .. " - more...") flickerstreak@1: break flickerstreak@1: else flickerstreak@1: listAddon(v, depth + 1) flickerstreak@1: end flickerstreak@1: end flickerstreak@1: end flickerstreak@1: end flickerstreak@1: local function listNormalAddon(i) flickerstreak@1: local name,_,_,enabled,loadable = GetAddOnInfo(i) flickerstreak@1: if not loadable then flickerstreak@1: enabled = false flickerstreak@1: end flickerstreak@1: if self.addons[name] then flickerstreak@22: listAddon(self.addons[name]) flickerstreak@1: else flickerstreak@1: local s = " - " .. tostring(GetAddOnMetadata(i, "Title") or name) flickerstreak@1: local version = GetAddOnMetadata(i, "Version") flickerstreak@1: if version then flickerstreak@1: if version:find("%$Revision: (%d+) %$") then flickerstreak@1: version = version:gsub("%$Revision: (%d+) %$", "%1") flickerstreak@1: elseif version:find("%$Rev: (%d+) %$") then flickerstreak@1: version = version:gsub("%$Rev: (%d+) %$", "%1") flickerstreak@1: elseif version:find("%$LastChangedRevision: (%d+) %$") then flickerstreak@1: version = version:gsub("%$LastChangedRevision: (%d+) %$", "%1") flickerstreak@1: end flickerstreak@1: s = s .. " - |cffffff7f" .. version .. "|r" flickerstreak@1: end flickerstreak@1: if not enabled then flickerstreak@1: s = s .. " |cffff0000(disabled)|r" flickerstreak@1: end flickerstreak@1: if IsAddOnLoadOnDemand(i) then flickerstreak@1: s = s .. " |cff00ff00[LoD]|r" flickerstreak@1: end flickerstreak@1: print(s) flickerstreak@1: end flickerstreak@1: end flickerstreak@1: local function mySort(alpha, bravo) flickerstreak@1: return tostring(alpha) < tostring(bravo) flickerstreak@1: end flickerstreak@1: AceConsole.RegisterChatCommand(self, slashCommands, { flickerstreak@1: desc = "AddOn development framework", flickerstreak@1: name = "Ace2", flickerstreak@1: type = "group", flickerstreak@1: args = { flickerstreak@1: about = { flickerstreak@1: desc = "Get information about Ace2", flickerstreak@1: name = "About", flickerstreak@1: type = "execute", flickerstreak@1: func = function() flickerstreak@1: print("|cffffff7fAce2|r - |cffffff7f2.0." .. MINOR_VERSION:gsub("%$Revision: (%d+) %$", "%1") .. "|r - AddOn development framework") flickerstreak@1: print(" - |cffffff7f" .. AUTHOR .. ":|r Ace Development Team") flickerstreak@1: print(" - |cffffff7f" .. WEBSITE .. ":|r http://www.wowace.com/") flickerstreak@1: end flickerstreak@1: }, flickerstreak@1: list = { flickerstreak@1: desc = "List addons", flickerstreak@1: name = "List", flickerstreak@1: type = "group", flickerstreak@1: args = { flickerstreak@1: ace2 = { flickerstreak@1: desc = "List addons using Ace2", flickerstreak@1: name = "Ace2", flickerstreak@1: type = "execute", flickerstreak@1: func = function() flickerstreak@1: print("|cffffff7fAddon list:|r") flickerstreak@1: table.sort(self.addons, mySort) flickerstreak@1: for _,v in ipairs(self.addons) do flickerstreak@22: listAddon(v) flickerstreak@1: end flickerstreak@1: end flickerstreak@1: }, flickerstreak@1: all = { flickerstreak@1: desc = "List all addons", flickerstreak@1: name = "All", flickerstreak@1: type = "execute", flickerstreak@1: func = function() flickerstreak@1: print("|cffffff7fAddon list:|r") flickerstreak@1: local count = GetNumAddOns() flickerstreak@1: for i = 1, count do flickerstreak@1: listNormalAddon(i) flickerstreak@1: end flickerstreak@1: end flickerstreak@1: }, flickerstreak@1: enabled = { flickerstreak@1: desc = "List all enabled addons", flickerstreak@1: name = "Enabled", flickerstreak@1: type = "execute", flickerstreak@1: func = function() flickerstreak@1: print("|cffffff7fAddon list:|r") flickerstreak@1: local count = GetNumAddOns() flickerstreak@1: for i = 1, count do flickerstreak@1: local _,_,_,enabled,loadable = GetAddOnInfo(i) flickerstreak@1: if enabled and loadable then flickerstreak@1: listNormalAddon(i) flickerstreak@1: end flickerstreak@1: end flickerstreak@1: end flickerstreak@1: }, flickerstreak@1: disabled = { flickerstreak@1: desc = "List all disabled addons", flickerstreak@1: name = "Disabled", flickerstreak@1: type = "execute", flickerstreak@1: func = function() flickerstreak@1: print("|cffffff7fAddon list:|r") flickerstreak@1: local count = GetNumAddOns() flickerstreak@1: for i = 1, count do flickerstreak@1: local _,_,_,enabled,loadable = GetAddOnInfo(i) flickerstreak@1: if not enabled or not loadable then flickerstreak@1: listNormalAddon(i) flickerstreak@1: end flickerstreak@1: end flickerstreak@1: end flickerstreak@1: }, flickerstreak@1: lod = { flickerstreak@1: desc = "List all LoadOnDemand addons", flickerstreak@1: name = "LoadOnDemand", flickerstreak@1: type = "execute", flickerstreak@1: func = function() flickerstreak@1: print("|cffffff7fAddon list:|r") flickerstreak@1: local count = GetNumAddOns() flickerstreak@1: for i = 1, count do flickerstreak@1: if IsAddOnLoadOnDemand(i) then flickerstreak@1: listNormalAddon(i) flickerstreak@1: end flickerstreak@1: end flickerstreak@1: end flickerstreak@1: }, flickerstreak@1: ace1 = { flickerstreak@1: desc = "List all addons using Ace1", flickerstreak@1: name = "Ace 1.x", flickerstreak@1: type = "execute", flickerstreak@1: func = function() flickerstreak@1: print("|cffffff7fAddon list:|r") flickerstreak@1: local count = GetNumAddOns() flickerstreak@1: for i = 1, count do flickerstreak@1: local dep1, dep2, dep3, dep4 = GetAddOnDependencies(i) flickerstreak@1: if dep1 == "Ace" or dep2 == "Ace" or dep3 == "Ace" or dep4 == "Ace" then flickerstreak@1: listNormalAddon(i) flickerstreak@1: end flickerstreak@1: end flickerstreak@1: end flickerstreak@1: }, flickerstreak@1: libs = { flickerstreak@1: desc = "List all libraries using AceLibrary", flickerstreak@1: name = "Libraries", flickerstreak@1: type = "execute", flickerstreak@1: func = function() flickerstreak@1: if type(AceLibrary) == "table" and type(AceLibrary.libs) == "table" then flickerstreak@1: print("|cffffff7fLibrary list:|r") flickerstreak@1: for name, data in pairs(AceLibrary.libs) do flickerstreak@1: local s flickerstreak@1: if data.minor then flickerstreak@1: s = " - " .. tostring(name) .. "." .. tostring(data.minor) flickerstreak@1: else flickerstreak@1: s = " - " .. tostring(name) flickerstreak@1: end flickerstreak@1: if rawget(AceLibrary(name), 'slashCommand') then flickerstreak@1: s = s .. " |cffffff7f(" .. tostring(AceLibrary(name).slashCommand) .. "|cffffff7f)" flickerstreak@1: end flickerstreak@1: print(s) flickerstreak@1: end flickerstreak@1: end flickerstreak@1: end flickerstreak@1: }, flickerstreak@1: search = { flickerstreak@1: desc = "Search by name", flickerstreak@1: name = "Search", flickerstreak@1: type = "text", flickerstreak@1: usage = "", flickerstreak@1: input = true, flickerstreak@1: get = false, flickerstreak@1: set = function(...) flickerstreak@1: local arg = { ... } flickerstreak@1: for i,v in ipairs(arg) do flickerstreak@1: arg[i] = v:gsub('%*', '.*'):gsub('%%', '%%%%'):lower() flickerstreak@1: end flickerstreak@1: local count = GetNumAddOns() flickerstreak@1: for i = 1, count do flickerstreak@1: local name = GetAddOnInfo(i) flickerstreak@1: local good = true flickerstreak@1: for _,v in ipairs(arg) do flickerstreak@1: if not name:lower():find(v) then flickerstreak@1: good = false flickerstreak@1: break flickerstreak@1: end flickerstreak@1: end flickerstreak@1: if good then flickerstreak@1: listNormalAddon(i) flickerstreak@1: end flickerstreak@1: end flickerstreak@1: end flickerstreak@1: } flickerstreak@1: }, flickerstreak@1: }, flickerstreak@1: enable = { flickerstreak@22: desc = "Enable addon(s).", flickerstreak@1: name = "Enable", flickerstreak@1: type = "text", flickerstreak@22: usage = " ...", flickerstreak@1: get = false, flickerstreak@22: input = true, flickerstreak@22: set = function(...) flickerstreak@22: for i = 1, select("#", ...) do flickerstreak@22: local addon = select(i, ...) flickerstreak@22: local name, title, _, enabled, _, reason = GetAddOnInfo(addon) flickerstreak@22: if reason == "MISSING" then flickerstreak@22: print(("|cffffff7fAce2:|r AddOn %q does not exist."):format(addon)) flickerstreak@22: elseif not enabled then flickerstreak@22: EnableAddOn(addon) flickerstreak@22: print(("|cffffff7fAce2:|r %s is now enabled."):format(addon or name)) flickerstreak@22: else flickerstreak@22: print(("|cffffff7fAce2:|r %s is already enabled."):format(addon or name)) flickerstreak@22: end flickerstreak@1: end flickerstreak@1: end, flickerstreak@1: }, flickerstreak@1: disable = { flickerstreak@22: desc = "Disable addon(s).", flickerstreak@1: name = "Disable", flickerstreak@1: type = "text", flickerstreak@22: usage = " ...", flickerstreak@1: get = false, flickerstreak@22: input = true, flickerstreak@22: set = function(...) flickerstreak@22: for i = 1, select("#", ...) do flickerstreak@22: local addon = select(i, ...) flickerstreak@22: local name, title, _, enabled, _, reason = GetAddOnInfo(addon) flickerstreak@22: if reason == "MISSING" then flickerstreak@22: print(("|cffffff7fAce2:|r AddOn %q does not exist."):format(addon)) flickerstreak@22: elseif enabled then flickerstreak@22: DisableAddOn(addon) flickerstreak@22: print(("|cffffff7fAce2:|r %s is now disabled."):format(addon or name)) flickerstreak@22: else flickerstreak@22: print(("|cffffff7fAce2:|r %s is already disabled."):format(addon or name)) flickerstreak@22: end flickerstreak@1: end flickerstreak@1: end, flickerstreak@1: }, flickerstreak@1: load = { flickerstreak@22: desc = "Load addon(s).", flickerstreak@1: name = "Load", flickerstreak@1: type = "text", flickerstreak@22: usage = " ...", flickerstreak@1: get = false, flickerstreak@22: input = true, flickerstreak@22: set = function(...) flickerstreak@22: for i = 1, select("#", ...) do flickerstreak@22: local addon = select(i, ...) flickerstreak@22: local name, title, _, _, loadable, reason = GetAddOnInfo(addon) flickerstreak@22: if reason == "MISSING" then flickerstreak@22: print(("|cffffff7fAce2:|r AddOn %q does not exist."):format(addon)) flickerstreak@22: elseif not loadable then flickerstreak@22: print(("|cffffff7fAce2:|r AddOn %q is not loadable. Reason: %s."):format(addon, reason)) flickerstreak@22: else flickerstreak@22: LoadAddOn(addon) flickerstreak@22: print(("|cffffff7fAce2:|r %s is now loaded."):format(addon or name)) flickerstreak@22: end flickerstreak@1: end flickerstreak@1: end flickerstreak@1: }, flickerstreak@1: info = { flickerstreak@1: desc = "Display information", flickerstreak@1: name = "Information", flickerstreak@1: type = "execute", flickerstreak@1: func = function() flickerstreak@1: local mem, threshold = gcinfo() flickerstreak@22: print((" - |cffffff7fMemory usage [|r%.3f MiB|cffffff7f]|r"):format(mem / 1024)) flickerstreak@1: if threshold then flickerstreak@22: print((" - |cffffff7fThreshold [|r%.3f MiB|cffffff7f]|r"):format(threshold / 1024)) flickerstreak@1: end flickerstreak@22: print((" - |cffffff7fFramerate [|r%.0f fps|cffffff7f]|r"):format(GetFramerate())) flickerstreak@1: local bandwidthIn, bandwidthOut, latency = GetNetStats() flickerstreak@1: bandwidthIn, bandwidthOut = floor(bandwidthIn * 1024), floor(bandwidthOut * 1024) flickerstreak@22: print((" - |cffffff7fLatency [|r%.0f ms|cffffff7f]|r"):format(latency)) flickerstreak@22: print((" - |cffffff7fBandwidth in [|r%.0f B/s|cffffff7f]|r"):format(bandwidthIn)) flickerstreak@22: print((" - |cffffff7fBandwidth out [|r%.0f B/s|cffffff7f]|r"):format(bandwidthOut)) flickerstreak@22: print((" - |cffffff7fTotal addons [|r%d|cffffff7f]|r"):format(GetNumAddOns())) flickerstreak@22: print((" - |cffffff7fAce2 addons [|r%d|cffffff7f]|r"):format(#self.addons)) flickerstreak@1: local ace = 0 flickerstreak@1: local enabled = 0 flickerstreak@1: local disabled = 0 flickerstreak@1: local lod = 0 flickerstreak@1: for i = 1, GetNumAddOns() do flickerstreak@1: local dep1, dep2, dep3, dep4 = GetAddOnDependencies(i) flickerstreak@1: if dep1 == "Ace" or dep2 == "Ace" or dep3 == "Ace" or dep4 == "Ace" then flickerstreak@1: ace = ace + 1 flickerstreak@1: end flickerstreak@1: if IsAddOnLoadOnDemand(i) then flickerstreak@1: lod = lod + 1 flickerstreak@1: end flickerstreak@22: local isActive, loadable = select(4, GetAddOnInfo(i)) flickerstreak@22: if not isActive or not loadable then flickerstreak@1: disabled = disabled + 1 flickerstreak@1: else flickerstreak@1: enabled = enabled + 1 flickerstreak@1: end flickerstreak@1: end flickerstreak@22: print((" - |cffffff7fAce 1.x addons [|r%d|cffffff7f]|r"):format(ace)) flickerstreak@22: print((" - |cffffff7fLoadOnDemand addons [|r%d|cffffff7f]|r"):format(lod)) flickerstreak@22: print((" - |cffffff7fenabled addons [|r%d|cffffff7f]|r"):format(enabled)) flickerstreak@22: print((" - |cffffff7fdisabled addons [|r%d|cffffff7f]|r"):format(disabled)) flickerstreak@1: local libs = 0 flickerstreak@1: if type(AceLibrary) == "table" and type(AceLibrary.libs) == "table" then flickerstreak@1: for _ in pairs(AceLibrary.libs) do flickerstreak@1: libs = libs + 1 flickerstreak@1: end flickerstreak@1: end flickerstreak@22: print((" - |cffffff7fAceLibrary instances [|r%d|cffffff7f]|r"):format(libs)) flickerstreak@1: end flickerstreak@1: } flickerstreak@1: } flickerstreak@1: }) flickerstreak@1: elseif major == "AceModuleCore-2.0" then flickerstreak@1: AceModuleCore = instance flickerstreak@1: end flickerstreak@1: end flickerstreak@1: flickerstreak@1: local function activate(self, oldLib, oldDeactivate) flickerstreak@1: AceAddon = self flickerstreak@22: flickerstreak@22: self.playerLoginFired = oldLib and oldLib.playerLoginFired or DEFAULT_CHAT_FRAME and DEFAULT_CHAT_FRAME.defaultLanguage flickerstreak@22: self.addonsToOnEnable = oldLib and oldLib.addonsToOnEnable flickerstreak@22: self.addons = oldLib and oldLib.addons or {} flickerstreak@22: self.nextAddon = oldLib and oldLib.nextAddon or {} flickerstreak@22: self.skipAddon = oldLib and oldLib.skipAddon or {} flickerstreak@22: self.addonsStarted = oldLib and oldLib.addonsStarted or {} flickerstreak@22: self.addonsEnabled = oldLib and oldLib.addonsEnabled or {} flickerstreak@22: flickerstreak@1: if oldDeactivate then flickerstreak@1: oldDeactivate(oldLib) flickerstreak@1: end flickerstreak@1: end flickerstreak@1: flickerstreak@1: AceLibrary:Register(AceAddon, MAJOR_VERSION, MINOR_VERSION, activate, nil, external)