from retail
This commit is contained in:
@@ -55,15 +55,35 @@ local function getAuraMatchesList(name)
|
||||
end
|
||||
end
|
||||
|
||||
function WeakAuras.GetBuffConversionOptions(data, optionTriggerChoices)
|
||||
local trigger;
|
||||
if (not data.controlledChildren) then
|
||||
local triggernum = optionTriggerChoices[data.id];
|
||||
if (triggernum) then
|
||||
trigger = data.triggers[triggernum].trigger;
|
||||
end
|
||||
end
|
||||
local function GetBuffTriggerOptions(data, triggernum)
|
||||
local trigger= data.triggers[triggernum].trigger
|
||||
local spellCache = WeakAuras.spellCache;
|
||||
local ValidateNumeric = WeakAuras.ValidateNumeric;
|
||||
local aura_options = {
|
||||
convertToBuffTrigger2SpaceBeforeDesc = {
|
||||
type = "description",
|
||||
width = 0.4,
|
||||
order = 8.1,
|
||||
name = "",
|
||||
},
|
||||
convertToBuffTrigger2Desc = {
|
||||
type = "description",
|
||||
width = WeakAuras.doubleWidth - 0.8,
|
||||
order = 8.2,
|
||||
name = function()
|
||||
if (not WeakAuras.CanConvertBuffTrigger2) then
|
||||
return "";
|
||||
end
|
||||
local _, err = WeakAuras.CanConvertBuffTrigger2(trigger);
|
||||
return err or "";
|
||||
end,
|
||||
},
|
||||
convertToBuffTrigger2SpaceAfterDesc = {
|
||||
type = "description",
|
||||
width = 0.4,
|
||||
order = 8.3,
|
||||
name = "",
|
||||
},
|
||||
convertToBuffTrigger2SpaceBefore = {
|
||||
type = "description",
|
||||
width = 0.3,
|
||||
@@ -97,23 +117,10 @@ function WeakAuras.GetBuffConversionOptions(data, optionTriggerChoices)
|
||||
return err or ""
|
||||
end,
|
||||
func = function()
|
||||
if(data.controlledChildren) then
|
||||
for index, childId in pairs(data.controlledChildren) do
|
||||
local childData = WeakAuras.GetData(childId);
|
||||
local trigger = childData.triggers[optionTriggerChoices[childId]] and childData.triggers[optionTriggerChoices[childId]].trigger;
|
||||
if (trigger) then
|
||||
WeakAuras.ConvertBuffTrigger2(trigger);
|
||||
WeakAuras.Add(childData);
|
||||
WeakAuras.ReloadTriggerOptions(childData);
|
||||
end
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.ReloadTriggerOptions(data);
|
||||
else
|
||||
WeakAuras.ConvertBuffTrigger2(trigger);
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.ReloadTriggerOptions(data);
|
||||
end
|
||||
WeakAuras.ConvertBuffTrigger2(trigger);
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateDisplayButton(data)
|
||||
WeakAuras.ClearAndUpdateOptions(data.id);
|
||||
end
|
||||
},
|
||||
convertToBuffTrigger2SpaceAfter = {
|
||||
@@ -121,63 +128,8 @@ function WeakAuras.GetBuffConversionOptions(data, optionTriggerChoices)
|
||||
width = 0.3,
|
||||
order = 8.6,
|
||||
name = "",
|
||||
hidden = function()
|
||||
-- For those that update without restarting
|
||||
return not WeakAuras.CanConvertBuffTrigger2
|
||||
end,
|
||||
},
|
||||
convertToBuffTrigger2SpaceBeforeDesc = {
|
||||
type = "description",
|
||||
width = 0.4,
|
||||
order = 8.1,
|
||||
name = "",
|
||||
hidden = function()
|
||||
-- For those that update without restarting
|
||||
return not WeakAuras.CanConvertBuffTrigger2
|
||||
end,
|
||||
},
|
||||
convertToBuffTrigger2Desc = {
|
||||
type = "description",
|
||||
width = WeakAuras.doubleWidth - 0.8,
|
||||
order = 8.2,
|
||||
name = function()
|
||||
if (not WeakAuras.CanConvertBuffTrigger2) then
|
||||
return "";
|
||||
end
|
||||
local _, err = WeakAuras.CanConvertBuffTrigger2(trigger);
|
||||
return err or "";
|
||||
end,
|
||||
hidden = function()
|
||||
-- For those that update without restarting
|
||||
return not WeakAuras.CanConvertBuffTrigger2
|
||||
end,
|
||||
},
|
||||
convertToBuffTrigger2SpaceAfterDesc = {
|
||||
type = "description",
|
||||
width = 0.4,
|
||||
order = 8.3,
|
||||
name = "",
|
||||
hidden = function()
|
||||
-- For those that update without restarting
|
||||
return not WeakAuras.CanConvertBuffTrigger2
|
||||
end,
|
||||
},
|
||||
}
|
||||
return aura_options;
|
||||
end
|
||||
|
||||
local function GetBuffTriggerOptions(data, optionTriggerChoices)
|
||||
local trigger;
|
||||
if (not data.controlledChildren) then
|
||||
local triggernum = optionTriggerChoices[data.id];
|
||||
if (triggernum) then
|
||||
trigger = data.triggers[triggernum].trigger;
|
||||
end
|
||||
end
|
||||
|
||||
local spellCache = WeakAuras.spellCache;
|
||||
local ValidateNumeric = WeakAuras.ValidateNumeric;
|
||||
local aura_options = {
|
||||
fullscan = {
|
||||
type = "toggle",
|
||||
name = L["Use Full Scan (High CPU)"],
|
||||
@@ -240,7 +192,6 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
WeakAuras.UpdateDisplayButton(data);
|
||||
end,
|
||||
},
|
||||
@@ -294,7 +245,6 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
|
||||
else trigger.use_stealable = false end
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
end
|
||||
},
|
||||
use_spellId = {
|
||||
@@ -366,7 +316,6 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
WeakAuras.UpdateDisplayButton(data);
|
||||
end,
|
||||
},
|
||||
@@ -402,7 +351,6 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
WeakAuras.UpdateDisplayButton(data);
|
||||
end,
|
||||
},
|
||||
@@ -445,7 +393,6 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
WeakAuras.UpdateDisplayButton(data);
|
||||
end,
|
||||
},
|
||||
@@ -488,7 +435,6 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
WeakAuras.UpdateDisplayButton(data);
|
||||
end,
|
||||
},
|
||||
@@ -530,7 +476,6 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
WeakAuras.UpdateDisplayButton(data);
|
||||
end,
|
||||
},
|
||||
@@ -573,7 +518,6 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
WeakAuras.UpdateDisplayButton(data);
|
||||
end,
|
||||
},
|
||||
@@ -616,7 +560,6 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
WeakAuras.UpdateDisplayButton(data);
|
||||
end,
|
||||
},
|
||||
@@ -659,7 +602,6 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
WeakAuras.UpdateDisplayButton(data);
|
||||
end,
|
||||
},
|
||||
@@ -702,7 +644,6 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
WeakAuras.UpdateDisplayButton(data);
|
||||
end,
|
||||
},
|
||||
@@ -745,7 +686,6 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.UpdateThumbnail(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
WeakAuras.UpdateDisplayButton(data);
|
||||
end,
|
||||
},
|
||||
@@ -839,7 +779,6 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
|
||||
trigger.group_count = "";
|
||||
end
|
||||
WeakAuras.Add(data);
|
||||
WeakAuras.SetIconNames(data);
|
||||
WeakAuras.UpdateDisplayButton(data);
|
||||
end
|
||||
},
|
||||
@@ -1070,7 +1009,14 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
|
||||
},
|
||||
|
||||
};
|
||||
return aura_options;
|
||||
|
||||
WeakAuras.commonOptions.AddCommonTriggerOptions(aura_options, data, triggernum)
|
||||
WeakAuras.commonOptions.AddTriggerGetterSetter(aura_options, data, triggernum)
|
||||
WeakAuras.AddTriggerMetaFunctions(aura_options, data, triggernum)
|
||||
|
||||
return {
|
||||
["trigger." .. triggernum .. ".legacy_aura_options"] = aura_options
|
||||
}
|
||||
end
|
||||
|
||||
WeakAuras.RegisterTriggerSystemOptions({"aura"}, GetBuffTriggerOptions);
|
||||
|
||||
Reference in New Issue
Block a user