diff --git a/Bars.lua b/Bars.lua index 81953f4..6c918e1 100644 --- a/Bars.lua +++ b/Bars.lua @@ -237,6 +237,7 @@ MOD.BarGroupTemplate = { -- default bar group settings showSolo = true, showParty = true, showRaid = true, + showRaid5 = true, showCombat = true, showOOC = true, showStealth = true, @@ -3377,13 +3378,15 @@ end -- Each condition (e.g., "in combat") is checked and if true then that condition must be enabled for the bar group local function CheckShow(bp) local stat, pst = MOD.status, "solo" - if GetNumGroupMembers() > 0 then - if IsInRaid() then - pst = "raid" - else - pst = "party" - end - end + if GetNumGroupMembers() > 0 and IsInRaid() then + if GetNumGroupMembers() <= 5 then + pst = "raid5" + else + pst = "raid" + end + else + pst = "party" + end if InCinematic() @@ -3391,6 +3394,7 @@ local function CheckShow(bp) or (UnitOnTaxi("player") and not bp.showOnTaxi) or (pst == "solo" and not bp.showSolo) or (pst == "party" and not bp.showParty) + or (pst == "raid5" and not bp.showRaid5) or (pst == "raid" and not bp.showRaid) or (stat.inCombat and not bp.showCombat) or (not stat.inCombat and not bp.showOOC) diff --git a/Localizations/enUS.lua b/Localizations/enUS.lua index 7191a55..2e8fb52 100644 --- a/Localizations/enUS.lua +++ b/Localizations/enUS.lua @@ -91,6 +91,8 @@ L["Not In Group"] = true L["In Party"] = true L["Not In Party"] = true L["In Raid"] = true +L["In Raid > 5"] = true +L["In Raid <= 5"] = true L["Not In Raid"] = true L["In Instance"] = true L["Not In Instance"] = true @@ -569,7 +571,8 @@ L["Reset Spell"] = true L["Spell Alerts"] = true L["Enable showing spell alerts."] = true L["Show spell alerts when player is in an arena."] = true -L["Show spell alerts when player is in a raid group."] = true +L["Show spell alerts when player is in a raid group with greater than 5 members."] = true +L["Show spell alerts when player is in a raid group with 5 members or less."] = true L["Show spell alerts when player is in a party."] = true L["Show spell alerts when playing solo."] = true L["Show spell alerts when player is in an instance."] = true @@ -798,7 +801,8 @@ L["If checked, bar group is shown when focus is same as target."] = true L["Solo"] = true L["If checked, bar group is shown when the player is not in a party or raid."] = true L["If checked, bar group is shown when the player is in a party."] = true -L["If checked, bar group is shown when the player is in a raid."] = true +L["If checked, bar group is shown when the player is in a raid with greater than 5 members."] = true +L["If checked, bar group is shown when the player is in a raid with 5 members or less."] = true L["If checked, bar group is shown when the player is in a 5-man or raid instance."] = true L["If checked, bar group is shown when the player is not in a 5-man or raid instance."] = true L["If checked, bar group is shown when the player is in an arena."] = true diff --git a/Main.lua b/Main.lua index 8031c3a..352f844 100644 --- a/Main.lua +++ b/Main.lua @@ -1310,6 +1310,7 @@ function MOD:OnEnable() self:RegisterEvent("UNIT_PET") self:RegisterEvent("UNIT_TARGET") self:RegisterEvent("PLAYER_TARGET_CHANGED") + self:RegisterEvent("PLAYER_FOCUS_CHANGED") self:RegisterEvent("SPELLS_CHANGED") self:RegisterEvent("BAG_UPDATE_DELAYED") self:RegisterEvent("UNIT_INVENTORY_CHANGED") diff --git a/Raven_Options/Options.lua b/Raven_Options/Options.lua index 0aead96..4c97afa 100644 --- a/Raven_Options/Options.lua +++ b/Raven_Options/Options.lua @@ -6587,9 +6587,9 @@ MOD.OptionsTable = { ShowInRaid = { type = "toggle", order = 11, - name = L["In Raid"], + name = L["In Raid > 5"], width = "half", - desc = L["Show spell alerts when player is in a raid group."], + desc = L["Show spell alerts when player is in a raid group with greater than 5 members."], get = function(info) return MOD.db.global.SpellAlerts.showRaid end, @@ -6597,9 +6597,22 @@ MOD.OptionsTable = { MOD.db.global.SpellAlerts.showRaid = value end, }, - ShowInParty = { + ShowInRaid5 = { type = "toggle", order = 12, + name = L["In Raid <= 5"], + width = "half", + desc = L["Show spell alerts when player is in a raid group with 5 members or less."], + get = function(info) + return MOD.db.global.SpellAlerts.showRaid5 + end, + set = function(info, value) + MOD.db.global.SpellAlerts.showRaid5 = value + end, + }, + ShowInParty = { + type = "toggle", + order = 13, name = L["In Party"], width = "half", desc = L["Show spell alerts when player is in a party."], @@ -6612,7 +6625,7 @@ MOD.OptionsTable = { }, ShowSolo = { type = "toggle", - order = 13, + order = 14, name = L["Solo"], width = "half", desc = L["Show spell alerts when playing solo."], @@ -6625,7 +6638,7 @@ MOD.OptionsTable = { }, ShowNotInInstance = { type = "toggle", - order = 14, + order = 15, name = L["Not In Instance"], desc = L["Show spell alerts when player is not in an instance."], get = function(info) @@ -9856,8 +9869,8 @@ MOD.OptionsTable = { RaidGroup = { type = "toggle", order = 32, - name = L["In Raid"], - desc = L["If checked, bar group is shown when the player is in a raid."], + name = L["In Raid > 5"], + desc = L["If checked, bar group is shown when the player is in a raid with greater than 5 members."], get = function(info) return GetBarGroupField("showRaid") end, @@ -9865,9 +9878,21 @@ MOD.OptionsTable = { SetBarGroupField("showRaid", value) end, }, - BattlegroundGroup = { + RaidGroup5 = { type = "toggle", order = 33, + name = L["In Raid <= 5"], + desc = L["If checked, bar group is shown when the player is in a raid with 5 members or less."], + get = function(info) + return GetBarGroupField("showRaid5") + end, + set = function(info, value) + SetBarGroupField("showRaid5", value) + end, + }, + BattlegroundGroup = { + type = "toggle", + order = 34, name = L["In Battleground"], desc = L["If checked, bar group is shown when the player is in a battleground."], get = function(info) @@ -9879,7 +9904,7 @@ MOD.OptionsTable = { }, InstanceGroup = { type = "toggle", - order = 34, + order = 35, name = L["In Instance"], desc = L["If checked, bar group is shown when the player is in a 5-man or raid instance."], get = function(info) @@ -9891,7 +9916,7 @@ MOD.OptionsTable = { }, NotInstanceGroup = { type = "toggle", - order = 35, + order = 36, name = L["Not In Instance"], desc = L["If checked, bar group is shown when the player is not in a 5-man or raid instance."], get = function(info) @@ -9903,7 +9928,7 @@ MOD.OptionsTable = { }, ArenaGroup = { type = "toggle", - order = 36, + order = 37, name = L["In Arena"], desc = L["If checked, bar group is shown when the player is in an arena."], get = function(info) @@ -9915,7 +9940,7 @@ MOD.OptionsTable = { }, PetBattleGroup = { type = "toggle", - order = 37, + order = 38, name = L["In Pet Battle"], desc = L["If checked, bar group is shown when the player is in a pet battle."], get = function(info)