This commit is contained in:
Bunny67
2020-07-31 19:46:21 +03:00
parent 549b04ce78
commit 02c047002d
49 changed files with 850 additions and 451 deletions
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local WeakAuras = WeakAuras local WeakAuras = WeakAuras
local L = WeakAuras.L local L = WeakAuras.L
+1
View File
@@ -57,6 +57,7 @@ Returns the potential conditions for a trigger
]]-- ]]--
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
-- Lua APIs -- Lua APIs
local tinsert, wipe = table.insert, wipe local tinsert, wipe = table.insert, wipe
+1
View File
@@ -57,6 +57,7 @@ GetTriggerConditions(data, triggernum)
Returns the potential conditions for a trigger Returns the potential conditions for a trigger
]]-- ]]--
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
-- Lua APIs -- Lua APIs
local tinsert, wipe = table.insert, wipe local tinsert, wipe = table.insert, wipe
+1
View File
@@ -56,6 +56,7 @@ GetTriggerConditions(data, triggernum)
Returns potential conditions that this trigger provides. Returns potential conditions that this trigger provides.
]]-- ]]--
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
-- Lua APIs -- Lua APIs
local tinsert, tconcat, wipe = table.insert, table.concat, wipe local tinsert, tconcat, wipe = table.insert, table.concat, wipe
+1 -2
View File
@@ -1,6 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local WeakAuras = WeakAuras local WeakAuras = WeakAuras
+1 -4
View File
@@ -25,16 +25,13 @@ function WeakAuras.IsCorrectVersion()
end end
WeakAuras.prettyPrint = function(msg) WeakAuras.prettyPrint = function(msg)
print(WeakAuras.printPrefix .. msg) print("|cff9900ffWeakAuras:|r " .. msg)
end end
if versionString ~= versionStringFromToc and versionStringFromToc ~= "Dev" then if versionString ~= versionStringFromToc and versionStringFromToc ~= "Dev" then
WeakAuras.prettyPrint("You need to restart your game client to complete the WeakAuras update!") WeakAuras.prettyPrint("You need to restart your game client to complete the WeakAuras update!")
end end
WeakAuras.PowerAurasPath = "Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\"
WeakAuras.PowerAurasSoundPath = "Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Sounds\\"
-- Force enable WeakAurasCompanion and Archive because some addon managers interfere with it -- Force enable WeakAurasCompanion and Archive because some addon managers interfere with it
EnableAddOn("WeakAurasCompanion") EnableAddOn("WeakAurasCompanion")
EnableAddOn("WeakAurasArchive") EnableAddOn("WeakAurasArchive")
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local WeakAuras = WeakAuras local WeakAuras = WeakAuras
local L = WeakAuras.L local L = WeakAuras.L
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
-- Lua APIs -- Lua APIs
local tinsert, tsort = table.insert, table.sort local tinsert, tsort = table.insert, table.sort
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local SharedMedia = LibStub("LibSharedMedia-3.0"); local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L; local L = WeakAuras.L;
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local WeakAuras = WeakAuras local WeakAuras = WeakAuras
local SharedMedia = LibStub("LibSharedMedia-3.0") local SharedMedia = LibStub("LibSharedMedia-3.0")
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local SharedMedia = LibStub("LibSharedMedia-3.0"); local SharedMedia = LibStub("LibSharedMedia-3.0");
+2 -1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local SharedMedia = LibStub("LibSharedMedia-3.0"); local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L local L = WeakAuras.L
@@ -6,7 +7,7 @@ local MSQ, MSQ_Version = LibStub("Masque", true);
if MSQ then if MSQ then
if MSQ_Version <= 80100 then if MSQ_Version <= 80100 then
MSQ = nil MSQ = nil
print(print(WeakAuras.printPrefix .. L["Please upgrade your Masque version"])) WeakAuras.prettyPrint(L["Please upgrade your Masque version"])
else else
MSQ:AddType("WA_Aura", {"Icon", "Cooldown"}) MSQ:AddType("WA_Aura", {"Icon", "Cooldown"})
end end
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local SharedMedia = LibStub("LibSharedMedia-3.0"); local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L; local L = WeakAuras.L;
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local L = WeakAuras.L; local L = WeakAuras.L;
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local WeakAuras = WeakAuras; local WeakAuras = WeakAuras;
local L = WeakAuras.L; local L = WeakAuras.L;
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local SharedMedia = LibStub("LibSharedMedia-3.0"); local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L; local L = WeakAuras.L;
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local L = WeakAuras.L; local L = WeakAuras.L;
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local SharedMedia = LibStub("LibSharedMedia-3.0"); local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L; local L = WeakAuras.L;
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local SharedMedia = LibStub("LibSharedMedia-3.0"); local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L; local L = WeakAuras.L;
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local SharedMedia = LibStub("LibSharedMedia-3.0"); local SharedMedia = LibStub("LibSharedMedia-3.0");
local LCG = LibStub("LibCustomGlow-1.0") local LCG = LibStub("LibCustomGlow-1.0")
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local SharedMedia = LibStub("LibSharedMedia-3.0"); local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L; local L = WeakAuras.L;
+95 -3
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local SharedMedia = LibStub("LibSharedMedia-3.0"); local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L; local L = WeakAuras.L;
@@ -12,6 +13,14 @@ local default = function(parentType)
automatic_length = true, automatic_length = true,
tick_thickness = 2, tick_thickness = 2,
tick_length = 30, tick_length = 30,
use_texture = false,
tick_texture = [[Interface\CastingBar\UI-CastingBar-Spark]],
tick_blend_mode = "ADD",
tick_desaturate = false,
tick_rotation = 0,
tick_xOffset = 0,
tick_yOffset = 0,
tick_mirror = false,
} }
end end
@@ -61,6 +70,26 @@ local properties = {
bigStep = 1, bigStep = 1,
default = 30, default = 30,
}, },
tick_desaturate = {
display = L["Desaturate"],
setter = "SetTickDesaturated",
type = "bool",
default = true,
},
tick_rotation = {
display = L["Rotation"],
setter = "SetTickRotation",
type = "number",
min = 0,
max = 360,
default = 0,
},
tick_mirror = {
display = L["Mirror"],
setter = "SetTickMirror",
type = "bool",
default = true,
},
} }
local auraBarAnchor = { local auraBarAnchor = {
@@ -145,7 +174,12 @@ local funcs = {
end, end,
SetTickColor = function(self, r, g, b, a) SetTickColor = function(self, r, g, b, a)
self.tick_color[1], self.tick_color[2], self.tick_color[3], self.tick_color[4] = r, g, b, a or 1 self.tick_color[1], self.tick_color[2], self.tick_color[3], self.tick_color[4] = r, g, b, a or 1
self.texture:SetTexture(r, g, b, a or 1) if self.use_texture then
self.texture:SetVertexColor(r, g, b, a or 1)
self:UpdateTickDesaturated()
else
self.texture:SetTexture(r, g, b, a or 1)
end
end, end,
SetTickPlacementMode = function(self, placement_mode) SetTickPlacementMode = function(self, placement_mode)
if self.tick_placement_mode ~= placement_mode then if self.tick_placement_mode ~= placement_mode then
@@ -232,7 +266,7 @@ local funcs = {
end end
local side = inverse and auraBarAnchorInverse or auraBarAnchor local side = inverse and auraBarAnchorInverse or auraBarAnchor
self:ClearAllPoints() self:ClearAllPoints()
self:SetPoint("CENTER", self.parent.bar, side[self.orientation], offsetx, offsety) self:SetPoint("CENTER", self.parent.bar, side[self.orientation], offsetx + self.tick_xOffset, offsety + self.tick_yOffset)
end, end,
SetAutomaticLength = function(self, automatic_length) SetAutomaticLength = function(self, automatic_length)
if self.automatic_length ~= automatic_length then if self.automatic_length ~= automatic_length then
@@ -265,7 +299,52 @@ local funcs = {
else else
self:SetHeight(length) self:SetHeight(length)
end end
end end,
SetTickDesaturated = function(self, desaturate)
if self.use_texture and self.tick_desaturate ~= desaturate then
self.tick_desaturate = desaturate
self:UpdateTickDesaturated()
end
end,
UpdateTickDesaturated = function(self)
self.texture:SetDesaturated(self.tick_desaturate)
end,
SetTickRotation = function(self, degrees)
if self.tick_rotation ~= degrees then
self.tick_rotation = degrees
self:UpdateTickRotation()
end
end,
UpdateTickRotation = function(self)
local rad = math.rad(self.tick_rotation)
self.texture:SetRotation(rad)
end,
SetTickMirror = function(self, mirror)
if self.mirror ~= mirror then
self.mirror = mirror
self:UpdateTickMirror()
end
end,
UpdateTickMirror = function(self)
if self.mirror then
self.texture:SetTexCoord(0, 1, 1, 1, 0, 0, 1, 0)
else
self.texture:SetTexCoord(0, 0, 1, 0, 0, 1, 1, 1)
end
end,
SetTickBlendMode = function(self, mode)
if self.tick_blend_mode ~= mode then
self.tick_blend_mode = mode
self:UpdateTickBlendMode()
end
end,
UpdateTickBlendMode = function(self)
if self.use_texture then
self.texture:SetBlendMode(self.tick_blend_mode)
else
self.texture:SetBlendMode("BLEND")
end
end,
} }
local function modify(parent, region, parentData, data, first) local function modify(parent, region, parentData, data, first)
@@ -290,13 +369,26 @@ local function modify(parent, region, parentData, data, first)
region.automatic_length = data.automatic_length region.automatic_length = data.automatic_length
region.tick_thickness = data.tick_thickness region.tick_thickness = data.tick_thickness
region.tick_length = data.tick_length region.tick_length = data.tick_length
region.use_texture = data.use_texture
region.tick_texture = data.tick_texture
region.tick_xOffset = data.tick_xOffset
region.tick_yOffset = data.tick_yOffset
for k, v in pairs(funcs) do for k, v in pairs(funcs) do
region[k] = v region[k] = v
end end
if data.use_texture then
region.texture:SetTexture(data.tick_texture)
end
region:SetVisible(data.tick_visible) region:SetVisible(data.tick_visible)
region:SetTickColor(unpack(data.tick_color)) region:SetTickColor(unpack(data.tick_color))
region:SetTickDesaturated(data.tick_desaturate)
region:SetTickBlendMode(data.tick_blend_mode)
region:SetTickRotation(data.tick_rotation)
region:SetTickMirror(data.tick_mirror)
region:UpdateTickSize() region:UpdateTickSize()
+4 -109
View File
@@ -13,7 +13,7 @@ Converts the display id to a formatted table
SerializeTable(data) SerializeTable(data)
Converts the table data to a formatted table Converts the table data to a formatted table
ShowDisplayTooltip(data, children, icon, icons, import, compressed, alterdesc) ShowDisplayTooltip(data, children, icon, icons, import, compressed)
Shows a tooltip frame for an aura, which allows for importing if import is true Shows a tooltip frame for an aura, which allows for importing if import is true
Import(str, [target]) Import(str, [target])
@@ -22,6 +22,7 @@ If target is installed data, or is a uid which points to installed data, then th
]]-- ]]--
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
-- Lua APIs -- Lua APIs
local tinsert = table.insert local tinsert = table.insert
@@ -366,7 +367,7 @@ local function importPendingData()
regionOptions[thumbnailAnchor.currentThumbnailType].releaseThumbnail(thumbnailAnchor.currentThumbnail) regionOptions[thumbnailAnchor.currentThumbnailType].releaseThumbnail(thumbnailAnchor.currentThumbnail)
thumbnailAnchor.currentThumbnail = nil thumbnailAnchor.currentThumbnail = nil
end end
if imports and WeakAuras.LoadOptions() then if imports and Private.LoadOptions() then
WeakAuras.ShowOptions() WeakAuras.ShowOptions()
else else
return return
@@ -1421,7 +1422,7 @@ function WeakAuras.Update(data, diff)
end end
function WeakAuras.ShowDisplayTooltip(data, children, matchInfo, icon, icons, import, compressed, alterdesc) function WeakAuras.ShowDisplayTooltip(data, children, matchInfo, icon, icons, import, compressed)
-- since we have new data, wipe the old pending data -- since we have new data, wipe the old pending data
wipe(pendingData) wipe(pendingData)
@@ -1610,105 +1611,6 @@ function WeakAuras.ShowDisplayTooltip(data, children, matchInfo, icon, icons, im
end end
if alterdesc then -- TODO: simplify this. The frame doesn't need to be a field of ItemRefTooltip, for one.
if not(ItemRefTooltip.WeakAuras_Desc_Box) then
ItemRefTooltip.WeakAuras_Desc_Box = CreateFrame("frame", nil, ItemRefTooltip);
end
local descboxframe = ItemRefTooltip.WeakAuras_Desc_Box;
descboxframe:SetBackdrop({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
edgeSize = 16,
insets = {
left = 4,
right = 3,
top = 4,
bottom = 3
}
});
descboxframe:SetBackdropColor(0, 0, 0);
descboxframe:SetBackdropBorderColor(0.4, 0.4, 0.4);
if (alterdesc == "desc") then
descboxframe:SetHeight(80);
else
descboxframe:SetHeight(20);
end
descboxframe:SetWidth(260);
descboxframe:SetPoint("TOP", ItemRefTooltip, "BOTTOM");
descboxframe:Show();
local descbox = descboxframe.descbox;
if not(descbox) then
descbox = CreateFrame("editbox", nil, descboxframe);
descboxframe.descbox = descbox;
end
descbox:SetPoint("BOTTOMLEFT", descboxframe, "BOTTOMLEFT", 8, 8);
descbox:SetPoint("TOPRIGHT", descboxframe, "TOPRIGHT", -8, -8);
descbox:SetFont(STANDARD_TEXT_FONT, 12);
descbox:EnableMouse(true);
descbox:SetAutoFocus(false);
descbox:SetCountInvisibleLetters(false);
descbox:SetMultiLine(alterdesc == "desc");
if (alterdesc == "url") then
if (not descbox.label) then
local label = descbox:CreateFontString(nil, "BACKGROUND", "GameFontHighlightSmall");
label:SetPoint("TOPLEFT", descboxframe, "BOTTOMLEFT", 8, 0);
label:SetText(L["Press Ctrl+C to copy"]);
descbox.label = label;
end
descbox.label:Show();
else
if (descbox.label) then
descbox.label:Hide();
end
end
local text = data[alterdesc] and data[alterdesc] ~= "" and data[alterdesc] or "";
descbox:SetText(text);
descbox:SetScript("OnEscapePressed", function()
descbox:ClearFocus();
if (alterdesc == "url") then
return;
end
if(data.desc and data.desc ~= "") then
descbox:SetText(data.desc);
else
descbox:SetText("");
end
end);
descbox:SetScript("OnEnterPressed", function()
descbox:ClearFocus();
if (alterdesc == "url") then
return;
end
if(descbox:GetText() ~= "") then
data.desc = descbox:GetText();
else
data.desc = nil;
end
WeakAuras.ShowDisplayTooltip(data, children, nil, nil, nil, import, nil, "desc");
if(WeakAuras.GetDisplayButton) then
local button = WeakAuras.GetDisplayButton(data.id);
if(button) then
button:SetNormalTooltip();
end
end
end);
if (alterdesc == "url") then
descbox:SetScript("OnChar", function() descbox:SetText(text); descbox:HighlightText(); end);
descbox:SetScript("OnMouseUp", function() descbox:HighlightText(); end);
else
descbox:SetScript("OnChar", nil);
descbox:SetScript("OnMouseUp", nil);
end
descbox:Show();
elseif ItemRefTooltip.WeakAuras_Desc_Box then
ItemRefTooltip.WeakAuras_Desc_Box:Hide()
end
if not IsAddOnLoaded('WeakAurasOptions') then if not IsAddOnLoaded('WeakAurasOptions') then
LoadAddOn('WeakAurasOptions') LoadAddOn('WeakAurasOptions')
end end
@@ -1741,13 +1643,6 @@ function WeakAuras.ShowDisplayTooltip(data, children, matchInfo, icon, icons, im
end end
WeakAuras.GetData = RegularGetData or WeakAuras.GetData WeakAuras.GetData = RegularGetData or WeakAuras.GetData
ShowTooltip(tooltip, linesFromTop, matchInfo and matchInfo.activeCategories) ShowTooltip(tooltip, linesFromTop, matchInfo and matchInfo.activeCategories)
if alterdesc then
ItemRefTooltip.WeakAuras_Desc_Box.descbox:SetFocus();
if (alterdesc == "url") then
ItemRefTooltip.WeakAuras_Desc_Box.descbox:HighlightText();
end
end
end end
function WeakAuras.Import(inData, target) function WeakAuras.Import(inData, target)
+200 -203
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, Private = ...
local WeakAuras = WeakAuras; local WeakAuras = WeakAuras;
local L = WeakAuras.L; local L = WeakAuras.L;
@@ -241,7 +242,6 @@ WeakAuras.format_types = {
type = "range", type = "range",
name = L["Max Char "], name = L["Max Char "],
width = WeakAuras.normalWidth, width = WeakAuras.normalWidth,
hidden = hidden,
min = 1, min = 1,
max = 20, max = 20,
hidden = hidden, hidden = hidden,
@@ -363,7 +363,6 @@ WeakAuras.format_types = {
type = "range", type = "range",
name = L["Max Char "], name = L["Max Char "],
width = WeakAuras.normalWidth, width = WeakAuras.normalWidth,
hidden = hidden,
min = 1, min = 1,
max = 20, max = 20,
hidden = hidden, hidden = hidden,
@@ -1371,163 +1370,162 @@ WeakAuras.texture_types = {
} }
} }
if(WeakAuras.PowerAurasPath ~= "") then local PowerAurasPath = "Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\"
WeakAuras.texture_types["PowerAuras Heads-Up"] = { WeakAuras.texture_types["PowerAuras Heads-Up"] = {
[WeakAuras.PowerAurasPath.."Aura1"] = "Runed Text", [PowerAurasPath.."Aura1"] = "Runed Text",
[WeakAuras.PowerAurasPath.."Aura2"] = "Runed Text On Ring", [PowerAurasPath.."Aura2"] = "Runed Text On Ring",
[WeakAuras.PowerAurasPath.."Aura3"] = "Power Waves", [PowerAurasPath.."Aura3"] = "Power Waves",
[WeakAuras.PowerAurasPath.."Aura4"] = "Majesty", [PowerAurasPath.."Aura4"] = "Majesty",
[WeakAuras.PowerAurasPath.."Aura5"] = "Runed Ends", [PowerAurasPath.."Aura5"] = "Runed Ends",
[WeakAuras.PowerAurasPath.."Aura6"] = "Extra Majesty", [PowerAurasPath.."Aura6"] = "Extra Majesty",
[WeakAuras.PowerAurasPath.."Aura7"] = "Triangular Highlights", [PowerAurasPath.."Aura7"] = "Triangular Highlights",
[WeakAuras.PowerAurasPath.."Aura11"] = "Oblong Highlights", [PowerAurasPath.."Aura11"] = "Oblong Highlights",
[WeakAuras.PowerAurasPath.."Aura16"] = "Thin Crescents", [PowerAurasPath.."Aura16"] = "Thin Crescents",
[WeakAuras.PowerAurasPath.."Aura17"] = "Crescent Highlights", [PowerAurasPath.."Aura17"] = "Crescent Highlights",
[WeakAuras.PowerAurasPath.."Aura18"] = "Dense Runed Text", [PowerAurasPath.."Aura18"] = "Dense Runed Text",
[WeakAuras.PowerAurasPath.."Aura23"] = "Runed Spiked Ring", [PowerAurasPath.."Aura23"] = "Runed Spiked Ring",
[WeakAuras.PowerAurasPath.."Aura24"] = "Smoke", [PowerAurasPath.."Aura24"] = "Smoke",
[WeakAuras.PowerAurasPath.."Aura28"] = "Flourished Text", [PowerAurasPath.."Aura28"] = "Flourished Text",
[WeakAuras.PowerAurasPath.."Aura33"] = "Droplet Highlights" [PowerAurasPath.."Aura33"] = "Droplet Highlights"
} }
WeakAuras.texture_types["PowerAuras Icons"] = { WeakAuras.texture_types["PowerAuras Icons"] = {
[WeakAuras.PowerAurasPath.."Aura8"] = "Rune", [PowerAurasPath.."Aura8"] = "Rune",
[WeakAuras.PowerAurasPath.."Aura9"] = "Stylized Ghost", [PowerAurasPath.."Aura9"] = "Stylized Ghost",
[WeakAuras.PowerAurasPath.."Aura10"] = "Skull and Crossbones", [PowerAurasPath.."Aura10"] = "Skull and Crossbones",
[WeakAuras.PowerAurasPath.."Aura12"] = "Snowflake", [PowerAurasPath.."Aura12"] = "Snowflake",
[WeakAuras.PowerAurasPath.."Aura13"] = "Flame", [PowerAurasPath.."Aura13"] = "Flame",
[WeakAuras.PowerAurasPath.."Aura14"] = "Holy Rune", [PowerAurasPath.."Aura14"] = "Holy Rune",
[WeakAuras.PowerAurasPath.."Aura15"] = "Zig-Zag Exclamation Point", [PowerAurasPath.."Aura15"] = "Zig-Zag Exclamation Point",
[WeakAuras.PowerAurasPath.."Aura19"] = "Crossed Swords", [PowerAurasPath.."Aura19"] = "Crossed Swords",
[WeakAuras.PowerAurasPath.."Aura21"] = "Shield", [PowerAurasPath.."Aura21"] = "Shield",
[WeakAuras.PowerAurasPath.."Aura22"] = "Glow", [PowerAurasPath.."Aura22"] = "Glow",
[WeakAuras.PowerAurasPath.."Aura25"] = "Cross", [PowerAurasPath.."Aura25"] = "Cross",
[WeakAuras.PowerAurasPath.."Aura26"] = "Droplet", [PowerAurasPath.."Aura26"] = "Droplet",
[WeakAuras.PowerAurasPath.."Aura27"] = "Alert", [PowerAurasPath.."Aura27"] = "Alert",
[WeakAuras.PowerAurasPath.."Aura29"] = "Paw", [PowerAurasPath.."Aura29"] = "Paw",
[WeakAuras.PowerAurasPath.."Aura30"] = "Bull", [PowerAurasPath.."Aura30"] = "Bull",
-- [WeakAuras.PowerAurasPath.."Aura31"] = "Heiroglyphics Horizontal", -- [PowerAurasPath.."Aura31"] = "Heiroglyphics Horizontal",
[WeakAuras.PowerAurasPath.."Aura32"] = "Heiroglyphics", [PowerAurasPath.."Aura32"] = "Heiroglyphics",
[WeakAuras.PowerAurasPath.."Aura34"] = "Circled Arrow", [PowerAurasPath.."Aura34"] = "Circled Arrow",
[WeakAuras.PowerAurasPath.."Aura35"] = "Short Sword", [PowerAurasPath.."Aura35"] = "Short Sword",
-- [WeakAuras.PowerAurasPath.."Aura36"] = "Short Sword Horizontal", -- [PowerAurasPath.."Aura36"] = "Short Sword Horizontal",
[WeakAuras.PowerAurasPath.."Aura45"] = "Circular Glow", [PowerAurasPath.."Aura45"] = "Circular Glow",
[WeakAuras.PowerAurasPath.."Aura48"] = "Totem", [PowerAurasPath.."Aura48"] = "Totem",
[WeakAuras.PowerAurasPath.."Aura49"] = "Dragon Blade", [PowerAurasPath.."Aura49"] = "Dragon Blade",
[WeakAuras.PowerAurasPath.."Aura50"] = "Ornate Design", [PowerAurasPath.."Aura50"] = "Ornate Design",
[WeakAuras.PowerAurasPath.."Aura51"] = "Inverted Holy Rune", [PowerAurasPath.."Aura51"] = "Inverted Holy Rune",
[WeakAuras.PowerAurasPath.."Aura52"] = "Stylized Skull", [PowerAurasPath.."Aura52"] = "Stylized Skull",
[WeakAuras.PowerAurasPath.."Aura53"] = "Exclamation Point", [PowerAurasPath.."Aura53"] = "Exclamation Point",
[WeakAuras.PowerAurasPath.."Aura54"] = "Nonagon", [PowerAurasPath.."Aura54"] = "Nonagon",
[WeakAuras.PowerAurasPath.."Aura68"] = "Wings", [PowerAurasPath.."Aura68"] = "Wings",
[WeakAuras.PowerAurasPath.."Aura69"] = "Rectangle", [PowerAurasPath.."Aura69"] = "Rectangle",
[WeakAuras.PowerAurasPath.."Aura70"] = "Low Mana", [PowerAurasPath.."Aura70"] = "Low Mana",
[WeakAuras.PowerAurasPath.."Aura71"] = "Ghostly Eye", [PowerAurasPath.."Aura71"] = "Ghostly Eye",
[WeakAuras.PowerAurasPath.."Aura72"] = "Circle", [PowerAurasPath.."Aura72"] = "Circle",
[WeakAuras.PowerAurasPath.."Aura73"] = "Ring", [PowerAurasPath.."Aura73"] = "Ring",
[WeakAuras.PowerAurasPath.."Aura74"] = "Square", [PowerAurasPath.."Aura74"] = "Square",
[WeakAuras.PowerAurasPath.."Aura75"] = "Square Brackets", [PowerAurasPath.."Aura75"] = "Square Brackets",
[WeakAuras.PowerAurasPath.."Aura76"] = "Bob-omb", [PowerAurasPath.."Aura76"] = "Bob-omb",
[WeakAuras.PowerAurasPath.."Aura77"] = "Goldfish", [PowerAurasPath.."Aura77"] = "Goldfish",
[WeakAuras.PowerAurasPath.."Aura78"] = "Check", [PowerAurasPath.."Aura78"] = "Check",
[WeakAuras.PowerAurasPath.."Aura79"] = "Ghostly Face", [PowerAurasPath.."Aura79"] = "Ghostly Face",
[WeakAuras.PowerAurasPath.."Aura84"] = "Overlapping Boxes", [PowerAurasPath.."Aura84"] = "Overlapping Boxes",
-- [WeakAuras.PowerAurasPath.."Aura85"] = "Overlapping Boxes 45°", -- [PowerAurasPath.."Aura85"] = "Overlapping Boxes 45°",
-- [WeakAuras.PowerAurasPath.."Aura86"] = "Overlapping Boxes 270°", -- [PowerAurasPath.."Aura86"] = "Overlapping Boxes 270°",
[WeakAuras.PowerAurasPath.."Aura87"] = "Fairy", [PowerAurasPath.."Aura87"] = "Fairy",
[WeakAuras.PowerAurasPath.."Aura88"] = "Comet", [PowerAurasPath.."Aura88"] = "Comet",
[WeakAuras.PowerAurasPath.."Aura95"] = "Dual Spiral", [PowerAurasPath.."Aura95"] = "Dual Spiral",
[WeakAuras.PowerAurasPath.."Aura96"] = "Japanese Character", [PowerAurasPath.."Aura96"] = "Japanese Character",
[WeakAuras.PowerAurasPath.."Aura97"] = "Japanese Character", [PowerAurasPath.."Aura97"] = "Japanese Character",
[WeakAuras.PowerAurasPath.."Aura98"] = "Japanese Character", [PowerAurasPath.."Aura98"] = "Japanese Character",
[WeakAuras.PowerAurasPath.."Aura99"] = "Japanese Character", [PowerAurasPath.."Aura99"] = "Japanese Character",
[WeakAuras.PowerAurasPath.."Aura100"] = "Japanese Character", [PowerAurasPath.."Aura100"] = "Japanese Character",
[WeakAuras.PowerAurasPath.."Aura101"] = "Ball of Flame", [PowerAurasPath.."Aura101"] = "Ball of Flame",
[WeakAuras.PowerAurasPath.."Aura102"] = "Zig-Zag", [PowerAurasPath.."Aura102"] = "Zig-Zag",
[WeakAuras.PowerAurasPath.."Aura103"] = "Thorny Ring", [PowerAurasPath.."Aura103"] = "Thorny Ring",
[WeakAuras.PowerAurasPath.."Aura110"] = "Hunter's Mark", [PowerAurasPath.."Aura110"] = "Hunter's Mark",
-- [WeakAuras.PowerAurasPath.."Aura111"] = "Hunter's Mark Horizontal", -- [PowerAurasPath.."Aura111"] = "Hunter's Mark Horizontal",
[WeakAuras.PowerAurasPath.."Aura112"] = "Kaleidoscope", [PowerAurasPath.."Aura112"] = "Kaleidoscope",
[WeakAuras.PowerAurasPath.."Aura113"] = "Jesus Face", [PowerAurasPath.."Aura113"] = "Jesus Face",
[WeakAuras.PowerAurasPath.."Aura114"] = "Green Mushrrom", [PowerAurasPath.."Aura114"] = "Green Mushrrom",
[WeakAuras.PowerAurasPath.."Aura115"] = "Red Mushroom", [PowerAurasPath.."Aura115"] = "Red Mushroom",
[WeakAuras.PowerAurasPath.."Aura116"] = "Fire Flower", [PowerAurasPath.."Aura116"] = "Fire Flower",
[WeakAuras.PowerAurasPath.."Aura117"] = "Radioactive", [PowerAurasPath.."Aura117"] = "Radioactive",
[WeakAuras.PowerAurasPath.."Aura118"] = "X", [PowerAurasPath.."Aura118"] = "X",
[WeakAuras.PowerAurasPath.."Aura119"] = "Flower", [PowerAurasPath.."Aura119"] = "Flower",
[WeakAuras.PowerAurasPath.."Aura120"] = "Petal", [PowerAurasPath.."Aura120"] = "Petal",
[WeakAuras.PowerAurasPath.."Aura130"] = "Shoop Da Woop", [PowerAurasPath.."Aura130"] = "Shoop Da Woop",
[WeakAuras.PowerAurasPath.."Aura131"] = "8-Bit Symbol", [PowerAurasPath.."Aura131"] = "8-Bit Symbol",
[WeakAuras.PowerAurasPath.."Aura132"] = "Cartoon Skull", [PowerAurasPath.."Aura132"] = "Cartoon Skull",
[WeakAuras.PowerAurasPath.."Aura138"] = "Stop", [PowerAurasPath.."Aura138"] = "Stop",
[WeakAuras.PowerAurasPath.."Aura139"] = "Thumbs Up", [PowerAurasPath.."Aura139"] = "Thumbs Up",
[WeakAuras.PowerAurasPath.."Aura140"] = "Palette", [PowerAurasPath.."Aura140"] = "Palette",
[WeakAuras.PowerAurasPath.."Aura141"] = "Blue Ring", [PowerAurasPath.."Aura141"] = "Blue Ring",
[WeakAuras.PowerAurasPath.."Aura142"] = "Ornate Ring", [PowerAurasPath.."Aura142"] = "Ornate Ring",
[WeakAuras.PowerAurasPath.."Aura143"] = "Ghostly Skull" [PowerAurasPath.."Aura143"] = "Ghostly Skull"
} }
WeakAuras.texture_types["PowerAuras Separated"] = { WeakAuras.texture_types["PowerAuras Separated"] = {
[WeakAuras.PowerAurasPath.."Aura46"] = "8-Part Ring 1", [PowerAurasPath.."Aura46"] = "8-Part Ring 1",
[WeakAuras.PowerAurasPath.."Aura47"] = "8-Part Ring 2", [PowerAurasPath.."Aura47"] = "8-Part Ring 2",
[WeakAuras.PowerAurasPath.."Aura55"] = "Skull on Gear 1", [PowerAurasPath.."Aura55"] = "Skull on Gear 1",
[WeakAuras.PowerAurasPath.."Aura56"] = "Skull on Gear 2", [PowerAurasPath.."Aura56"] = "Skull on Gear 2",
[WeakAuras.PowerAurasPath.."Aura57"] = "Skull on Gear 3", [PowerAurasPath.."Aura57"] = "Skull on Gear 3",
[WeakAuras.PowerAurasPath.."Aura58"] = "Skull on Gear 4", [PowerAurasPath.."Aura58"] = "Skull on Gear 4",
[WeakAuras.PowerAurasPath.."Aura59"] = "Rune Ring Full", [PowerAurasPath.."Aura59"] = "Rune Ring Full",
[WeakAuras.PowerAurasPath.."Aura60"] = "Rune Ring Empty", [PowerAurasPath.."Aura60"] = "Rune Ring Empty",
[WeakAuras.PowerAurasPath.."Aura61"] = "Rune Ring Left", [PowerAurasPath.."Aura61"] = "Rune Ring Left",
[WeakAuras.PowerAurasPath.."Aura62"] = "Rune Ring Right", [PowerAurasPath.."Aura62"] = "Rune Ring Right",
[WeakAuras.PowerAurasPath.."Aura63"] = "Spiked Rune Ring Full", [PowerAurasPath.."Aura63"] = "Spiked Rune Ring Full",
[WeakAuras.PowerAurasPath.."Aura64"] = "Spiked Rune Ring Empty", [PowerAurasPath.."Aura64"] = "Spiked Rune Ring Empty",
[WeakAuras.PowerAurasPath.."Aura65"] = "Spiked Rune Ring Left", [PowerAurasPath.."Aura65"] = "Spiked Rune Ring Left",
[WeakAuras.PowerAurasPath.."Aura66"] = "Spiked Rune Ring Bottom", [PowerAurasPath.."Aura66"] = "Spiked Rune Ring Bottom",
[WeakAuras.PowerAurasPath.."Aura67"] = "Spiked Rune Ring Right", [PowerAurasPath.."Aura67"] = "Spiked Rune Ring Right",
[WeakAuras.PowerAurasPath.."Aura80"] = "Spiked Helm Background", [PowerAurasPath.."Aura80"] = "Spiked Helm Background",
[WeakAuras.PowerAurasPath.."Aura81"] = "Spiked Helm Full", [PowerAurasPath.."Aura81"] = "Spiked Helm Full",
[WeakAuras.PowerAurasPath.."Aura82"] = "Spiked Helm Bottom", [PowerAurasPath.."Aura82"] = "Spiked Helm Bottom",
[WeakAuras.PowerAurasPath.."Aura83"] = "Spiked Helm Top", [PowerAurasPath.."Aura83"] = "Spiked Helm Top",
[WeakAuras.PowerAurasPath.."Aura89"] = "5-Part Ring 1", [PowerAurasPath.."Aura89"] = "5-Part Ring 1",
[WeakAuras.PowerAurasPath.."Aura90"] = "5-Part Ring 2", [PowerAurasPath.."Aura90"] = "5-Part Ring 2",
[WeakAuras.PowerAurasPath.."Aura91"] = "5-Part Ring 3", [PowerAurasPath.."Aura91"] = "5-Part Ring 3",
[WeakAuras.PowerAurasPath.."Aura92"] = "5-Part Ring 4", [PowerAurasPath.."Aura92"] = "5-Part Ring 4",
[WeakAuras.PowerAurasPath.."Aura93"] = "5-Part Ring 5", [PowerAurasPath.."Aura93"] = "5-Part Ring 5",
[WeakAuras.PowerAurasPath.."Aura94"] = "5-Part Ring Full", [PowerAurasPath.."Aura94"] = "5-Part Ring Full",
[WeakAuras.PowerAurasPath.."Aura104"] = "Shield Center", [PowerAurasPath.."Aura104"] = "Shield Center",
[WeakAuras.PowerAurasPath.."Aura105"] = "Shield Full", [PowerAurasPath.."Aura105"] = "Shield Full",
[WeakAuras.PowerAurasPath.."Aura106"] = "Shield Top Right", [PowerAurasPath.."Aura106"] = "Shield Top Right",
[WeakAuras.PowerAurasPath.."Aura107"] = "Shiled Top Left", [PowerAurasPath.."Aura107"] = "Shiled Top Left",
[WeakAuras.PowerAurasPath.."Aura108"] = "Shield Bottom Right", [PowerAurasPath.."Aura108"] = "Shield Bottom Right",
[WeakAuras.PowerAurasPath.."Aura109"] = "Shield Bottom Left", [PowerAurasPath.."Aura109"] = "Shield Bottom Left",
[WeakAuras.PowerAurasPath.."Aura121"] = "Vine Top Right Leaf", [PowerAurasPath.."Aura121"] = "Vine Top Right Leaf",
[WeakAuras.PowerAurasPath.."Aura122"] = "Vine Left Leaf", [PowerAurasPath.."Aura122"] = "Vine Left Leaf",
[WeakAuras.PowerAurasPath.."Aura123"] = "Vine Bottom Right Leaf", [PowerAurasPath.."Aura123"] = "Vine Bottom Right Leaf",
[WeakAuras.PowerAurasPath.."Aura124"] = "Vine Stem", [PowerAurasPath.."Aura124"] = "Vine Stem",
[WeakAuras.PowerAurasPath.."Aura125"] = "Vine Thorns", [PowerAurasPath.."Aura125"] = "Vine Thorns",
[WeakAuras.PowerAurasPath.."Aura126"] = "3-Part Circle 1", [PowerAurasPath.."Aura126"] = "3-Part Circle 1",
[WeakAuras.PowerAurasPath.."Aura127"] = "3-Part Circle 2", [PowerAurasPath.."Aura127"] = "3-Part Circle 2",
[WeakAuras.PowerAurasPath.."Aura128"] = "3-Part Circle 3", [PowerAurasPath.."Aura128"] = "3-Part Circle 3",
[WeakAuras.PowerAurasPath.."Aura129"] = "3-Part Circle Full", [PowerAurasPath.."Aura129"] = "3-Part Circle Full",
[WeakAuras.PowerAurasPath.."Aura133"] = "Sliced Orb 1", [PowerAurasPath.."Aura133"] = "Sliced Orb 1",
[WeakAuras.PowerAurasPath.."Aura134"] = "Sliced Orb 2", [PowerAurasPath.."Aura134"] = "Sliced Orb 2",
[WeakAuras.PowerAurasPath.."Aura135"] = "Sliced Orb 3", [PowerAurasPath.."Aura135"] = "Sliced Orb 3",
[WeakAuras.PowerAurasPath.."Aura136"] = "Sliced Orb 4", [PowerAurasPath.."Aura136"] = "Sliced Orb 4",
[WeakAuras.PowerAurasPath.."Aura137"] = "Sliced Orb 5", [PowerAurasPath.."Aura137"] = "Sliced Orb 5",
[WeakAuras.PowerAurasPath.."Aura144"] = "Taijitu Bottom", [PowerAurasPath.."Aura144"] = "Taijitu Bottom",
[WeakAuras.PowerAurasPath.."Aura145"] = "Taijitu Top" [PowerAurasPath.."Aura145"] = "Taijitu Top"
} }
WeakAuras.texture_types["PowerAuras Words"] = { WeakAuras.texture_types["PowerAuras Words"] = {
[WeakAuras.PowerAurasPath.."Aura20"] = "Power", [PowerAurasPath.."Aura20"] = "Power",
[WeakAuras.PowerAurasPath.."Aura37"] = "Slow", [PowerAurasPath.."Aura37"] = "Slow",
[WeakAuras.PowerAurasPath.."Aura38"] = "Stun", [PowerAurasPath.."Aura38"] = "Stun",
[WeakAuras.PowerAurasPath.."Aura39"] = "Silence", [PowerAurasPath.."Aura39"] = "Silence",
[WeakAuras.PowerAurasPath.."Aura40"] = "Root", [PowerAurasPath.."Aura40"] = "Root",
[WeakAuras.PowerAurasPath.."Aura41"] = "Disorient", [PowerAurasPath.."Aura41"] = "Disorient",
[WeakAuras.PowerAurasPath.."Aura42"] = "Dispell", [PowerAurasPath.."Aura42"] = "Dispell",
[WeakAuras.PowerAurasPath.."Aura43"] = "Danger", [PowerAurasPath.."Aura43"] = "Danger",
[WeakAuras.PowerAurasPath.."Aura44"] = "Buff", [PowerAurasPath.."Aura44"] = "Buff",
[WeakAuras.PowerAurasPath.."Aura44"] = "Buff", [PowerAurasPath.."Aura44"] = "Buff",
["Interface\\AddOns\\WeakAuras\\Media\\Textures\\interrupt"] = "Interrupt" ["Interface\\AddOns\\WeakAuras\\Media\\Textures\\interrupt"] = "Interrupt"
} }
end
WeakAuras.operator_types = { WeakAuras.operator_types = {
["=="] = "=", ["=="] = "=",
@@ -1909,50 +1907,49 @@ LSM:Register("sound", "Voice: Taunt", "Interface\\AddOns\\WeakAuras\\Media\\Soun
LSM:Register("sound", "Voice: Triangle", "Interface\\AddOns\\WeakAuras\\Media\\Sounds\\Triangle.ogg") LSM:Register("sound", "Voice: Triangle", "Interface\\AddOns\\WeakAuras\\Media\\Sounds\\Triangle.ogg")
if(WeakAuras.PowerAurasSoundPath ~= "") then local PowerAurasSoundPath = "Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Sounds\\"
LSM:Register("sound", "Aggro", WeakAuras.PowerAurasSoundPath.."aggro.ogg") LSM:Register("sound", "Aggro", PowerAurasSoundPath.."aggro.ogg")
LSM:Register("sound", "Arrow Swoosh", WeakAuras.PowerAurasSoundPath.."Arrow_swoosh.ogg") LSM:Register("sound", "Arrow Swoosh", PowerAurasSoundPath.."Arrow_swoosh.ogg")
LSM:Register("sound", "Bam", WeakAuras.PowerAurasSoundPath.."bam.ogg") LSM:Register("sound", "Bam", PowerAurasSoundPath.."bam.ogg")
LSM:Register("sound", "Polar Bear", WeakAuras.PowerAurasSoundPath.."bear_polar.ogg") LSM:Register("sound", "Polar Bear", PowerAurasSoundPath.."bear_polar.ogg")
LSM:Register("sound", "Big Kiss", WeakAuras.PowerAurasSoundPath.."bigkiss.ogg") LSM:Register("sound", "Big Kiss", PowerAurasSoundPath.."bigkiss.ogg")
LSM:Register("sound", "Bite", WeakAuras.PowerAurasSoundPath.."BITE.ogg") LSM:Register("sound", "Bite", PowerAurasSoundPath.."BITE.ogg")
LSM:Register("sound", "Burp", WeakAuras.PowerAurasSoundPath.."burp4.ogg") LSM:Register("sound", "Burp", PowerAurasSoundPath.."burp4.ogg")
LSM:Register("sound", "Cat", WeakAuras.PowerAurasSoundPath.."cat2.ogg") LSM:Register("sound", "Cat", PowerAurasSoundPath.."cat2.ogg")
LSM:Register("sound", "Chant Major 2nd", WeakAuras.PowerAurasSoundPath.."chant2.ogg") LSM:Register("sound", "Chant Major 2nd", PowerAurasSoundPath.."chant2.ogg")
LSM:Register("sound", "Chant Minor 3rd", WeakAuras.PowerAurasSoundPath.."chant4.ogg") LSM:Register("sound", "Chant Minor 3rd", PowerAurasSoundPath.."chant4.ogg")
LSM:Register("sound", "Chimes", WeakAuras.PowerAurasSoundPath.."chimes.ogg") LSM:Register("sound", "Chimes", PowerAurasSoundPath.."chimes.ogg")
LSM:Register("sound", "Cookie Monster", WeakAuras.PowerAurasSoundPath.."cookie.ogg") LSM:Register("sound", "Cookie Monster", PowerAurasSoundPath.."cookie.ogg")
LSM:Register("sound", "Electrical Spark", WeakAuras.PowerAurasSoundPath.."ESPARK1.ogg") LSM:Register("sound", "Electrical Spark", PowerAurasSoundPath.."ESPARK1.ogg")
LSM:Register("sound", "Fireball", WeakAuras.PowerAurasSoundPath.."Fireball.ogg") LSM:Register("sound", "Fireball", PowerAurasSoundPath.."Fireball.ogg")
LSM:Register("sound", "Gasp", WeakAuras.PowerAurasSoundPath.."Gasp.ogg") LSM:Register("sound", "Gasp", PowerAurasSoundPath.."Gasp.ogg")
LSM:Register("sound", "Heartbeat", WeakAuras.PowerAurasSoundPath.."heartbeat.ogg") LSM:Register("sound", "Heartbeat", PowerAurasSoundPath.."heartbeat.ogg")
LSM:Register("sound", "Hiccup", WeakAuras.PowerAurasSoundPath.."hic3.ogg") LSM:Register("sound", "Hiccup", PowerAurasSoundPath.."hic3.ogg")
LSM:Register("sound", "Huh?", WeakAuras.PowerAurasSoundPath.."huh_1.ogg") LSM:Register("sound", "Huh?", PowerAurasSoundPath.."huh_1.ogg")
LSM:Register("sound", "Hurricane", WeakAuras.PowerAurasSoundPath.."hurricane.ogg") LSM:Register("sound", "Hurricane", PowerAurasSoundPath.."hurricane.ogg")
LSM:Register("sound", "Hyena", WeakAuras.PowerAurasSoundPath.."hyena.ogg") LSM:Register("sound", "Hyena", PowerAurasSoundPath.."hyena.ogg")
LSM:Register("sound", "Kaching", WeakAuras.PowerAurasSoundPath.."kaching.ogg") LSM:Register("sound", "Kaching", PowerAurasSoundPath.."kaching.ogg")
LSM:Register("sound", "Moan", WeakAuras.PowerAurasSoundPath.."moan.ogg") LSM:Register("sound", "Moan", PowerAurasSoundPath.."moan.ogg")
LSM:Register("sound", "Panther", WeakAuras.PowerAurasSoundPath.."panther1.ogg") LSM:Register("sound", "Panther", PowerAurasSoundPath.."panther1.ogg")
LSM:Register("sound", "Phone", WeakAuras.PowerAurasSoundPath.."phone.ogg") LSM:Register("sound", "Phone", PowerAurasSoundPath.."phone.ogg")
LSM:Register("sound", "Punch", WeakAuras.PowerAurasSoundPath.."PUNCH.ogg") LSM:Register("sound", "Punch", PowerAurasSoundPath.."PUNCH.ogg")
LSM:Register("sound", "Rain", WeakAuras.PowerAurasSoundPath.."rainroof.ogg") LSM:Register("sound", "Rain", PowerAurasSoundPath.."rainroof.ogg")
LSM:Register("sound", "Rocket", WeakAuras.PowerAurasSoundPath.."rocket.ogg") LSM:Register("sound", "Rocket", PowerAurasSoundPath.."rocket.ogg")
LSM:Register("sound", "Ship's Whistle", WeakAuras.PowerAurasSoundPath.."shipswhistle.ogg") LSM:Register("sound", "Ship's Whistle", PowerAurasSoundPath.."shipswhistle.ogg")
LSM:Register("sound", "Gunshot", WeakAuras.PowerAurasSoundPath.."shot.ogg") LSM:Register("sound", "Gunshot", PowerAurasSoundPath.."shot.ogg")
LSM:Register("sound", "Snake Attack", WeakAuras.PowerAurasSoundPath.."snakeatt.ogg") LSM:Register("sound", "Snake Attack", PowerAurasSoundPath.."snakeatt.ogg")
LSM:Register("sound", "Sneeze", WeakAuras.PowerAurasSoundPath.."sneeze.ogg") LSM:Register("sound", "Sneeze", PowerAurasSoundPath.."sneeze.ogg")
LSM:Register("sound", "Sonar", WeakAuras.PowerAurasSoundPath.."sonar.ogg") LSM:Register("sound", "Sonar", PowerAurasSoundPath.."sonar.ogg")
LSM:Register("sound", "Splash", WeakAuras.PowerAurasSoundPath.."splash.ogg") LSM:Register("sound", "Splash", PowerAurasSoundPath.."splash.ogg")
LSM:Register("sound", "Squeaky Toy", WeakAuras.PowerAurasSoundPath.."Squeakypig.ogg") LSM:Register("sound", "Squeaky Toy", PowerAurasSoundPath.."Squeakypig.ogg")
LSM:Register("sound", "Sword Ring", WeakAuras.PowerAurasSoundPath.."swordecho.ogg") LSM:Register("sound", "Sword Ring", PowerAurasSoundPath.."swordecho.ogg")
LSM:Register("sound", "Throwing Knife", WeakAuras.PowerAurasSoundPath.."throwknife.ogg") LSM:Register("sound", "Throwing Knife", PowerAurasSoundPath.."throwknife.ogg")
LSM:Register("sound", "Thunder", WeakAuras.PowerAurasSoundPath.."thunder.ogg") LSM:Register("sound", "Thunder", PowerAurasSoundPath.."thunder.ogg")
LSM:Register("sound", "Wicked Male Laugh", WeakAuras.PowerAurasSoundPath.."wickedmalelaugh1.ogg") LSM:Register("sound", "Wicked Male Laugh", PowerAurasSoundPath.."wickedmalelaugh1.ogg")
LSM:Register("sound", "Wilhelm Scream", WeakAuras.PowerAurasSoundPath.."wilhelm.ogg") LSM:Register("sound", "Wilhelm Scream", PowerAurasSoundPath.."wilhelm.ogg")
LSM:Register("sound", "Wicked Female Laugh", WeakAuras.PowerAurasSoundPath.."wlaugh.ogg") LSM:Register("sound", "Wicked Female Laugh", PowerAurasSoundPath.."wlaugh.ogg")
LSM:Register("sound", "Wolf Howl", WeakAuras.PowerAurasSoundPath.."wolf5.ogg") LSM:Register("sound", "Wolf Howl", PowerAurasSoundPath.."wolf5.ogg")
LSM:Register("sound", "Yeehaw", WeakAuras.PowerAurasSoundPath.."yeehaw.ogg") LSM:Register("sound", "Yeehaw", PowerAurasSoundPath.."yeehaw.ogg")
end
WeakAuras.sound_types = { WeakAuras.sound_types = {
[" custom"] = " " .. L["Custom"], [" custom"] = " " .. L["Custom"],
+77 -57
View File
@@ -1,3 +1,5 @@
local AddonName, Private = ...
local internalVersion = 33; local internalVersion = 33;
-- Lua APIs -- Lua APIs
@@ -59,7 +61,7 @@ function WeakAuras.InternalVersion()
return internalVersion; return internalVersion;
end end
function WeakAuras.LoadOptions(msg) function Private.LoadOptions(msg)
if not(IsAddOnLoaded("WeakAurasOptions")) then if not(IsAddOnLoaded("WeakAurasOptions")) then
if not WeakAuras.IsLoginFinished() then if not WeakAuras.IsLoginFinished() then
prettyPrint(WeakAuras.LoginMessage()) prettyPrint(WeakAuras.LoginMessage())
@@ -74,7 +76,7 @@ function WeakAuras.LoadOptions(msg)
local loaded, reason = LoadAddOn("WeakAurasOptions"); local loaded, reason = LoadAddOn("WeakAurasOptions");
if not(loaded) then if not(loaded) then
reason = string.lower("|cffff2020" .. _G["ADDON_" .. reason] .. "|r.") reason = string.lower("|cffff2020" .. _G["ADDON_" .. reason] .. "|r.")
print(WeakAuras.printPrefix .. "Options could not be loaded, the addon is " .. reason); WeakAuras.prettyPrint("Options could not be loaded, the addon is " .. reason);
return false; return false;
end end
end end
@@ -85,12 +87,12 @@ end
function WeakAuras.OpenOptions(msg) function WeakAuras.OpenOptions(msg)
if WeakAuras.NeedToRepairDatabase() then if WeakAuras.NeedToRepairDatabase() then
StaticPopup_Show("WEAKAURAS_CONFIRM_REPAIR", nil, nil, {reason = "downgrade"}) StaticPopup_Show("WEAKAURAS_CONFIRM_REPAIR", nil, nil, {reason = "downgrade"})
elseif (WeakAuras.IsLoginFinished() and WeakAuras.LoadOptions(msg)) then elseif (WeakAuras.IsLoginFinished() and Private.LoadOptions(msg)) then
WeakAuras.ToggleOptions(msg); WeakAuras.ToggleOptions(msg);
end end
end end
function WeakAuras.PrintHelp() function Private.PrintHelp()
print(L["Usage:"]) print(L["Usage:"])
print(L["/wa help - Show this message"]) print(L["/wa help - Show this message"])
print(L["/wa minimap - Toggle the minimap icon"]) print(L["/wa minimap - Toggle the minimap icon"])
@@ -120,9 +122,9 @@ function SlashCmdList.WEAKAURAS(input)
elseif msg == "pcancel" then elseif msg == "pcancel" then
WeakAuras.CancelScheduledProfile() WeakAuras.CancelScheduledProfile()
elseif msg == "minimap" then elseif msg == "minimap" then
WeakAuras.ToggleMinimap(); Private.ToggleMinimap();
elseif msg == "help" then elseif msg == "help" then
WeakAuras.PrintHelp(); Private.PrintHelp();
elseif msg == "repair" then elseif msg == "repair" then
StaticPopup_Show("WEAKAURAS_CONFIRM_REPAIR", nil, nil, {reason = "user"}) StaticPopup_Show("WEAKAURAS_CONFIRM_REPAIR", nil, nil, {reason = "user"})
else else
@@ -143,7 +145,7 @@ function WeakAuras.ApplyToDataOrChildData(data, func, ...)
end end
end end
function WeakAuras.ToggleMinimap() function Private.ToggleMinimap()
WeakAurasSaved.minimap.hide = not WeakAurasSaved.minimap.hide WeakAurasSaved.minimap.hide = not WeakAurasSaved.minimap.hide
if WeakAurasSaved.minimap.hide then if WeakAurasSaved.minimap.hide then
LDBIcon:Hide("WeakAuras"); LDBIcon:Hide("WeakAuras");
@@ -169,10 +171,6 @@ local registeredFromAddons;
WeakAuras.addons = {}; WeakAuras.addons = {};
local addons = WeakAuras.addons; local addons = WeakAuras.addons;
-- A list of tutorials, filled in by the WeakAuras_Tutorials addon by calling RegisterTutorial
WeakAuras.tutorials = {};
local tutorials = WeakAuras.tutorials;
-- used if an addon tries to register a display under an id that the user already has a display with that id -- used if an addon tries to register a display under an id that the user already has a display with that id
WeakAuras.collisions = {}; WeakAuras.collisions = {};
local collisions = WeakAuras.collisions; local collisions = WeakAuras.collisions;
@@ -908,6 +906,19 @@ local function CreateTestForCondition(uid, input, allConditionsTemplate, usedSta
check = string.format("state and WeakAuras.CallCustomConditionTest(%q, %s, state[%s], %s, %s, %s)", check = string.format("state and WeakAuras.CallCustomConditionTest(%q, %s, state[%s], %s, %s, %s)",
uid, testFunctionNumber, trigger, valueString, (opString or "nil"), preambleString or "nil"); uid, testFunctionNumber, trigger, valueString, (opString or "nil"), preambleString or "nil");
end end
elseif (cType == "customcheck") then
if value then
local customCheck = WeakAuras.LoadFunction("return " .. value, "custom check")
if customCheck then
WeakAuras.conditionHelpers[uid] = WeakAuras.conditionHelpers[uid] or {}
WeakAuras.conditionHelpers[uid].customTestFunctions = WeakAuras.conditionHelpers[uid].customTestFunctions or {}
tinsert(WeakAuras.conditionHelpers[uid].customTestFunctions, customCheck);
local testFunctionNumber = #(WeakAuras.conditionHelpers[uid].customTestFunctions);
check = string.format("state and WeakAuras.CallCustomConditionTest(%q, %s, state)",
uid, testFunctionNumber, trigger);
end
end
elseif (cType == "number" and op) then elseif (cType == "number" and op) then
local v = tonumber(value) local v = tonumber(value)
if (v) then if (v) then
@@ -1212,6 +1223,10 @@ local globalConditions =
state.attackabletarget = UnitCanAttack("player", "target") == 1 and true or false; state.attackabletarget = UnitCanAttack("player", "target") == 1 and true or false;
end end
}, },
["customcheck"] = {
display = L["Custom Check"],
type = "customcheck"
}
} }
function WeakAuras.GetGlobalConditions() function WeakAuras.GetGlobalConditions()
@@ -1362,6 +1377,16 @@ local function EvaluateCheckForRegisterForGlobalConditions(id, check, allConditi
EvaluateCheckForRegisterForGlobalConditions(id, subcheck, allConditionsTemplate, register); EvaluateCheckForRegisterForGlobalConditions(id, subcheck, allConditionsTemplate, register);
end end
end end
elseif trigger == -1 and variable == "customcheck" then
if check.op then
for event in string.gmatch(check.op, "[%w_]+") do
if (not dynamicConditions[event]) then
register[event] = true;
dynamicConditions[event] = {};
end
dynamicConditions[event][id] = true;
end
end
elseif (trigger and variable) then elseif (trigger and variable) then
local conditionTemplate = allConditionsTemplate[trigger] and allConditionsTemplate[trigger][variable]; local conditionTemplate = allConditionsTemplate[trigger] and allConditionsTemplate[trigger][variable];
if (conditionTemplate and conditionTemplate.events) then if (conditionTemplate and conditionTemplate.events) then
@@ -1414,7 +1439,7 @@ function WeakAuras.RegisterForGlobalConditions(id)
dynamicConditionsFrame.onUpdate = true; dynamicConditionsFrame.onUpdate = true;
end end
else else
dynamicConditionsFrame:RegisterEvent(event); pcall(dynamicConditionsFrame.RegisterEvent, dynamicConditionsFrame, event);
end end
end end
end end
@@ -1530,7 +1555,7 @@ Broker_WeakAuras = LDB:NewDataObject("WeakAuras", {
WeakAuras.OpenOptions(); WeakAuras.OpenOptions();
end end
elseif(button == 'MiddleButton') then elseif(button == 'MiddleButton') then
WeakAuras.ToggleMinimap(); Private.ToggleMinimap();
else else
WeakAuras.RealTimeProfilingWindow:Toggle() WeakAuras.RealTimeProfilingWindow:Toggle()
end end
@@ -2433,6 +2458,9 @@ function WeakAuras.Rename(data, newid)
WeakAuras.ProfileRenameAura(oldid, newid); WeakAuras.ProfileRenameAura(oldid, newid);
WeakAuras.RenameCollapsedData(oldid, newid) WeakAuras.RenameCollapsedData(oldid, newid)
-- This should not be necessary
WeakAuras.Add(data)
end end
function WeakAuras.Convert(data, newType) function WeakAuras.Convert(data, newType)
@@ -5664,17 +5692,6 @@ function WeakAuras.ProfileDisplays(all)
end end
end end
function WeakAuras.RegisterTutorial(name, displayName, description, icon, steps, order)
tutorials[name] = {
name = name,
displayName = displayName,
description = description,
icon = icon,
steps = steps,
order = order
};
end
function WeakAuras.ValueFromPath(data, path) function WeakAuras.ValueFromPath(data, path)
if not data then if not data then
return nil return nil
@@ -5847,7 +5864,7 @@ end
function WeakAuras.RegisterTriggerSystemOptions(types, func) function WeakAuras.RegisterTriggerSystemOptions(types, func)
for _, v in ipairs(types) do for _, v in ipairs(types) do
triggerTypesOptions[v] = func; WeakAuras.triggerTypesOptions[v] = func;
end end
end end
@@ -7021,41 +7038,44 @@ function WeakAuras.ReplaceLocalizedRaidMarkers(txt)
end end
end end
local trackableUnits = {} do
trackableUnits["player"] = true local trackableUnits = {}
trackableUnits["target"] = true trackableUnits["player"] = true
trackableUnits["focus"] = true trackableUnits["target"] = true
trackableUnits["pet"] = true trackableUnits["focus"] = true
trackableUnits["vehicle"] = true trackableUnits["pet"] = true
trackableUnits["vehicle"] = true
for i = 1, 5 do
trackableUnits["arena" .. i] = true
trackableUnits["arenapet" .. i] = true
end
for i = 1, 4 do
trackableUnits["party" .. i] = true
trackableUnits["partypet" .. i] = true
end
for i = 1, MAX_BOSS_FRAMES do
trackableUnits["boss" .. i] = true
end
for i = 1, 40 do
trackableUnits["raid" .. i] = true
trackableUnits["raidpet" .. i] = true
end
for i = 1, 5 do function WeakAuras.UntrackableUnit(unit)
trackableUnits["arena" .. i] = true return not trackableUnits[unit]
trackableUnits["arenapet" .. i] = true end
end end
for i = 1, 4 do do
trackableUnits["party" .. i] = true local ownRealm = GetRealmName()
trackableUnits["partypet" .. i] = true function WeakAuras.UnitNameWithRealm(unit)
end local name, realm = UnitName(unit)
return name or "", realm or ownRealm or ""
for i = 1, MAX_BOSS_FRAMES do end
trackableUnits["boss" .. i] = true
end
for i = 1, 40 do
trackableUnits["raid" .. i] = true
trackableUnits["raidpet" .. i] = true
end
function WeakAuras.UntrackableUnit(unit)
return not trackableUnits[unit]
end
local ownRealm = GetRealmName()
function WeakAuras.UnitNameWithRealm(unit)
local name, realm = UnitName(unit)
return name or "", realm or ownRealm or ""
end end
function WeakAuras.ParseNameCheck(name) function WeakAuras.ParseNameCheck(name)
@@ -807,24 +807,7 @@ local methods = {
if not(newid == oldid) then if not(newid == oldid) then
WeakAuras.Rename(data, newid); WeakAuras.Rename(data, newid);
WeakAuras.Add(data) WeakAuras.HandleRename(data, oldid, newid)
WeakAuras.displayButtons[newid] = WeakAuras.displayButtons[oldid];
WeakAuras.displayButtons[newid]:SetData(data)
WeakAuras.displayButtons[oldid] = nil;
WeakAuras.ClearOptions(oldid)
WeakAuras.displayButtons[newid]:SetTitle(newid);
if(data.controlledChildren) then
for index, childId in pairs(data.controlledChildren) do
WeakAuras.displayButtons[childId]:SetGroup(newid);
end
end
WeakAuras.SetGrouping();
WeakAuras.SortDisplayButtons();
WeakAuras.PickDisplay(newid);
end end
end end
@@ -943,21 +926,6 @@ local methods = {
func = self.callbacks.OnDuplicateClick func = self.callbacks.OnDuplicateClick
}); });
tinsert(self.menu, {
text = L["Set tooltip description"],
notCheckable = true,
func = function() WeakAuras.ShowDisplayTooltip(data, nil, nil, nil, nil, nil, nil, "desc") end
});
if (data.url and data.url ~= "") then
tinsert(self.menu, {
text = L["Copy URL"],
notCheckable = true,
func = function() WeakAuras.ShowDisplayTooltip(data, nil, nil, nil, nil, nil, nil, "url") end
});
end
tinsert(self.menu, { tinsert(self.menu, {
text = L["Export to string..."], text = L["Export to string..."],
notCheckable = true, notCheckable = true,
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
local L = WeakAuras.L local L = WeakAuras.L
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
local L = WeakAuras.L local L = WeakAuras.L
+1
View File
@@ -59,6 +59,7 @@
step (optional) -> like bigStep, but applies to number input as well step (optional) -> like bigStep, but applies to number input as well
]] ]]
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
local WeakAuras = WeakAuras local WeakAuras = WeakAuras
local L = WeakAuras.L local L = WeakAuras.L
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
local L = WeakAuras.L; local L = WeakAuras.L;
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
local L = WeakAuras.L local L = WeakAuras.L
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
-- Lua APIs -- Lua APIs
local pairs, error, coroutine = pairs, error, coroutine local pairs, error, coroutine = pairs, error, coroutine
+2 -1
View File
@@ -1,4 +1,5 @@
-- Nothing here if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
local L = WeakAuras.L local L = WeakAuras.L
local regionOptions = WeakAuras.regionOptions local regionOptions = WeakAuras.regionOptions
+107 -6
View File
@@ -45,6 +45,7 @@
--- - action: The action function, called on activating a condition --- - action: The action function, called on activating a condition
-- - type: The type -- - type: The type
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
local WeakAuras = WeakAuras; local WeakAuras = WeakAuras;
local L = WeakAuras.L; local L = WeakAuras.L;
@@ -96,7 +97,8 @@ local function valueToString(a, propertytype)
else else
return ""; return "";
end end
elseif (propertytype == "chat" or propertytype == "sound" or propertytype == "customcode" or propertytype == "glowexternal") then elseif (propertytype == "chat" or propertytype == "sound" or propertytype == "customcode"
or propertytype == "glowexternal" or propertytype == "customcheck") then
return tostring(a); return tostring(a);
elseif (propertytype == "bool") then elseif (propertytype == "bool") then
return (a == 1 or a == true) and L["True"] or L["False"]; return (a == 1 or a == true) and L["True"] or L["False"];
@@ -785,9 +787,9 @@ local function addControlsForChange(args, order, data, conditionVariable, condit
local changeIndex = reference.changeIndex; local changeIndex = reference.changeIndex;
multipath[id] = {"conditions", conditionIndex, "changes", changeIndex, "value", "custom"}; multipath[id] = {"conditions", conditionIndex, "changes", changeIndex, "value", "custom"};
end end
WeakAuras.OpenTextEditor(data, multipath, nil, true, nil, nil, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#chat-message---custom-code-1"); WeakAuras.OpenTextEditor(data, multipath, nil, true, nil, nil, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-check");
else else
WeakAuras.OpenTextEditor(data, {"conditions", i, "changes", j, "value", "custom"}, nil, nil, nil, nil, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#chat-message---custom-code-1"); WeakAuras.OpenTextEditor(data, {"conditions", i, "changes", j, "value", "custom"}, nil, nil, nil, nil, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-check");
end end
end end
} }
@@ -1493,11 +1495,13 @@ local function addControlsForIfLine(args, order, data, conditionVariable, condit
check = getOrCreateSubCheck(conditions[i].check, path); check = getOrCreateSubCheck(conditions[i].check, path);
check.op = v; check.op = v;
WeakAuras.Add(data); WeakAuras.Add(data);
WeakAuras.ClearAndUpdateOptions(data.id)
end end
setValue = function(info, v) setValue = function(info, v)
check = getOrCreateSubCheck(conditions[i].check, path); check = getOrCreateSubCheck(conditions[i].check, path);
check.value = v; check.value = v;
WeakAuras.Add(data); WeakAuras.Add(data)
WeakAuras.ClearAndUpdateOptions(data.id)
end end
end end
@@ -1644,6 +1648,98 @@ local function addControlsForIfLine(args, order, data, conditionVariable, condit
set = setValue set = setValue
} }
order = order + 1; order = order + 1;
elseif currentConditionTemplate.type == "customcheck" then
args["condition" .. i .. tostring(path) .. "_op"] = {
name = blueIfNoValue(data, conditions[i].check, "op", L["Events"], L["Events"]),
desc = descIfNoValue(data, conditions[i].check, "op", currentConditionTemplate.type) or "",
type = "input",
width = WeakAuras.doubleWidth,
order = order,
get = function()
return check and check.op;
end,
set = setOp
}
order = order + 1;
local multipath = {}
args["condition" .. i .. tostring(path) .. "_value"] = {
type = "input",
width = WeakAuras.doubleWidth,
name = blueIfNoValue(data, conditions[i].check, "value", L["Custom Check"], L["Custom Check"]),
desc = descIfNoValue(data, conditions[i].check, "value", currentConditionTemplate.type) or "",
order = order,
get = function()
return check and check.value;
end,
set = setValue,
multiline = true,
control = "WeakAurasMultiLineEditBox",
arg = {
extraFunctions = {
{
buttonLabel = L["Expand"],
func = function()
if (data.controlledChildren) then
-- Collect multi paths
local multipath = {};
for id, reference in pairs(conditions[i].check.references) do
local conditionIndex = conditions[i].check.references[id].conditionIndex;
multipath[id] ={ "conditions", i, "check" }
for i, v in ipairs(path) do
tinsert(multipath[id], "checks")
tinsert(multipath[id], v)
end
tinsert(multipath[id], "value")
end
WeakAuras.OpenTextEditor(data, multipath, nil, true, nil, nil, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#chat-message---custom-code-1");
else
for i, v in ipairs(path) do
print(i, v)
end
local fullPath = { "conditions", i, "check" }
for i, v in ipairs(path) do
tinsert(fullPath, "checks")
tinsert(fullPath, v)
end
tinsert(fullPath, "value")
WeakAuras.OpenTextEditor(data, fullPath, nil, nil, nil, nil, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#chat-message---custom-code-1");
end
end
}
}
}
}
order = order + 1
args["condition" .. i .. tostring(path) .. "_value_error"] = {
type = "description",
name = function()
if (not check.value) then
return ""
end
local _, errorString = loadstring("return " .. check.value);
return errorString and "|cFFFF0000"..errorString or "";
end,
width = WeakAuras.doubleWidth,
order = order,
hidden = function()
if (not check.value) then
return true;
end
local loadedFunction, errorString = loadstring("return " .. check.value);
if(errorString and not loadedFunction) then
return false;
else
return true;
end
end
}
order = order + 1
elseif (currentConditionTemplate.type == "combination") then elseif (currentConditionTemplate.type == "combination") then
-- Do nothing -- Do nothing
else else
@@ -2109,7 +2205,7 @@ local function compareSubChecks(a, b, allConditionTemplates)
end end
local type = currentConditionTemplate.type; local type = currentConditionTemplate.type;
if (type == "number" or type == "timer" or type == "select" or type == "string") then if (type == "number" or type == "timer" or type == "select" or type == "string" or type == "customcheck") then
if (a[i].op ~= b[i].op or a[i].value ~= b[i].value) then if (a[i].op ~= b[i].op or a[i].value ~= b[i].value) then
return false; return false;
end end
@@ -2131,7 +2227,12 @@ local function findMatchingCondition(all, needle, start, allConditionTemplates)
end end
if (condition.check.trigger == needle.check.trigger and condition.check.variable == needle.check.variable) then if (condition.check.trigger == needle.check.trigger and condition.check.variable == needle.check.variable) then
if (condition.check.trigger == -2) then if condition.check.variable == "customcheck" then
-- Be a bit more strict for custom checks, there's little benefit in merging them
if condition.check.op == needle.check.op and condition.check.value == needle.check.value then
return start
end
elseif (condition.check.trigger == -2) then
if (compareSubChecks(condition.check.checks, needle.check.checks, allConditionTemplates)) then if (compareSubChecks(condition.check.checks, needle.check.checks, allConditionTemplates)) then
return start; return start;
end end
+3
View File
@@ -1,3 +1,6 @@
if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
local L = WeakAuras.L local L = WeakAuras.L
local regionOptions = WeakAuras.regionOptions local regionOptions = WeakAuras.regionOptions
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
-- Lua APIs -- Lua APIs
local tinsert, wipe = table.insert, wipe local tinsert, wipe = table.insert, wipe
+1
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
local L = WeakAuras.L; local L = WeakAuras.L;
+3
View File
@@ -1,3 +1,6 @@
if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
local L = WeakAuras.L local L = WeakAuras.L
local regionOptions = WeakAuras.regionOptions; local regionOptions = WeakAuras.regionOptions;
local parsePrefix = WeakAuras.commonOptions.parsePrefix local parsePrefix = WeakAuras.commonOptions.parsePrefix
+147
View File
@@ -0,0 +1,147 @@
if not WeakAuras.IsCorrectVersion() then return end
local L = WeakAuras.L
function WeakAuras.GetInformationOptions(data)
local isGroup = data.controlledChildren
local isTmpGroup = type(data.id) == "table"
local options = {
type = "group",
name = L["Information"],
order = 1,
args = {
}
}
local order = 1
local args = options.args
-- NAME
-- One Aura or Group: Allows editing of aura/group name
-- Multi-selection: Don't allow any editing
if not isTmpGroup then
args.name = {
type = "input",
name = L["Name:"],
width = WeakAuras.doubleWidth,
order = order,
get = function()
return data.id
end,
set = function(info, newid)
if data.id ~= newid and not WeakAuras.GetData(newid) then
local oldid = data.id
WeakAuras.Rename(data, newid);
WeakAuras.HandleRename(data, oldid, newid)
end
end
}
order = order + 1
end
-- URL
-- One Aura: Edit URL of the aura
-- Group/Multi-selection: Edit URLs of both parent and children
local sameURL = true
local commonURL
local desc = ""
if not isTmpGroup then
commonURL = data.url
if data.url then
desc = "|cFFE0E000"..data.id..": |r".. data.url .. "\n"
end
end
if data.controlledChildren then
for _, childId in ipairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId)
if childData.url then
desc = desc .. "|cFFE0E000"..childData.id..": |r"..childData.url .. "\n"
end
if not commonURL then
commonURL = childData.url or ""
elseif childData.url ~= commonURL then
sameURL = false
end
end
end
args.url = {
type = "input",
name = sameURL and L["URL"] or "|cFF4080FF" .. L["URL"],
width = WeakAuras.doubleWidth,
get = function()
if data.controlledChildren then
return sameURL and commonURL or ""
else
return data.url
end
end,
set = function(info, v)
if data.controlledChildren then
for _, childId in ipairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId)
childData.url = v
WeakAuras.Add(childData)
WeakAuras.ClearOptions(childData.id)
end
end
if not isTmpGroup then
data.url = v
WeakAuras.Add(data)
end
WeakAuras.ClearAndUpdateOptions(data.id)
end,
desc = sameURL and "" or desc,
order = order
}
order = order + 1
if isGroup then
args.url_note = {
type = "description",
name = isTmpGroup and L["|cFFE0E000Note:|r This sets the URL on all selected auras"]
or L["|cFFE0E000Note:|r This sets the URL on this group and all its members."],
width = WeakAuras.doubleWidth,
order = order
}
order = order + 1
end
-- Description
-- One Aura/Group: Edit description of the aura or group
-- Multi-selection: No editing
if not isTmpGroup then
args.description = {
type = "input",
name = isGroup and L["Group Description"] or L["Description"],
width = WeakAuras.doubleWidth,
multiline = true,
order = order,
get = function()
return data.desc
end,
set = function(info, v)
data.desc = v
WeakAuras.Add(data)
WeakAuras.ClearAndUpdateOptions(data.id)
end
}
order = order + 1
if isGroup then
args.description_note = {
type = "description",
name = string.format(L["|cFFE0E000Note:|r This sets the description only on '%s'"], data.id),
width = WeakAuras.doubleWidth,
order = order,
}
order = order + 1
end
end
return options
end
+3
View File
@@ -1,3 +1,6 @@
if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
local L = WeakAuras.L local L = WeakAuras.L
local removeFuncs = WeakAuras.commonOptions.removeFuncs local removeFuncs = WeakAuras.commonOptions.removeFuncs
@@ -807,7 +807,8 @@ function WeakAuras.CreateFrame()
load = WeakAuras.GetLoadOptions, load = WeakAuras.GetLoadOptions,
action = WeakAuras.GetActionOptions, action = WeakAuras.GetActionOptions,
animation = WeakAuras.GetAnimationOptions, animation = WeakAuras.GetAnimationOptions,
authorOptions = WeakAuras.GetAuthorOptions authorOptions = WeakAuras.GetAuthorOptions,
information = WeakAuras.GetInformationOptions,
} }
if optionsGenerator[tab] then if optionsGenerator[tab] then
aceOptions[id][tab] = optionsGenerator[tab](data) aceOptions[id][tab] = optionsGenerator[tab](data)
@@ -845,11 +846,12 @@ function WeakAuras.CreateFrame()
local tabs = { local tabs = {
{ value = "region", text = L["Display"]}, { value = "region", text = L["Display"]},
{ value = "trigger", text = L["Trigger"]}, { value = "trigger", text = L["Trigger"]},
{ value = "conditions", text = L["Conditions"]},
{ value = "load", text = L["Load"]}, { value = "load", text = L["Load"]},
{ value = "action", text = L["Actions"]}, { value = "action", text = L["Actions"]},
{ value = "animation", text = L["Animations"]}, { value = "animation", text = L["Animations"]},
{ value = "authorOptions", text = L["Custom Options"]} { value = "conditions", text = L["Conditions"]},
{ value = "authorOptions", text = L["Custom Options"]},
{ value = "information", text = L["Information"]},
} }
-- Check if group and not the temp group -- Check if group and not the temp group
if data.controlledChildren and type(data.id) == "string" then if data.controlledChildren and type(data.id) == "string" then
@@ -161,17 +161,18 @@ local function ConstructTexturePicker(frame)
end end
SetAll(self.data, self.field, texturePath); SetAll(self.data, self.field, texturePath);
if(type(self.data.id) == "string") then if(type(self.parentData.id) == "string") then
WeakAuras.Add(self.data); WeakAuras.Add(self.parentData);
WeakAuras.UpdateThumbnail(self.data); WeakAuras.UpdateThumbnail(self.parentData);
end end
group:UpdateList(); group:UpdateList();
local status = dropdown.status or dropdown.localstatus local status = dropdown.status or dropdown.localstatus
dropdown.dropdown:SetText(dropdown.list[status.selected]); dropdown.dropdown:SetText(dropdown.list[status.selected]);
end end
function group.Open(self, data, field, textures, SetTextureFunc) function group.Open(self, data, parentData, field, textures, SetTextureFunc)
self.data = data; self.data = data
self.parentData = parentData
self.field = field; self.field = field;
self.textures = textures; self.textures = textures;
self.SetTextureFunc = SetTextureFunc self.SetTextureFunc = SetTextureFunc
@@ -247,8 +248,8 @@ local function ConstructTexturePicker(frame)
end end
function group.CancelClose() function group.CancelClose()
if(group.data.controlledChildren) then if(group.parentData.controlledChildren) then
for index, childId in pairs(group.data.controlledChildren) do for index, childId in pairs(group.parentData.controlledChildren) do
local childData = WeakAuras.GetData(childId); local childData = WeakAuras.GetData(childId);
if(childData) then if(childData) then
childData[group.field] = group.givenPath[childId]; childData[group.field] = group.givenPath[childId];
+1 -1
View File
@@ -240,7 +240,7 @@ local function createOptions(id, data)
width = WeakAuras.halfWidth, width = WeakAuras.halfWidth,
order = 44.3, order = 44.3,
func = function() func = function()
WeakAuras.OpenTexturePicker(data, "sparkTexture", WeakAuras.texture_types); WeakAuras.OpenTexturePicker(data, data, "sparkTexture", WeakAuras.texture_types);
end, end,
disabled = function() return not data.spark end, disabled = function() return not data.spark end,
hidden = function() return not data.spark end, hidden = function() return not data.spark end,
@@ -33,7 +33,7 @@ local function createOptions(id, data)
width = WeakAuras.halfWidth, width = WeakAuras.halfWidth,
order = 12, order = 12,
func = function() func = function()
WeakAuras.OpenTexturePicker(data, "foregroundTexture", WeakAuras.texture_types); WeakAuras.OpenTexturePicker(data, data, "foregroundTexture", WeakAuras.texture_types);
end end
}, },
sameTexture = { sameTexture = {
@@ -48,7 +48,7 @@ local function createOptions(id, data)
width = WeakAuras.halfWidth, width = WeakAuras.halfWidth,
order = 17, order = 17,
func = function() func = function()
WeakAuras.OpenTexturePicker(data, "backgroundTexture", WeakAuras.texture_types); WeakAuras.OpenTexturePicker(data, data, "backgroundTexture", WeakAuras.texture_types);
end, end,
disabled = function() return data.sameTexture; end disabled = function() return data.sameTexture; end
}, },
+1 -1
View File
@@ -31,7 +31,7 @@ local function createOptions(id, data)
width = WeakAuras.halfWidth, width = WeakAuras.halfWidth,
order = 7, order = 7,
func = function() func = function()
WeakAuras.OpenTexturePicker(data, "texture", WeakAuras.texture_types); WeakAuras.OpenTexturePicker(data, data, "texture", WeakAuras.texture_types);
end end
}, },
color = { color = {
+133 -13
View File
@@ -6,6 +6,9 @@ local L = WeakAuras.L;
local indentWidth = WeakAuras.normalWidth * 0.06 local indentWidth = WeakAuras.normalWidth * 0.06
local function createOptions(parentData, data, index, subIndex) local function createOptions(parentData, data, index, subIndex)
local hiddentickextras = function()
return WeakAuras.IsCollapsed("subtext", "subtext", "tickextras" .. index, true)
end
local options = { local options = {
__title = L["Tick %s"]:format(subIndex), __title = L["Tick %s"]:format(subIndex),
__order = 1, __order = 1,
@@ -57,27 +60,66 @@ local function createOptions(parentData, data, index, subIndex)
validate = WeakAuras.ValidateNumeric, validate = WeakAuras.ValidateNumeric,
desc = L["Enter in a value for the tick's placement."], desc = L["Enter in a value for the tick's placement."],
}, },
tick_space1 = { tick_thickness = {
type = "description", type = "range",
width = WeakAuras.normalWidth, width = WeakAuras.normalWidth,
name = "", name = L["Thickness"],
order = 5, order = 5,
min = 0,
softMax = 20,
step = 1,
},
tick_extrasDescription = {
type = "execute",
control = "WeakAurasExpandSmall",
name = function()
local lengthtext = ""
if data.automatic_length then
lengthtext = L["|cFFFF0000Automatic|r length"]
else
lengthtext = L["Length of |cFFFF0000%s|r"]:format(data.tick_length)
end
local texturetext = ""
if data.use_texture then
local desaturatetext = data.tick_desaturate and L["|cFFFF0000desaturated|r "] or ""
local blendtext = WeakAuras.blend_types[data.tick_blend_mode]
local rotationtext = data.tick_rotation ~= 0 and L[" rotated |cFFFF0000%s|r degrees"]:format(data.tick_rotation) or ""
local mirrortext = data.tick_mirror and L[" and |cFFFF0000mirrored|r"] or ""
texturetext = L["%s|cFFFF0000custom|r texture with |cFFFF0000%s|r blend mode%s%s"]:format(desaturatetext, blendtext, rotationtext, mirrortext)
else
texturetext = L["|cFFFF0000default|r texture"]
end
local offsettext = ""
if data.tick_xOffset ~=0 or data.tick_yOffset ~=0 then
offsettext = L["Offset by |cFFFF0000%s|r/|cFFFF0000%s|r"]:format(data.tick_xOffset, data.tick_yOffset)
end
local description = L["|cFFffcc00Extra:|r %s and %s %s"]:format(lengthtext, texturetext, offsettext)
return description
end,
width = WeakAuras.doubleWidth,
order = 6,
func = function(info, button)
local collapsed = WeakAuras.IsCollapsed("subtext", "subtext", "tickextras" .. index, true)
WeakAuras.SetCollapsed("subtext", "subtext", "tickextras" .. index, not collapsed)
end,
image = function()
local collapsed = WeakAuras.IsCollapsed("subtext", "subtext", "tickextras" .. index, true)
return collapsed and "Interface\\AddOns\\WeakAuras\\Media\\Textures\\edit" or "Interface\\AddOns\\WeakAuras\\Media\\Textures\\editdown"
end,
imageWidth = 24,
imageHeight = 24
}, },
automatic_length = { automatic_length = {
type = "toggle", type = "toggle",
width = WeakAuras.normalWidth, width = WeakAuras.normalWidth,
name = L["Automatic length"], name = L["Automatic length"],
order = 6,
desc = L["Matches the height setting of a horizontal bar or width for a vertical bar."],
},
tick_thickness = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Thickness"],
order = 7, order = 7,
min = 0, desc = L["Matches the height setting of a horizontal bar or width for a vertical bar."],
softMax = 20, hidden = hiddentickextras,
step = 1,
}, },
tick_length = { tick_length = {
type = "range", type = "range",
@@ -88,6 +130,84 @@ local function createOptions(parentData, data, index, subIndex)
softMax = 50, softMax = 50,
step = 1, step = 1,
disabled = function() return data.automatic_length end, disabled = function() return data.automatic_length end,
hidden = hiddentickextras,
},
use_texture = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Use Texture"],
order = 9,
hidden = hiddentickextras,
},
tick_blend_mode = {
type = "select",
width = WeakAuras.normalWidth,
name = L["Blend Mode"],
order = 10,
values = WeakAuras.blend_types,
disabled = function() return not data.use_texture end,
hidden = hiddentickextras,
},
tick_texture = {
type = "input",
name = L["Texture"],
order = 11,
width = WeakAuras.doubleWidth,
disabled = function() return not data.use_texture end,
hidden = hiddentickextras,
},
tick_desaturate = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Desaturate"],
order = 12,
hidden = hiddentickextras,
},
texture_chooser = {
type = "execute",
name = L["Choose"],
width = WeakAuras.normalWidth,
order = 13,
func = function()
WeakAuras.OpenTexturePicker(data, "tick_texture", WeakAuras.texture_types);
end,
disabled = function() return not data.use_texture end,
hidden = hiddentickextras,
},
tick_rotation = {
type = "range",
width = WeakAuras.normalWidth,
name = L["Rotation"],
min = 0,
max = 360,
order = 14,
hidden = hiddentickextras,
},
tick_mirror = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Mirror"],
order = 15,
disabled = function() return not data.use_texture end,
hidden = hiddentickextras,
},
tick_xOffset = {
type = "range",
width = WeakAuras.normalWidth,
name = L["x-Offset"],
order = 16,
softMin = -200,
softMax = 200,
hidden = hiddentickextras,
},
tick_yOffset = {
type = "range",
width = WeakAuras.normalWidth,
name = L["y-Offset"],
order = 17,
softMin = -200,
softMax = 200,
hidden = hiddentickextras,
}, },
} }
return options return options
+2
View File
@@ -1,3 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
local L = WeakAuras.L local L = WeakAuras.L
+25 -5
View File
@@ -1,4 +1,5 @@
if not WeakAuras.IsCorrectVersion() then return end if not WeakAuras.IsCorrectVersion() then return end
local AddonName, OptionsPrivate = ...
-- Lua APIs -- Lua APIs
local tinsert, tremove, wipe = table.insert, table.remove, wipe local tinsert, tremove, wipe = table.insert, table.remove, wipe
@@ -1214,7 +1215,7 @@ function WeakAuras.DropIndicator()
indicator:SetHeight(4) indicator:SetHeight(4)
indicator:SetFrameStrata("FULLSCREEN") indicator:SetFrameStrata("FULLSCREEN")
local texture = indicator:CreateTexture(nil, "FULLSCREEN") local texture = indicator:CreateTexture(nil, "HIGHLIGHT")
texture:SetBlendMode("ADD") texture:SetBlendMode("ADD")
texture:SetAllPoints(indicator) texture:SetAllPoints(indicator)
texture:SetTexture("Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight") texture:SetTexture("Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight")
@@ -1253,8 +1254,8 @@ function WeakAuras.UpdateThumbnail(data)
button:UpdateThumbnail() button:UpdateThumbnail()
end end
function WeakAuras.OpenTexturePicker(data, field, textures, stopMotion) function WeakAuras.OpenTexturePicker(data, parentData, field, textures, stopMotion)
frame.texturePicker:Open(data, field, textures, stopMotion); frame.texturePicker:Open(data, parentData, field, textures, stopMotion);
end end
function WeakAuras.OpenIconPicker(data, field, groupIcon) function WeakAuras.OpenIconPicker(data, field, groupIcon)
@@ -1266,7 +1267,7 @@ function WeakAuras.OpenModelPicker(data, field, parentData)
local loaded, reason = LoadAddOn("WeakAurasModelPaths"); local loaded, reason = LoadAddOn("WeakAurasModelPaths");
if not(loaded) then if not(loaded) then
reason = string.lower("|cffff2020" .. _G["ADDON_" .. reason] .. "|r.") reason = string.lower("|cffff2020" .. _G["ADDON_" .. reason] .. "|r.")
print(WeakAuras.printPrefix .. "ModelPaths could not be loaded, the addon is " .. reason); WeakAuras.prettyPrint("ModelPaths could not be loaded, the addon is " .. reason);
WeakAuras.ModelPaths = {}; WeakAuras.ModelPaths = {};
end end
frame.modelPicker.modelTree:SetTree(WeakAuras.ModelPaths); frame.modelPicker.modelTree:SetTree(WeakAuras.ModelPaths);
@@ -1287,7 +1288,7 @@ function WeakAuras.OpenTriggerTemplate(data, targetId)
local loaded, reason = LoadAddOn("WeakAurasTemplates"); local loaded, reason = LoadAddOn("WeakAurasTemplates");
if not(loaded) then if not(loaded) then
reason = string.lower("|cffff2020" .. _G["ADDON_" .. reason] .. "|r.") reason = string.lower("|cffff2020" .. _G["ADDON_" .. reason] .. "|r.")
print(WeakAuras.printPrefix .. "Templates could not be loaded, the addon is " .. reason); WeakAuras.prettyPrint("Templates could not be loaded, the addon is " .. reason);
return; return;
end end
frame.newView = WeakAuras.CreateTemplateView(frame); frame.newView = WeakAuras.CreateTemplateView(frame);
@@ -1663,3 +1664,22 @@ function WeakAuras.AddTextFormatOption(input, withHeader, get, addOption, hidden
return next(seenSymbols) ~= nil return next(seenSymbols) ~= nil
end end
function WeakAuras.HandleRename(data, oldid, newid)
WeakAuras.displayButtons[newid] = WeakAuras.displayButtons[oldid];
WeakAuras.displayButtons[newid]:SetData(data)
WeakAuras.displayButtons[oldid] = nil;
WeakAuras.ClearOptions(oldid)
WeakAuras.displayButtons[newid]:SetTitle(newid);
if(data.controlledChildren) then
for index, childId in pairs(data.controlledChildren) do
WeakAuras.displayButtons[childId]:SetGroup(newid)
end
end
WeakAuras.SetGrouping()
WeakAuras.SortDisplayButtons()
WeakAuras.PickDisplay(newid)
end
+1
View File
@@ -44,6 +44,7 @@ TriggerOptions.lua
LoadOptions.lua LoadOptions.lua
ActionOptions.lua ActionOptions.lua
AnimationOptions.lua AnimationOptions.lua
InformationOptions.lua
BuffTrigger.lua BuffTrigger.lua
BuffTrigger2.lua BuffTrigger2.lua