diff --git a/Init.lua b/Init.lua index 6fb9109fc4a2580193636d7046c117402f91f38f..00a000a3c2024bf120f9452644e6825a967a72ca 100644 --- a/Init.lua +++ b/Init.lua @@ -97,9 +97,6 @@ PA.Title = GetAddOnMetadata('ProjectAzilroka', 'Title') PA.Version = GetAddOnMetadata('ProjectAzilroka', 'Version') PA.Authors = GetAddOnMetadata('ProjectAzilroka', 'Author'):gsub(", ", " ") -local Color = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[PA.MyClass] or RAID_CLASS_COLORS[PA.MyClass] -PA.ClassColor = { Color.r, Color.g, Color.b } - PA.AllPoints = { CENTER = 'CENTER', BOTTOM = 'BOTTOM', TOP = 'TOP', LEFT = 'LEFT', RIGHT = 'RIGHT', BOTTOMLEFT = 'BOTTOMLEFT', BOTTOMRIGHT = 'BOTTOMRIGHT', TOPLEFT = 'TOPLEFT', TOPRIGHT = 'TOPRIGHT' } PA.ElvUI = PA:IsAddOnEnabled('ElvUI', PA.MyName) @@ -117,6 +114,18 @@ local function GetoUF() end PA.oUF = GetoUF() +function PA:ClassColorCode(class) + local color = PA:GetClassColor(class) + return format('FF%02x%02x%02x', color.r * 255, color.g * 255, color.b * 255) +end + +function PA:GetClassColor(class) + return _G.CUSTOM_CLASS_COLORS and _G.CUSTOM_CLASS_COLORS[class] or _G.RAID_CLASS_COLORS[class] or { r = 1, g = 1, b = 1 } +end + +local Color = PA:GetClassColor(PA.MyClass) +PA.ClassColor = { Color.r, Color.g, Color.b } + PA.Classes = {} PA.ScanTooltip = CreateFrame('GameTooltip', 'PAScanTooltip', _G.UIParent, 'GameTooltipTemplate') @@ -143,12 +152,6 @@ function PA:GetUIScale() return magic/scale end -function PA:ClassColorCode(class) - local color = class and (CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[PA.Classes[class]] or RAID_CLASS_COLORS[PA.Classes[class]]) or { r = 1, g = 1, b = 1 } - - return format('FF%02x%02x%02x', color.r * 255, color.g * 255, color.b * 255) -end - function PA:GetClassName(class) return PA.Classes[class] end @@ -230,7 +233,7 @@ function PA:SetTemplate(frame) if PA.AddOnSkins then _G.AddOnSkins[1]:SetTemplate(frame) else - if not frame.SetBackdrop then Mixin(frame, BackdropTemplateMixin) end + if not frame.SetBackdrop then _G.Mixin(frame, _G.BackdropTemplateMixin) end if frame.SetTemplate then frame:SetTemplate('Transparent', true) else @@ -248,12 +251,7 @@ function PA:CreateBackdrop(frame) frame.Backdrop = CreateFrame('Frame', nil, frame) frame.Backdrop:SetFrameLevel(frame:GetFrameLevel() - 1) frame.Backdrop:SetOutside(frame) - if not frame.Backdrop.SetBackdrop then Mixin(frame.Backdrop, BackdropTemplateMixin) end - if frame.SetTemplate then - frame.Backdrop:SetTemplate('Transparent', true) - else - PA:SetTemplate(frame.Backdrop) - end + PA:SetTemplate(frame.Backdrop) end end @@ -516,7 +514,7 @@ PA.Defaults = { } } -PA.Options = PA.ACH:Group(PA:Color(PA.Title), nil, 6, 'tab') +PA.Options = PA.ACH:Group(PA:Color(PA.Title), nil, 6, 'tree') function PA:GetOptions() PA.AceOptionsPanel.Options.args.ProjectAzilroka = PA.Options diff --git a/Modules/BigButtons.lua b/Modules/BigButtons.lua index 02b2ea62a982f74b7fd36a0f1bb0ab393e1aa1e6..9e53435cfb1c0571c2cf776477e286fea45fe4a5 100644 --- a/Modules/BigButtons.lua +++ b/Modules/BigButtons.lua @@ -4,8 +4,7 @@ if PA.Classic then return end local BB = PA:NewModule('BigButtons', 'AceEvent-3.0') PA.BB, _G.BigButtons = BB, BB -BB.Title = 'BigButtons' -BB.Header = PA.ACL['|cFF16C3F2Big|r|cFFFFFFFFButtons|r'] +BB.Title = PA.ACL['|cFF16C3F2Big|r |cFFFFFFFFButtons|r'] BB.Description = PA.ACL['A farm tool for Sunsong Ranch.'] BB.Authors = 'Azilroka NihilisticPandemonium' BB.isEnabled = false @@ -238,7 +237,7 @@ end function BB:GetOptions() PA.Options.args.BigButtons = PA.ACH:Group(BB.Title, BB.Description, nil, nil, function(info) return BB.db[info[#info]] end) - PA.Options.args.BigButtons.args.Header = PA.ACH:Header(BB.Header, 0) + PA.Options.args.BigButtons.args.Description = PA.ACH:Description(BB.Description, 0) PA.Options.args.BigButtons.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) BB.db[info[#info]] = value if not BB.isEnabled then BB:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) PA.Options.args.BigButtons.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2, nil, nil, function(info, value) BB.db[info[#info]] = value BB:Update() end) diff --git a/Modules/BrokerLDB.lua b/Modules/BrokerLDB.lua index 60fdc0db6169906ae4ed65e443cf6ec2453faa10..26b44d0d14959fae37686b90b1222de484c893e6 100644 --- a/Modules/BrokerLDB.lua +++ b/Modules/BrokerLDB.lua @@ -7,8 +7,7 @@ local pairs = pairs local tinsert = tinsert local tremove = tremove -BrokerLDB.Title = 'BrokerLDB' -BrokerLDB.Header = PA.ACL['|cFF16C3F2Broker|r|cFFFFFFFFLDB|r'] +BrokerLDB.Title = PA.ACL['|cFF16C3F2Broker|r|cFFFFFFFFLDB|r'] BrokerLDB.Description = PA.ACL['Provides a Custom DataBroker Bar'] BrokerLDB.Authors = 'Azilroka' BrokerLDB.isEnabled = false @@ -232,7 +231,7 @@ end function BrokerLDB:GetOptions() PA.Options.args.BrokerLDB = PA.ACH:Group(BrokerLDB.Title, BrokerLDB.Description, nil, nil, function(info) return BrokerLDB.db[info[#info]] end) - PA.Options.args.BrokerLDB.args.Header = PA.ACH:Header(BrokerLDB.Header, 0) + PA.Options.args.BrokerLDB.args.Description = PA.ACH:Description(BrokerLDB.Description, 0) PA.Options.args.BrokerLDB.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) BrokerLDB.db[info[#info]] = value if not BrokerLDB.isEnabled then BrokerLDB:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) PA.Options.args.BrokerLDB.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2, nil, nil, function(info, value) BrokerLDB.db[info[#info]] = value BrokerLDB:Update() end) @@ -247,7 +246,7 @@ function BrokerLDB:GetOptions() PA.Options.args.BrokerLDB.args.General.args.FontSettings = PA.ACH:Group(PA.ACL['Font Settings'], nil, -1) PA.Options.args.BrokerLDB.args.General.args.FontSettings.inline = true PA.Options.args.BrokerLDB.args.General.args.FontSettings.args.Font = PA.ACH:SharedMediaFont(PA.ACL['Font'], nil, 1) - PA.Options.args.BrokerLDB.args.General.args.FontSettings.args.FontSize = PA.ACH:Range(FONT_SIZE, nil, 2, { min = 6, max = 22, step = 1 }) + PA.Options.args.BrokerLDB.args.General.args.FontSettings.args.FontSize = PA.ACH:Range(PA.ACL['Font Size'], nil, 2, { min = 6, max = 22, step = 1 }) PA.Options.args.BrokerLDB.args.General.args.FontSettings.args.FontFlag = PA.ACH:FontFlags(PA.ACL['Font Outline'], nil, 3) PA.Options.args.BrokerLDB.args.AuthorHeader = PA.ACH:Header(PA.ACL['Authors:'], -2) diff --git a/Modules/DragonOverlay.lua b/Modules/DragonOverlay.lua index 1e88734d2cd00e22634a9b8ce25d45bd78a13331..827342c801d967155e8c2d1212b9ab058df37fc0 100644 --- a/Modules/DragonOverlay.lua +++ b/Modules/DragonOverlay.lua @@ -7,8 +7,7 @@ local pairs, tinsert, select, unpack = pairs, tinsert, select, unpack local strfind, strsub = strfind, strsub local UnitIsPlayer, UnitClass, UnitClassification = UnitIsPlayer, UnitClass, UnitClassification -DO.Title = 'Dragon Overlay' -DO.Header = PA.ACL['|cFF16C3F2Dragon|r |cFFFFFFFFOverlay|r'] +DO.Title = PA.ACL['|cFF16C3F2Dragon|r |cFFFFFFFFOverlay|r'] DO.Description = PA.ACL['Provides an overlay on UnitFrames for Boss, Elite, Rare and RareElite'] DO.Authors = 'Azilroka NihilisticPandemonium' DO.ImageCredits = 'Codeblake Kkthnxbye Narley Durandil' @@ -61,7 +60,7 @@ end function DO:GetOptions() PA.Options.args.DragonOverlay = PA.ACH:Group(DO.Title, DO.Description, nil, nil, function(info) return DO.db[info[#info]] end) - PA.Options.args.DragonOverlay.args.Header = PA.ACH:Header(DO.Header, 0) + PA.Options.args.DragonOverlay.args.Description = PA.ACH:Description(DO.Description, 0) PA.Options.args.DragonOverlay.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) DO.db[info[#info]] = value if not DO.isEnabled then DO:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) PA.Options.args.DragonOverlay.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2, nil, nil, function(info, value) DO.db[info[#info]] = value DO:SetOverlay() end) diff --git a/Modules/EnhancedFriendsList.lua b/Modules/EnhancedFriendsList.lua index c2629b32ce40cf4dd41401a30a9c64ffdfdd9228..77f4ffb942319d5d13e3ce5f4edf4277349dc9d8 100644 --- a/Modules/EnhancedFriendsList.lua +++ b/Modules/EnhancedFriendsList.lua @@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka local EFL = PA:NewModule('EnhancedFriendsList', 'AceEvent-3.0', 'AceHook-3.0', 'AceTimer-3.0') PA.EFL, _G.EnhancedFriendsList = EFL, EFL -EFL.Title = 'Enhanced Friends List' -EFL.Header = PA.ACL['|cFF16C3F2Enhanced|r |cFFFFFFFFFriends List|r'] +EFL.Title = PA.ACL['|cFF16C3F2Enhanced|r |cFFFFFFFFFriends List|r'] EFL.Description = PA.ACL['Provides Friends List Customization'] EFL.Authors = 'Azilroka' EFL.Credits = 'Marotheit Merathilis' @@ -30,131 +29,31 @@ local isBNConnected = _G.BNConnected() local LEVEL = LEVEL --[[ -/run for i,v in pairs(_G) do if type(v)=="string" and v:match("Honorable") then print(i,"=",v) end end +/run for i,v in pairs(_G) do if type(v)=="string" and i:match("BNET_CLIENT_") then print(i,"=",v) end end ]] EFL.Icons = { Game = { - Alliance = { - Name = _G.FACTION_ALLIANCE, - Order = 1, - Default = "Interface/FriendsFrame/Battlenet-WoWicon", - Launcher = MediaPath..'GameIcons/Launcher/Alliance', - }, - Horde = { - Name = _G.FACTION_HORDE, - Order = 2, - Default = 'Interface/FriendsFrame/Battlenet-WoWicon', - Launcher = MediaPath..'GameIcons/Launcher/Horde', - }, - Neutral = { - Name = _G.FACTION_STANDING_LABEL4, - Order = 3, - Default = 'Interface/FriendsFrame/Battlenet-WoWicon', - Launcher = MediaPath..'GameIcons/Launcher/WoW', - }, - App = { - Name = PA.ACL['App'], - Order = 4, - Color = '82C5FF', - Default = 'Interface/FriendsFrame/Battlenet-Battleneticon', - Launcher = MediaPath..'GameIcons/Launcher/BattleNet', - }, - BSAp = { - Name = PA.ACL['Mobile'], - Order = 5, - Color = '82C5FF', - Default = 'Interface/FriendsFrame/Battlenet-Battleneticon', - Launcher = MediaPath..'GameIcons/Launcher/BattleNet', - }, - [_G.BNET_CLIENT_D3 or 'D3'] = { - Name = PA.ACL['Diablo 3'], - Color = 'C41F3B', - Default = 'Interface/FriendsFrame/Battlenet-D3icon', - Launcher = MediaPath..'GameIcons/Launcher/D3', - }, - [_G.BNET_CLIENT_WTCG or 'WTCG'] = { - Name = PA.ACL['Hearthstone'], - Color = 'FFB100', - Default = 'Interface/FriendsFrame/Battlenet-WTCGicon', - Launcher = MediaPath..'GameIcons/Launcher/Hearthstone', - }, - [_G.BNET_CLIENT_SC or 'S1'] = { - Name = PA.ACL['Starcraft'], - Color = 'C495DD', - Default = 'Interface/FriendsFrame/Battlenet-Sc2icon', - Launcher = MediaPath..'GameIcons/Launcher/SC', - }, - [_G.BNET_CLIENT_SC2 or 'S2'] = { - Name = PA.ACL['Starcraft 2'], - Color = 'C495DD', - Default = "Interface/ChatFrame/UI-ChatIcon-SC2", - Launcher = MediaPath..'GameIcons/Launcher/SC2', - }, - [_G.BNET_CLIENT_HEROES or 'Hero'] = { - Name = PA.ACL['Hero of the Storm'], - Color = '00CCFF', - Default = 'Interface/FriendsFrame/Battlenet-HotSicon', - Launcher = MediaPath..'GameIcons/Launcher/Heroes', - }, - [_G.BNET_CLIENT_OVERWATCH or 'Pro'] = { - Name = PA.ACL['Overwatch'], - Color = 'FFFFFF', - Default = 'Interface/FriendsFrame/Battlenet-Overwatchicon', - Launcher = MediaPath..'GameIcons/Launcher/Overwatch', - }, - [_G.BNET_CLIENT_COD or 'VIPR'] = { - Name = PA.ACL['Call of Duty 4'], - Color = 'FFFFFF', - Default = 'Interface/FriendsFrame/Battlenet-CallOfDutyBlackOps4icon', - Launcher = MediaPath..'GameIcons/Launcher/COD4', - }, - [_G.BNET_CLIENT_COD_MW or 'ODIN'] = { - Name = PA.ACL['Call of Duty Modern Warfare'], - Color = 'FFFFFF', - Default = 'Interface/FriendsFrame/Battlenet-CallOfDutyMWicon', - Launcher = MediaPath..'GameIcons/Launcher/CODMW', - }, - [_G.BNET_CLIENT_WC3 or 'W3'] = { - Name = PA.ACL['Warcraft 3 Reforged'], - Color = 'FFFFFF', - Default = "Interface/FriendsFrame/Battlenet-Warcraft3Reforged", - Launcher = MediaPath..'GameIcons/Launcher/WC3R', - }, + Alliance = { Name = _G.FACTION_ALLIANCE, Order = 1, Default = "Interface/FriendsFrame/Battlenet-WoWicon", Launcher = MediaPath..'GameIcons/Launcher/Alliance' }, + Horde = { Name = _G.FACTION_HORDE, Order = 2, Default = 'Interface/FriendsFrame/Battlenet-WoWicon', Launcher = MediaPath..'GameIcons/Launcher/Horde' }, + Neutral = { Name = _G.FACTION_STANDING_LABEL4, Order = 3, Default = 'Interface/FriendsFrame/Battlenet-WoWicon', Launcher = MediaPath..'GameIcons/Launcher/WoW' }, + App = { Name = PA.ACL['App'], Order = 4, Color = '82C5FF', Default = 'Interface/FriendsFrame/Battlenet-Battleneticon', Launcher = MediaPath..'GameIcons/Launcher/BattleNet' }, + BSAp = { Name = PA.ACL['Mobile'], Order = 5, Color = '82C5FF', Default = 'Interface/FriendsFrame/Battlenet-Battleneticon', Launcher = MediaPath..'GameIcons/Launcher/BattleNet' }, + D3 = { Name = PA.ACL['Diablo 3'], Color = 'C41F3B', Default = 'Interface/FriendsFrame/Battlenet-D3icon', Launcher = MediaPath..'GameIcons/Launcher/D3' }, + WTCG = { Name = PA.ACL['Hearthstone'], Color = 'FFB100', Default = 'Interface/FriendsFrame/Battlenet-WTCGicon', Launcher = MediaPath..'GameIcons/Launcher/Hearthstone' }, + S1 = { Name = PA.ACL['Starcraft'], Color = 'C495DD', Default = 'Interface/FriendsFrame/Battlenet-Sc2icon', Launcher = MediaPath..'GameIcons/Launcher/SC' }, + S2 = { Name = PA.ACL['Starcraft 2'], Color = 'C495DD', Default = "Interface/ChatFrame/UI-ChatIcon-SC2", Launcher = MediaPath..'GameIcons/Launcher/SC2' }, + Hero = { Name = PA.ACL['Hero of the Storm'], Color = '00CCFF', Default = 'Interface/FriendsFrame/Battlenet-HotSicon', Launcher = MediaPath..'GameIcons/Launcher/Heroes' }, + Pro = { Name = PA.ACL['Overwatch'], Color = 'FFFFFF', Default = 'Interface/FriendsFrame/Battlenet-Overwatchicon', Launcher = MediaPath..'GameIcons/Launcher/Overwatch' }, + VIPR = { Name = PA.ACL['Call of Duty 4'], Color = 'FFFFFF', Default = 'Interface/FriendsFrame/Battlenet-CallOfDutyBlackOps4icon', Launcher = MediaPath..'GameIcons/Launcher/COD4' }, + ODIN = { Name = PA.ACL['Call of Duty Modern Warfare'], Color = 'FFFFFF', Default = 'Interface/FriendsFrame/Battlenet-CallOfDutyMWicon', Launcher = MediaPath..'GameIcons/Launcher/CODMW' }, + W3 = { Name = PA.ACL['Warcraft 3 Reforged'], Color = 'FFFFFF', Default = "Interface/FriendsFrame/Battlenet-Warcraft3Reforged", Launcher = MediaPath..'GameIcons/Launcher/WC3R' }, }, Status = { - Online = { - Name = _G.FRIENDS_LIST_ONLINE, - Order = 1, - Default = _G.FRIENDS_TEXTURE_ONLINE, - Square = MediaPath..'StatusIcons/Square/Online', - D3 = MediaPath..'StatusIcons/D3/Online', - Color = {.243, .57, 1}, - }, - Offline = { - Name = _G.FRIENDS_LIST_OFFLINE, - Order = 2, - Default = _G.FRIENDS_TEXTURE_OFFLINE, - Square = MediaPath..'StatusIcons/Square/Offline', - D3 = MediaPath..'StatusIcons/D3/Offline', - Color = {.486, .518, .541}, - }, - DND = { - Name = _G.DEFAULT_DND_MESSAGE, - Order = 3, - Default = _G.FRIENDS_TEXTURE_DND, - Square = MediaPath..'StatusIcons/Square/DND', - D3 = MediaPath..'StatusIcons/D3/DND', - Color = {1, 0, 0}, - }, - AFK = { - Name = _G.DEFAULT_AFK_MESSAGE, - Order = 4, - Default = _G.FRIENDS_TEXTURE_AFK, - Square = MediaPath..'StatusIcons/Square/AFK', - D3 = MediaPath..'StatusIcons/D3/AFK', - Color = {1, 1, 0}, - }, + Online = { Name = _G.FRIENDS_LIST_ONLINE, Order = 1, Default = _G.FRIENDS_TEXTURE_ONLINE, Square = MediaPath..'StatusIcons/Square/Online', D3 = MediaPath..'StatusIcons/D3/Online', Color = {.243, .57, 1} }, + Offline = { Name = _G.FRIENDS_LIST_OFFLINE, Order = 2, Default = _G.FRIENDS_TEXTURE_OFFLINE, Square = MediaPath..'StatusIcons/Square/Offline', D3 = MediaPath..'StatusIcons/D3/Offline', Color = {.486, .518, .541} }, + DND = { Name = _G.DEFAULT_DND_MESSAGE, Order = 3, Default = _G.FRIENDS_TEXTURE_DND, Square = MediaPath..'StatusIcons/Square/DND', D3 = MediaPath..'StatusIcons/D3/DND', Color = {1, 0, 0} }, + AFK = { Name = _G.DEFAULT_AFK_MESSAGE, Order = 4, Default = _G.FRIENDS_TEXTURE_AFK, Square = MediaPath..'StatusIcons/Square/AFK', D3 = MediaPath..'StatusIcons/D3/AFK', Color = {1, 1, 0} }, } } @@ -299,7 +198,7 @@ end function EFL:GetOptions() PA.Options.args.EnhancedFriendsList = PA.ACH:Group(EFL.Title, EFL.Description, nil, nil, function(info) return EFL.db[info[#info]] end, function(info, value) EFL.db[info[#info]] = value _G.FriendsFrame_Update() end) - PA.Options.args.EnhancedFriendsList.args.Header = PA.ACH:Header(EFL.Header, 0) + PA.Options.args.EnhancedFriendsList.args.Description = PA.ACH:Description(EFL.Description, 0) PA.Options.args.EnhancedFriendsList.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) EFL.db[info[#info]] = value if not EFL.isEnabled then EFL:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) PA.Options.args.EnhancedFriendsList.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2) diff --git a/Modules/EnhancedPetBattleUI.lua b/Modules/EnhancedPetBattleUI.lua index 36797b1bffb1a273955a6fff557c668f843da7b9..16f1b2b139e3776b0f39c090a75ed935246be184 100644 --- a/Modules/EnhancedPetBattleUI.lua +++ b/Modules/EnhancedPetBattleUI.lua @@ -5,8 +5,7 @@ end local EPB = PA:NewModule("EnhancedPetBattleUI", "AceEvent-3.0") -EPB.Title = "Enhanced Pet Battle UI" -EPB.Header = "|cFF16C3F2Enhanced|r |cFFFFFFFFPet Battle UI|r" +EPB.Title = "|cFF16C3F2Enhanced|r |cFFFFFFFFPet Battle UI|r" EPB.Description = "" EPB.Authors = "Azilroka NihilisticPandemonium" EPB.isEnabled = false @@ -1237,10 +1236,10 @@ function EPB:GetOptions() EPB:Update() end, args = { - Header = { + Description = { order = 0, - type = "header", - name = EPB.Header + type = "description", + name = EPB.Description }, Enable = { order = 1, diff --git a/Modules/EnhancedShadows.lua b/Modules/EnhancedShadows.lua index 08138454ea9767d3e40dcc902fd1367cf8519a63..6780015932f478a163ebe33e8fdc5a6c0b784691 100644 --- a/Modules/EnhancedShadows.lua +++ b/Modules/EnhancedShadows.lua @@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka local ES = PA:NewModule('EnhancedShadows', 'AceEvent-3.0', 'AceTimer-3.0') PA.ES = ES -ES.Title = 'Enhanced Shadows' -ES.Header = PA.ACL['|cFF16C3F2Enhanced|r |cFFFFFFFFShadows|r'] +ES.Title = PA.ACL['|cFF16C3F2Enhanced|r |cFFFFFFFFShadows|r'] ES.Description = PA.ACL['Adds options for registered shadows'] ES.Authors = 'Azilroka NihilisticPandemonium' ES.isEnabled = false @@ -66,7 +65,7 @@ end function ES:GetOptions() PA.Options.args.EnhancedShadows = PA.ACH:Group(ES.Title, ES.Description, nil, nil, function(info) return ES.db[info[#info]] end) - PA.Options.args.EnhancedShadows.args.Header = PA.ACH:Header(ES.Header, 0) + PA.Options.args.EnhancedShadows.args.Description = PA.ACH:Description(ES.Description, 0) PA.Options.args.EnhancedShadows.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) ES.db[info[#info]] = value if not ES.isEnabled then ES:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) PA.Options.args.EnhancedShadows.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2, nil, nil, function(info, value) ES.db[info[#info]] = value ES:UpdateShadows() end) diff --git a/Modules/FasterLoot.lua b/Modules/FasterLoot.lua index 1f1b821583e2169bccf16cd4a0d24db564d7ed34..d9032d8f45d797eff75b81535aee59be3058ed29 100644 --- a/Modules/FasterLoot.lua +++ b/Modules/FasterLoot.lua @@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka local FL = PA:NewModule('FasterLoot', 'AceEvent-3.0') PA.FL, _G.FasterLoot = FL, FL -FL.Title = 'Faster Loot' -FL.Header = PA.ACL['|cFF16C3F2Faster|r |cFFFFFFFFLoot|r'] +FL.Title = PA.ACL['|cFF16C3F2Faster|r |cFFFFFFFFLoot|r'] FL.Description = PA.ACL['Increases auto loot speed near instantaneous.'] FL.Authors = 'Azilroka' FL.isEnabled = false @@ -63,7 +62,7 @@ end function FL:GetOptions() PA.Options.args.FasterLoot = PA.ACH:Group(FL.Title, FL.Description, nil, nil, function(info) return FL.db[info[#info]] end) - PA.Options.args.FasterLoot.args.Header = PA.ACH:Header(FL.Header, 0) + PA.Options.args.FasterLoot.args.Description = PA.ACH:Header(FL.Description, 0) PA.Options.args.FasterLoot.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) FL.db[info[#info]] = value if not FL.isEnabled then FL:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) PA.Options.args.FasterLoot.args.AuthorHeader = PA.ACH:Header(PA.ACL['Authors:'], -2) diff --git a/Modules/FriendGroups.lua b/Modules/FriendGroups.lua index efd54183cf2ae483c587f083d8bb96edfd660f5d..2a62e6ba33622405fb3001b9db8100881a0e02eb 100644 --- a/Modules/FriendGroups.lua +++ b/Modules/FriendGroups.lua @@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka local FG = PA:NewModule('FriendGroups', 'AceEvent-3.0', 'AceTimer-3.0', 'AceHook-3.0') _G.FriendGroups= FG -FG.Title = 'Friend Groups' -FG.Header = PA.ACL['|cFF16C3F2Friend|r |cFFFFFFFFGroups|r'] +FG.Title = PA.ACL['|cFF16C3F2Friend|r |cFFFFFFFFGroups|r'] FG.Description = PA.ACL['Manage Firends List with Groups'] FG.Authors = 'Azilroka' FG.Credits = 'Mikeprod frankkkkk' @@ -950,10 +949,10 @@ function FG:GetOptions() get = function(info) return FG.db[info[#info]] end, set = function(info, value) FG.db[info[#info]] = value end, args = { - Header = { + Description = { order = 0, - type = 'header', - name = FG.Header, + type = 'description', + name = FG.Description, }, Enable = { order = 1, diff --git a/Modules/LootConfirm.lua b/Modules/LootConfirm.lua index 9b3edb4fbd48b46a729149edd9aefed8fb1efbee..d117e9634be3e7c7457aa43a3547e3b38d854293 100644 --- a/Modules/LootConfirm.lua +++ b/Modules/LootConfirm.lua @@ -4,8 +4,7 @@ if PA.Retail then return end local LC = PA:NewModule('LootConfirm', 'AceEvent-3.0') PA.LC, _G.LootConfirm = LC, LC -LC.Title = 'Loot Confirm' -LC.Header = PA.ACL['|cFF16C3F2Loot|r |cFFFFFFFFConfirm|r'] +LC.Title = PA.ACL['|cFF16C3F2Loot|r |cFFFFFFFFConfirm|r'] LC.Description = PA.ACL['Confirms Loot for Solo/Groups (Need/Greed)'] LC.Authors = 'Azilroka NihilisticPandemonium' LC.isEnabled = false @@ -50,7 +49,7 @@ end function LC:GetOptions() PA.Options.args.LootConfirm = PA.ACH:Group(LC.Title, LC.Description, nil, nil, function(info) return LC.db[info[#info]] end) - PA.Options.args.LootConfirm.args.Header = PA.ACH:Header(LC.Header, 0) + PA.Options.args.LootConfirm.args.Description = PA.ACH:Description(LC.Description, 0) PA.Options.args.LootConfirm.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) LC.db[info[#info]] = value if not LC.isEnabled then LC:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) PA.Options.args.LootConfirm.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2) diff --git a/Modules/MasterExperience.lua b/Modules/MasterExperience.lua index 2ebf8957a4075b200bbede2d6429bd23709162bc..c2b63558fac8b6a6815e96adc76142cb05d1b784 100644 --- a/Modules/MasterExperience.lua +++ b/Modules/MasterExperience.lua @@ -1,8 +1,7 @@ local PA = _G.ProjectAzilroka local MXP = PA:NewModule('MasterXP', 'AceTimer-3.0', 'AceEvent-3.0') -MXP.Title = 'Master Experience' -MXP.Header = PA.ACL['|cFF16C3F2Master|r |cFFFFFFFFExperience|r'] +MXP.Title = PA.ACL['|cFF16C3F2Master|r |cFFFFFFFFExperience|r'] MXP.Description = PA.ACL['Shows Experience Bars for Party / Battle.net Friends'] MXP.Authors = 'Azilroka NihilisticPandemonium' MXP.isEnabled = false @@ -10,6 +9,9 @@ PA.MXP, _G.MasterExperience = MXP, MXP local _G = _G local min, format = min, format +local tostring, tonumber = tostring, tonumber +local strsplit = strsplit + local CreateFrame = CreateFrame local GetXPExhaustion = GetXPExhaustion local IsXPUserDisabled = IsXPUserDisabled @@ -17,16 +19,19 @@ local GetQuestLogRewardXP = GetQuestLogRewardXP local IsPlayerAtEffectiveMaxLevel = IsPlayerAtEffectiveMaxLevel local UnitXP, UnitXPMax = UnitXP, UnitXPMax +local BNGetInfo = BNGetInfo + local QuestLogXP, ZoneQuestXP, CompletedQuestXP = 0, 0, 0 local CurrentXP, XPToLevel, RestedXP, CurrentLevel -local PLAYER_NAME_WITH_REALM -MXP.BNFriendsWoW = {} -MXP.BNFriendsName = {} +MXP.playerRealm = format('%s-%s', UnitName("player"), gsub(GetRealmName(), '[%s%-]', '')) +MXP.battleTag = MXP.isBNConnected and select(2, BNGetInfo()) +MXP.BNFriends = {} +MXP.isBNConnected = false MXP.MasterExperience = CreateFrame('Frame', 'MasterExperience', PA.PetBattleFrameHider) MXP.MasterExperience:SetSize(250, 400) -MXP.MasterExperience:SetPoint('BOTTOM', UIParent, 'BOTTOM', 0, 43) +MXP.MasterExperience:SetPoint('BOTTOM', _G.UIParent, 'BOTTOM', 0, 43) MXP.MasterExperience.Bars = {} if not (PA.Tukui or PA.ElvUI) then @@ -38,7 +43,7 @@ function MXP:CheckQuests(questID, zoneOnly) return end - local isCompleted = C_QuestLog.ReadyForTurnIn(questID) + local isCompleted = _G.C_QuestLog.ReadyForTurnIn(questID) local experience = GetQuestLogRewardXP(questID) if zoneOnly then ZoneQuestXP = ZoneQuestXP + experience @@ -153,12 +158,14 @@ function MXP:UpdateBar(barID, infoString) end end + displayString = format('%s %s - %s', PA.ACL['Lvl'], info.level, displayString) + bar.Rested:SetShown(isRested) bar.Quest:SetShown(hasQuestXP) end bar.Text:SetText(displayString) - bar.Name:SetText(MXP.BNFriendsName[info.name] or info.name) + bar.Name:SetText(MXP.BNFriends[info.name] and MXP.BNFriends[info.name].accountName or info.name) local numShown = 0 for _, Bar in ipairs(MXP.MasterExperience.Bars) do @@ -183,7 +190,7 @@ function MXP:Bar_OnEnter() _G.GameTooltip:ClearLines() _G.GameTooltip:SetOwner(self, 'ANCHOR_CURSOR', 0, -4) - _G.GameTooltip:AddLine(format("%s's %s", MXP.BNFriendsName[self.Info.name] or self.Info.name, PA.ACL["Experience"])) + _G.GameTooltip:AddLine(format("%s's %s", MXP.BNFriends[self.Info.name] and MXP.BNFriends[self.Info.name].accountName or self.Info.name, PA.ACL["Experience"])) _G.GameTooltip:AddLine(' ') _G.GameTooltip:AddDoubleLine(PA.ACL["XP:"], format(' %d / %d (%.2f%%)', self.Info.CurrentXP, self.Info.XPToLevel, self.Info.PercentXP), 1, 1, 1) @@ -208,6 +215,15 @@ function MXP:Bar_OnLeave() GameTooltip_Hide(self) end +function MXP:GetBarPoints(barIndex) + local point = MXP.db.GrowthDirection == 'UP' and 'BOTTOM' or 'TOP' + local relativeFrame = barIndex == 1 and MXP.MasterExperience or MXP.MasterExperience.Bars[barIndex - 1] + local relativePoint = (barIndex == 1 or MXP.db.GrowthDirection == 'DOWN') and 'BOTTOM' or 'TOP' + local yOffset = barIndex == 1 and 0 or MXP.db.GrowthDirection == 'UP' and 2 or -2 + + return point, relativeFrame, relativePoint, yOffset +end + function MXP:CreateBar() local barIndex = (#MXP.MasterExperience.Bars + 1) @@ -220,11 +236,7 @@ function MXP:CreateBar() Bar:SetScript('OnLeave', MXP.Bar_OnLeave) Bar.Info = {} - local point = MXP.db.GrowthDirection == 'UP' and 'BOTTOM' or 'TOP' - local relativeFrame = barIndex == 1 and MXP.MasterExperience or MXP.MasterExperience.Bars[barIndex - 1] - local relativePoint = barIndex == 1 and 'BOTTOM' or 'TOP' - local yOffset = barIndex == 1 and 0 or MXP.db.GrowthDirection == 'UP' and 2 or -2 - + local point, relativeFrame, relativePoint, yOffset = MXP:GetBarPoints(barIndex) Bar:SetPoint(point, relativeFrame, relativePoint, 0, yOffset) Bar.Text = Bar:CreateFontString(nil, 'OVERLAY') @@ -319,9 +331,31 @@ function MXP:UpdateAllBars() C_ChatInfo.SendAddonMessage('PA_MXP', 'REQUESTINFO', 'PARTY') end - if MXP.db.BattleNet and BNConnected() then - for friend in pairs(MXP.BNFriendsWoW) do - BNSendGameData(friend, 'PA_MXP', 'REQUESTINFO') + if MXP.db.BattleNet and MXP.isBNConnected then + for _, info in pairs(MXP.BNFriends) do + if info.presenceID then + BNSendGameData(info.presenceID, 'PA_MXP', 'REQUESTINFO') + end + end + end +end + +function MXP:BattleNetUpdate(_, friendIndex) + if MXP.isBNConnected and friendIndex then + local hideBar = true + local friendInfo = C_BattleNet.GetFriendAccountInfo(friendIndex) + for gameIndex = 1, C_BattleNet.GetFriendNumGameAccounts(friendIndex) do + local info = C_BattleNet.GetFriendGameAccountInfo(friendIndex, gameIndex) + if info and info.clientProgram == 'WoW' then + BNSendGameData(info.gameAccountID, 'PA_MXP', 'REQUESTINFO') + hideBar = false + end + end + if hideBar then + local bar = MXP.MasterExperience.Bars[MXP:GetAssignedBar(friendInfo.battleTag)] + if bar then + bar:Hide() + end end end end @@ -337,76 +371,78 @@ function MXP:UpdateCurrentBars() bar.Text:SetFont(font, fontSize, fontFlag) bar.Name:SetFont(font, fontSize, fontFlag) - if MXP.db.GrowthDirection == 'UP' then - if barIndex == 1 then - bar:SetPoint('BOTTOM', MXP.MasterExperience, 'BOTTOM', 0, 0) - else - bar:SetPoint('BOTTOM', MXP.MasterExperience.Bars[barIndex - 1], 'TOP', 0, 2) - end - else - if barIndex == 1 then - bar:SetPoint('TOP', MXP.MasterExperience, 'TOP', 0, 0) - else - bar:SetPoint('TOP', MXP.MasterExperience.Bars[barIndex - 1], 'BOTTOM', 0, -2) - end - end + local point, relativeFrame, relativePoint, yOffset = MXP:GetBarPoints(barIndex) + bar:SetPoint(point, relativeFrame, relativePoint, 0, yOffset) end end function MXP:SendMessage() - local message = format('%s:%s:%d:%s:%s:%d:%d:%d:%d:%d:%d:%d', format('%s-%s', UnitName("player"), MXP:ShortenRealm(GetRealmName())), PA.MyClass, CurrentLevel, tostring(IsPlayerAtEffectiveMaxLevel()), tostring(IsXPUserDisabled()), CurrentXP or 0, XPToLevel or 0, RestedXP or 0, QuestLogXP or 0, ZoneQuestXP or 0, CompletedQuestXP or 0) - + local message = format('%s:%d:%s:%s:%d:%d:%d:%d:%d:%d:%d', PA.MyClass, CurrentLevel, tostring(IsPlayerAtEffectiveMaxLevel()), tostring(IsXPUserDisabled()), CurrentXP or 0, XPToLevel or 0, RestedXP or 0, QuestLogXP or 0, ZoneQuestXP or 0, CompletedQuestXP or 0) if MXP.db.Party and IsInGroup(LE_PARTY_CATEGORY_HOME) and not IsInRaid() then + message = format('%s:%s', MXP.playerRealm, message) C_ChatInfo.SendAddonMessage('PA_MXP', message, 'PARTY') end - if MXP.db.BattleNet and BNConnected() then - for friend in pairs(MXP.BNFriendsWoW) do - BNSendGameData(friend, 'PA_MXP', message) + if MXP.db.BattleNet and MXP.isBNConnected then + message = format('%s:%s', MXP.battleTag, message) + for _, info in pairs(MXP.BNFriends) do + if info.presenceID then + BNSendGameData(info.presenceID, 'PA_MXP', message) + end end end end function MXP:HandleBNET() - wipe(MXP.BNFriendsWoW) - wipe(MXP.BNFriendsName) + wipe(MXP.BNFriends) - if BNConnected() then + if MXP.isBNConnected then + MXP:BattleTag() local _, numBNetOnline = BNGetNumFriends() for friendIndex = 1, numBNetOnline do local friendInfo = C_BattleNet.GetFriendAccountInfo(friendIndex) for gameIndex = 1, C_BattleNet.GetFriendNumGameAccounts(friendIndex) do local info = C_BattleNet.GetFriendGameAccountInfo(friendIndex, gameIndex) - if info and info.clientProgram == 'WoW' and info.realmName and info.characterName then - MXP.BNFriendsWoW[info.gameAccountID] = format('%s-%s', info.characterName, info.realmName) - MXP.BNFriendsName[format('%s-%s', info.characterName, info.realmName)] = friendInfo.accountName + if info and info.clientProgram == 'WoW' then + MXP.BNFriends[friendInfo.battleTag] = { presenceID = info.gameAccountID, accountName = friendInfo.accountName } + MXP.BNFriends[info.gameAccountID] = { battleTag = friendInfo.battleTag, accountName = friendInfo.accountName } end end end end end +function MXP:HandleBNStatus() + MXP.isBNConnected = _G.BNConnected() +end + +function MXP:BattleTag() + if not MXP.battleTag then + MXP.battleTag = MXP.isBNConnected and select(2, BNGetInfo()) + end +end + function MXP:RecieveMessage(event, prefix, message, _, sender) if prefix ~= 'PA_MXP' then return end - if event == 'CHAT_MSG_ADDON' and sender ~= PLAYER_NAME_WITH_REALM then + if event == 'CHAT_MSG_ADDON' and sender ~= MXP.playerRealm then if message == 'REQUESTINFO' then MXP:SendMessage() else MXP:UpdateBar(MXP:GetAssignedBar(sender), message) end - elseif event == 'BN_CHAT_MSG_ADDON' and MXP.db.BattleNet and MXP.BNFriendsWoW[sender] then + elseif event == 'BN_CHAT_MSG_ADDON' and MXP.db.BattleNet and MXP.BNFriends[sender] then if message == 'REQUESTINFO' then MXP:SendMessage() else - MXP:UpdateBar(MXP:GetAssignedBar(MXP.BNFriendsWoW[sender]), message) + MXP:UpdateBar(MXP:GetAssignedBar(MXP.BNFriends[sender].battleTag), message) end end end function MXP:GetOptions() PA.Options.args.MasterExperience = PA.ACH:Group(MXP.Title, MXP.Description, nil, nil, function(info) return MXP.db[info[#info]] end) - PA.Options.args.MasterExperience.args.Header = PA.ACH:Header(MXP.Header, 0) + PA.Options.args.MasterExperience.args.Description = PA.ACH:Description(MXP.Description, 0) PA.Options.args.MasterExperience.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) MXP.db[info[#info]] = value if not MXP.isEnabled then MXP:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) PA.Options.args.MasterExperience.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2, nil, function(info) return MXP.db[info[#info]] end, function(info, value) MXP.db[info[#info]] = value MXP:UpdateCurrentBars() end) @@ -460,10 +496,6 @@ function MXP:UpdateSettings() MXP.db = PA.db.MasterExperience end -function MXP:ShortenRealm(realm) - return gsub(realm, '[%s%-]', '') -end - function MXP:Initialize() MXP:UpdateSettings() @@ -473,10 +505,6 @@ function MXP:Initialize() MXP.isEnabled = true - PLAYER_NAME_WITH_REALM = format('%s-%s', UnitName("player"), MXP:ShortenRealm(GetRealmName())) - - MXP.PLAYER_NAME_WITH_REALM = PLAYER_NAME_WITH_REALM - _G.C_ChatInfo.RegisterAddonMessagePrefix('PA_MXP') if PA.Tukui then @@ -494,13 +522,18 @@ function MXP:Initialize() MXP:RegisterEvent('ENABLE_XP_GAIN', 'SendMessage') MXP:RegisterEvent('QUEST_LOG_UPDATE') MXP:RegisterEvent('GROUP_ROSTER_UPDATE', 'UpdateAllBars') - MXP:RegisterEvent('BN_FRIEND_INFO_CHANGED', 'UpdateAllBars') + MXP:RegisterEvent('BN_FRIEND_INFO_CHANGED', 'BattleNetUpdate') MXP:RegisterEvent('BN_FRIEND_ACCOUNT_ONLINE', 'HandleBNET') MXP:RegisterEvent('BN_FRIEND_ACCOUNT_OFFLINE', 'HandleBNET') MXP:RegisterEvent('PLAYER_XP_UPDATE') MXP:RegisterEvent('UPDATE_EXHAUSTION') MXP:RegisterEvent('PLAYER_LEVEL_UP') + MXP:RegisterEvent("BN_CONNECTED", 'HandleBNStatus') + MXP:RegisterEvent("BN_DISCONNECTED", 'HandleBNStatus') + + MXP:BattleTag() + MXP:HandleBNStatus() MXP:HandleBNET() MXP:UPDATE_EXHAUSTION() MXP:PLAYER_XP_UPDATE() @@ -509,5 +542,5 @@ function MXP:Initialize() MXP:UpdateAllBars() - MXP:ScheduleRepeatingTimer('SendMessage', 5) + MXP:ScheduleRepeatingTimer('SendMessage', 2) end diff --git a/Modules/MouseoverAuras.lua b/Modules/MouseoverAuras.lua index 5ebe287f4e7d101bc51a38741c74e7abe2f6eaea..f4d087b8af134af11858546b9bbc451e6e0304ea 100644 --- a/Modules/MouseoverAuras.lua +++ b/Modules/MouseoverAuras.lua @@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka local MA = PA:NewModule('MouseoverAuras', 'AceEvent-3.0', 'AceTimer-3.0') PA.MA = MA -MA.Title = 'MouseoverAuras' -MA.Header = PA.ACL['|cFF16C3F2Mouseover|r|cFFFFFFFFAuras|r'] +MA.Title = PA.ACL['|cFF16C3F2Mouseover|r|cFFFFFFFFAuras|r'] MA.Description = PA.ACL['Auras for your mouseover target'] MA.Authors = 'Azilroka' MA.isEnabled = false @@ -207,10 +206,10 @@ function MA:GetOptions() get = function(info) return MA.db[info[#info]] end, set = function(info, value) MA.db[info[#info]] = value MA:SetPosition() end, args = { - Header = { + Description = { order = 0, - type = 'header', - name = MA.Header, + type = 'description', + name = MA.Description, }, Enable = { order = 1, diff --git a/Modules/MovableFrames.lua b/Modules/MovableFrames.lua index 2bc90967d798734ed4779721db7ba42251240538..7f6f0af107968065ee45421d8fb23bdcdee1d1e2 100644 --- a/Modules/MovableFrames.lua +++ b/Modules/MovableFrames.lua @@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka local MF = PA:NewModule('MovableFrames', 'AceEvent-3.0', 'AceHook-3.0') PA.MF, _G.MovableFrames = MF, MF -MF.Title = 'Movable Frames' -MF.Header = PA.ACL['|cFF16C3F2Movable|r |cFFFFFFFFFrames|r'] +MF.Title = PA.ACL['|cFF16C3F2Movable|r |cFFFFFFFFFrames|r'] MF.Description = PA.ACL['Make Blizzard Frames Movable'] MF.Authors = 'Azilroka Simpy' MF.isEnabled = false @@ -289,7 +288,7 @@ end function MF:GetOptions() PA.Options.args.MovableFrames = PA.ACH:Group(MF.Title, MF.Description, nil, nil, function(info) return MF.db[info[#info]] end, function(info, value) MF.db[info[#info]] = value MF:Update() end) - PA.Options.args.MovableFrames.args.Header = PA.ACH:Header(MF.Header, 0) + PA.Options.args.MovableFrames.args.Header = PA.ACH:Description(MF.Description, 0) PA.Options.args.MovableFrames.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) MF.db[info[#info]] = value if (not MF.isEnabled) then MF:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) PA.Options.args.MovableFrames.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2) PA.Options.args.MovableFrames.args.General.inline = true diff --git a/Modules/OzCooldowns.lua b/Modules/OzCooldowns.lua index 3d163aad0d98639b2a2190a228a4792ab750f96f..e0ccdae23104bf1c6be93be600b51dd19720fcea 100644 --- a/Modules/OzCooldowns.lua +++ b/Modules/OzCooldowns.lua @@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka local OzCD = PA:NewModule('OzCooldowns', 'AceEvent-3.0', 'AceTimer-3.0') PA.OzCD = OzCD -OzCD.Title = 'OzCooldowns' -OzCD.Header = '|cFF16C3F2Oz|r|cFFFFFFFFCooldowns|r' +OzCD.Title = '|cFF16C3F2Oz|r|cFFFFFFFFCooldowns|r' OzCD.Description = 'Minimalistic Cooldowns' OzCD.Authors = 'Azilroka Nimaear' OzCD.isEnabled = false @@ -447,7 +446,7 @@ function OzCD:GetOptions() OzCD:UpdateSettings() PA.Options.args.OzCooldowns = PA.ACH:Group(OzCD.Title, OzCD.Description, nil, nil, function(info) return OzCD.db[info[#info]] end, function(info, value) OzCD.db[info[#info]] = value end) - PA.Options.args.OzCooldowns.args.Header = PA.ACH:Header(OzCD.Header, 0) + PA.Options.args.OzCooldowns.args.Description = PA.ACH:Description(OzCD.Description, 0) PA.Options.args.OzCooldowns.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) OzCD.db[info[#info]] = value if (not OzCD.isEnabled) then OzCD:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) PA.Options.args.OzCooldowns.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2) diff --git a/Modules/QuestSounds.lua b/Modules/QuestSounds.lua index c58fc51283a06927a29a358767496c37bc38c8e0..3648c6565150064d0382cf393cd3468ea4d99936 100644 --- a/Modules/QuestSounds.lua +++ b/Modules/QuestSounds.lua @@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka local QS = PA:NewModule('QuestSounds', 'AceEvent-3.0', 'AceTimer-3.0') PA.QS = QS -QS.Title = 'QuestSounds' -QS.Header = PA.ACL['|cFF16C3F2Quest|r|cFFFFFFFFSounds|r'] +QS.Title = PA.ACL['|cFF16C3F2Quest|r|cFFFFFFFFSounds|r'] QS.Description = PA.ACL['Audio for Quest Progress & Completions.'] QS.Authors = 'Azilroka' QS.Credits = 'Yoco' @@ -141,7 +140,7 @@ end function QS:GetOptions() PA.Options.args.QuestSounds = PA.ACH:Group(QS.Title, QS.Description, nil, nil, function(info) return QS.db[info[#info]] end, function(info, value) QS.db[info[#info]] = value end) - PA.Options.args.QuestSounds.args.Header = PA.ACH:Header(QS.Header, 0) + PA.Options.args.QuestSounds.args.Description = PA.ACH:Description(QS.Description, 0) PA.Options.args.QuestSounds.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) QS.db[info[#info]] = value if (not QS.isEnabled) then QS:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) PA.Options.args.QuestSounds.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2) diff --git a/Modules/Reminder.lua b/Modules/Reminder.lua index 1936dd3919d1e291ed5243a7383accebf3b33666..be7e2c289e473a212171790d981b5ed75706c5f2 100644 --- a/Modules/Reminder.lua +++ b/Modules/Reminder.lua @@ -3,8 +3,7 @@ local AR = PA:NewModule('AuraReminder', 'AceEvent-3.0', 'AceTimer-3.0') PA.AR = AR -AR.Title = 'Aura Reminder' -AR.Header = '|cFF16C3F2Aura|r |cFFFFFFFFReminder|r' +AR.Title = '|cFF16C3F2Aura|r |cFFFFFFFFReminder|r' AR.Description = 'Reminder for Buffs / Debuffs' AR.Authors = 'Azilroka NihilisticPandemonium' AR.isEnabled = false @@ -318,14 +317,14 @@ local addGroupTemplate = { name = '', template = ''} function AR:GetOptions() PA.Options.args.AuraReminder = { type = 'group', - name = 'Aura Reminder', + name = AR.Title, get = function(info) return AR.db[info[#info]] end, set = function(info, value) AR.db[info[#info]] = value end, args = { - Header = { + Description = { order = 0, - type = 'header', - name = AR.Header, + type = 'description', + name = AR.Description, }, Enable = { order = 1, diff --git a/Modules/ReputationReward.lua b/Modules/ReputationReward.lua index e1063cb7a0a2106b398fd88b8018db38a1fb927a..670c9d7eed84c3588e027fb33bd95b3488e551ca 100644 --- a/Modules/ReputationReward.lua +++ b/Modules/ReputationReward.lua @@ -4,8 +4,7 @@ if PA.Classic then return end local RR = PA:NewModule('ReputationReward', 'AceEvent-3.0', 'AceTimer-3.0', 'AceHook-3.0') PA.RR = RR -RR.Title = 'ReputationRewards' -RR.Header = PA.ACL['|cFF16C3F2Reputation|r|cFFFFFFFFRewards|r'] +RR.Title = PA.ACL['|cFF16C3F2Reputation|r|cFFFFFFFFRewards|r'] RR.Description = PA.ACL['Adds Reputation into Quest Log & Quest Frame.'] RR.Authors = 'Azilroka' RR.isEnabled = false @@ -13,6 +12,7 @@ RR.isEnabled = false local _G = _G local floor = floor local pairs = pairs +local ipairs = ipairs local select = select local wipe = wipe local mod = mod @@ -24,7 +24,6 @@ local GetNumQuestLogRewardFactions = _G.GetNumQuestLogRewardFactions local GetQuestLogRewardFactionInfo = _G.GetQuestLogRewardFactionInfo local GetQuestLogTitle = _G.GetQuestLogTitle local GetQuestLogSelection = _G.GetQuestLogSelection -local C_QuestLog = _G.C_QuestLog local GetNumQuestLogChoices = _G.GetNumQuestLogChoices local GetNumQuestChoices = _G.GetNumQuestChoices local UnitAura = _G.UnitAura @@ -111,7 +110,7 @@ function RR:Show() if ( _G.QuestInfoFrame.questLog ) then local questID = select(8, GetQuestLogTitle(GetQuestLogSelection())) - if C_QuestLog.ShouldShowQuestRewards(questID) then + if _G.C_QuestLog.ShouldShowQuestRewards(questID) then numQuestChoices = GetNumQuestLogChoices() end else @@ -151,7 +150,7 @@ function RR:Show() end end - local rewardsFrame, lastFrame = QuestInfo_ShowRewards() + local rewardsFrame, lastFrame = _G.QuestInfo_ShowRewards() if not rewardsFrame then return end local buttonHeight = rewardsFrame.RewardButtons[1]:GetHeight() @@ -187,18 +186,13 @@ function RR:Show() if Info.Base < 0 then r, g, b = 1, 0, 0 elseif Info.Bonus > 0 then r, g, b = 0, 1, 0 end questItem.Count:SetTextColor(r, g, b) - questItem:ClearAllPoints() if (buttonIndex > 1) then if mod(buttonIndex, 2) == 1 then - questItem:SetPoint('TOPLEFT', QuestInfo_GetRewardButton(rewardsFrame, buttonIndex - 2) or lastFrame, 'BOTTOMLEFT', 0, -REWARDS_SECTION_OFFSET) Height = Height + buttonHeight + REWARDS_SECTION_OFFSET lastFrame = questItem - else - questItem:SetPoint('TOPLEFT', QuestInfo_GetRewardButton(rewardsFrame, buttonIndex - 1) or lastFrame, 'TOPRIGHT', 2, 0) end else - questItem:SetPoint('TOPLEFT', lastFrame, 'BOTTOMLEFT', 0, -REWARDS_SECTION_OFFSET) Height = Height + buttonHeight + REWARDS_SECTION_OFFSET lastFrame = questItem end @@ -218,7 +212,7 @@ end function RR:GetOptions() PA.Options.args.ReputationReward = PA.ACH:Group(RR.Title, RR.Description, nil, nil, function(info) return RR.db[info[#info]] end, function(info, value) RR.db[info[#info]] = value end) - PA.Options.args.ReputationReward.args.Header = PA.ACH:Header(RR.Header, 0) + PA.Options.args.ReputationReward.args.Description = PA.ACH:Description(RR.Description, 0) PA.Options.args.ReputationReward.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) RR.db[info[#info]] = value if (not RR.isEnabled) then RR:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) PA.Options.args.ReputationReward.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2) diff --git a/Modules/SquareMinimapButtons.lua b/Modules/SquareMinimapButtons.lua index daf47d2e7c262e8dd5b4a1779484e7e95c41484a..689060141064cc0b769e4eb89477a41076267ccd 100644 --- a/Modules/SquareMinimapButtons.lua +++ b/Modules/SquareMinimapButtons.lua @@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka local SMB = PA:NewModule('SquareMinimapButtons', 'AceEvent-3.0', 'AceHook-3.0', 'AceTimer-3.0') PA.SMB, _G.SquareMinimapButtons = SMB, SMB -SMB.Title = 'Square Minimap Buttons' -SMB.Header = PA.ACL['|cFF16C3F2Square|r |cFFFFFFFFMinimap Buttons|r'] +SMB.Title = PA.ACL['|cFF16C3F2Square|r |cFFFFFFFFMinimap Buttons|r'] SMB.Description = PA.ACL['Minimap Button Bar / Minimap Button Skinning'] SMB.Authors = 'Azilroka NihilisticPandemonium Sinaris Omega Durc' SMB.isEnabled = false @@ -574,7 +573,7 @@ end function SMB:GetOptions() PA.Options.args.SquareMinimapButtons = PA.ACH:Group(SMB.Title, SMB.Description, nil, nil, function(info) return SMB.db[info[#info]] end, function(info, value) SMB.db[info[#info]] = value SMB:Update() end) - PA.Options.args.SquareMinimapButtons.args.Header = PA.ACH:Header(SMB.Header, 0) + PA.Options.args.SquareMinimapButtons.args.Description = PA.ACH:Description(SMB.Description, 0) PA.Options.args.SquareMinimapButtons.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) SMB.db[info[#info]] = value if (not SMB.isEnabled) then SMB:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) PA.Options.args.SquareMinimapButtons.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2) PA.Options.args.SquareMinimapButtons.args.General.inline = true diff --git a/Modules/TargetSounds.lua b/Modules/TargetSounds.lua index d433e7cdbd41702017b9dad475f409cfaeacc2ea..098a69b29fb97771b97b57ddb427176a160293d9 100644 --- a/Modules/TargetSounds.lua +++ b/Modules/TargetSounds.lua @@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka local TS = PA:NewModule('TargetSounds', 'AceEvent-3.0') PA.TS = TS -TS.Title = 'TargetSounds' -TS.Header = PA.ACL['|cFF16C3F2Target|r|cFFFFFFFFSounds|r'] +TS.Title = PA.ACL['|cFF16C3F2Target|r|cFFFFFFFFSounds|r'] TS.Description = PA.ACL['Audio for Target Sounds.'] TS.Authors = 'Azilroka' TS.isEnabled = false @@ -31,8 +30,9 @@ end function TS:GetOptions() PA.Options.args.TargetSounds = PA.ACH:Group(TS.Title, TS.Description, nil, nil, function(info) return TS.db[info[#info]] end, function(info, value) TS.db[info[#info]] = value end) - PA.Options.args.TargetSounds.args.Header = PA.ACH:Header(TS.Header, 0) + PA.Options.args.TargetSounds.args.Description = PA.ACH:Description(TS.Description, 0) PA.Options.args.TargetSounds.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) TS.db[info[#info]] = value if (not TS.isEnabled) then TS:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) + PA.Options.args.TargetSounds.args.AuthorHeader = PA.ACH:Header(PA.ACL['Authors:'], -2) PA.Options.args.TargetSounds.args.Authors = PA.ACH:Description(TS.Authors, -1, 'large') end diff --git a/Modules/iFilger.lua b/Modules/iFilger.lua index 36d3eeaaa6771e1c013fb4fa2e91a4ce4a56e1cb..4570bac9bf2e6d48a01234a4947f0779b6c252b2 100644 --- a/Modules/iFilger.lua +++ b/Modules/iFilger.lua @@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka local iFilger = PA:NewModule('iFilger', 'AceEvent-3.0', 'AceTimer-3.0') PA.iFilger = iFilger -iFilger.Title = 'iFilger' -iFilger.Header = '|cFF16C3F2i|r|cFFFFFFFFFilger|r' +iFilger.Title = '|cFF16C3F2i|r|cFFFFFFFFFilger|r' iFilger.Description = 'Minimalistic Auras / Buffs / Procs / Cooldowns' iFilger.Authors = 'Azilroka Nils Ruesch Ildyria' @@ -801,7 +800,7 @@ function iFilger:GetOptions() iFilger:UpdateSettings() PA.Options.args.iFilger = PA.ACH:Group(iFilger.Title, iFilger.Description, nil, 'tab') - PA.Options.args.iFilger.args.Header = PA.ACH:Header(iFilger.Header, 0) + PA.Options.args.iFilger.args.Description = PA.ACH:Description(iFilger.Description, 0) PA.Options.args.iFilger.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) iFilger.db[info[#info]] = value if (not iFilger.isEnabled) then iFilger:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) PA.Options.args.iFilger.args.AuthorHeader = PA.ACH:Header(PA.ACL['Authors:'], -2) diff --git a/Modules/stAddonManager.lua b/Modules/stAddonManager.lua index 7671834a7ebc52b1a76f5cbb7c556cc1ce581252..d7d4728394a54f78fc912ee2cd79de36477b44e1 100644 --- a/Modules/stAddonManager.lua +++ b/Modules/stAddonManager.lua @@ -5,8 +5,7 @@ PA.stAM, _G.stAddonManager = stAM, stAM _G.stAddonManagerProfilesDB = {} _G.stAddonManagerServerDB = {} -stAM.Title = 'stAddonManager' -stAM.Header = PA.ACL['|cFF16C3F2st|r|cFFFFFFFFAddonManager|r'] +stAM.Title = PA.ACL['|cFF16C3F2st|r|cFFFFFFFFAddonManager|r'] stAM.Description = PA.ACL['A simple and minimalistic addon to disable/enabled addons without logging out.'] stAM.Authors = 'Azilroka Safturento' stAM.isEnabled = false @@ -680,7 +679,7 @@ end function stAM:GetOptions() PA.Options.args.stAM = PA.ACH:Group(stAM.Title, stAM.Description, nil, nil, function(info) return stAM.db[info[#info]] end, function(info, value) stAM.db[info[#info]] = value stAM:Update() end) - PA.Options.args.stAM.args.Header = PA.ACH:Header(stAM.Header, 0) + PA.Options.args.stAM.args.Description = PA.ACH:Description(stAM.Description, 0) PA.Options.args.stAM.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) stAM.db[info[#info]] = value if not stAM.isEnabled then stAM:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end) PA.Options.args.stAM.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2)