Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions Bars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ MOD.BarGroupTemplate = { -- default bar group settings
showSolo = true,
showParty = true,
showRaid = true,
showRaid5 = true,
showCombat = true,
showOOC = true,
showStealth = true,
Expand Down Expand Up @@ -3377,20 +3378,23 @@ 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()
or (MOD.ExpansionIsOrAbove(LE_EXPANSION_MISTS_OF_PANDARIA) and C_PetBattles.IsInBattle() and not bp.showPetBattle)
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)
Expand Down
8 changes: 6 additions & 2 deletions Localizations/enUS.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
49 changes: 37 additions & 12 deletions Raven_Options/Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6587,19 +6587,32 @@ 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,
set = function(info, value)
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."],
Expand All @@ -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."],
Expand All @@ -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)
Expand Down Expand Up @@ -9856,18 +9869,30 @@ 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,
set = function(info, value)
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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down