from retail
This commit is contained in:
@@ -2696,7 +2696,9 @@ function BuffTrigger.GetTriggerConditions(data, triggernum)
|
||||
}
|
||||
end
|
||||
|
||||
if not IsGroupTrigger(trigger) and trigger.matchesShowOn == "showAlways" then
|
||||
if not IsGroupTrigger(trigger) and trigger.matchesShowOn == "showAlways"
|
||||
or IsGroupTrigger(trigger) and trigger.showClones and trigger.unit ~= "multi" and trigger.combinePerUnit
|
||||
then
|
||||
result["buffed"] = {
|
||||
display = L["Aura(s) Found"],
|
||||
type = "bool",
|
||||
|
||||
@@ -853,6 +853,7 @@ function Private.RegisterForGlobalConditions(uid)
|
||||
if (not dynamicConditionsFrame.onUpdate) then
|
||||
dynamicConditionsFrame:SetScript("OnUpdate", handleDynamicConditionsOnUpdate);
|
||||
dynamicConditionsFrame.onUpdate = true;
|
||||
handleDynamicConditionsOnUpdate(dynamicConditionsFrame, event)
|
||||
end
|
||||
else
|
||||
local unitEvent, unit = event:match("([^:]+):([^:]+)")
|
||||
@@ -864,8 +865,10 @@ function Private.RegisterForGlobalConditions(uid)
|
||||
end
|
||||
dynamicConditionsFrame.units[unit].unit = unit;
|
||||
pcall(dynamicConditionsFrame.RegisterEvent, dynamicConditionsFrame.units[unit], unitEvent);
|
||||
handleDynamicConditionsPerUnit(dynamicConditionsFrame, event, unit)
|
||||
else
|
||||
pcall(dynamicConditionsFrame.RegisterEvent, dynamicConditionsFrame, event);
|
||||
handleDynamicConditions(dynamicConditionsFrame, event)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1410,14 +1410,19 @@ function GenericTrigger.Add(data, region)
|
||||
overlayFuncs = {};
|
||||
local dest = 1;
|
||||
for i, v in ipairs(prototype.overlayFuncs) do
|
||||
if (v.enable(trigger)) then
|
||||
local enable = true
|
||||
if type(v.enable) == "function" then
|
||||
enable = v.enable(trigger)
|
||||
elseif type(v.enable) == "boolean" then
|
||||
enable = v.enable
|
||||
end
|
||||
if enable then
|
||||
overlayFuncs[dest] = v.func;
|
||||
dest = dest + 1;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if (prototype.automaticrequired) then
|
||||
untriggerFunc = trueFunction
|
||||
elseif prototype.timedrequired then
|
||||
@@ -3789,7 +3794,13 @@ function GenericTrigger.GetOverlayInfo(data, triggernum)
|
||||
result = {};
|
||||
local dest = 1;
|
||||
for i, v in ipairs(Private.event_prototypes[trigger.event].overlayFuncs) do
|
||||
if (v.enable(trigger)) then
|
||||
local enable = true
|
||||
if type(v.enable) == "function" then
|
||||
enable = v.enable(trigger)
|
||||
elseif type(v.enable) == "boolean" then
|
||||
enable = v.enable
|
||||
end
|
||||
if enable then
|
||||
result[dest] = v.name;
|
||||
dest = dest + 1;
|
||||
end
|
||||
@@ -4209,6 +4220,7 @@ function GenericTrigger.CreateFallbackState(data, triggernum, state)
|
||||
state.expirationTime = math.huge;
|
||||
state.value = nil;
|
||||
state.total = nil;
|
||||
Private.ActivateAuraEnvironment(nil)
|
||||
return;
|
||||
end
|
||||
arg1 = type(arg1) == "number" and arg1 or 0;
|
||||
|
||||
@@ -945,6 +945,7 @@ Private.inverse_point_types = {
|
||||
|
||||
Private.anchor_frame_types = {
|
||||
SCREEN = L["Screen/Parent Group"],
|
||||
UIPARENT = L["Screen"],
|
||||
MOUSE = L["Mouse Cursor"],
|
||||
SELECTFRAME = L["Select Frame"],
|
||||
UNITFRAME = L["Unit Frames"],
|
||||
@@ -956,6 +957,7 @@ end
|
||||
|
||||
Private.anchor_frame_types_group = {
|
||||
SCREEN = L["Screen/Parent Group"],
|
||||
UIPARENT = L["Screen"],
|
||||
MOUSE = L["Mouse Cursor"],
|
||||
SELECTFRAME = L["Select Frame"],
|
||||
CUSTOM = L["Custom"]
|
||||
|
||||
@@ -3977,7 +3977,6 @@ end
|
||||
|
||||
local function evaluateTriggerStateTriggers(id)
|
||||
local result = false;
|
||||
Private.ActivateAuraEnvironment(id);
|
||||
|
||||
if WeakAuras.IsOptionsOpen() then
|
||||
-- While the options are open ignore the combination function
|
||||
@@ -3990,7 +3989,9 @@ local function evaluateTriggerStateTriggers(id)
|
||||
result = true;
|
||||
else
|
||||
if (triggerState[id].disjunctive == "custom" and triggerState[id].triggerLogicFunc) then
|
||||
Private.ActivateAuraEnvironment(id)
|
||||
local ok, returnValue = pcall(triggerState[id].triggerLogicFunc, triggerState[id].triggers);
|
||||
Private.ActivateAuraEnvironment()
|
||||
if not ok then
|
||||
Private.GetErrorHandlerId(id, L["Custom Trigger Combination"])
|
||||
result = false
|
||||
@@ -4000,8 +4001,6 @@ local function evaluateTriggerStateTriggers(id)
|
||||
end
|
||||
end
|
||||
|
||||
Private.ActivateAuraEnvironment();
|
||||
|
||||
return result;
|
||||
end
|
||||
|
||||
@@ -4989,6 +4988,10 @@ local function GetAnchorFrame(data, region, parent)
|
||||
return parent;
|
||||
end
|
||||
|
||||
if (anchorFrameType == "UIPARENT") then
|
||||
return UIParent;
|
||||
end
|
||||
|
||||
if (anchorFrameType == "MOUSE") then
|
||||
ensureMouseFrame();
|
||||
mouseFrame:anchorFrame(id, anchorFrameType);
|
||||
@@ -5080,7 +5083,7 @@ function Private.AnchorFrame(data, region, parent, force)
|
||||
local anchorParent = GetAnchorFrame(data, region, parent);
|
||||
if not anchorParent then return end
|
||||
if (data.anchorFrameParent or data.anchorFrameParent == nil
|
||||
or data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE") then
|
||||
or data.anchorFrameType == "SCREEN" or data.anchorFrameType == "UIPARENT" or data.anchorFrameType == "MOUSE") then
|
||||
local ok, ret = pcall(region.SetParent, region, anchorParent);
|
||||
if not ok then
|
||||
Private.GetErrorHandlerId(data.id, L["Anchoring"])
|
||||
@@ -5091,7 +5094,7 @@ function Private.AnchorFrame(data, region, parent, force)
|
||||
|
||||
local anchorPoint = data.anchorPoint
|
||||
if data.parent then
|
||||
if data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE" then
|
||||
if data.anchorFrameType == "SCREEN" or data.anchorFrameType == "UIPARENT" or data.anchorFrameType == "MOUSE" then
|
||||
anchorPoint = "CENTER"
|
||||
end
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user