fix libs not loading, use libgrouptalents, but still not working

This commit is contained in:
NoM0Re
2025-02-01 20:17:50 +01:00
parent fb09181ee7
commit 95a13c6896
57 changed files with 485 additions and 50 deletions
+59 -1
View File
@@ -1286,6 +1286,17 @@ local function AddWatchedUnits(triggerUnit, includePets, unitisunit)
end
end
local function AddUnitSpecChangeInternalEvents(triggerUnit, t)
if Private.multiUnitUnits[triggerUnit] then
for unit in pairs(Private.multiUnitUnits[triggerUnit]) do
local isPet = WeakAuras.UnitIsPet(unit)
if (not isPet) then
tinsert(t, "UNIT_SPEC_CHANGED_" .. string.lower(unit))
end
end
end
end
local function AddUnitRoleChangeInternalEvents(triggerUnit, t)
if (triggerUnit == nil) then
return
@@ -1463,7 +1474,9 @@ Private.event_prototypes = {
local unit = trigger.unit
local result = {}
AddUnitChangeInternalEvents(unit, result, nil, trigger.use_unitisunit and trigger.unitisunit or nil)
AddUnitRoleChangeInternalEvents(unit, result)
if trigger.use_specId then
AddUnitSpecChangeInternalEvents(unit, result)
end
return result
end,
loadFunc = function(trigger)
@@ -1555,6 +1568,19 @@ Private.event_prototypes = {
store = true,
conditionType = "select"
},
{
name = "specId",
display = L["Specialization"],
type = "multiselect",
init = "WeakAuras.SpecForUnit(unit)",
values = "spec_types_all",
store = true,
conditionType = "select",
enable = function(trigger)
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
end,
desc = L["Requires syncing the specialization via LibSpecialization."],
},
{
name = "classification",
display = L["Classification"],
@@ -1889,6 +1915,9 @@ Private.event_prototypes = {
if includePets ~= "PetsOnly" then
AddUnitRoleChangeInternalEvents(unit, result)
end
if trigger.use_specId then
AddUnitSpecChangeInternalEvents(unit, result)
end
return result
end,
loadFunc = function(trigger)
@@ -2062,6 +2091,19 @@ Private.event_prototypes = {
store = true,
conditionType = "select"
},
{
name = "specId",
display = L["Specialization"],
type = "multiselect",
init = "WeakAuras.SpecForUnit(unit)",
values = "spec_types_all",
store = true,
conditionType = "select",
enable = function(trigger)
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
end,
desc = L["Requires syncing the specialization via LibSpecialization."],
},
{
name = "raid_role",
display = L["Raid Role"],
@@ -2213,6 +2255,9 @@ Private.event_prototypes = {
if includePets ~= "PetsOnly" then
AddUnitRoleChangeInternalEvents(unit, result)
end
if trigger.use_specId then
AddUnitSpecChangeInternalEvents(unit, result)
end
return result
end,
loadFunc = function(trigger)
@@ -2417,6 +2462,19 @@ Private.event_prototypes = {
store = true,
conditionType = "select"
},
{
name = "specId",
display = L["Specialization"],
type = "multiselect",
init = "WeakAuras.SpecForUnit(unit)",
values = "spec_types_all",
store = true,
conditionType = "select",
enable = function(trigger)
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
end,
desc = L["Requires syncing the specialization via LibSpecialization."],
},
{
name = "raid_role",
display = L["Raid Role"],