Backport event TRIGGER:x support from mainline
https://github.com/WeakAuras/WeakAuras2/commit/3ab97ddce48e6ba46b49a7fdb36a4efa2d1c935b#diff-06c2316487fbaca0f482a162e763ad96ce5624a012a6d5417653b2068d144dfdR119
This commit is contained in:
@@ -120,6 +120,15 @@ local function GetCustomTriggerOptions(data, triggernum)
|
||||
if not (OptionsPrivate.Private.baseUnitId[unit] and OptionsPrivate.Private.multiUnitId[unit]) and not string.find(unit, "^nameplate%d+$") then
|
||||
return "|cFFFF0000"..L["Unit %s is not a valid unit for RegisterUnitEvent"]:format(unit)
|
||||
end
|
||||
elseif trueEvent == "TRIGGER" then
|
||||
local requestedTriggernum = tonumber(i)
|
||||
if requestedTriggernum then
|
||||
if OptionsPrivate.Private.watched_trigger_events[data.id]
|
||||
and OptionsPrivate.Private.watched_trigger_events[data.id][triggernum]
|
||||
and OptionsPrivate.Private.watched_trigger_events[data.id][triggernum][requestedTriggernum] then
|
||||
return "|cFFFF0000"..L["Reciprocal TRIGGER:# requests will be ignored!"]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -151,6 +160,15 @@ local function GetCustomTriggerOptions(data, triggernum)
|
||||
if not (OptionsPrivate.Private.baseUnitId[unit] or string.find(unit, "^nameplate%d+$")) then
|
||||
return false
|
||||
end
|
||||
elseif trueEvent == "TRIGGER" then
|
||||
local requestedTriggernum = tonumber(i)
|
||||
if requestedTriggernum then
|
||||
if OptionsPrivate.Private.watched_trigger_events[data.id]
|
||||
and OptionsPrivate.Private.watched_trigger_events[data.id][triggernum]
|
||||
and OptionsPrivate.Private.watched_trigger_events[data.id][triggernum][requestedTriggernum] then
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -106,14 +106,20 @@ L["Crusader"] = "Crusader"
|
||||
L["Custom Code"] = "Custom Code"
|
||||
L["Custom Trigger"] = "Custom Trigger"
|
||||
L["Custom trigger event tooltip"] = [=[
|
||||
Choose which events cause the custom trigger to be checked.
|
||||
Multiple events can be specified using commas or spaces.
|
||||
Choose which events cause the custom trigger to be checked. Multiple events can be specified using commas or spaces.
|
||||
• "UNIT" events can use colons to define which unitIDs will be registered. In addition to UnitIDs Unit types can be used, they include "nameplate", "group", "raid", "party", "arena", "boss".
|
||||
• "CLEU" can be used instead of COMBAT_LOG_EVENT_UNFILTERED and colons can be used to separate specific "subEvents" you want to recieve.
|
||||
• The keyword "TRIGGER" can be used, with colons separating trigger numbers, to have the custom trigger get updated when the specified trigger(s) update.
|
||||
|
||||
|cFF4444FFFor example:|r
|
||||
UNIT_POWER_UPDATE, UNIT_AURA PLAYER_TARGET_CHANGED
|
||||
UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:SPELL_CAST_SUCCESS TRIGGER:3:1
|
||||
]=]
|
||||
L["Custom trigger status tooltip"] = [=[
|
||||
Choose which events cause the custom trigger to be checked.
|
||||
Choose which events cause the custom trigger to be checked. Multiple events can be specified using commas or spaces.
|
||||
• "UNIT" events can use colons to define which unitIDs will be registered. In addition to UnitIDs Unit types can be used, they include "nameplate", "group", "raid", "party", "arena", "boss".
|
||||
• "CLEU" can be used instead of COMBAT_LOG_EVENT_UNFILTERED and colons can be used to separate specific "subEvents" you want to recieve.
|
||||
• The keyword "TRIGGER" can be used, with colons separating trigger numbers, to have the custom trigger get updated when the specified trigger(s) update.
|
||||
|
||||
Since this is a status-type trigger, the specified events may be called by WeakAuras without the expected arguments.
|
||||
Multiple events can be specified using commas or spaces.
|
||||
|
||||
@@ -127,7 +133,7 @@ This can be different than the events defined for the trigger.
|
||||
Multiple events can be specified using commas or spaces.
|
||||
|
||||
|cFF4444FFFor example:|r
|
||||
UNIT_POWER_UPDATE, UNIT_AURA PLAYER_TARGET_CHANGED
|
||||
UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:SPELL_CAST_SUCCESS TRIGGER:3:1
|
||||
]=]
|
||||
L["Death"] = "Death"
|
||||
L["Death Rune"] = "Death Rune"
|
||||
|
||||
Reference in New Issue
Block a user