Skip to content
Merged

Patches #6220

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions WeakAuras/BossMods.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1875,5 +1875,3 @@ Private.event_prototypes["Boss Mod Timer"] = {
automaticrequired = true,
}
Private.category_event_prototype.addons["Boss Mod Timer"] = L["Boss Mod Timer"]


1 change: 0 additions & 1 deletion WeakAuras/Features.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,3 @@ Features:Register({
Private.DebugPrint = Features:Wrap("debug", function(...)
print("|cff00d3ffWeakAuras-Debug:|r ", ...)
end)

12 changes: 6 additions & 6 deletions WeakAuras/GenericTrigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ function TestForMultiSelect(trigger, arg)
test = "(";
local any = false;
if trigger[name] and trigger[name].multi then
for value, _ in pairs(trigger[name].multi) do
for value in pairs(trigger[name].multi) do
if not arg.test then
test = test..name.."=="..(tonumber(value) or ("[["..value.."]]")).." or ";
else
Expand Down Expand Up @@ -2294,7 +2294,7 @@ do

local function GetRuneDuration()
local runeDuration = -100;
for id, _ in pairs(runes) do
for id in pairs(runes) do
local _, duration = GetRuneCooldown(id);
duration = duration or 0;
runeDuration = duration > 0 and duration or runeDuration
Expand Down Expand Up @@ -2521,7 +2521,7 @@ do
--- @field private spellCdsOnlyCooldownRune SpellCDHandler
--- @field private spellCdsCharges SpellCDHandler
--- @field private AddEffectiveSpellId fun(self: SpellDetails, effectiveSpellId: number, userSpellId: number)
--- @field CheckSpellKnown fun(self: SpellDetails) Handles the SPELLS_CHANGED event (and intial setup)
--- @field CheckSpellKnown fun(self: SpellDetails) Handles the SPELLS_CHANGED event (and initial setup)
--- @field CheckSpellCooldowns fun(self: SpellDetails, runeDuration: number?)
--- @field CheckSpellCooldown fun(self: SpellDetails, effectiveSpellId: number, runeDuration: number?)
--- @field SendEventsForSpell fun(self: SpellDetails, effectiveSpellId: number, event: string, ...: any[])
Expand Down Expand Up @@ -2670,7 +2670,7 @@ do
end,

CheckSpellCooldowns = function(self, runeDuration)
for id, _ in pairs(self.data) do
for id in pairs(self.data) do
self:CheckSpellCooldown(id, runeDuration)
end
end,
Expand Down Expand Up @@ -3215,7 +3215,7 @@ do
---@return number
function Private.CheckRuneCooldown()
local runeDuration = -100;
for id, _ in pairs(runes) do
for id in pairs(runes) do
local startTime, duration = GetRuneCooldown(id);
startTime = startTime or 0;
duration = duration or 0;
Expand Down Expand Up @@ -3369,7 +3369,7 @@ do

---@type fun()
function Private.CheckItemCooldowns()
for id, _ in pairs(items) do
for id in pairs(items) do
Private.CheckItemCooldown(id)
end
end
Expand Down
2 changes: 1 addition & 1 deletion WeakAuras/Init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ end

---@type fun(regionType: string, createOptions: function, icon: string|function, displayName: string, createThumbnail: function?, modifyThumbnail: function?, description: string?, templates: table?, getAnchors: function?)
---@diagnostic disable-next-line: duplicate-set-field
function Private.RegisterRegionOptions(_, _ , _ ,_ )
function Private.RegisterRegionOptions(_, _ , _ ,_)
end

function Private.StartProfileSystem(_)
Expand Down
10 changes: 6 additions & 4 deletions WeakAuras/Prototypes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11169,9 +11169,6 @@ Private.event_prototypes = {
tinsert(events, "PLAYER_REGEN_DISABLED")
tinsert(events, "PLAYER_ENTERING_WORLD")
end
if trigger.use_pvpflagged ~= nil or trigger.use_afk ~= nil then
tinsert(events, "PLAYER_FLAGS_CHANGED")
end
if trigger.use_pvpflagged ~= nil then
tinsert(events, "UNIT_FACTION")
tinsert(events, "ZONE_CHANGED")
Expand All @@ -11191,6 +11188,11 @@ Private.event_prototypes = {
end
local unit_events = {}
local pet_unit_events = {}
if trigger.use_pvpflagged ~= nil
or trigger.use_afk ~= nil
then
tinsert(unit_events, "PLAYER_FLAGS_CHANGED")
end
if trigger.use_vehicle ~= nil then
if WeakAuras.IsClassicOrTBC() then
tinsert(unit_events, "UNIT_FLAGS")
Expand Down Expand Up @@ -11952,7 +11954,7 @@ Private.event_prototypes = {
sortOrder = function()
local discovered_currencies_sorted = Private.GetDiscoveredCurrenciesSorted()
local sortOrder = {}
for key, value in pairs(Private.GetDiscoveredCurrencies()) do
for key in pairs(Private.GetDiscoveredCurrencies()) do
tinsert(sortOrder, key)
end
table.sort(sortOrder, function(aKey, bKey)
Expand Down
2 changes: 1 addition & 1 deletion WeakAuras/TSUHelpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end
---@type fun(states: states): boolean
local removeAll = function(states)
local changed = false
for cloneId, state in pairs(states) do
for cloneId in pairs(states) do
states[cloneId] = nil
changed = true
end
Expand Down
2 changes: 1 addition & 1 deletion WeakAuras/Types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3258,7 +3258,7 @@ Private.group_types = {

---@type table<string, string>
Private.difficulty_types = {
none = L["None"],
none = L["None"],
normal = PLAYER_DIFFICULTY1,
heroic = PLAYER_DIFFICULTY2,
}
Expand Down
43 changes: 40 additions & 3 deletions WeakAuras/Types_Wrath.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,31 @@ function Private.InitializeEncounterAndZoneLists()
{ L["Malygos"], 734 },
}
},
{
L["Zul'Gurub"],
{
{ L["High Priest Venoxis"], 784 },
{ L["High Priestess Jeklik"], 785 },
{ L["High Priestess Mar'li"], 786 },
{ L["Bloodlord Mandokir"], 787 },
{ L["Edge of Madness"], 788 },
{ L["High Priest Thekal"], 789 },
{ L["Gahz'ranka"], 790 },
{ L["High Priestess Arlokk"], 791 },
{ L["Jin'do the Hexxer"], 792 },
{ L["Hakkar"], 793 }
}
},
{
L["Trial of the Crusader"],
{
{ L["Northrend Beasts"], 629 },
{ L["Lord Jaraxxus"], 633 },
{ L["Faction Champions"], 637 },
{ L["Val'kyr Twins"], 641 },
{ L["Anub'arak"], 645 },
}
},
{
L["Vault of Archavon"],
{
Expand Down Expand Up @@ -2798,7 +2823,7 @@ Private.talentInfo = {
237566, -- [1]
10, -- [2]
3, -- [3]
51167, -- [4]
47578, -- [4]
}, -- [102]
{
237568, -- [1]
Expand Down Expand Up @@ -4881,7 +4906,7 @@ Private.talentInfo = {
35395, -- [4]
}, -- [100]
{
236262, -- [1]
135875, -- [1]
8, -- [2]
3, -- [3]
53376, -- [4]
Expand Down Expand Up @@ -4913,9 +4938,21 @@ Private.talentInfo = {
{
236263, -- [1]
9, -- [2]
3, -- [3]
4, -- [3]
53503, -- [4]
}, -- [106]
{
236262, -- [1]
9, -- [2]
3, -- [3]
1299093, -- [4]
}, -- [107]
{
236262, -- [1]
10, -- [2]
3, -- [3]
1299096, -- [4]
}, -- [108]
[121] = {
"PaladinHoly", -- [1]
"PaladinProtection", -- [2]
Expand Down
9 changes: 4 additions & 5 deletions WeakAuras/WeakAuras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,6 @@ WeakAuras.UnitIsPet = function(unit)
end

local playerLevel = UnitLevel("player");
local currentInstanceType = "none"

-- Custom Action Functions, keyed on id, "init" / "start" / "finish"
Private.customActionsFunctions = {};
Expand Down Expand Up @@ -2718,7 +2717,7 @@ function Private.AddMany(tbl, takeSnapshots)
else
if next(WeakAuras.LoadFromArchive("Repository", "migration").stores) ~= nil then
C_Timer.After(1, function()
prettyPrint(L["WeakAuras has detected empty settings. If this is unexpected, ask for assitance on https://discord.gg/weakauras."])
prettyPrint(L["WeakAuras has detected empty settings. If this is unexpected, ask for assistance on https://discord.gg/weakauras."])
end)
end
end
Expand Down Expand Up @@ -3567,7 +3566,7 @@ end
function Private.SetAllStatesHidden(id, triggernum)
local triggerState = WeakAuras.GetTriggerStateForTrigger(id, triggernum);
local changed = false
for cloneId, state in pairs(triggerState) do
for cloneId in pairs(triggerState) do
changed = true
triggerState[cloneId] = nil
end
Expand All @@ -3576,7 +3575,7 @@ end

function Private.SetAllStatesHiddenExcept(id, triggernum, list)
local triggerState = WeakAuras.GetTriggerStateForTrigger(id, triggernum);
for cloneId, state in pairs(triggerState) do
for cloneId in pairs(triggerState) do
if (not (list[cloneId])) then
triggerState[cloneId] = nil
end
Expand Down Expand Up @@ -6032,7 +6031,7 @@ local function tryAnchorAgain()
postPonedAnchors = {};
anchorTimer = nil;

for id, _ in pairs(delayed) do
for id in pairs(delayed) do
local data = WeakAuras.GetData(id);
local region = WeakAuras.GetRegion(id);
if (data and region) then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end

-- Lua APIs
local pairs, assert, type = pairs, assert, type
local pairs = pairs
local min, max, floor = math.min, math.max, math.floor

-- WoW APIs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ local methods = {
end
end
local secondList = {}
for displayName, _ in pairs(treeValue) do
for displayName in pairs(treeValue) do
tinsert(secondList, displayName)
end
table.sort(secondList)
Expand Down Expand Up @@ -220,7 +220,7 @@ local methods = {
self.userdata.tree = tree

local firstList = {}
for displayName, _ in pairs(tree) do
for displayName in pairs(tree) do
tinsert(firstList, displayName)
end
table.sort(firstList)
Expand Down
8 changes: 4 additions & 4 deletions WeakAurasOptions/AnimationOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -643,8 +643,8 @@ function OptionsPrivate.GetAnimationOptions(data)
name = L["Color"],
order = 68.2,
hidden = function()
return (data.animation.main.type ~= "custom" or not OptionsPrivate.Private.EnsureRegion(id).Color)
end
return (data.animation.main.type ~= "custom" or not OptionsPrivate.Private.EnsureRegion(id).Color)
end
},
main_colorType = {
type = "select",
Expand Down Expand Up @@ -892,8 +892,8 @@ function OptionsPrivate.GetAnimationOptions(data)
order = 87,
values = anim_rotate_types,
hidden = function()
return (data.animation.finish.type ~= "custom" or not OptionsPrivate.Private.EnsureRegion(id).SetAnimRotation)
end
return (data.animation.finish.type ~= "custom" or not OptionsPrivate.Private.EnsureRegion(id).SetAnimRotation)
end
},
-- texteditor added below
finish_rotate = {
Expand Down
2 changes: 1 addition & 1 deletion WeakAurasOptions/BuffTrigger2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ local function getAuraMatchesList(name, showSpellIdRecommendation)
local playerSpells = {}
local otherSpells = {}

for id, _ in pairs(ids) do
for id in pairs(ids) do
numMatches = numMatches + 1

if WeakAuras.IsPlayerSpellOrOverridesAndBaseIsPlayerSpell(id) then
Expand Down
8 changes: 4 additions & 4 deletions WeakAurasOptions/Cache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ local bestIcon = {}
-- Builds a cache of name/icon pairs from existing spell data
-- This is a rather slow operation, so it's only done once, and the result is subsequently saved
function spellCache.Build()
if not cache then
if not cache then
error("spellCache has not been loaded. Call WeakAuras.spellCache.Load(...) first.")
end

Expand Down Expand Up @@ -106,7 +106,8 @@ function spellCache.Build()
coroutine.yield(0.01, "spells")
end

if WeakAuras.IsCataOrMistsOrRetail() then
-- achievements got introduced in 3.0.2, so we can skip this step for TBC and Classic
if WeakAuras.IsWrathOrCataOrMistsOrRetail() then
for _, category in pairs(GetCategoryList()) do
local total = GetCategoryNumAchievements(category, true)
for i = 1, total do
Expand Down Expand Up @@ -195,7 +196,6 @@ function spellCache.GetSpellsMatching(name)
local result = {}
for spell, icon in cache[name].spells:gmatch("(%d+)=(%d+)") do
local spellId = tonumber(spell)
local iconId = tonumber(icon)
result[spellId] = icon
end
return result
Expand Down Expand Up @@ -294,7 +294,7 @@ function spellCache.BestKeyMatch(nearkey)
partialMatches[key] = value;
end
end
for key, value in pairs(partialMatches) do
for key in pairs(partialMatches) do
local distance = Lev(nearkey, key);
if(distance < bestDistance) then
bestKey = key;
Expand Down
3 changes: 1 addition & 2 deletions WeakAurasOptions/CommonOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ local function replaceNameDescFuncs(intable, data, subOption)
local childOptions = OptionsPrivate.EnsureOptions(child, subOption)
local get = getValueFor(childOptions, info, "get");
if (combinedKeys) then
for key, _ in pairs(combinedKeys) do
for key in pairs(combinedKeys) do
local values = {};
if (get) then
values = { get(info, key) };
Expand Down Expand Up @@ -2166,4 +2166,3 @@ OptionsPrivate.commonOptions.AddCodeOption = AddCodeOption

OptionsPrivate.commonOptions.AddCommonTriggerOptions = AddCommonTriggerOptions
OptionsPrivate.commonOptions.AddTriggerGetterSetter = AddTriggerGetterSetter

4 changes: 2 additions & 2 deletions WeakAurasOptions/OptionsFrames/MoverSizer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local AddonName = ...
---@class OptionsPrivate
local OptionsPrivate = select(2, ...)

local createCenterLines = true --- Creates only the middle lines
local createCenterLines = true -- Creates only the middle lines
local showNormalLines = false -- Show all alignment lines all the time
local highlightColor = { 1, 1, 0 } -- The color of lines that are we are currently aligned too
local gridHighlightColor = { 0.3, 1, 0.3}
Expand All @@ -15,7 +15,7 @@ local gridColor = { 0.3, 0.6, 0.3 } -- The color of grid lines, if they aren't m
local pairs = pairs

-- WoW APIs
local IsShiftKeyDown, CreateFrame = IsShiftKeyDown, CreateFrame
local IsShiftKeyDown, CreateFrame = IsShiftKeyDown, CreateFrame

---@class WeakAuras
local WeakAuras = WeakAuras
Expand Down
8 changes: 4 additions & 4 deletions WeakAurasOptions/OptionsFrames/OptionsFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ local OptionsPrivate = select(2, ...)

-- Lua APIs
local tinsert, tremove, wipe = table.insert, table.remove, wipe
local pairs, type, error = pairs, type, error
local pairs, type = pairs, type
local _G = _G

-- WoW APIs
local GetScreenWidth, GetScreenHeight, CreateFrame, UnitName
= GetScreenWidth, GetScreenHeight, CreateFrame, UnitName
local GetScreenWidth, GetScreenHeight, CreateFrame
= GetScreenWidth, GetScreenHeight, CreateFrame

local AceGUI = LibStub("AceGUI-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
Expand Down Expand Up @@ -186,7 +186,7 @@ function OptionsPrivate.CreateFrame()
OptionsPrivate.Private.personalRessourceDisplayFrame:OptionsClosed()
end

if frame.dynamicTextCodesFrame then
if frame.dynamicTextCodesFrame then
frame.dynamicTextCodesFrame:Hide()
end

Expand Down
Loading