(fix/Prototypes) Add inRange trigger properly to Prototypes too

(cherry picked from commit ade6cb124a76fbb5ebd1a91936f1cb188d70789f)
This commit is contained in:
NoM0Re
2025-10-24 09:20:00 +02:00
committed by andrew6180
parent be4564b8a0
commit 909a0e97f9
2 changed files with 48 additions and 4 deletions
+12 -3
View File
@@ -1640,6 +1640,9 @@ Private.event_prototypes = {
end,
loadFunc = function(trigger)
AddWatchedUnits(trigger.unit, nil, trigger.use_unitisunit and trigger.unitisunit or nil)
if trigger.use_inRange then
WeakAuras.WatchForPlayerInRange()
end
end,
force_events = unitHelperFunctions.UnitChangedForceEvents,
name = L["Unit Characteristics"],
@@ -1861,7 +1864,7 @@ Private.event_prototypes = {
enable = function(trigger)
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
end,
init = "UnitInRange(unit)"
init = "Private.ExecEnv.UnitInRangeFixed(unit)"
},
{
name = "hostility",
@@ -2301,6 +2304,9 @@ Private.event_prototypes = {
loadFunc = function(trigger)
local includePets = trigger.use_includePets == true and trigger.includePets or nil
AddWatchedUnits(trigger.unit, includePets)
if trigger.use_inRange then
WeakAuras.WatchForPlayerInRange()
end
end,
force_events = unitHelperFunctions.UnitChangedForceEventsWithPets,
name = L["Health"],
@@ -2607,7 +2613,7 @@ Private.event_prototypes = {
enable = function(trigger)
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
end,
init = "UnitInRange(unit)"
init = "Private.ExecEnv.UnitInRangeFixed(unit)"
},
{
name = "nameplateType",
@@ -2727,6 +2733,9 @@ Private.event_prototypes = {
end
local includePets = trigger.use_includePets == true and trigger.includePets or nil
AddWatchedUnits(trigger.unit, includePets)
if trigger.use_inRange then
WeakAuras.WatchForPlayerInRange()
end
end,
force_events = unitHelperFunctions.UnitChangedForceEventsWithPets,
name = L["Power"],
@@ -3109,7 +3118,7 @@ Private.event_prototypes = {
enable = function(trigger)
return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
end,
init = "UnitInRange(unit)"
init = "Private.ExecEnv.UnitInRangeFixed(unit)"
},
{
name = "nameplateType",