from retail
This commit is contained in:
+28
-27
@@ -2622,52 +2622,53 @@ end
|
||||
-- @return string of additional properties
|
||||
function BuffTrigger.GetAdditionalProperties(data, triggernum)
|
||||
local trigger = data.triggers[triggernum].trigger
|
||||
local props = {}
|
||||
props["spellId"] = L["Spell ID"]
|
||||
props["debuffClass"] = L["Debuff Class"]
|
||||
props["debuffClassIcon"] = L["Debuff Class Icon"]
|
||||
props["unitCaster"] = L["Caster Unit"]
|
||||
props["casterName"] = L["Caster Name"]
|
||||
|
||||
local ret = {"|cFFFFCC00%".. triggernum .. ".spellId|r - " .. L["Spell ID"] .. "\n"}
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".debuffClass|r - " .. L["Debuff Class"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".debuffClassIcon|r - " .. L["Debuff Class Icon"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".unitCaster|r - " .. L["Caster Unit"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".casterName|r - " .. L["Caster Name"] .. "\n")
|
||||
if trigger.unit ~= "multi" then
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".unit|r - " .. L["Unit"] .. "\n")
|
||||
props["unit"] = L["Unit"]
|
||||
end
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".unitName|r - " .. L["Unit Name"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".matchCount|r - " .. L["Match Count"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".matchCountPerUnit|r - " .. L["Match Count per Unit"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".unitCount|r - " .. L["Units Affected"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".totalStacks|r - " .. L["Total stacks over all matches"] .. "\n")
|
||||
props["unitName"] = L["Unit Name"]
|
||||
props["matchCount"] = L["Match Count"]
|
||||
props["matchCountPerUnit"] = L["Match Count per Unit"]
|
||||
props["unitCount"] = L["Units Affected"]
|
||||
props["totalStacks"] = L["Total stacks over all matches"]
|
||||
|
||||
if trigger.unit ~= "multi" then
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".maxUnitCount|r - " .. L["Total Units"] .. "\n")
|
||||
props["maxUnitCount"] = L["Total Units"]
|
||||
end
|
||||
|
||||
if not IsSingleMissing(trigger) and trigger.unit ~= "multi" and trigger.fetchTooltip then
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".tooltip|r - " .. L["Tooltip"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".tooltip1|r - " .. L["First Value of Tooltip Text"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".tooltip2|r - " .. L["Second Value of Tooltip Text"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".tooltip3|r - " .. L["Third Value of Tooltip Text"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".tooltip4|r - " .. L["Fourth Value of Tooltip Text"] .. "\n")
|
||||
props["tooltip"] = L["Tooltip"]
|
||||
props["tooltip1"] = L["First Value of Tooltip Text"]
|
||||
props["tooltip2"] = L["Second Value of Tooltip Text"]
|
||||
props["tooltip3"] = L["Third Value of Tooltip Text"]
|
||||
props["tooltip4"] = L["Fourth Value of Tooltip Text"]
|
||||
end
|
||||
|
||||
if trigger.unit ~= "multi" then
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".stackGainTime|r - " .. L["Since Stack Gain"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".stackLostTime|r - " .. L["Since Stack Lost"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".initialTime|r - " .. L["Since Apply"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".refreshTime|r - " .. L["Since Apply/Refresh"] .. "\n")
|
||||
props["stackGainTime"] = L["Since Stack Gain"]
|
||||
props["stackLostTime"] = L["Since Stack Lost"]
|
||||
props["initialTime"] = L["Since Apply"]
|
||||
props["refreshTime"] = L["Since Apply/Refresh"]
|
||||
end
|
||||
|
||||
if trigger.unit ~= "multi" and trigger.fetchRaidMark then
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".raidMark|r - " .. L["Raid Mark"] .. "\n")
|
||||
props["raidMark"] = L["Raid Mark"]
|
||||
end
|
||||
|
||||
if (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party") and trigger.useAffected then
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".affected|r - " .. L["Names of affected Players"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".unaffected|r - " .. L["Names of unaffected Players"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".affectedUnits|r - " .. L["Units of affected Players in a table format"] .. "\n")
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".unaffectedUnits|r - " .. L["Units of unaffected Players in a table format"] .. "\n")
|
||||
props["affected"] = L["Names of affected Players"]
|
||||
props["unaffected"] = L["Names of unaffected Players"]
|
||||
props["affectedUnits"] = L["Units of affected Players in a table format"]
|
||||
props["unaffectedUnits"] = L["Units of unaffected Players in a table format"]
|
||||
end
|
||||
|
||||
return table.concat(ret)
|
||||
return props
|
||||
end
|
||||
|
||||
function BuffTrigger.GetProgressSources(data, triggernum, values)
|
||||
|
||||
@@ -53,6 +53,12 @@ function TableHasAnyEntries(tbl)
|
||||
return false
|
||||
end
|
||||
|
||||
function tAppendAll(table, addedArray)
|
||||
for i, element in ipairs(addedArray) do
|
||||
tinsert(table, element);
|
||||
end
|
||||
end
|
||||
|
||||
function IsInGroup()
|
||||
return GetNumPartyMembers() > 0 or GetNumRaidMembers() > 0
|
||||
end
|
||||
|
||||
@@ -3826,7 +3826,7 @@ end
|
||||
|
||||
function GenericTrigger.GetAdditionalProperties(data, triggernum)
|
||||
local trigger = data.triggers[triggernum].trigger
|
||||
local ret = {""};
|
||||
local props = {}
|
||||
local prototype = GenericTrigger.GetPrototype(trigger)
|
||||
if prototype then
|
||||
for _, v in pairs(prototype.args) do
|
||||
@@ -3838,28 +3838,26 @@ function GenericTrigger.GetAdditionalProperties(data, triggernum)
|
||||
end
|
||||
|
||||
if (enable and v.store and v.name and v.display and v.conditionType ~= "bool") then
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. "." .. v.name .. "|r - " .. v.display .. "\n")
|
||||
props[v.name] = v.display
|
||||
end
|
||||
end
|
||||
if prototype.countEvents then
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. ".count|r - " .. L["Count"] .. "\n")
|
||||
props.count = L["Count"]
|
||||
end
|
||||
else
|
||||
if (trigger.custom_type == "stateupdate") then
|
||||
local variables = GenericTrigger.GetTsuConditionVariables(data.id, triggernum)
|
||||
if (type(variables) == "table") then
|
||||
for var, varData in pairs(variables) do
|
||||
if (type(varData) == "table") then
|
||||
if varData.display then
|
||||
table.insert(ret, "|cFFFFCC00%".. triggernum .. "." .. var .. "|r - " .. varData.display .. "\n")
|
||||
end
|
||||
if (type(varData) == "table") and varData.display then
|
||||
props[var] = varData.display
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return table.concat(ret);
|
||||
return props;
|
||||
end
|
||||
|
||||
function GenericTrigger.GetProgressSources(data, triggernum, values)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
+5
-15
@@ -3390,27 +3390,17 @@ Private.GetTriggerDescription = wrapTriggerSystemFunction("GetTriggerDescription
|
||||
local wrappedGetOverlayInfo = wrapTriggerSystemFunction("GetOverlayInfo", "table");
|
||||
|
||||
Private.GetAdditionalProperties = function(data)
|
||||
local additionalProperties = ""
|
||||
local props = {}
|
||||
for i = 1, #data.triggers do
|
||||
local triggerSystem = GetTriggerSystem(data, i);
|
||||
if (triggerSystem) then
|
||||
local add = triggerSystem.GetAdditionalProperties(data, i)
|
||||
if (add and add ~= "") then
|
||||
if additionalProperties ~= "" then
|
||||
additionalProperties = additionalProperties .. "\n"
|
||||
end
|
||||
additionalProperties = additionalProperties .. add;
|
||||
local triggerProps = triggerSystem.GetAdditionalProperties(data, i)
|
||||
if triggerProps then
|
||||
props[i] = triggerProps
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if additionalProperties ~= "" then
|
||||
additionalProperties = "\n\n"
|
||||
.. L["Additional Trigger Replacements"] .. "\n"
|
||||
.. additionalProperties .. "\n\n"
|
||||
.. L["The trigger number is optional, and uses the trigger providing dynamic information if not specified."]
|
||||
end
|
||||
return additionalProperties
|
||||
return props
|
||||
end
|
||||
|
||||
Private.GetProgressSources = function(data)
|
||||
|
||||
Reference in New Issue
Block a user