diff --git a/AuraControl.lua b/AuraControl.lua index dc1ea08..787b30f 100644 --- a/AuraControl.lua +++ b/AuraControl.lua @@ -32,7 +32,7 @@ local auraLookup = Srendarr.auraLookup local filteredAuras = Srendarr.filteredAuras local prominentAuras = {} local displayFrameRef = {} -local shortBuffThreshold, filterDisguisesOnPlayer, filterDisguisesOnTarget +local shortBuffThreshold, passiveEffectsAsPassive, filterDisguisesOnPlayer, filterDisguisesOnTarget local displayFrameFake = { ['AddAuraToDisplay'] = function() @@ -82,18 +82,22 @@ local function AuraHandler(flagBurst, auraName, unitTag, start, finish, icon, ef -- buff on player, sort as passive, toggled or timed and add if (filterDisguisesOnPlayer and abilityType == ABILITY_TYPE_CHANGEAPPEARANCE) then return end -- is a disguise and they are filtered - if (IsMajorEffect(abilityID)) then -- major buff on player - displayFrameRef[GROUP_PLAYER_MAJOR]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_MAJOR, (start == finish) and AURA_TYPE_PASSIVE or AURA_TYPE_TIMED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) - elseif (IsMinorEffect(abilityID)) then -- minor buff on player - displayFrameRef[GROUP_PLAYER_MINOR]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_MINOR, (start == finish) and AURA_TYPE_PASSIVE or AURA_TYPE_TIMED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) - elseif (start == finish) then -- toggled or passive - if (IsToggledAura(abilityID)) then -- toggled + if (start == finish) then -- toggled or passive + if (IsMajorEffect(abilityID) and not passiveEffectsAsPassive) then -- major buff on player + displayFrameRef[GROUP_PLAYER_MAJOR]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_MAJOR, AURA_TYPE_PASSIVE, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + elseif (IsMinorEffect(abilityID) and not passiveEffectsAsPassive) then -- minor buff on player + displayFrameRef[GROUP_PLAYER_MINOR]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_MINOR, AURA_TYPE_PASSIVE, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + elseif (IsToggledAura(abilityID)) then -- toggled displayFrameRef[GROUP_PLAYER_TOGGLED]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_TOGGLED, AURA_TYPE_TOGGLED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) - else -- passive + else -- passive, including passive major and minor effects, not seperated out before displayFrameRef[GROUP_PLAYER_PASSIVE]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_PASSIVE, AURA_TYPE_PASSIVE, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) end else -- timed buff - if ((finish - start) > shortBuffThreshold) then -- is considered a long duration buff + if (IsMajorEffect(abilityID)) then -- major buff on player + displayFrameRef[GROUP_PLAYER_MAJOR]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_MAJOR, AURA_TYPE_TIMED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + elseif (IsMinorEffect(abilityID)) then -- minor buff on player + displayFrameRef[GROUP_PLAYER_MINOR]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_MINOR, AURA_TYPE_TIMED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) + elseif ((finish - start) > shortBuffThreshold) then -- is considered a long duration buff displayFrameRef[GROUP_PLAYER_LONG]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_LONG, AURA_TYPE_TIMED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) else displayFrameRef[GROUP_PLAYER_SHORT]:AddAuraToDisplay(flagBurst, GROUP_PLAYER_SHORT, AURA_TYPE_TIMED, auraName, unitTag, start, finish, icon, effectType, abilityType, abilityID) @@ -112,6 +116,7 @@ function Srendarr:ConfigureAuraHandler() end shortBuffThreshold = self.db.shortBuffThreshold + passiveEffectsAsPassive = self.db.passiveEffectsAsPassive filterDisguisesOnPlayer = self.db.filtersPlayer.disguise filterDisguisesOnTarget = self.db.filtersTarget.disguise diff --git a/AuraData.lua b/AuraData.lua index af6b075..48d4c8c 100644 --- a/AuraData.lua +++ b/AuraData.lua @@ -195,7 +195,6 @@ local filterAuraGroups = { [16348] = true, -- Offensive Scroll Bonus II [16350] = true, -- Defensive Scroll Bonus II [39671] = true, -- Emperorship Alliance Bonus - [64210] = true, -- Increased Experience }, ['disguise'] = { -- intentionally empty table just so setup can iterate through filters more simply diff --git a/Core.lua b/Core.lua index d269c88..bee0583 100644 --- a/Core.lua +++ b/Core.lua @@ -2,7 +2,7 @@ Srendarr - Aura (Buff & Debuff) Tracker ---------------------------------------------------------- * - * Version 2.1.8 + * Version 2.1.9 * Kith, Garkin, silentgecko * * @@ -12,7 +12,7 @@ local L = Srendarr:GetLocale() Srendarr.name = 'Srendarr' Srendarr.slash = '/srendarr' -Srendarr.version = '2.1.8' +Srendarr.version = '2.1.9' Srendarr.versionDB = 3 Srendarr.displayFrames = {} diff --git a/Defaults.lua b/Defaults.lua index aa3be14..376f310 100644 --- a/Defaults.lua +++ b/Defaults.lua @@ -62,6 +62,7 @@ local defaults = { shortBuffThreshold = 35, procEnableAnims = true, procPlaySound = 'Srendarr Ability Proc', -- can be set to None by user + passiveEffectsAsPassive = false, auraGroups = { [Srendarr.GROUP_PLAYER_SHORT] = 1, -- set the displayFrame that will display this grouping [Srendarr.GROUP_PLAYER_LONG] = 2, -- multiple groupings can go to a given frame diff --git a/Locales/Local_en.lua b/Locales/Local_en.lua index 6fe887c..0e09010 100644 --- a/Locales/Local_en.lua +++ b/Locales/Local_en.lua @@ -130,6 +130,8 @@ L.General_ProcEnableAnimsTip = 'Set whether to show an animation on the ActionBa L.General_ProcenableAnimsWarn = 'If you are using a mod that modifies or hides the default ActionBar, animations may not display.' L.General_ProcPlaySound = 'Play Sound On Proc' L.General_ProcPlaySoundTip = 'Set a sound to play when an ability procs. A settings of None will prevent any audio alert of your procs.' +L.General_PassiveEffectsAsPassive = 'Treat Passive Major & Minor Buffs As Passives' +L.General_PassiveEffectsAsPassiveTip = 'Set whether Major & Minor Buffs that are passive are grouped and hidden along with other passive auras on the player according to the \'Your Passives\' setting.\n\nIf not enabled, all Major & Minor Buffs will be grouped together regardless of whether they are timed or passive.' -- settings: general (aura control: display groups) L.General_ControlHeader = 'Aura Control - Display Groups' L.General_ControlBaseTip = 'Set which display window to show this Aura Group in, or hide it from display entirely.' diff --git a/Settings.lua b/Settings.lua index 9dd719c..9a9ff01 100644 --- a/Settings.lua +++ b/Settings.lua @@ -808,6 +808,18 @@ tabPanelData = { end, }, { + type = 'checkbox', + name = L.General_PassiveEffectsAsPassive, + tooltip = L.General_PassiveEffectsAsPassiveTip, + getFunc = function() + return Srendarr.db.passiveEffectsAsPassive + end, + setFunc = function(v) + Srendarr.db.passiveEffectsAsPassive = v + Srendarr:ConfigureAuraHandler() + end, + }, + { type = 'dropdown', name = L.Group_Player_Toggled, tooltip = strformat('%s\n\n%s', L.General_ControlBaseTip, L.General_ControlToggledTip),