add lead/assist and maintank/mainassist load options

This commit is contained in:
NoM0Re
2024-07-07 05:34:25 +02:00
parent 1bf07b7fea
commit b7dac42f5a
14 changed files with 97 additions and 3 deletions
+28
View File
@@ -609,6 +609,16 @@ function WeakAuras.ValidateNumericOrPercent(info, val)
return true
end
function WeakAuras.CheckGroupMemberType(loadSetting, currentFlags)
if loadSetting == "LEADER" then
return bit.band(currentFlags, 1) == 1
elseif loadSetting == "ASSIST" then
return bit.band(currentFlags, 2) == 2
else
return currentFlags == 0
end
end
function WeakAuras.CheckChargesDirection(direction, triggerDirection)
return triggerDirection == "CHANGED"
or (triggerDirection == "GAINED" and direction > 0)
@@ -807,6 +817,14 @@ Private.load_prototype = {
optional = true,
events = {"VEHICLE_UPDATE", "UNIT_ENTERED_VEHICLE", "UNIT_EXITED_VEHICLE"}
},
{
name = "raid_role",
display = L["Raid Role"],
type = "multiselect",
values = "raid_role_types",
init = "arg",
events = {"PLAYER_ROLES_ASSIGNED"}
},
{
name = "ingroup",
display = L["Group Type"],
@@ -903,6 +921,16 @@ Private.load_prototype = {
init = "arg",
events = {"PLAYER_LEVEL_UP"}
},
{
name = "group_leader",
display = WeakAuras.newFeatureString .. L["Group Leader/Assist"],
type = "multiselect",
init = "arg",
events = {"PARTY_LEADER_CHANGED", "RAID_ROSTER_UPDATE"},
values = "group_member_types",
test = "WeakAuras.CheckGroupMemberType(%s, group_leader)",
optional = true,
},
{
name = "zone",
display = L["Zone Name"],