diff --git a/.luacheckrc b/.luacheckrc index c2ec833..3040487 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -19569,5 +19569,6 @@ globals = { "WA_UpdateNineSliceBorders", "SecondsToMinutes", "MinutesToSeconds", "HasTimePassed", "SecondsFormatterConstants", "ConvertSecondsToUnits", "SecondsToClock", "MinutesToTime", "FormatShortDate", "NUMBER_ABBREVIATION_DATA", "WeakAurasProfilingReportTitleText", - "WeakAurasRealTimeProfiling", "WeakAurasRealTimeProfilingTitleText", "seconds", "NUM_CHAT_WINDOWS" + "WeakAurasRealTimeProfiling", "WeakAurasRealTimeProfilingTitleText", "seconds", "NUM_CHAT_WINDOWS", + "GetNumGlyphSockets", "GetGlyphLink", "GetGlyphSocketInfo" } diff --git a/WeakAuras/Animations.lua b/WeakAuras/Animations.lua index 46e83eb..a44ab03 100644 --- a/WeakAuras/Animations.lua +++ b/WeakAuras/Animations.lua @@ -265,7 +265,7 @@ function Private.Animate(namespace, uid, type, anim, region, inverse, onFinished anim.translateFunc = anim_function_strings[anim.translateType] end if (anim.translateFunc) then - translateFunc = WeakAuras.LoadFunction("return " .. anim.translateFunc); + translateFunc = WeakAuras.LoadFunction("return " .. anim.translateFunc, uid); else if (region.SetOffsetAnim) then region:SetOffsetAnim(0, 0); @@ -286,7 +286,7 @@ function Private.Animate(namespace, uid, type, anim, region, inverse, onFinished anim.alphaFunc = anim_function_strings[anim.alphaType] end if (anim.alphaFunc) then - alphaFunc = WeakAuras.LoadFunction("return " .. anim.alphaFunc); + alphaFunc = WeakAuras.LoadFunction("return " .. anim.alphaFunc, uid); else if (region.SetAnimAlpha) then region:SetAnimAlpha(nil); @@ -307,7 +307,7 @@ function Private.Animate(namespace, uid, type, anim, region, inverse, onFinished anim.scaleFunc = anim_function_strings[anim.scaleType] end if (anim.scaleFunc) then - scaleFunc = WeakAuras.LoadFunction("return " .. anim.scaleFunc); + scaleFunc = WeakAuras.LoadFunction("return " .. anim.scaleFunc, uid); else region:Scale(1, 1); end @@ -320,7 +320,7 @@ function Private.Animate(namespace, uid, type, anim, region, inverse, onFinished anim.rotateFunc = anim_function_strings[anim.rotateType] end if (anim.rotateFunc) then - rotateFunc = WeakAuras.LoadFunction("return " .. anim.rotateFunc); + rotateFunc = WeakAuras.LoadFunction("return " .. anim.rotateFunc, uid); else region:Rotate(startRotation); end @@ -333,7 +333,7 @@ function Private.Animate(namespace, uid, type, anim, region, inverse, onFinished anim.colorFunc = anim_function_strings[anim.colorType] end if (anim.colorFunc) then - colorFunc = WeakAuras.LoadFunction("return " .. anim.colorFunc); + colorFunc = WeakAuras.LoadFunction("return " .. anim.colorFunc, uid); else region:ColorAnim(nil); end diff --git a/WeakAuras/AuraEnvironment.lua b/WeakAuras/AuraEnvironment.lua index 961cb65..9b98870 100644 --- a/WeakAuras/AuraEnvironment.lua +++ b/WeakAuras/AuraEnvironment.lua @@ -632,14 +632,14 @@ local function CreateFunctionCache(exec_env) local cache = { funcs = setmetatable({}, {__mode = "v"}) } - cache.Load = function(self, string, silent) + cache.Load = function(self, string, id, silent) if self.funcs[string] then return self.funcs[string] else local loadedFunction, errorString = loadstring(string, firstLine(string)) if errorString then if not silent then - print(errorString) + print(string.format(L["Error in aura '%s'"], id), errorString) end return nil, errorString elseif loadedFunction then @@ -658,12 +658,12 @@ end local function_cache_custom = CreateFunctionCache(exec_env_custom) local function_cache_builtin = CreateFunctionCache(exec_env_builtin) -function WeakAuras.LoadFunction(string) - return function_cache_custom:Load(string) +function WeakAuras.LoadFunction(string, id) + return function_cache_custom:Load(string, id) end -function Private.LoadFunction(string, silent) - return function_cache_builtin:Load(string, silent) +function Private.LoadFunction(string, id, silent) + return function_cache_builtin:Load(string, id, silent) end function Private.GetSanitizedGlobal(key) diff --git a/WeakAuras/BossMods.lua b/WeakAuras/BossMods.lua index 82453f9..28cdda6 100644 --- a/WeakAuras/BossMods.lua +++ b/WeakAuras/BossMods.lua @@ -179,7 +179,7 @@ Private.ExecEnv.BossMods.DBM = { EventCallback = function(self, event, ...) if event == "DBM_Announce" then - local message, icon, _, spellId, _, count = ... + local message, icon, _, spellId, _, _, count = ... Private.ScanEvents("DBM_Announce", spellId, message, icon) if self.isGeneric then count = count and tostring(count) or "0" @@ -1552,11 +1552,16 @@ Private.event_prototypes["Boss Mod Announce"] = { type = "string", preamble = "local counter = Private.ExecEnv.CreateTriggerCounter(%q)", test = "counter:SetCount(tonumber(count) or 0) == nil and counter:Match()", + conditionPreamble = function(input) + return Private.ExecEnv.CreateTriggerCounter(input) + end, conditionTest = function(state, needle, op, preamble) - return preamble:Check(state.count) + preamble:SetCount(tonumber(state.count) or 0) + return preamble:Match() end, store = true, conditionType = "string", + operator_types = "none" }, { name = "cloneId", diff --git a/WeakAuras/BuffTrigger2.lua b/WeakAuras/BuffTrigger2.lua index abe3973..681ce2f 100644 --- a/WeakAuras/BuffTrigger2.lua +++ b/WeakAuras/BuffTrigger2.lua @@ -1966,7 +1966,7 @@ Buff2Frame:RegisterEvent("PLAYER_TARGET_CHANGED") Buff2Frame:RegisterEvent("PARTY_MEMBERS_CHANGED") Buff2Frame:RegisterEvent("RAID_ROSTER_UPDATE") Buff2Frame:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT") -if WeakAuras.isAwesomeEnabled() then +if WeakAuras.IsAwesomeEnabled() then Buff2Frame:RegisterEvent("NAME_PLATE_UNIT_ADDED") Buff2Frame:RegisterEvent("NAME_PLATE_UNIT_REMOVED") end @@ -2205,7 +2205,6 @@ end --- Removes all data for an aura id --- @param id number function BuffTrigger.Delete(id) - BuffTrigger.UnloadDisplays({[id] = true}) triggerInfos[id] = nil end @@ -2501,7 +2500,7 @@ function BuffTrigger.Add(data) local remFunc if trigger.unit ~= "multi" and CanHaveMatchCheck(trigger) and trigger.useRem then local remFuncStr = Private.function_strings.count:format(trigger.remOperator or ">=", tonumber(trigger.rem) or 0) - remFunc = Private.LoadFunction(remFuncStr) + remFunc = Private.LoadFunction(remFuncStr, id) end local names @@ -2531,14 +2530,14 @@ function BuffTrigger.Add(data) else group_countFuncStr = Private.function_strings.count:format(">", 0) end - groupCountFunc = Private.LoadFunction(group_countFuncStr) + groupCountFunc = Private.LoadFunction(group_countFuncStr, id) end local matchCountFunc if HasMatchCount(trigger) and trigger.match_countOperator and trigger.match_count and tonumber(trigger.match_count) then local count = tonumber(trigger.match_count) local match_countFuncStr = Private.function_strings.count:format(trigger.match_countOperator, count) - matchCountFunc = Private.LoadFunction(match_countFuncStr) + matchCountFunc = Private.LoadFunction(match_countFuncStr, id) elseif IsGroupTrigger(trigger) then if trigger.showClones and not trigger.combinePerUnit then matchCountFunc = GreaterEqualOne @@ -2556,7 +2555,7 @@ function BuffTrigger.Add(data) and tonumber(trigger.matchPerUnit_count) and trigger.matchPerUnit_countOperator then local count = tonumber(trigger.matchPerUnit_count) local match_countFuncStr = Private.function_strings.count:format(trigger.matchPerUnit_countOperator, count) - matchPerUnitCountFunc = Private.LoadFunction(match_countFuncStr) + matchPerUnitCountFunc = Private.LoadFunction(match_countFuncStr, id) end local groupTrigger = trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" @@ -3579,7 +3578,7 @@ function BuffTrigger.InitMultiAura() multiAuraFrame:RegisterEvent("UNIT_AURA") multiAuraFrame:RegisterEvent("PLAYER_TARGET_CHANGED") multiAuraFrame:RegisterEvent("PLAYER_FOCUS_CHANGED") - if WeakAuras.isAwesomeEnabled() then + if WeakAuras.IsAwesomeEnabled() then multiAuraFrame:RegisterEvent("NAME_PLATE_UNIT_ADDED") multiAuraFrame:RegisterEvent("NAME_PLATE_UNIT_REMOVED") end diff --git a/WeakAuras/Compatibility.lua b/WeakAuras/Compatibility.lua index 06e6651..23e26db 100644 --- a/WeakAuras/Compatibility.lua +++ b/WeakAuras/Compatibility.lua @@ -114,6 +114,10 @@ RAID_CLASS_COLORS.SHAMAN.colorStr = "ff0070de" RAID_CLASS_COLORS.WARRIOR.colorStr = "ffc79c6e" RAID_CLASS_COLORS.DEATHKNIGHT.colorStr = "ffc41f3b" +function WrapTextInColorCode(text, colorHexString) + return ("|c%s%s|r"):format(colorHexString, text); +end + function CreateTextureMarkup(file, fileWidth, fileHeight, width, height, left, right, top, bottom, xOffset, yOffset) return ("|T%s:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d|t"):format( file diff --git a/WeakAuras/Conditions.lua b/WeakAuras/Conditions.lua index c97f3cb..cd2c8d4 100644 --- a/WeakAuras/Conditions.lua +++ b/WeakAuras/Conditions.lua @@ -292,7 +292,7 @@ local function CreateTestForCondition(data, input, allConditionsTemplate, usedSt end elseif (cType == "customcheck") then if value then - local customCheck = WeakAuras.LoadFunction("return " .. value) + local customCheck = WeakAuras.LoadFunction("return " .. value, data.id) if customCheck then Private.ExecEnv.conditionHelpers[uid] = Private.ExecEnv.conditionHelpers[uid] or {} Private.ExecEnv.conditionHelpers[uid].customTestFunctions @@ -378,7 +378,7 @@ local function CreateTestForCondition(data, input, allConditionsTemplate, usedSt fn = fn:format(input.op_range, input.range, op, value) end if fn then - local customCheck = WeakAuras.LoadFunction(fn) + local customCheck = WeakAuras.LoadFunction(fn, data.id) if customCheck then Private.ExecEnv.conditionHelpers[uid] = Private.ExecEnv.conditionHelpers[uid] or {} Private.ExecEnv.conditionHelpers[uid].customTestFunctions @@ -654,7 +654,7 @@ function Private.LoadConditionPropertyFunctions(data) else prefix, suffix = "return function()", "\nend"; end - local customFunc = WeakAuras.LoadFunction(prefix .. custom .. suffix); + local customFunc = WeakAuras.LoadFunction(prefix .. custom .. suffix, data.id); if (customFunc) then Private.ExecEnv.customConditionsFunctions[id][conditionNumber] = Private.ExecEnv.customConditionsFunctions[id][conditionNumber] or {}; Private.ExecEnv.customConditionsFunctions[id][conditionNumber].changes = Private.ExecEnv.customConditionsFunctions[id][conditionNumber].changes or {}; @@ -835,7 +835,7 @@ function Private.LoadConditionFunction(data) CancelTimers(data.uid) local checkConditionsFuncStr = ConstructConditionFunction(data); - local checkConditionsFunc = checkConditionsFuncStr and Private.LoadFunction(checkConditionsFuncStr) + local checkConditionsFunc = checkConditionsFuncStr and Private.LoadFunction(checkConditionsFuncStr, data.id) checkConditions[data.uid] = checkConditionsFunc; end @@ -1014,7 +1014,8 @@ function Private.RegisterForGlobalConditions(uid) dynamicConditionsFrame.units[unit] = CreateFrame("Frame"); dynamicConditionsFrame.units[unit]:SetScript("OnEvent", handleDynamicConditionsPerUnit); end - pcall(dynamicConditionsFrame.units[unit].RegisterUnitEvent, dynamicConditionsFrame.units[unit], unitEvent, unit); + dynamicConditionsFrame.units[unit].unit = unit; + pcall(dynamicConditionsFrame.units[unit].RegisterEvent, dynamicConditionsFrame.units[unit], unitEvent, unit); UpdateDynamicConditionsPerUnitState(dynamicConditionsFrame, event, unit) else pcall(dynamicConditionsFrame.RegisterEvent, dynamicConditionsFrame, event); diff --git a/WeakAuras/DiscordList.lua b/WeakAuras/DiscordList.lua index 2ca194b..f72158f 100644 --- a/WeakAuras/DiscordList.lua +++ b/WeakAuras/DiscordList.lua @@ -42,15 +42,18 @@ Private.DiscordList = { [=[MetalMusicMan]=], [=[Murph]=], [=[Mynze]=], + [=[NoM0Re]=], [=[Nona]=], [=[NostraDumAzz]=], [=[Oi]=], + [=[opti]=], [=[Ora]=], [=[phoenix7700]=], [=[pit]=], [=[Putro]=], [=[reggie]=], [=[Reloe]=], + [=[Saaggs]=], [=[Spaten]=], [=[Tel]=], [=[Translit]=], diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index b57086b..13a4e7f 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -555,16 +555,12 @@ function Private.ActivateEvent(id, triggernum, data, state, errorHandler) state.autoHide = autoHide; elseif (data.durationFunc) then local ok, arg1, arg2, arg3, inverse = pcall(data.durationFunc, data.trigger); + arg1 = ok and type(arg1) == "number" and arg1 or 0; + arg2 = ok and type(arg2) == "number" and arg2 or 0; if not ok then - (errorHandler or Private.GetErrorHandlerId(id, L["Duration Function"]))(arg1) - arg1 = 0; - arg2 = 0; - else - arg1 = type(arg1) == "number" and arg1 or 0; - arg2 = type(arg2) == "number" and arg2 or 0; + if errorHandler then errorHandler(arg1) else Private.GetErrorHandlerId(id, L["Duration Function"]) end end - if (state.inverse ~= inverse) then state.inverse = inverse; changed = true; @@ -683,6 +679,9 @@ local function RunTriggerFunc(allStates, data, id, triggernum, event, arg1, arg2 else ok, returnValue = pcall(data.triggerFunc, allStates, event, arg1, arg2, ...); end + if not ok then + errorHandler(returnValue) + end if( (ok and returnValue) or optionsEvent) then for id, state in pairs(allStates) do if (state.changed) then @@ -693,9 +692,6 @@ local function RunTriggerFunc(allStates, data, id, triggernum, event, arg1, arg2 end else untriggerCheck = true; - if not ok then - errorHandler(returnValue) - end end elseif (data.statesParameter == "unit") then if arg1 then @@ -718,15 +714,15 @@ local function RunTriggerFunc(allStates, data, id, triggernum, event, arg1, arg2 else ok, returnValue = pcall(data.triggerFunc, state, event, unitForUnitTrigger, arg1, arg2, ...); end + if not ok then + errorHandler(returnValue) + end if (ok and returnValue) or optionsEvent then if(Private.ActivateEvent(id, triggernum, data, state)) then updateTriggerState = true; end else untriggerCheck = true; - if not ok then - errorHandler(returnValue) - end end end elseif (data.statesParameter == "one") then @@ -738,15 +734,15 @@ local function RunTriggerFunc(allStates, data, id, triggernum, event, arg1, arg2 else ok, returnValue = pcall(data.triggerFunc, state, event, arg1, arg2, ...); end + if not ok then + errorHandler(returnValue) + end if (ok and returnValue) or optionsEvent then if(Private.ActivateEvent(id, triggernum, data, state, (optionsEvent and data.ignoreOptionsEventErrors) and ignoreErrorHandler or nil)) then updateTriggerState = true; end else untriggerCheck = true; - if not ok then - errorHandler(returnValue) - end end else local ok, returnValue @@ -755,6 +751,9 @@ local function RunTriggerFunc(allStates, data, id, triggernum, event, arg1, arg2 else ok, returnValue = pcall(data.triggerFunc, event, arg1, arg2, ...); end + if not ok then + errorHandler(returnValue) + end if (ok and returnValue) or optionsEvent then allStates[""] = allStates[""] or {}; local state = allStates[""]; @@ -763,9 +762,6 @@ local function RunTriggerFunc(allStates, data, id, triggernum, event, arg1, arg2 end else untriggerCheck = true; - if not ok then - errorHandler(returnValue) - end end end if (untriggerCheck and not optionsEvent) then @@ -897,10 +893,8 @@ function Private.ScanEvents(event, arg1, arg2, ...) Private.StopProfileSystem("generictrigger " .. system) return; end - Private.ScanEventsInternal(event_list, event, arg1, arg2, ...); - else - Private.ScanEventsInternal(event_list, event, arg1, arg2, ...); end + Private.ScanEventsInternal(event_list, event, arg1, arg2, ...); Private.StopProfileSystem("generictrigger " .. system) end @@ -1220,7 +1214,7 @@ end function GenericTrigger.UnloadDisplays(toUnload) for id in pairs(toUnload) do - loaded_auras[id] = false; + loaded_auras[id] = nil for eventname, events in pairs(loaded_events) do if(eventname == "COMBAT_LOG_EVENT_UNFILTERED") then for subeventname, subevents in pairs(events) do @@ -1247,17 +1241,18 @@ local frame = CreateFrame("Frame"); frame.unitFrames = {}; Private.frames["WeakAuras Generic Trigger Frame"] = frame; frame:RegisterEvent("PLAYER_ENTERING_WORLD"); -genericTriggerRegisteredEvents["PLAYER_ENTERING_WORLD"] = true; -if WeakAuras.isAwesomeEnabled() then +if WeakAuras.IsAwesomeEnabled() then frame:RegisterEvent("NAME_PLATE_UNIT_ADDED") frame:RegisterEvent("NAME_PLATE_UNIT_REMOVED") genericTriggerRegisteredEvents["NAME_PLATE_UNIT_ADDED"] = true; genericTriggerRegisteredEvents["NAME_PLATE_UNIT_REMOVED"] = true; end +genericTriggerRegisteredEvents["PLAYER_ENTERING_WORLD"] = true; frame:SetScript("OnEvent", HandleEvent); function GenericTrigger.Delete(id) - GenericTrigger.UnloadDisplays({[id] = true}); + events[id] = nil + watched_trigger_events[id] = nil end function GenericTrigger.Rename(oldid, newid) @@ -1630,7 +1625,7 @@ function GenericTrigger.Add(data, region) triggerFuncStr = ConstructFunction(prototype, trigger); statesParameter = prototype.statesParameter; - triggerFunc = Private.LoadFunction(triggerFuncStr); + triggerFunc = Private.LoadFunction(triggerFuncStr, id); durationFunc = prototype.durationFunc; nameFunc = prototype.nameFunc; @@ -1707,44 +1702,44 @@ function GenericTrigger.Add(data, region) end end else -- CUSTOM - triggerFunc = WeakAuras.LoadFunction("return "..(trigger.custom or "")); + triggerFunc = WeakAuras.LoadFunction("return "..(trigger.custom or ""), data.id); if (trigger.custom_type == "stateupdate") then - tsuConditionVariables = WeakAuras.LoadFunction("return function() return \n" .. (trigger.customVariables or "") .. "\n end"); + tsuConditionVariables = WeakAuras.LoadFunction("return function() return \n" .. (trigger.customVariables or "") .. "\n end", data.id); if not tsuConditionVariables then tsuConditionVariables = function() end end end if(trigger.custom_type == "status" or trigger.custom_type == "event" and trigger.custom_hide == "custom") then - untriggerFunc = WeakAuras.LoadFunction("return "..(untrigger.custom or "")); + untriggerFunc = WeakAuras.LoadFunction("return "..(untrigger.custom or ""), data.id); if (not untriggerFunc) then untriggerFunc = trueFunction; end end if(trigger.custom_type ~= "stateupdate" and trigger.customDuration and trigger.customDuration ~= "") then - durationFunc = WeakAuras.LoadFunction("return "..trigger.customDuration); + durationFunc = WeakAuras.LoadFunction("return "..trigger.customDuration, data.id); end if(trigger.custom_type ~= "stateupdate") then overlayFuncs = {}; for i = 1, 7 do local property = "customOverlay" .. i; if (trigger[property] and trigger[property] ~= "") then - overlayFuncs[i] = WeakAuras.LoadFunction("return ".. trigger[property]); + overlayFuncs[i] = WeakAuras.LoadFunction("return ".. trigger[property], data.id); end end end if(trigger.custom_type ~= "stateupdate" and trigger.customName and trigger.customName ~= "") then - nameFunc = WeakAuras.LoadFunction("return "..trigger.customName); + nameFunc = WeakAuras.LoadFunction("return "..trigger.customName, data.id); end if(trigger.custom_type ~= "stateupdate" and trigger.customIcon and trigger.customIcon ~= "") then - iconFunc = WeakAuras.LoadFunction("return "..trigger.customIcon); + iconFunc = WeakAuras.LoadFunction("return "..trigger.customIcon, data.id); end if(trigger.custom_type ~= "stateupdate" and trigger.customTexture and trigger.customTexture ~= "") then - textureFunc = WeakAuras.LoadFunction("return "..trigger.customTexture); + textureFunc = WeakAuras.LoadFunction("return "..trigger.customTexture, data.id); end if(trigger.custom_type ~= "stateupdate" and trigger.customStacks and trigger.customStacks ~= "") then - stacksFunc = WeakAuras.LoadFunction("return "..trigger.customStacks); + stacksFunc = WeakAuras.LoadFunction("return "..trigger.customStacks, data.id); end if((trigger.custom_type == "status" or trigger.custom_type == "stateupdate") and trigger.check == "update") then @@ -1774,7 +1769,7 @@ function GenericTrigger.Add(data, region) end elseif Private.InternalEventByIDList[trueEvent] then tinsert(trigger_events, trueEvent..":"..i) - elseif trueEvent:match("^UNIT_") then + elseif trueEvent:match("^UNIT_") or Private.UnitEventList[trueEvent] then isUnitEvent = true if string.lower(strsub(i, #i - 3)) == "pets" then @@ -2130,9 +2125,9 @@ do lastSwingOff, swingDurationOff = nil, nil swingTriggerUpdate() end - elseif event == "PLAYER_REGEN_DISABLED" then + elseif event == "PLAYER_ENTER_COMBAT" then isAttacking = true - elseif event == "PLAYER_REGEN_ENABLED" then + elseif event == "PLAYER_LEAVE_COMBAT" then isAttacking = nil end Private.StopProfileSystem("generictrigger swing"); @@ -2142,8 +2137,8 @@ do if not(swingTimerFrame) then swingTimerFrame = CreateFrame("Frame"); swingTimerFrame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED"); - swingTimerFrame:RegisterEvent("PLAYER_REGEN_DISABLED"); - swingTimerFrame:RegisterEvent("PLAYER_REGEN_ENABLED"); + swingTimerFrame:RegisterEvent("PLAYER_ENTER_COMBAT"); + swingTimerFrame:RegisterEvent("PLAYER_LEAVE_COMBAT"); swingTimerFrame:RegisterEvent("PLAYER_EQUIPMENT_CHANGED"); swingTimerFrame:RegisterEvent("UNIT_ATTACK_SPEED"); swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED"); @@ -2167,11 +2162,6 @@ end do local cdReadyFrame; - local spells = {}; - local spellKnown = {}; - - local spellCounts = {} - local items = {}; local itemCdDurs = {}; local itemCdExps = {}; @@ -2195,10 +2185,13 @@ do local gcdSpellIcon; local gcdEndCheck; + local shootStart + local shootDuration + local function GetRuneDuration() local runeDuration = -100; for id, _ in pairs(runes) do - local startTime, duration = GetRuneCooldown(id); + local _, duration = GetRuneCooldown(id); duration = duration or 0; runeDuration = duration > 0 and duration or runeDuration end @@ -2207,14 +2200,15 @@ do local function CheckGCD() local event; - local startTime, duration = GetSpellCooldown(61304); + local startTime, duration = GetSpellCooldown(61304) + shootStart, shootDuration = GetSpellCooldown(5019) if(duration and duration > 0) then if not(gcdStart) then event = "GCD_START"; elseif(gcdStart ~= startTime or gcdDuration ~= duration) then event = "GCD_CHANGE"; end - gcdStart, gcdDuration = startTime, duration; + gcdStart, gcdDuration = startTime, duration local endCheck = startTime + duration + 0.1; if(gcdEndCheck ~= endCheck) then gcdEndCheck = endCheck; @@ -2263,12 +2257,14 @@ do local function FetchSpellCooldown(self, id) if self.duration[id] and self.expirationTime[id] then - return self.expirationTime[id] - self.duration[id], self.duration[id], self.readyTime[id] + return self.expirationTime[id] - self.duration[id], self.duration[id], false, self.readyTime[id] + elseif self.remainingTime[id] then + return self.remainingTime[id], self.duration[id], true, self.readyTime[id] end - return 0, 0, nil + return 0, 0, nil, nil end - local function HandleSpell(self, id, startTime, duration) + local function HandleSpell(self, id, startTime, duration, paused) local changed = false local nowReady = false local time = GetTime() @@ -2286,8 +2282,29 @@ do endTime = 0 end + if paused then + if self.duration[id] ~= duration then + self.duration[id] = duration + changed = true + end + if self.expirationTime[id] then + self.expirationTime[id] = nil + changed = true + end + + local remaining = startTime + duration - GetTime() + if self.remainingTime[id] ~= remaining then + self.remainingTime[id] = remaining + changed = true + end + + return changed, false + end + if duration > 0 then - if startTime == gcdStart and duration == gcdDuration then + if (startTime == gcdStart and duration == gcdDuration) + or (duration == shootDuration and startTime == shootStart) + then -- GCD cooldown, this could mean that the spell reset! if self.expirationTime[id] and self.expirationTime[id] > endTime and self.expirationTime[id] ~= 0 then self.duration[id] = 0 @@ -2303,6 +2320,11 @@ do end end + if self.remainingTime[id] then + self.remainingTime[id] = nil + changed = true + end + if self.duration[id] ~= duration then self.duration[id] = duration changed = true @@ -2330,6 +2352,7 @@ do local cd = { duration = {}, expirationTime = {}, + remainingTime = {}, readyTime = {}, handles = {}, -- Share handles, and use lowest time to schedule HandleSpell = HandleSpell, @@ -2338,10 +2361,207 @@ do return cd end - local spellCds = CreateSpellCDHandler(); - local spellCdsRune = CreateSpellCDHandler(); + local SpellDetails = { + -- The data per effective spellId + data = { + }, + + -- Interprets the basic information to figure out whether an ability is on cd or not + -- for th various different api variants we have + -- This can probably be simplfied + spellCds = CreateSpellCDHandler(), + spellCdsRune = CreateSpellCDHandler(), + spellCdsOnlyCooldown = CreateSpellCDHandler(), + spellCdsOnlyCooldownRune = CreateSpellCDHandler(), + + -- Helper functions + AddSpellId = function(self, spellId) + local name, _, icon = GetSpellInfo(spellId) + self.data[spellId] = { + name = name, + icon = icon, + id = spellId, + } + + local spellDetail = self.data[spellId] + spellDetail.known = WeakAuras.IsSpellKnownIncludingPet(spellId) + + local startTime, duration, unifiedCooldownBecauseRune, + startTimeCooldown, durationCooldown, cooldownBecauseRune, + spellCount, paused + = WeakAuras.GetSpellCooldownUnified(spellId, GetRuneDuration()); + + spellDetail.count = spellCount + self.spellCds:HandleSpell(spellId, startTime, duration, paused) + if not unifiedCooldownBecauseRune then + self.spellCdsRune:HandleSpell(spellId, startTime, duration, paused) + end + self.spellCdsOnlyCooldown:HandleSpell(spellId, startTimeCooldown, durationCooldown, paused) + if not cooldownBecauseRune then + self.spellCdsOnlyCooldownRune:HandleSpell(spellId, startTimeCooldown, durationCooldown, paused) + end + end, + + -- Actual api + CheckSpellKnown = function(self) + -- Check for changes in the tracked spells + local changed = {} + for spellId, spellDetailsData in pairs(self.data) do + local known = WeakAuras.IsSpellKnownIncludingPet(spellId) + if (known ~= spellDetailsData.known) then + spellDetailsData.known = known + changed[spellId] = true + end + + local name, _, icon = GetSpellInfo(spellId) + if self.data[spellId].name ~= name then + self.data[spellId].name = name + changed[spellId] = true + end + if self.data[spellId].icon ~= icon then + self.data[spellId].icon = icon + changed[spellId] = true + end + end + + if not WeakAuras.IsPaused() then + for id in pairs(changed) do + self:SendEventsForSpell(id, "SPELL_COOLDOWN_CHANGED", id) + end + end + end, + + CheckSpellCooldowns = function(self, runeDuration) + for id, _ in pairs(self.data) do + self:CheckSpellCooldown(id, runeDuration) + end + end, + + CheckSpellCooldown = function(self, spellId, runeDuration) + local startTime, duration, unifiedCooldownBecauseRune, + startTimeCooldown, durationCooldown, cooldownBecauseRune, + spellCount, paused + = WeakAuras.GetSpellCooldownUnified(spellId, runeDuration); + + local time = GetTime(); + + local spellDetail = self.data[spellId] + + local chargesChanged = spellDetail.count ~= spellCount + local chargesDifference = (spellCount or 0) - (spellDetail.count or 0) + spellDetail.count = spellCount + if chargesDifference ~= 0 then + if chargesDifference > 0 then + spellDetail.chargeGainTime = time + spellDetail.chargeLostTime = nil + else + spellDetail.chargeGainTime = nil + spellDetail.chargeLostTime = time + end + end + + local changed = false + changed = self.spellCds:HandleSpell(spellId, startTime, duration, paused) or changed + if not unifiedCooldownBecauseRune then + changed = self.spellCdsRune:HandleSpell(spellId, startTime, duration, paused) or changed + end + local cdChanged, nowReady = self.spellCdsOnlyCooldown:HandleSpell(spellId, startTimeCooldown, durationCooldown, paused) + changed = cdChanged or changed + if not cooldownBecauseRune then + changed = self.spellCdsOnlyCooldownRune:HandleSpell(spellId, startTimeCooldown, durationCooldown, paused) or changed + end + + if not WeakAuras.IsPaused() then + if nowReady then + self:SendEventsForSpell(spellId, "SPELL_COOLDOWN_READY", spellId) + end + + if changed or chargesChanged then + self:SendEventsForSpell(spellId, "SPELL_COOLDOWN_CHANGED", spellId) + end + + if (chargesDifference ~= 0 ) then + self:SendEventsForSpell(spellId, "SPELL_CHARGES_CHANGED", spellId, chargesDifference, spellCount or 0) + end + end + end, + + WatchSpellCooldown = function(self, spellId, ignoreRunes) + if not(cdReadyFrame) then + Private.InitCooldownReady(); + end + + if not spellId or spellId == 0 then + return + end + + if ignoreRunes then + for i = 1, 6 do + WeakAuras.WatchRuneCooldown(i) + end + end + + if self.data[spellId] then + -- We are already watching spellId, so there's + -- nothing to do then + return + end + + -- We aren't watching spellId yet + self:AddSpellId(spellId) + end, + + SendEventsForSpell = function(self, effectiveSpellId, event, ...) + Private.ScanEventsByID(event, effectiveSpellId, ...) + end, + + GetSpellCharges = function(self, spellId, ignoreSpellKnown) + local spellDetail = self.data[spellId] + if not spellDetail then + return + end + + if not spellDetail.known and not ignoreSpellKnown then + return + end + return spellDetail.count, spellDetail.count, spellDetail.count, spellDetail.chargeGainTime, spellDetail.chargeLostTime + end, + + GetSpellCooldown = function(self, spellId, ignoreRuneCD, showgcd, ignoreSpellKnown, track) + if (not (self.data[spellId] and self.data[spellId].known) and not ignoreSpellKnown) then + return; + end + local startTime, duration, paused, gcdCooldown, readyTime + if track == "cooldown" then + if ignoreRuneCD then + startTime, duration, paused, readyTime = self.spellCdsOnlyCooldownRune:FetchSpellCooldown(spellId) + else + startTime, duration, paused, readyTime = self.spellCdsOnlyCooldown:FetchSpellCooldown(spellId) + end + elseif (ignoreRuneCD) then + startTime, duration, paused, readyTime = self.spellCdsRune:FetchSpellCooldown(spellId) + else + startTime, duration, paused, readyTime = self.spellCds:FetchSpellCooldown(spellId) + end + + if paused then + return startTime, duration, false, readyTime, true + end + + if (showgcd) then + if ((gcdStart or 0) + (gcdDuration or 0) > startTime + duration) then + if startTime == 0 then + gcdCooldown = true + end + startTime = gcdStart; + duration = gcdDuration; + end + end + + return startTime, duration, gcdCooldown, readyTime, false + end + } - local spellDetails = {} local mark_ACTIONBAR_UPDATE_COOLDOWN, mark_PLAYER_ENTERING_WORLD function Private.InitCooldownReady() @@ -2353,6 +2573,7 @@ do cdReadyFrame:RegisterEvent("PLAYER_TALENT_UPDATE"); cdReadyFrame:RegisterEvent("CHARACTER_POINTS_CHANGED"); cdReadyFrame:RegisterEvent("SPELL_UPDATE_COOLDOWN"); + cdReadyFrame:RegisterEvent("SPELL_UPDATE_USABLE") cdReadyFrame:RegisterEvent("UNIT_SPELLCAST_SENT"); cdReadyFrame:RegisterEvent("BAG_UPDATE_COOLDOWN"); cdReadyFrame:RegisterEvent("UNIT_INVENTORY_CHANGED") @@ -2360,7 +2581,7 @@ do cdReadyFrame:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN"); cdReadyFrame:RegisterEvent("SPELLS_CHANGED"); cdReadyFrame:RegisterEvent("PLAYER_ENTERING_WORLD"); - cdReadyFrame:RegisterEvent("PLAYER_LEAVING_WORLD"); + cdReadyFrame:RegisterEvent("PLAYER_LEAVING_WORLD") cdReadyFrame.HandleEvent = function(self, event, ...) if (event == "PLAYER_ENTERING_WORLD") then cdReadyFrame.inWorld = GetTime() @@ -2386,7 +2607,7 @@ do Private.StartProfileSystem("generictrigger cd tracking"); if type(event) == "number" then-- Called from OnUpdate! if mark_PLAYER_ENTERING_WORLD then - Private.CheckSpellKnown() + SpellDetails:CheckSpellKnown() Private.CheckCooldownReady() Private.CheckItemSlotCooldowns() mark_PLAYER_ENTERING_WORLD = nil @@ -2395,21 +2616,22 @@ do Private.CheckCooldownReady() mark_ACTIONBAR_UPDATE_COOLDOWN = nil end - elseif(event == "SPELL_UPDATE_COOLDOWN" or event == "RUNE_POWER_UPDATE" - or event == "PLAYER_TALENT_UPDATE" - or event == "CHARACTER_POINTS_CHANGED" or event == "RUNE_TYPE_UPDATE") then - if event == "SPELL_UPDATE_COOLDOWN" then - mark_ACTIONBAR_UPDATE_COOLDOWN = nil - end - Private.CheckCooldownReady(); + elseif(event == "SPELL_UPDATE_COOLDOWN" or event == "SPELL_UPDATE_USABLE" + or event == "RUNE_POWER_UPDATE" or event == "RUNE_TYPE_UPDATE" + or event == "PLAYER_TALENT_UPDATE" or event == "CHARACTER_POINTS_CHANGED") + then + if event == "SPELL_UPDATE_COOLDOWN" then + mark_ACTIONBAR_UPDATE_COOLDOWN = nil + end + Private.CheckCooldownReady(); elseif(event == "SPELLS_CHANGED") then - Private.CheckSpellKnown() + SpellDetails:CheckSpellKnown() Private.CheckCooldownReady() elseif(event == "UNIT_SPELLCAST_SENT") then - local unit, name, _ = ...; + local unit, name = ...; if(unit == "player") then if(gcdSpellName ~= name) then - local _,_,icon = GetSpellInfo(name or 0); + local icon = select(3,GetSpellInfo(name or 0)); gcdSpellName = name; gcdSpellIcon = icon; if not WeakAuras.IsPaused() then @@ -2440,29 +2662,12 @@ do end end - function WeakAuras.GetSpellCooldown(id, ignoreRuneCD, showgcd) - local startTime, duration, gcdCooldown, readyTime - if (ignoreRuneCD) then - startTime, duration, readyTime = spellCdsRune:FetchSpellCooldown(id) - else - startTime, duration, readyTime = spellCds:FetchSpellCooldown(id) - end - - if (showgcd) then - if ((gcdStart or 0) + (gcdDuration or 0) > startTime + duration) then - if startTime == 0 then - gcdCooldown = true - end - startTime = gcdStart; - duration = gcdDuration; - end - end - - return startTime, duration, gcdCooldown, readyTime + function WeakAuras.GetSpellCooldown(id, ignoreRuneCD, showgcd, ignoreSpellKnown, track) + return SpellDetails:GetSpellCooldown(id, ignoreRuneCD, showgcd, ignoreSpellKnown, track) end - function WeakAuras.GetSpellCharges(id) - return spellCounts[id]; + function WeakAuras.GetSpellCharges(id, ignoreSpellKnown) + return SpellDetails:GetSpellCharges(id, ignoreSpellKnown) end function WeakAuras.GetItemCooldown(id, showgcd) @@ -2543,10 +2748,12 @@ do end function Private.CheckRuneCooldown() + local runeDuration = -100; for id, _ in pairs(runes) do local startTime, duration = GetRuneCooldown(id); startTime = startTime or 0; duration = duration or 0; + runeDuration = duration > 0 and duration or runeDuration local time = GetTime(); if(not startTime or startTime == 0) then @@ -2574,7 +2781,7 @@ do runeCdHandles[id] = timer:ScheduleTimer(RuneCooldownFinished, endTime - time, id); Private.ScanEvents("RUNE_COOLDOWN_CHANGED", id); end - elseif(startTime > 0 and duration > 0) then + elseif(duration > 0) then -- GCD, do nothing else if(runeCdExps[id]) then @@ -2587,15 +2794,17 @@ do end end end + return runeDuration; end function WeakAuras.GetSpellCooldownUnified(id, runeDuration) local startTimeCooldown, durationCooldown, enabled = GetSpellCooldown(id) + enabled = enabled == 1 and true or false startTimeCooldown = startTimeCooldown or 0; durationCooldown = durationCooldown or 0; - -- WORKAROUND Sometimes the API returns very high bogus numbers causing client freeezes, discard them here. WowAce issue #1008 + -- WORKAROUND: Sometimes the API returns very high bogus numbers causing client freezes, discard them here. CurseForge issue #1008 if (durationCooldown > 604800) then durationCooldown = 0; startTimeCooldown = 0; @@ -2607,81 +2816,37 @@ do startTimeCooldown = startTimeCooldown - 2^32 / 1000 end - local cooldownBecauseRune = false; - if (enabled == 0) then - startTimeCooldown, durationCooldown = 0, 0 + -- Default to + local unifiedCooldownBecauseRune = false + local cooldownBecauseRune = false + -- Paused cooldowns are: + -- Spells like Presence of Mind/Nature's Swiftness that start their cooldown after the effect is consumed + -- But also oddly some Evoker spells + -- Presence of Might is on 0.0001 enabled == 0 cooldown while prepared + -- For Evoker, using an empowered spell puts spells on pause. Some spells are put on an entirely bogus 0.5 paused cd + -- Others the real cd (that continues ticking) is paused. + -- We treat anything with less than 0.5 as not on cd, and hope for the best. + if not enabled and durationCooldown <= 0.5 then + startTimeCooldown, durationCooldown, enabled = 0, 0, true end local onNonGCDCD = durationCooldown and startTimeCooldown and durationCooldown > 0 and (durationCooldown ~= gcdDuration or startTimeCooldown ~= gcdStart); if (onNonGCDCD) then cooldownBecauseRune = runeDuration and durationCooldown and abs(durationCooldown - runeDuration) < 0.001; + unifiedCooldownBecauseRune = cooldownBecauseRune end - return startTimeCooldown, durationCooldown, cooldownBecauseRune, GetSpellCount(id); - end + local startTime, duration = startTimeCooldown, durationCooldown - function Private.CheckSpellKnown() - for id, _ in pairs(spells) do - local known = WeakAuras.IsSpellKnownIncludingPet(id); - local changed = false - if (known ~= spellKnown[id]) then - spellKnown[id] = known - changed = true - end + local count = GetSpellCount(id) - local name, _, icon = GetSpellInfo(id) - if spellDetails[id].name ~= name then - spellDetails[id].name = name - changed = true - end - if spellDetails[id].icon ~= icon then - spellDetails[id].icon = icon - changed = true - end - - if changed and not WeakAuras.IsPaused() then - Private.ScanEventsByID("SPELL_COOLDOWN_CHANGED", id) - end - end + return startTime, duration, unifiedCooldownBecauseRune, + startTimeCooldown, durationCooldown, cooldownBecauseRune, + count, not enabled end function Private.CheckSpellCooldown(id, runeDuration) - local startTimeCooldown, durationCooldown, cooldownBecauseRune, spellCount = WeakAuras.GetSpellCooldownUnified(id, runeDuration); - - local time = GetTime(); - local remaining = startTimeCooldown + durationCooldown - time; - - local chargesChanged = spellCounts[id] ~= spellCount; - local chargesDifference = (spellCount or 0) - (spellCount or 0) - spellCounts[id] = spellCount - - local changed = false - - local cdChanged, nowReady = spellCds:HandleSpell(id, startTimeCooldown, durationCooldown) - changed = cdChanged or changed - if not cooldownBecauseRune then - changed = spellCdsRune:HandleSpell(id, startTimeCooldown, durationCooldown) or changed - end - - if not WeakAuras.IsPaused() then - if nowReady then - Private.ScanEventsByID("SPELL_COOLDOWN_READY", id) - end - - if changed or chargesChanged then - Private.ScanEventsByID("SPELL_COOLDOWN_CHANGED", id) - end - - if (chargesDifference ~= 0 ) then - Private.ScanEventsByID("SPELL_CHARGES_CHANGED", id, chargesDifference, spellCount or 0); - end - end - end - - function Private.CheckSpellCooldowns(runeDuration) - for id, _ in pairs(spells) do - Private.CheckSpellCooldown(id, runeDuration) - end + SpellDetails:CheckSpellCooldown(id, runeDuration) end function Private.CheckItemCooldowns() @@ -2806,8 +2971,8 @@ do function Private.CheckCooldownReady() CheckGCD(); - Private.CheckRuneCooldown(); - Private.CheckSpellCooldowns(); + local runeDuration = Private.CheckRuneCooldown(); + SpellDetails:CheckSpellCooldowns(runeDuration); Private.CheckItemCooldowns(); Private.CheckItemSlotCooldowns(); end @@ -2847,35 +3012,7 @@ do end function WeakAuras.WatchSpellCooldown(id, ignoreRunes) - if not(cdReadyFrame) then - Private.InitCooldownReady(); - end - - if not id or id == 0 then return end - - if ignoreRunes then - for i = 1, 6 do - WeakAuras.WatchRuneCooldown(i); - end - end - - if (spells[id]) then - return; - end - spells[id] = true; - local name, _, icon = GetSpellInfo(id) - spellDetails[id] = { - name = name, - icon = icon - } - spellKnown[id] = WeakAuras.IsSpellKnownIncludingPet(id); - - local startTimeCooldown, durationCooldown, cooldownBecauseRune, spellCount = WeakAuras.GetSpellCooldownUnified(id, GetRuneDuration()); - spellCounts[id] = spellCount - spellCds:HandleSpell(id, startTimeCooldown, durationCooldown) - if not cooldownBecauseRune then - spellCdsRune:HandleSpell(id, startTimeCooldown, durationCooldown) - end + SpellDetails:WatchSpellCooldown(id, ignoreRunes) end function WeakAuras.WatchItemCooldown(id) @@ -2895,7 +3032,7 @@ do startTime, duration = 0, 0 end itemCdEnabled[id] = enabled; - if(duration > 0 and duration > 1.5 and duration ~= WeakAuras.gcdDuration()) then + if(duration and duration > 0 and duration > 1.5 and duration ~= WeakAuras.gcdDuration()) then local time = GetTime(); local endTime = startTime + duration; itemCdDurs[id] = duration; @@ -2960,14 +3097,14 @@ function WeakAuras.WatchUnitChange(unit) Private.frames["Unit Change Frame"] = watchUnitChange; watchUnitChange:RegisterEvent("PLAYER_TARGET_CHANGED") - watchUnitChange:RegisterEvent("PLAYER_FOCUS_CHANGED"); + watchUnitChange:RegisterEvent("PLAYER_FOCUS_CHANGED") watchUnitChange:RegisterEvent("ARENA_OPPONENT_UPDATE") - watchUnitChange:RegisterEvent("PLAYER_ROLES_ASSIGNED"); + watchUnitChange:RegisterEvent("PLAYER_ROLES_ASSIGNED") watchUnitChange:RegisterEvent("UNIT_TARGET"); watchUnitChange:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT"); - watchUnitChange:RegisterEvent("PARTY_MEMBERS_CHANGED"); - watchUnitChange:RegisterEvent("RAID_ROSTER_UPDATE"); - if WeakAuras.isAwesomeEnabled() then + watchUnitChange:RegisterEvent("PARTY_MEMBERS_CHANGED") + watchUnitChange:RegisterEvent("RAID_ROSTER_UPDATE") + if WeakAuras.IsAwesomeEnabled() then watchUnitChange:RegisterEvent("NAME_PLATE_UNIT_ADDED") watchUnitChange:RegisterEvent("NAME_PLATE_UNIT_REMOVED") end @@ -3177,6 +3314,7 @@ function WeakAuras.WatchUnitChange(unit) watchUnitChange.trackedUnits[unit] = true watchUnitChange.unitIdToGUID[unit] = WeakAuras.UnitExistsFixed(unit) and UnitGUID(unit) watchUnitChange.unitExists[unit] = UnitExists(unit) + if guid then watchUnitChange.GUIDToUnitIds[guid] = watchUnitChange.GUIDToUnitIds[guid] or {} watchUnitChange.GUIDToUnitIds[guid][unit] = true @@ -3206,9 +3344,9 @@ function WeakAuras.GetEquipmentSetInfo(itemSetName, partial) for slot, item in ipairs(equipmentSetItemIDs) do if item > 0 then numItems = numItems + 1 - if equipmentItemIDs[slot] == item then - numEquipped = numEquipped + 1 - end + if equipmentItemIDs[slot] == item then + numEquipped = numEquipped + 1 + end end end local match = (not partial and numItems == numEquipped) @@ -3346,12 +3484,12 @@ do function WeakAuras.TenchInit() if not(tenchFrame) then tenchFrame = CreateFrame("Frame"); - tenchFrame:RegisterEvent("UNIT_INVENTORY_CHANGED"); tenchFrame:RegisterEvent("PLAYER_ENTERING_WORLD"); - - tenchTip = WeakAuras.GetHiddenTooltip(); + tenchFrame:RegisterEvent("UNIT_INVENTORY_CHANGED", "player") + tenchFrame:RegisterEvent("PLAYER_EQUIPMENT_CHANGED"); local function getTenchName(id) + tenchTip = WeakAuras.GetHiddenTooltip(); tenchTip:SetInventoryItem("player", id); local lines = { tenchTip:GetRegions() }; for i,v in ipairs(lines) do @@ -3359,7 +3497,7 @@ do local text = v:GetText(); if(text) then local _, _, name, shortenedName = text:find("^((.-) ?+?[XVI%d]*) %(%d+ .+%)$"); - if(name) then + if(name and name ~= "") then return name, shortenedName; end end @@ -3371,7 +3509,7 @@ do local function tenchUpdate() Private.StartProfileSystem("generictrigger temporary enchant"); - local _, mh_rem, oh_rem, rw_rem, re_charges + local _, mh_rem, oh_rem, rw_rem _, mh_rem, mh_charges, _, oh_rem, oh_charges, _, rw_rem, rw_charges = GetWeaponEnchantInfo(); local time = GetTime(); local mh_exp_new = mh_rem and (time + (mh_rem / 1000)); @@ -3442,7 +3580,7 @@ do function WeakAuras.WatchForPetDeath() if not(petFrame) then petFrame = CreateFrame("Frame"); - petFrame:RegisterEvent("UNIT_PET") + petFrame:RegisterEvent("UNIT_PET") petFrame:SetScript("OnEvent", function(_, event, unit) if unit ~= "player" then return end Private.StartProfileSystem("generictrigger pet update") @@ -3470,7 +3608,6 @@ do castLatencyFrame:SetScript("OnEvent", function(self, event, unit, ...) if unit and unit ~= "player" then return end - if event == "CURRENT_SPELL_CAST_CHANGED" then castLatencyFrame.sendTime = GetTime() return @@ -3479,6 +3616,7 @@ do castLatencyFrame.sendTime = nil return end + if castLatencyFrame.sendTime then castLatencyFrame.timeDiff = (GetTime() - castLatencyFrame.sendTime) else @@ -3494,7 +3632,6 @@ do end --- Nameplate Target do local nameplateTargetFrame = nil local nameplateTargets = {} @@ -3578,23 +3715,29 @@ end do local playerMovingFrame = nil - local function PlayerMoveSpeedUpdate() + local function PlayerMoveUpdate() Private.StartProfileSystem("generictrigger player moving"); local speed = GetUnitSpeed("player") - if speed ~= playerMovingFrame.speed then + if playerMovingFrame.speed ~= speed then playerMovingFrame.speed = speed Private.ScanEvents("PLAYER_MOVE_SPEED_UPDATE") end + + local moving = speed > 0 + if playerMovingFrame.moving ~= moving then + playerMovingFrame.moving = moving + Private.ScanEvents("PLAYER_MOVING_UPDATE") + end Private.StopProfileSystem("generictrigger player moving"); end - function WeakAuras.WatchPlayerMoveSpeed() - if not (playerMovingFrame) then + function WeakAuras.WatchForPlayerMoving() + if not(playerMovingFrame) then playerMovingFrame = CreateFrame("Frame"); Private.frames["Player Moving Frame"] = playerMovingFrame; + playerMovingFrame.speed = GetUnitSpeed("player") end - playerMovingFrame.speed = GetUnitSpeed("player") - playerMovingFrame:SetScript("OnUpdate", PlayerMoveSpeedUpdate) + playerMovingFrame:SetScript("OnUpdate", PlayerMoveUpdate) end end @@ -3682,18 +3825,31 @@ do end -- Item Count -local itemCountWatchFrame; +local itemCountWatchFrame function WeakAuras.RegisterItemCountWatch() - if not(itemCountWatchFrame) then - itemCountWatchFrame = CreateFrame("Frame"); - itemCountWatchFrame:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED"); - itemCountWatchFrame:SetScript("OnEvent", function(_, _, unit) - if unit ~= "player" then return end - Private.StartProfileSystem("generictrigger item count"); - timer:ScheduleTimer(Private.ScanEvents, 0.2, "ITEM_COUNT_UPDATE"); - timer:ScheduleTimer(Private.ScanEvents, 0.5, "ITEM_COUNT_UPDATE"); - Private.StopProfileSystem("generictrigger item count"); - end); + if not itemCountWatchFrame then + itemCountWatchFrame = CreateFrame("Frame") + itemCountWatchFrame:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN") + itemCountWatchFrame:RegisterEvent("BAG_UPDATE") + local batchUpdateCount = function() + itemCountWatchFrame:SetScript("OnUpdate", nil) + Private.StartProfileSystem("generictrigger ITEM_COUNT_UPDATE") + Private.ScanEvents("ITEM_COUNT_UPDATE") + Private.StopProfileSystem("generictrigger ITEM_COUNT_UPDATE") + end + itemCountWatchFrame:SetScript("OnEvent", function(self, event) + Private.StartProfileSystem("generictrigger itemCountFrame") + if event == "ACTIONBAR_UPDATE_COOLDOWN" then + -- WORKAROUND: Blizzard bug: refreshing healthstones from soulwell don't trigger BAG_UPDATE_DELAYED + -- so, we fake it by listening to A_U_C and checking on next frame + itemCountWatchFrame:SetScript("OnUpdate", batchUpdateCount) + else + -- if we *do* get a B_U_D, then cancel our fake one + -- item count prototype already subscribes to this event so no need to also send an internal event + itemCountWatchFrame:SetScript("OnUpdate", nil) + end + Private.StopProfileSystem("generictrigger itemCountFrame") + end) end end @@ -3701,10 +3857,10 @@ end -- We always register, because it's probably not that often called, and ScanEvents checks -- early if anyone wants the event Private.LibGroupTalentsWrapper.Register(function(unit) - WeakAuras.ScanEvents("UNIT_SPEC_CHANGED_" .. unit, unit) if unit == "player" then Private.ScanForLoads(nil, "UNIT_SPEC_CHANGED_" .. unit) end + WeakAuras.ScanEvents("UNIT_SPEC_CHANGED_" .. unit, unit) end) do @@ -3730,7 +3886,6 @@ do scheduled_scans[unit][firetime] = nil; Private.ScanEvents("CAST_REMAINING_CHECK_" .. string.lower(unit), unit); end - function Private.ExecEnv.ScheduleCastCheck(fireTime, unit) scheduled_scans[unit] = scheduled_scans[unit] or {} if not(scheduled_scans[unit][fireTime]) then @@ -4029,15 +4184,17 @@ local commonConditions = { hidden = true, type = "bool", test = function(state, needle) - if not state or not state.itemId or not state.show or not UnitExists('target') then + if not state or not state.itemname or not state.show or not UnitExists('target') then return false end if InCombatLockdown() and not UnitCanAttack('player', 'target') then return false end - return C_Item.IsItemInRange(state.itemId, 'target') == (needle == 1) + return IsItemInRange(state.itemname, 'target') == 1 == (needle == 1) end, - events = { "PLAYER_TARGET_CHANGED", "WA_SPELL_RANGECHECK", } + events = Private.AddTargetConditionEvents({ + "WA_SPELL_RANGECHECK", + }) }, } @@ -4256,27 +4413,23 @@ function GenericTrigger.CreateFallbackState(data, triggernum, state) if (event.textureFunc ) then local ok, texture = pcall(event.textureFunc, trigger); + state.texture = ok and texture or nil; if not ok then Private.GetErrorHandlerUid(data.uid, L["Texture Function (fallback state)"]) - state.texture = nil - else - state.texture = texture or nil end end if (event.stacksFunc) then local ok, stacks = pcall(event.stacksFunc, trigger); + state.stacks = ok and stacks or nil; if not ok then Private.GetErrorHandlerUid(data.uid, L["Stacks Function (fallback state)"]) - state.stacks = nil - else - state.stacks = stacks or nil end end if (event.durationFunc) then local ok, arg1, arg2, arg3, inverse = pcall(event.durationFunc, trigger); - if not ok then + if (not ok) then Private.GetErrorHandlerUid(data.uid, L["Duration Function (fallback state)"]) state.progressType = "timed"; state.duration = 0; diff --git a/WeakAuras/Init.lua b/WeakAuras/Init.lua index 958b11d..3f09499 100644 --- a/WeakAuras/Init.lua +++ b/WeakAuras/Init.lua @@ -9,16 +9,25 @@ WeakAuras.halfWidth = WeakAuras.normalWidth / 2 WeakAuras.doubleWidth = WeakAuras.normalWidth * 2 local versionStringFromToc = GetAddOnMetadata("WeakAuras", "Version") -local versionString = "5.19.9 Beta" +local versionString = "5.19.10 Beta" local buildTime = "20250425191700" local isAwesomeEnabled = C_NamePlate and C_NamePlate.GetNamePlateForUnit and true or false +local flavor +if GetRealmName() == "Onyxia" or (GetRealmName() == "Blackrock [PvP only]" and GetExpansionLevel() == 1) then + flavor = "TBC" +elseif GetRealmName() == "Kezan" then + flavor = "ClassicPlus" +else + flavor = "Wrath" +end + WeakAuras.versionString = versionString WeakAuras.buildTime = buildTime WeakAuras.newFeatureString = "|TInterface\\OptionsFrame\\UI-OptionsFrame-NewFeatureIcon:0|t" WeakAuras.BuildInfo = select(4, GetBuildInfo()) -function WeakAuras.isAwesomeEnabled() +function WeakAuras.IsAwesomeEnabled() return isAwesomeEnabled or false end @@ -26,6 +35,22 @@ function WeakAuras.IsCorrectVersion() return true end +function WeakAuras.IsWrath() + return flavor == "Wrath" +end + +function WeakAuras.IsTBC() + return flavor == "TBC" +end + +function WeakAuras.IsClassicPlus() + return flavor == "ClassicPlus" +end + +function WeakAuras.IsClassicPlusOrTBC() + return WeakAuras.IsClassicPlus() or WeakAuras.IsTBC() +end + WeakAuras.prettyPrint = function(...) print("|cff9900ffWeakAuras:|r ", ...) end diff --git a/WeakAuras/Libs/LibCustomGlow-1.0/LibCustomGlow-1.0.lua b/WeakAuras/Libs/LibCustomGlow-1.0/LibCustomGlow-1.0.lua index 2d7b5dd..d95d2e6 100644 --- a/WeakAuras/Libs/LibCustomGlow-1.0/LibCustomGlow-1.0.lua +++ b/WeakAuras/Libs/LibCustomGlow-1.0/LibCustomGlow-1.0.lua @@ -1,5 +1,12 @@ +--[[ +This library contains work of Hendrick "nevcairiel" Leppkes +https://www.wowace.com/projects/libbuttonglow-1-0 +]] + +-- luacheck: globals CreateFromMixins ObjectPoolMixin CreateTexturePool CreateFramePool + local MAJOR_VERSION = "LibCustomGlow-1.0" -local MINOR_VERSION = 16 +local MINOR_VERSION = 21 if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end local lib, oldversion = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION) if not lib then return end @@ -8,14 +15,22 @@ local pairs, ipairs = pairs, ipairs local ceil, floor, min, mod = math.ceil, math.floor, math.min, mod local tinsert, tremove = table.insert, table.remove +-- =============================================================================== +-- !!! IMPORTANT: CHANGE `texturePath` BELOW TO POINT TO YOUR ADDON'S FILE LOCATION !!! +-- DON'T FORGET THE BACKSLASH AT THE END (\)! +-- Example: local texturePath = [[Interface\AddOns\YourAddon\Libs\]] +-- =============================================================================== +-- This is the path to the texture files used by this library. +local texturePath = [[Interface\AddOns\WeakAuras\Libs\]] + local textureList = { - ["empty"] = [[Interface\AddOns\WeakAuras\Libs\LibCustomGlow-1.0\AM_29]], - ["white"] = [[Interface\BUTTONS\WHITE8X8]], - ["shine"] = [[Interface\AddOns\WeakAuras\Libs\LibCustomGlow-1.0\Artifacts]] + ["empty"] = texturePath .. [[LibCustomGlow-1.0\AM_29]], + ["white"] = [[Interface\BUTTONS\WHITE8X8]], + ["shine"] = texturePath .. [[LibCustomGlow-1.0\Artifacts]] } function lib.RegisterTextures(texture, id) - textureList[id] = texture + textureList[id] = texture end lib.glowList = {} @@ -25,212 +40,212 @@ lib.stopList = {} local GlowParent = UIParent local TexPoolResetter = function(pool, tex) - tex:Hide() - tex:ClearAllPoints() + tex:Hide() + tex:ClearAllPoints() end local GlowTexPool = CreateTexturePool(GlowParent, "ARTWORK", nil, TexPoolResetter) lib.GlowTexPool = GlowTexPool local FramePoolResetter = function(framePool, frame) - frame:SetScript("OnSizeChanged", nil) - frame:SetScript("OnUpdate", nil) + frame:SetScript("OnSizeChanged", nil) + frame:SetScript("OnUpdate", nil) - local parent = frame:GetParent() - if parent[frame.name] then - parent[frame.name] = nil - end + local parent = frame:GetParent() + if parent[frame.name] then + parent[frame.name] = nil + end - if frame.textures then - for _, texture in ipairs(frame.textures) do - GlowTexPool:Release(texture) - end - end + if frame.textures then + for _, texture in ipairs(frame.textures) do + GlowTexPool:Release(texture) + end + end - frame.textures = {} - frame.info = {} - frame.name = nil - frame.timer = nil - frame:Hide() - frame:ClearAllPoints() + frame.textures = {} + frame.info = {} + frame.name = nil + frame.timer = nil + frame:Hide() + frame:ClearAllPoints() end local GlowFramePool = CreateFramePool("Frame", GlowParent, "", FramePoolResetter) lib.GlowFramePool = GlowFramePool local function addFrameAndTex(r, color, name, key, N, xOffset, yOffset, texture, texCoord, desaturated, frameLevel) - key = key or "" - frameLevel = frameLevel or 8 + key = key or "" + frameLevel = frameLevel or 8 - if not r[name..key] then - r[name..key] = GlowFramePool:Acquire() - r[name..key]:SetParent(r) - r[name..key].name = name..key - end + if not r[name..key] then + r[name..key] = GlowFramePool:Acquire() + r[name..key]:SetParent(r) + r[name..key].name = name..key + end - local f = r[name..key] - f:SetFrameLevel(r:GetFrameLevel() + frameLevel) - f:SetPoint("TOPLEFT", r, "TOPLEFT", -xOffset, yOffset) - f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", xOffset, -yOffset) - f:Show() + local f = r[name..key] + f:SetFrameLevel(r:GetFrameLevel() + frameLevel) + f:SetPoint("TOPLEFT", r, "TOPLEFT", -xOffset, yOffset) + f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", xOffset, -yOffset) + f:Show() - if not f.textures then - f.textures = {} - end + if not f.textures then + f.textures = {} + end - for i = 1, N do - if not f.textures[i] then - f.textures[i] = GlowTexPool:Acquire() - f.textures[i]:SetTexture(texture) - f.textures[i]:SetTexCoord(texCoord[1], texCoord[2], texCoord[3], texCoord[4]) - f.textures[i]:SetParent(f) - end + for i = 1, N do + if not f.textures[i] then + f.textures[i] = GlowTexPool:Acquire() + f.textures[i]:SetTexture(texture) + f.textures[i]:SetTexCoord(texCoord[1], texCoord[2], texCoord[3], texCoord[4]) + f.textures[i]:SetParent(f) + end - f.textures[i]:SetVertexColor(color[1], color[2], color[3], color[4]) - f.textures[i]:Show() - end + f.textures[i]:SetVertexColor(color[1], color[2], color[3], color[4]) + f.textures[i]:Show() + end - while #f.textures > N do - GlowTexPool:Release(f.textures[#f.textures]) - tremove(f.textures) - end + while #f.textures > N do + GlowTexPool:Release(f.textures[#f.textures]) + tremove(f.textures) + end end --Pixel Glow Functions-- local pPoint = { - ["BOTTOMLEFT"] = "BOTTOMRIGHT", - ["BOTTOMRIGHT"] = "TOPRIGHT", - ["TOPRIGHT"] = "TOPLEFT", - ["TOPLEFT"] = "BOTTOMLEFT", + ["BOTTOMLEFT"] = "BOTTOMRIGHT", + ["BOTTOMRIGHT"] = "TOPRIGHT", + ["TOPRIGHT"] = "TOPLEFT", + ["TOPLEFT"] = "BOTTOMLEFT", } local function pWidth(position, width, length, thickness, line1, line2, point) - line1:ClearAllPoints() - line1:SetPoint(pPoint[point], point == "BOTTOMLEFT" and -position or position, 0) - position = width - position - if position > length then - line1:SetSize(length, thickness) - line2:Hide() - else - line2:ClearAllPoints() - line2:SetPoint(point) - line2:Show() + line1:ClearAllPoints() + line1:SetPoint(pPoint[point], point == "BOTTOMLEFT" and -position or position, 0) + position = width - position + if position > length then + line1:SetSize(length, thickness) + line2:Hide() + else + line2:ClearAllPoints() + line2:SetPoint(point) + line2:Show() - line1:SetSize(position, thickness) - line2:SetSize(thickness, length - position) - end + line1:SetSize(position, thickness) + line2:SetSize(thickness, length - position) + end end local function pHeight(position, height, length, thickness, line1, line2, point) - line1:ClearAllPoints() - line1:SetPoint(pPoint[point], 0, point == "BOTTOMRIGHT" and -position or position) - position = height - position - if position > length then - line1:SetSize(thickness, length) - line2:Hide() - else - line2:ClearAllPoints() - line2:SetPoint(point) - line2:Show() + line1:ClearAllPoints() + line1:SetPoint(pPoint[point], 0, point == "BOTTOMRIGHT" and -position or position) + position = height - position + if position > length then + line1:SetSize(thickness, length) + line2:Hide() + else + line2:ClearAllPoints() + line2:SetPoint(point) + line2:Show() - line1:SetSize(thickness, position) - line2:SetSize(length - position, thickness) - end + line1:SetSize(thickness, position) + line2:SetSize(length - position, thickness) + end end --[[ local function pSize(position, size, length, thickness, line1, line2, point, left) - line1:ClearAllPoints() - line1:SetPoint(pPoint[point], not left and (point == "BOTTOMLEFT" and -position or position) or 0, left and (point == "BOTTOMRIGHT" and -position or position) or 0) - position = size - position - if position > length then - line1:SetSize(left and thickness or length, left and length or thickness) - line2:Hide() - else - line2:ClearAllPoints() - line2:SetPoint(point) - line2:Show() + line1:ClearAllPoints() + line1:SetPoint(pPoint[point], not left and (point == "BOTTOMLEFT" and -position or position) or 0, left and (point == "BOTTOMRIGHT" and -position or position) or 0) + position = size - position + if position > length then + line1:SetSize(left and thickness or length, left and length or thickness) + line2:Hide() + else + line2:ClearAllPoints() + line2:SetPoint(point) + line2:Show() - line1:SetSize(left and thickness or position, left and position or thickness) - line2:SetSize(left and (length - position) or thickness, not left and (length - position) or thickness) - end + line1:SetSize(left and thickness or position, left and position or thickness) + line2:SetSize(left and (length - position) or thickness, not left and (length - position) or thickness) + end end ]] local function pSizeChanged(self, width, height) - if not (width or height) then - width, height = self:GetSize() - end + if not (width or height) then + width, height = self:GetSize() + end - if width ~= self.info.width or height ~= self.info.height then - self.info.width = width - self.info.height = height - self.info.perimeter = 2 * (width + height) - self.info.bottomlim = height * 2 + width - self.info.rightlim = height + width - self.info.space = self.info.perimeter / self.info.N - end + if width ~= self.info.width or height ~= self.info.height then + self.info.width = width + self.info.height = height + self.info.perimeter = 2 * (width + height) + self.info.bottomlim = height * 2 + width + self.info.rightlim = height + width + self.info.space = self.info.perimeter / self.info.N + end end local function pUpdate(self, elapsed) - self.timer = self.timer + elapsed / self.info.period - if self.timer > 1 or self.timer < -1 then - self.timer = self.timer % 1 - end + self.timer = self.timer + elapsed / self.info.period + if self.timer > 1 or self.timer < -1 then + self.timer = self.timer % 1 + end - local info = self.info - for i = 1, info.N do - local position = (info.space * i + info.perimeter * self.timer) % info.perimeter - if position > info.bottomlim then -- BOTTOM - pWidth(position - info.bottomlim, info.width, info.length, info.th, self.textures[i], self.textures[info.N + i], "BOTTOMLEFT") - elseif position > info.rightlim then -- RIGHT - pHeight(position - info.rightlim, info.height, info.length, info.th, self.textures[i], self.textures[info.N + i], "BOTTOMRIGHT") - elseif position > info.height then -- TOP - pWidth(position - info.height, info.width, info.length, info.th, self.textures[i], self.textures[info.N + i], "TOPRIGHT") - else -- LEFT - pHeight(position, info.height, info.length, info.th, self.textures[i], self.textures[info.N + i], "TOPLEFT") - end - end + local info = self.info + for i = 1, info.N do + local position = (info.space * i + info.perimeter * self.timer) % info.perimeter + if position > info.bottomlim then -- BOTTOM + pWidth(position - info.bottomlim, info.width, info.length, info.th, self.textures[i], self.textures[info.N + i], "BOTTOMLEFT") + elseif position > info.rightlim then -- RIGHT + pHeight(position - info.rightlim, info.height, info.length, info.th, self.textures[i], self.textures[info.N + i], "BOTTOMRIGHT") + elseif position > info.height then -- TOP + pWidth(position - info.height, info.width, info.length, info.th, self.textures[i], self.textures[info.N + i], "TOPRIGHT") + else -- LEFT + pHeight(position, info.height, info.length, info.th, self.textures[i], self.textures[info.N + i], "TOPLEFT") + end + end end function lib.PixelGlow_Start(r, color, N, frequency, length, th, xOffset, yOffset, border, key, frameLevel) - if not r then return end - if not N or N <= 0 then N = 8 end + if not r then return end + if not N or N <= 0 then N = 8 end - local width, height = r:GetSize() - length = length or floor((width + height) * (2 / N - 0.1)) - length = min(length, min(width, height)) - key = key or "" + local width, height = r:GetSize() + length = length or floor((width + height) * (2 / N - 0.1)) + length = min(length, min(width, height)) + key = key or "" - addFrameAndTex(r, color or {.95, .95, .32, 1}, "_PixelGlow", key, N * 2, xOffset or 0, yOffset or 0, textureList.white, {0, 1, 0, 1}, nil, frameLevel) + addFrameAndTex(r, color or {.95, .95, .32, 1}, "_PixelGlow", key, N * 2, xOffset or 0, yOffset or 0, textureList.white, {0, 1, 0, 1}, nil, frameLevel) - local f = r["_PixelGlow"..key] + local f = r["_PixelGlow"..key] - f.timer = f.timer or 0 - f.info = f.info or {} - f.info.N = N - f.info.period = (not frequency or frequency == 0) and 4 or (1 / frequency) - f.info.th = th or 1 + f.timer = f.timer or 0 + f.info = f.info or {} + f.info.N = N + f.info.period = (not frequency or frequency == 0) and 4 or (1 / frequency) + f.info.th = th or 1 - if f.info.length ~= length then - f.info.width = nil - f.info.length = length - end + if f.info.length ~= length then + f.info.width = nil + f.info.length = length + end - pSizeChanged(f) - f:SetScript("OnSizeChanged", pSizeChanged) - pUpdate(f, 0) - f:SetScript("OnUpdate", pUpdate) + pSizeChanged(f) + f:SetScript("OnSizeChanged", pSizeChanged) + pUpdate(f, 0) + f:SetScript("OnUpdate", pUpdate) end function lib.PixelGlow_Stop(r, key) - if not r then return end - key = key or "" - if not r["_PixelGlow"..key] then - return false - else - GlowFramePool:Release(r["_PixelGlow"..key]) - end + if not r then return end + key = key or "" + if not r["_PixelGlow"..key] then + return false + else + GlowFramePool:Release(r["_PixelGlow"..key]) + end end tinsert(lib.glowList, "Pixel Glow") @@ -242,81 +257,81 @@ lib.stopList["Pixel Glow"] = lib.PixelGlow_Stop local acSizes = {7, 6, 5, 4} local function acSizeChanged(self, width, height) - if not (width or height) then - width, height = self:GetSize() - end + if not (width or height) then + width, height = self:GetSize() + end - if width ~= self.info.width or height ~= self.info.height then - if width*height == 0 then return end - self.info.width = width - self.info.height = height - self.info.perimeter = 2 * (width + height) - self.info.bottomlim = height * 2 + width - self.info.rightlim = height + width - self.info.space = self.info.perimeter / self.info.N - end + if width ~= self.info.width or height ~= self.info.height then + if width*height == 0 then return end + self.info.width = width + self.info.height = height + self.info.perimeter = 2 * (width + height) + self.info.bottomlim = height * 2 + width + self.info.rightlim = height + width + self.info.space = self.info.perimeter / self.info.N + end end local function acUpdate(self, elapsed) - local texIndex, info = 0, self.info - for k = 1, 4 do - self.timer[k] = self.timer[k] + elapsed / (info.period * k) - if self.timer[k] > 1 or self.timer[k] < -1 then - self.timer[k] = self.timer[k] % 1 - end - for i = 1, info.N do - texIndex = texIndex + 1 - local position = (info.space * i + info.perimeter * self.timer[k]) % info.perimeter - if position > info.bottomlim then - self.textures[texIndex]:SetPoint("CENTER", self, "BOTTOMRIGHT", -position + info.bottomlim, 0) - elseif position > info.rightlim then - self.textures[texIndex]:SetPoint("CENTER", self, "TOPRIGHT", 0, -position + info.rightlim) - elseif position > info.height then - self.textures[texIndex]:SetPoint("CENTER", self, "TOPLEFT", position - info.height, 0) - else - self.textures[texIndex]:SetPoint("CENTER", self, "BOTTOMLEFT", 0, position) - end - end - end + local texIndex, info = 0, self.info + for k = 1, 4 do + self.timer[k] = self.timer[k] + elapsed / (info.period * k) + if self.timer[k] > 1 or self.timer[k] < -1 then + self.timer[k] = self.timer[k] % 1 + end + for i = 1, info.N do + texIndex = texIndex + 1 + local position = (info.space * i + info.perimeter * self.timer[k]) % info.perimeter + if position > info.bottomlim then + self.textures[texIndex]:SetPoint("CENTER", self, "BOTTOMRIGHT", -position + info.bottomlim, 0) + elseif position > info.rightlim then + self.textures[texIndex]:SetPoint("CENTER", self, "TOPRIGHT", 0, -position + info.rightlim) + elseif position > info.height then + self.textures[texIndex]:SetPoint("CENTER", self, "TOPLEFT", position - info.height, 0) + else + self.textures[texIndex]:SetPoint("CENTER", self, "BOTTOMLEFT", 0, position) + end + end + end end function lib.AutoCastGlow_Start(r, color, N, frequency, scale, xOffset, yOffset, key, frameLevel) - if not r then return end - if not (N and N > 0) then N = 4 end + if not r then return end + if not (N and N > 0) then N = 4 end - scale = scale or 1 - xOffset = xOffset or 0 - yOffset = yOffset or 0 - key = key or "" + scale = scale or 1 + xOffset = xOffset or 0 + yOffset = yOffset or 0 + key = key or "" - addFrameAndTex(r, color or {.95, .95, .32, 1}, "_AutoCastGlow", key, N * 4, xOffset, yOffset, textureList.shine, {0.8115234375, 0.9169921875, 0.8798828125, 0.9853515625}, true, frameLevel) - local f = r["_AutoCastGlow"..key] - for k, size in pairs(acSizes) do - for i = 1, N do - f.textures[i + N * (k - 1)]:SetSize(size * scale, size * scale) - end - end + addFrameAndTex(r, color or {.95, .95, .32, 1}, "_AutoCastGlow", key, N * 4, xOffset, yOffset, textureList.shine, {0.8115234375, 0.9169921875, 0.8798828125, 0.9853515625}, true, frameLevel) + local f = r["_AutoCastGlow"..key] + for k, size in pairs(acSizes) do + for i = 1, N do + f.textures[i + N * (k - 1)]:SetSize(size * scale, size * scale) + end + end - f.timer = f.timer or {0, 0, 0, 0} - f.info = f.info or {} - f.info.N = N - f.info.period = (not frequency or frequency == 0) and 4 or (1 / frequency) + f.timer = f.timer or {0, 0, 0, 0} + f.info = f.info or {} + f.info.N = N + f.info.period = (not frequency or frequency == 0) and 4 or (1 / frequency) - acSizeChanged(f) - f:SetScript("OnSizeChanged", acSizeChanged) - f:SetScript("OnUpdate", acUpdate) - acUpdate(f, 0) + acSizeChanged(f) + f:SetScript("OnSizeChanged", acSizeChanged) + f:SetScript("OnUpdate", acUpdate) + acUpdate(f, 0) end function lib.AutoCastGlow_Stop(r, key) - if not r then return end + if not r then return end - key = key or "" - if not r["_AutoCastGlow"..key] then - return false - else - GlowFramePool:Release(r["_AutoCastGlow"..key]) - end + key = key or "" + if not r["_AutoCastGlow"..key] then + return false + else + GlowFramePool:Release(r["_AutoCastGlow"..key]) + end end tinsert(lib.glowList, "Autocast Shine") @@ -326,394 +341,394 @@ lib.stopList["Autocast Shine"] = lib.AutoCastGlow_Stop -- Animation Functions local function InitAlphaAnimation(self) - self.target = self.target or self:GetRegionParent() - self.change = self.change or 0 + self.target = self.target or self:GetRegionParent() + self.change = self.change or 0 - self.frameAlpha = self.target:GetAlpha() - self.alphaFactor = self.frameAlpha + self.change - self.frameAlpha + self.frameAlpha = self.target:GetAlpha() + self.alphaFactor = self.frameAlpha + self.change - self.frameAlpha end local function TidyAlphaAnimation(self) - self.alphaFactor = nil - self.frameAlpha = nil + self.alphaFactor = nil + self.frameAlpha = nil end local function AlphaAnimation_OnUpdate(self, elapsed) - local progress = self:GetSmoothProgress() - if progress ~= 0 then - if not self.played then - InitAlphaAnimation(self) - self.played = 1 - end + local progress = self:GetSmoothProgress() + if progress ~= 0 then + if not self.played then + InitAlphaAnimation(self) + self.played = 1 + end - if self.frameAlpha then - self.target:SetAlpha(self.frameAlpha + self.alphaFactor * progress) + if self.frameAlpha then + self.target:SetAlpha(self.frameAlpha + self.alphaFactor * progress) - if progress == 1 then - TidyAlphaAnimation(self) - end - end - end + if progress == 1 then + TidyAlphaAnimation(self) + end + end + end end local function AlphaAnimation_OnStop(self) - if self.frameAlpha then - TidyAlphaAnimation(self) - end + if self.frameAlpha then + TidyAlphaAnimation(self) + end - self.played = nil + self.played = nil end local function CreateAlphaAnim(group, target, order, duration, change, delay, onPlay, onFinished) - local alpha = group:CreateAnimation() + local alpha = group:CreateAnimation() - if target then - alpha.target = alpha:GetRegionParent()[target] - end + if target then + alpha.target = alpha:GetRegionParent()[target] + end - if order then - alpha:SetOrder(order) - end + if order then + alpha:SetOrder(order) + end - alpha:SetDuration(duration) - alpha.change = change + alpha:SetDuration(duration) + alpha.change = change - if delay then - alpha:SetStartDelay(delay) - end + if delay then + alpha:SetStartDelay(delay) + end - if onPlay then - alpha:SetScript("OnPlay", onPlay) - end + if onPlay then + alpha:SetScript("OnPlay", onPlay) + end - alpha:SetScript("OnUpdate", AlphaAnimation_OnUpdate) - alpha:SetScript("OnStop", AlphaAnimation_OnStop) - alpha:SetScript("OnFinished", onFinished or AlphaAnimation_OnStop) + alpha:SetScript("OnUpdate", AlphaAnimation_OnUpdate) + alpha:SetScript("OnStop", AlphaAnimation_OnStop) + alpha:SetScript("OnFinished", onFinished or AlphaAnimation_OnStop) end local function InitScaleAnimation(self) - self.target = self.target or self:GetRegionParent() - self.scaleX = self.scaleX or 0 - self.scaleY = self.scaleY or 0 + self.target = self.target or self:GetRegionParent() + self.scaleX = self.scaleX or 0 + self.scaleY = self.scaleY or 0 - local _, _, width, height = self.target:GetRect() - if not width then return end + local _, _, width, height = self.target:GetRect() + if not width then return end - self.frameWidth = width - self.frameHeight = height + self.frameWidth = width + self.frameHeight = height - self.widthFactor = width * self.scaleX - width - self.heightFactor = height * self.scaleY - height + self.widthFactor = width * self.scaleX - width + self.heightFactor = height * self.scaleY - height - local setCenter - local parent = self.target:GetParent() - local numPoints = self.target:GetNumPoints() + local setCenter + local parent = self.target:GetParent() + local numPoints = self.target:GetNumPoints() - if numPoints > 0 then - local point, relativeTo, relativePoint, xOffset, yOffset = self.target:GetPoint(1) + if numPoints > 0 then + local point, relativeTo, relativePoint, xOffset, yOffset = self.target:GetPoint(1) - if numPoints == 1 and point == "CENTER" then - setCenter = false - else - local i = 1 - while true do - if relativeTo ~= parent and yOffset then - local j = #self + 1 - self[j], self[j + 1], self[j + 2], self[j + 3], self[j + 4] = point, relativeTo, relativePoint, xOffset, yOffset - end + if numPoints == 1 and point == "CENTER" then + setCenter = false + else + local i = 1 + while true do + if relativeTo ~= parent and yOffset then + local j = #self + 1 + self[j], self[j + 1], self[j + 2], self[j + 3], self[j + 4] = point, relativeTo, relativePoint, xOffset, yOffset + end - i = i + 1 - if numPoints >= i then - point, relativeTo, relativePoint, xOffset, yOffset = self.target:GetPoint(i) - else - break - end - end + i = i + 1 + if numPoints >= i then + point, relativeTo, relativePoint, xOffset, yOffset = self.target:GetPoint(i) + else + break + end + end - setCenter = true - end - else - setCenter = true - end + setCenter = true + end + else + setCenter = true + end - if setCenter then - local x, y = self.target:GetCenter() - local parentX, parentY = parent:GetCenter() + if setCenter then + local x, y = self.target:GetCenter() + local parentX, parentY = parent:GetCenter() - self.target:ClearAllPoints() - self.target:SetPoint("CENTER", x - parentX, y - parentY) - end + self.target:ClearAllPoints() + self.target:SetPoint("CENTER", x - parentX, y - parentY) + end - return 1 + return 1 end local function TidyScaleAnimation(self) - local target = self.target + local target = self.target - if #self ~= 0 then - target:ClearAllPoints() + if #self ~= 0 then + target:ClearAllPoints() - for i = 1, #self, 5 do - target:SetPoint(self[i], self[i + 1], self[i + 2], self[i + 3], self[i + 4]) - self[i] = nil - self[i + 1] = nil - self[i + 2] = nil - self[i + 3] = nil - self[i + 4] = nil - end - end + for i = 1, #self, 5 do + target:SetPoint(self[i], self[i + 1], self[i + 2], self[i + 3], self[i + 4]) + self[i] = nil + self[i + 1] = nil + self[i + 2] = nil + self[i + 3] = nil + self[i + 4] = nil + end + end - self.widthFactor = nil - self.heightFactor = nil + self.widthFactor = nil + self.heightFactor = nil - self.frameWidth = nil - self.frameHeight = nil + self.frameWidth = nil + self.frameHeight = nil end local function ScaleAnimation_OnUpdate(self, elapsed) - local progress = self:GetSmoothProgress() - if progress ~= 0 then - if not self.played then - if InitScaleAnimation(self) then - self.played = 1 - end - end + local progress = self:GetSmoothProgress() + if progress ~= 0 then + if not self.played then + if InitScaleAnimation(self) then + self.played = 1 + end + end - if self.frameWidth then - self.target:SetSize(self.frameWidth + self.widthFactor * progress, self.frameHeight + self.heightFactor * progress) + if self.frameWidth then + self.target:SetSize(self.frameWidth + self.widthFactor * progress, self.frameHeight + self.heightFactor * progress) - if progress == 1 then - TidyScaleAnimation(self) - end - end - end + if progress == 1 then + TidyScaleAnimation(self) + end + end + end end local function ScaleAnimation_OnStop(self) - if self.frameWidth then - TidyScaleAnimation(self) - end + if self.frameWidth then + TidyScaleAnimation(self) + end - self.played = nil + self.played = nil end local function CreateScaleAnim(group, target, order, duration, x, y, delay, smoothing, onPlay) - local scale = group:CreateAnimation() + local scale = group:CreateAnimation() - if target then - scale.target = scale:GetRegionParent()[target] - end + if target then + scale.target = scale:GetRegionParent()[target] + end - scale:SetOrder(order) - scale:SetDuration(duration) - scale.scaleX, scale.scaleY = x, y + scale:SetOrder(order) + scale:SetDuration(duration) + scale.scaleX, scale.scaleY = x, y - if delay then - scale:SetStartDelay(delay) - end + if delay then + scale:SetStartDelay(delay) + end - if smoothing then - scale:SetSmoothing(smoothing) - end + if smoothing then + scale:SetSmoothing(smoothing) + end - if onPlay then - scale:SetScript("OnPlay", onPlay) - end + if onPlay then + scale:SetScript("OnPlay", onPlay) + end - scale:SetScript("OnUpdate", ScaleAnimation_OnUpdate) - scale:SetScript("OnStop", ScaleAnimation_OnStop) - scale:SetScript("OnFinished", ScaleAnimation_OnStop) + scale:SetScript("OnUpdate", ScaleAnimation_OnUpdate) + scale:SetScript("OnStop", ScaleAnimation_OnStop) + scale:SetScript("OnFinished", ScaleAnimation_OnStop) end local function AnimateTexCoords(texture, textureWidth, textureHeight, frameWidth, frameHeight, numFrames, elapsed, throttle) - if not texture.frame then - texture.frame = 1 - texture.throttle = throttle - texture.numColumns = floor(textureWidth / frameWidth) - texture.numRows = floor(textureHeight / frameHeight) - texture.columnWidth = frameWidth / textureWidth - texture.rowHeight = frameHeight / textureHeight - end + if not texture.frame then + texture.frame = 1 + texture.throttle = throttle + texture.numColumns = floor(textureWidth / frameWidth) + texture.numRows = floor(textureHeight / frameHeight) + texture.columnWidth = frameWidth / textureWidth + texture.rowHeight = frameHeight / textureHeight + end - if not texture.throttle or texture.throttle > throttle then - local frame = texture.frame - local framesToAdvance = floor(texture.throttle / throttle) - while frame + framesToAdvance > numFrames do - frame = frame - numFrames - end + if not texture.throttle or texture.throttle > throttle then + local frame = texture.frame + local framesToAdvance = floor(texture.throttle / throttle) + while frame + framesToAdvance > numFrames do + frame = frame - numFrames + end - frame = frame + framesToAdvance - texture.throttle = 0 + frame = frame + framesToAdvance + texture.throttle = 0 - local left = mod(frame - 1, texture.numColumns) * texture.columnWidth - local right = left + texture.columnWidth - local bottom = ceil(frame / texture.numColumns) * texture.rowHeight - local top = bottom - texture.rowHeight - texture:SetTexCoord(left, right, top, bottom) + local left = mod(frame - 1, texture.numColumns) * texture.columnWidth + local right = left + texture.columnWidth + local bottom = ceil(frame / texture.numColumns) * texture.rowHeight + local top = bottom - texture.rowHeight + texture:SetTexCoord(left, right, top, bottom) - texture.frame = frame - else - texture.throttle = texture.throttle + elapsed - end + texture.frame = frame + else + texture.throttle = texture.throttle + elapsed + end end --Action Button Glow-- local function ButtonGlowResetter(framePool,frame) -- frame:SetScript("OnUpdate",nil) - local parent = frame:GetParent() - if parent._ButtonGlow then - parent._ButtonGlow = nil - end - frame:Hide() - frame:ClearAllPoints() + local parent = frame:GetParent() + if parent._ButtonGlow then + parent._ButtonGlow = nil + end + frame:Hide() + frame:ClearAllPoints() end local ButtonGlowPool = CreateFramePool("Frame", GlowParent, "", ButtonGlowResetter) lib.ButtonGlowPool = ButtonGlowPool local function AnimIn_OnPlay(anim) - local frame = anim:GetRegionParent() - local frameWidth, frameHeight = frame:GetSize() - frame.spark:SetSize(frameWidth, frameHeight) - frame.spark:SetAlpha(not (frame.color) and 1 or 0.3 * frame.color[4]) - frame.innerGlow:SetSize(frameWidth / 2, frameHeight / 2) - frame.innerGlow:SetAlpha(not (frame.color) and 1 or frame.color[4]) - frame.innerGlowOver:SetAlpha(not (frame.color) and 1 or frame.color[4]) - frame.outerGlow:SetSize(frameWidth * 2, frameHeight * 2) - frame.outerGlow:SetAlpha(not (frame.color) and 1 or frame.color[4]) - frame.outerGlowOver:SetAlpha(not (frame.color) and 1 or frame.color[4]) - frame.ants:SetSize(frameWidth * 0.85, frameHeight * 0.85) - frame.ants:SetAlpha(0) - frame:Show() + local frame = anim:GetRegionParent() + local frameWidth, frameHeight = frame:GetSize() + frame.spark:SetSize(frameWidth, frameHeight) + frame.spark:SetAlpha(not (frame.color) and 1 or 0.3 * frame.color[4]) + frame.innerGlow:SetSize(frameWidth / 2, frameHeight / 2) + frame.innerGlow:SetAlpha(not (frame.color) and 1 or frame.color[4]) + frame.innerGlowOver:SetAlpha(not (frame.color) and 1 or frame.color[4]) + frame.outerGlow:SetSize(frameWidth * 2, frameHeight * 2) + frame.outerGlow:SetAlpha(not (frame.color) and 1 or frame.color[4]) + frame.outerGlowOver:SetAlpha(not (frame.color) and 1 or frame.color[4]) + frame.ants:SetSize(frameWidth * 0.85, frameHeight * 0.85) + frame.ants:SetAlpha(0) + frame:Show() end local function AnimIn_OnFinished(group) - local frame = group:GetParent() - local frameWidth, frameHeight = frame:GetSize() - frame.spark:SetAlpha(0) - frame.innerGlow:SetAlpha(0) - frame.innerGlow:SetSize(frameWidth, frameHeight) - frame.innerGlowOver:SetAlpha(0) - frame.outerGlow:SetSize(frameWidth, frameHeight) - frame.outerGlowOver:SetAlpha(0) - frame.outerGlowOver:SetSize(frameWidth, frameHeight) - frame.ants:SetAlpha(not (frame.color) and 1 or frame.color[4]) + local frame = group:GetParent() + local frameWidth, frameHeight = frame:GetSize() + frame.spark:SetAlpha(0) + frame.innerGlow:SetAlpha(0) + frame.innerGlow:SetSize(frameWidth, frameHeight) + frame.innerGlowOver:SetAlpha(0) + frame.outerGlow:SetSize(frameWidth, frameHeight) + frame.outerGlowOver:SetAlpha(0) + frame.outerGlowOver:SetSize(frameWidth, frameHeight) + frame.ants:SetAlpha(not (frame.color) and 1 or frame.color[4]) end local function AnimIn_OnStop(group) - local frame = group:GetParent() - frame.spark:SetAlpha(0) - frame.innerGlow:SetAlpha(0) - frame.innerGlowOver:SetAlpha(0) - frame.outerGlowOver:SetAlpha(0) + local frame = group:GetParent() + frame.spark:SetAlpha(0) + frame.innerGlow:SetAlpha(0) + frame.innerGlowOver:SetAlpha(0) + frame.outerGlowOver:SetAlpha(0) end local function bgHide(self) - if self.animOut:IsPlaying() then - self.animOut:Stop() - ButtonGlowPool:Release(self) - end + if self.animOut:IsPlaying() then + self.animOut:Stop() + ButtonGlowPool:Release(self) + end end local function bgUpdate(self, elapsed) - AnimateTexCoords(self.ants, 256, 256, 48, 48, 22, elapsed, self.throttle) + AnimateTexCoords(self.ants, 256, 256, 48, 48, 22, elapsed, self.throttle) end local function IsAnimPlaying(self) - return self.isPlaying + return self.isPlaying end local function configureButtonGlow(f, alpha) - f.spark = f:CreateTexture(nil, "BACKGROUND") - f.spark:SetPoint("CENTER") - f.spark:SetAlpha(0) - f.spark:SetTexture([[Interface\AddOns\WeakAuras\Libs\LibCustomGlow-1.0\IconAlert]]) - f.spark:SetTexCoord(0.00781250, 0.61718750, 0.00390625, 0.26953125) + f.spark = f:CreateTexture(nil, "BACKGROUND") + f.spark:SetPoint("CENTER") + f.spark:SetAlpha(0) + f.spark:SetTexture(texturePath .. [[LibCustomGlow-1.0\IconAlert]]) + f.spark:SetTexCoord(0.00781250, 0.61718750, 0.00390625, 0.26953125) - -- inner glow - f.innerGlow = f:CreateTexture() - f.innerGlow:SetPoint("CENTER") - f.innerGlow:SetAlpha(0) - f.innerGlow:SetTexture([[Interface\AddOns\WeakAuras\Libs\LibCustomGlow-1.0\IconAlert]]) - f.innerGlow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52734375) - f.innerGlow:Show() + -- inner glow + f.innerGlow = f:CreateTexture() + f.innerGlow:SetPoint("CENTER") + f.innerGlow:SetAlpha(0) + f.innerGlow:SetTexture(texturePath .. [[LibCustomGlow-1.0\IconAlert]]) + f.innerGlow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52734375) + f.innerGlow:Show() - -- inner glow over - f.innerGlowOver = f:CreateTexture() - f.innerGlowOver:SetPoint("TOPLEFT", f.innerGlow, "TOPLEFT") - f.innerGlowOver:SetPoint("BOTTOMRIGHT", f.innerGlow, "BOTTOMRIGHT") - f.innerGlowOver:SetAlpha(0) - f.innerGlowOver:SetTexture([[Interface\AddOns\WeakAuras\Libs\LibCustomGlow-1.0\IconAlert]]) - f.innerGlowOver:SetTexCoord(0.00781250, 0.50781250, 0.53515625, 0.78515625) + -- inner glow over + f.innerGlowOver = f:CreateTexture() + f.innerGlowOver:SetPoint("TOPLEFT", f.innerGlow, "TOPLEFT") + f.innerGlowOver:SetPoint("BOTTOMRIGHT", f.innerGlow, "BOTTOMRIGHT") + f.innerGlowOver:SetAlpha(0) + f.innerGlowOver:SetTexture(texturePath .. [[LibCustomGlow-1.0\IconAlert]]) + f.innerGlowOver:SetTexCoord(0.00781250, 0.50781250, 0.53515625, 0.78515625) - -- outer glow - f.outerGlow = f:CreateTexture() - f.outerGlow:SetPoint("CENTER") - f.outerGlow:SetAlpha(0) - f.outerGlow:SetTexture([[Interface\AddOns\WeakAuras\Libs\LibCustomGlow-1.0\IconAlert]]) - f.outerGlow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52734375) + -- outer glow + f.outerGlow = f:CreateTexture() + f.outerGlow:SetPoint("CENTER") + f.outerGlow:SetAlpha(0) + f.outerGlow:SetTexture(texturePath .. [[LibCustomGlow-1.0\IconAlert]]) + f.outerGlow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52734375) - -- outer glow over - f.outerGlowOver = f:CreateTexture() - f.outerGlowOver:SetPoint("TOPLEFT", f.outerGlow, "TOPLEFT") - f.outerGlowOver:SetPoint("BOTTOMRIGHT", f.outerGlow, "BOTTOMRIGHT") - f.outerGlowOver:SetAlpha(0) - f.outerGlowOver:SetTexture([[Interface\AddOns\WeakAuras\Libs\LibCustomGlow-1.0\IconAlert]]) - f.outerGlowOver:SetTexCoord(0.00781250, 0.50781250, 0.53515625, 0.78515625) + -- outer glow over + f.outerGlowOver = f:CreateTexture() + f.outerGlowOver:SetPoint("TOPLEFT", f.outerGlow, "TOPLEFT") + f.outerGlowOver:SetPoint("BOTTOMRIGHT", f.outerGlow, "BOTTOMRIGHT") + f.outerGlowOver:SetAlpha(0) + f.outerGlowOver:SetTexture(texturePath .. [[LibCustomGlow-1.0\IconAlert]]) + f.outerGlowOver:SetTexCoord(0.00781250, 0.50781250, 0.53515625, 0.78515625) - -- ants - f.ants = f:CreateTexture(nil, "OVERLAY") - f.ants:SetPoint("CENTER") - f.ants:SetAlpha(0) - f.ants:SetTexture([[Interface\AddOns\WeakAuras\Libs\LibCustomGlow-1.0\IconAlertAnts]]) + -- ants + f.ants = f:CreateTexture(nil, "OVERLAY") + f.ants:SetPoint("CENTER") + f.ants:SetAlpha(0) + f.ants:SetTexture(texturePath .. [[LibCustomGlow-1.0\IconAlertAnts]]) - f.animIn = f:CreateAnimationGroup() - f.animIn.appear = {} - f.animIn.fade = {} - CreateScaleAnim(f.animIn, "spark", 1, 0.2, 1.5, 1.5, nil, nil, AnimIn_OnPlay) - CreateAlphaAnim(f.animIn, "spark", 1, 0.2, alpha, nil, nil, nil, true) - CreateScaleAnim(f.animIn, "innerGlow", 1, 0.3, 2, 2) - CreateScaleAnim(f.animIn, "innerGlowOver", 1, 0.3, 2, 2) - CreateAlphaAnim(f.animIn, "innerGlowOver", 1, 0.3, alpha, nil, nil, nil, false) - CreateScaleAnim(f.animIn, "outerGlow", 1, 0.3, 0.5, 0.5) - CreateScaleAnim(f.animIn, "outerGlowOver", 1, 0.3, 0.5, 0.5) - CreateAlphaAnim(f.animIn, "outerGlowOver", 1, 0.3, alpha, nil, nil, nil, false) - CreateScaleAnim(f.animIn, "spark", 1, 0.2, 0.666666, 0.666666, 0.2) - CreateAlphaAnim(f.animIn, "spark", 1, 0.2, alpha, 0.2, nil, nil, false) - CreateAlphaAnim(f.animIn, "innerGlow", 1, 0.2, alpha, 0.3, nil, nil, false) - CreateAlphaAnim(f.animIn, "ants", 1, 0.2, alpha, 0.3, nil, nil, true) - f.animIn:SetScript("OnStop", AnimIn_OnStop) - f.animIn:SetScript("OnFinished", AnimIn_OnFinished) + f.animIn = f:CreateAnimationGroup() + f.animIn.appear = {} + f.animIn.fade = {} + CreateScaleAnim(f.animIn, "spark", 1, 0.2, 1.5, 1.5, nil, nil, AnimIn_OnPlay) + CreateAlphaAnim(f.animIn, "spark", 1, 0.2, alpha, nil, nil, nil, true) + CreateScaleAnim(f.animIn, "innerGlow", 1, 0.3, 2, 2) + CreateScaleAnim(f.animIn, "innerGlowOver", 1, 0.3, 2, 2) + CreateAlphaAnim(f.animIn, "innerGlowOver", 1, 0.3, alpha, nil, nil, nil, false) + CreateScaleAnim(f.animIn, "outerGlow", 1, 0.3, 0.5, 0.5) + CreateScaleAnim(f.animIn, "outerGlowOver", 1, 0.3, 0.5, 0.5) + CreateAlphaAnim(f.animIn, "outerGlowOver", 1, 0.3, alpha, nil, nil, nil, false) + CreateScaleAnim(f.animIn, "spark", 1, 0.2, 0.666666, 0.666666, 0.2) + CreateAlphaAnim(f.animIn, "spark", 1, 0.2, alpha, 0.2, nil, nil, false) + CreateAlphaAnim(f.animIn, "innerGlow", 1, 0.2, alpha, 0.3, nil, nil, false) + CreateAlphaAnim(f.animIn, "ants", 1, 0.2, alpha, 0.3, nil, nil, true) + f.animIn:SetScript("OnStop", AnimIn_OnStop) + f.animIn:SetScript("OnFinished", AnimIn_OnFinished) - f.animOut = f:CreateAnimationGroup() - f.animOut.appear = {} - f.animOut.fade = {} - CreateAlphaAnim(f.animOut, "outerGlowOver", 1, 0.2, alpha, nil, nil, nil, true) - CreateAlphaAnim(f.animOut, "ants", 1, 0.2, alpha, nil, nil, nil, false) - CreateAlphaAnim(f.animOut, "outerGlowOver", 2, 0.2, alpha, nil, nil, nil, false) - CreateAlphaAnim(f.animOut, "outerGlow", 2, 0.2, alpha, nil, nil, nil, false) - f.animOut:SetScript("OnPlay", function(self) self.isPlaying = true; end) - f.animOut:SetScript("OnStop", function(self) self.isPlaying = false; end) - f.animOut:SetScript("OnFinished", function(self) self.isPlaying = false; ButtonGlowPool:Release(f) end) + f.animOut = f:CreateAnimationGroup() + f.animOut.appear = {} + f.animOut.fade = {} + CreateAlphaAnim(f.animOut, "outerGlowOver", 1, 0.2, alpha, nil, nil, nil, true) + CreateAlphaAnim(f.animOut, "ants", 1, 0.2, alpha, nil, nil, nil, false) + CreateAlphaAnim(f.animOut, "outerGlowOver", 2, 0.2, alpha, nil, nil, nil, false) + CreateAlphaAnim(f.animOut, "outerGlow", 2, 0.2, alpha, nil, nil, nil, false) + f.animOut:SetScript("OnPlay", function(self) self.isPlaying = true; end) + f.animOut:SetScript("OnStop", function(self) self.isPlaying = false; end) + f.animOut:SetScript("OnFinished", function(self) self.isPlaying = false; ButtonGlowPool:Release(f) end) - f.animOut.isPlaying = false - f.animOut.IsPlaying = IsAnimPlaying + f.animOut.isPlaying = false + f.animOut.IsPlaying = IsAnimPlaying - f:SetScript("OnHide", bgHide) + f:SetScript("OnHide", bgHide) end local function updateAlphaAnim(f,alpha) - for _,anim in pairs(f.animIn.appear) do - anim.change = alpha - end - for _,anim in pairs(f.animIn.fade) do - anim.change = -alpha - end - for _,anim in pairs(f.animOut.appear) do - anim.change = alpha - end - for _,anim in pairs(f.animOut.fade) do - anim.change = -alpha - end + for _,anim in pairs(f.animIn.appear) do + anim.change = alpha + end + for _,anim in pairs(f.animIn.fade) do + anim.change = -alpha + end + for _,anim in pairs(f.animOut.appear) do + anim.change = alpha + end + for _,anim in pairs(f.animOut.fade) do + anim.change = -alpha + end end local ButtonGlowTextures = {["spark"] = true, ["innerGlow"] = true, ["innerGlowOver"] = true, ["outerGlow"] = true, ["outerGlowOver"] = true, ["ants"] = true} @@ -727,86 +742,88 @@ local function noZero(num) end function lib.ButtonGlow_Start(r, color, frequency, frameLevel) - if not r then return end - frameLevel = frameLevel or 8; + if not r then return end + frameLevel = frameLevel or 8; - local throttle = frequency and frequency > 0 and 0.25 / frequency * 0.01 or 0.01 + local throttle = frequency and frequency > 0 and 0.25 / frequency * 0.01 or 0.01 - if r._ButtonGlow then - local f = r._ButtonGlow - local width, height = r:GetSize() - f:SetFrameLevel(r:GetFrameLevel() + frameLevel) - f:SetSize(width * 1.4 , height * 1.4) - f:SetPoint("TOPLEFT", r, "TOPLEFT", -width * 0.2, height * 0.2) - f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", width * 0.2, -height * 0.2) - f.ants:SetSize(width * 1.4 * 0.85, height * 1.4 * 0.85) - AnimIn_OnFinished(f.animIn) - if f.animOut:IsPlaying() then - f.animOut:Stop() - f.animIn:Play() - end + if r._ButtonGlow then + local f = r._ButtonGlow + local width, height = r:GetSize() + f:SetFrameLevel(r:GetFrameLevel() + frameLevel) + f:SetSize(width * 1.4 , height * 1.4) + f:SetPoint("TOPLEFT", r, "TOPLEFT", -width * 0.2, height * 0.2) + f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", width * 0.2, -height * 0.2) + f.ants:SetSize(width * 1.4 * 0.85, height * 1.4 * 0.85) + AnimIn_OnFinished(f.animIn) + if f.animOut:IsPlaying() then + f.animOut:Stop() + f.animIn:Play() + end - if not color then - for texture in pairs(ButtonGlowTextures) do - f[texture]:SetVertexColor(1, 1, 1) - local alpha = math.min(f[texture]:GetAlpha()/noZero(f.color and f.color[4] or 1), 1) + if not color then + for texture in pairs(ButtonGlowTextures) do + f[texture]:SetVertexColor(1, 1, 1) + local alpha = math.min(f[texture]:GetAlpha()/noZero(f.color and f.color[4] or 1), 1) f[texture]:SetAlpha(alpha) - updateAlphaAnim(f, 1) - end - f.color = false - else - for texture in pairs(ButtonGlowTextures) do - f[texture]:SetVertexColor(color[1], color[2], color[3]) + updateAlphaAnim(f, 1) + end + f.color = false + else + for texture in pairs(ButtonGlowTextures) do + f[texture]:SetVertexColor(color[1], color[2], color[3]) local alpha = math.min(f[texture]:GetAlpha()/noZero(f.color and f.color[4] or 1)*color[4], 1) f[texture]:SetAlpha(alpha) - updateAlphaAnim(f,color and color[4] or 1) - end - f.color = color - end - f.throttle = throttle - else - local f, new = ButtonGlowPool:Acquire() - if new then - configureButtonGlow(f,color and color[4] or 1) - else - updateAlphaAnim(f,color and color[4] or 1) - end - r._ButtonGlow = f - local width, height = r:GetSize() - f:SetParent(r) - f:SetFrameLevel(r:GetFrameLevel() + frameLevel) - f:SetSize(width * 1.4, height * 1.4) - f:SetPoint("TOPLEFT", r, "TOPLEFT", -width * 0.2, height * 0.2) - f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", width * 0.2, -height * 0.2) - if not color then - f.color = false - for texture in pairs(ButtonGlowTextures) do - f[texture]:SetVertexColor(1, 1, 1) - end - else - f.color = color - for texture in pairs(ButtonGlowTextures) do - f[texture]:SetVertexColor(color[1], color[2], color[3]) - end - end - f.throttle = throttle - f:SetScript("OnUpdate", bgUpdate) + updateAlphaAnim(f,color and color[4] or 1) + end + f.color = color + end + f.throttle = throttle + else + local f, new = ButtonGlowPool:Acquire() + if new then + configureButtonGlow(f,color and color[4] or 1) + else + updateAlphaAnim(f,color and color[4] or 1) + end + r._ButtonGlow = f + local width, height = r:GetSize() + f:SetParent(r) + f:SetFrameLevel(r:GetFrameLevel() + frameLevel) + f:SetSize(width * 1.4, height * 1.4) + f:SetPoint("TOPLEFT", r, "TOPLEFT", -width * 0.2, height * 0.2) + f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", width * 0.2, -height * 0.2) + if not color then + f.color = false + for texture in pairs(ButtonGlowTextures) do + f[texture]:SetVertexColor(1, 1, 1) + end + else + f.color = color + for texture in pairs(ButtonGlowTextures) do + f[texture]:SetVertexColor(color[1], color[2], color[3]) + end + end + f.throttle = throttle + f:SetScript("OnUpdate", bgUpdate) - f.animIn:Play() - end + f.animIn:Play() + end end function lib.ButtonGlow_Stop(r) - if r._ButtonGlow then - if r._ButtonGlow.animIn:IsPlaying() then - r._ButtonGlow.animIn:Stop() - ButtonGlowPool:Release(r._ButtonGlow) - elseif r:IsVisible() then - r._ButtonGlow.animOut:Play() - else - ButtonGlowPool:Release(r._ButtonGlow) - end - end + if r._ButtonGlow then + if r._ButtonGlow.animOut:IsPlaying() then + -- Do nothing the animOut finishing will release + elseif r._ButtonGlow.animIn:IsPlaying() then + r._ButtonGlow.animIn:Stop() + ButtonGlowPool:Release(r._ButtonGlow) + elseif r:IsVisible() then + r._ButtonGlow.animOut:Play() + else + ButtonGlowPool:Release(r._ButtonGlow) + end + end end tinsert(lib.glowList, "Action Button Glow") @@ -816,7 +833,7 @@ lib.stopList["Action Button Glow"] = lib.ButtonGlow_Stop -- ProcGlow -local ProcGlowBaseTexCoords = { +local BaseTexCoord = { ["Loop"] = {0.412598, 0.575195, 0.000976562, 0.391602}, ["Start"] = {0.000488281, 0.411621, 0.000976562, 0.987305}, } @@ -826,9 +843,7 @@ local function SetTile(texture, frame, rows, columns, frameScaleW, frameScaleH, local row = math.floor(frame / columns) local column = frame % columns - local BaseTexCoord = ProcGlowBaseTexCoords[key] - - local leftStart, rightEnd, topStart, bottomEnd = BaseTexCoord[1], BaseTexCoord[2], BaseTexCoord[3], BaseTexCoord[4] + local leftStart, rightEnd, topStart, bottomEnd = BaseTexCoord[key][1], BaseTexCoord[key][2], BaseTexCoord[key][3], BaseTexCoord[key][4] local fullWidth = rightEnd - leftStart local fullHeight = bottomEnd - topStart @@ -925,7 +940,7 @@ local function InitProcGlow(f) -- Start-Flipbook f.ProcStart = f:CreateTexture(nil, "ARTWORK") f.ProcStart:SetBlendMode("ADD") - f.ProcStart:SetTexture([[Interface\AddOns\WeakAuras\Libs\LibCustomGlow-1.0\UIActionBarFX]]) + f.ProcStart:SetTexture(texturePath .. [[LibCustomGlow-1.0\UIActionBarFX]]) f.ProcStart:SetTexCoord(0.0827148248, 0.1649413686, 0.000976562, 0.165364635) -- First Frame f.ProcStart:SetAlpha(1) f.ProcStart:SetSize(150, 150) @@ -934,7 +949,7 @@ local function InitProcGlow(f) -- Loop-Flipbook f.ProcLoop = f:CreateTexture(nil, "ARTWORK") - f.ProcLoop:SetTexture([[Interface\AddOns\WeakAuras\Libs\LibCustomGlow-1.0\UIActionBarFX]]) + f.ProcLoop:SetTexture(texturePath .. [[LibCustomGlow-1.0\UIActionBarFX]]) f.ProcLoop:SetTexCoord(0.412598, 0.4451174, 0.000976562, 0.066080801666667) -- First Frame f.ProcLoop:SetAlpha(1) f.ProcLoop:SetAllPoints() diff --git a/WeakAuras/Locales/deDE.lua b/WeakAuras/Locales/deDE.lua index fa671cb..5ed2f4e 100644 --- a/WeakAuras/Locales/deDE.lua +++ b/WeakAuras/Locales/deDE.lua @@ -185,6 +185,8 @@ L["Assigned Role"] = "Zugewiesene Rolle" L["Assigned Role Icon"] = "Assigned Role Icon" --[[Translation missing --]] L["Assist"] = "Assist" +--[[Translation missing --]] +L["Assisted Combat Next Cast"] = "Assisted Combat Next Cast" L["At Least One Enemy"] = "Zumindest ein Feind" L["At missing Value"] = "Bei fehlendem Wert" L["At Percent"] = "Bei Prozent" @@ -742,6 +744,8 @@ L["Error Frame"] = "Fehlerfenster" --[[Translation missing --]] L["ERROR in '%s' unknown or incompatible sub element type '%s'"] = "ERROR in '%s' unknown or incompatible sub element type '%s'" --[[Translation missing --]] +L["Error in aura '%s'"] = "Error in aura '%s'" +--[[Translation missing --]] L["Error not receiving display information from %s"] = "Error not receiving display information from %s" --[[Translation missing --]] L["Essence"] = "Essence" @@ -987,10 +991,10 @@ L["Icon Function"] = "Icon Function" --[[Translation missing --]] L["Icon Function (fallback state)"] = "Icon Function (fallback state)" --[[Translation missing --]] -L["Id"] = "Id" ---[[Translation missing --]] L["ID"] = "ID" --[[Translation missing --]] +L["Id"] = "Id" +--[[Translation missing --]] L["If you require additional assistance, please open a ticket on GitHub or visit our Discord at https://discord.gg/weakauras!"] = "If you require additional assistance, please open a ticket on GitHub or visit our Discord at https://discord.gg/weakauras!" --[[Translation missing --]] L["Ignore Dead"] = "Ignore Dead" @@ -1233,10 +1237,10 @@ E.g. 1;2;1;2;2.5;3]=] ] = [=[Matches stage number of encounter journal. Intermissions are .5 E.g. 1;2;1;2;2.5;3]=] --[[Translation missing --]] -L["Max Char "] = "Max Char " ---[[Translation missing --]] L["Max Char"] = "Max Char" --[[Translation missing --]] +L["Max Char "] = "Max Char " +--[[Translation missing --]] L["Max Charges"] = "Max Charges" --[[Translation missing --]] L["Max Health"] = "Max Health" @@ -1329,8 +1333,6 @@ L["Name/Realm of Caster's Target"] = "Name/Realm of Caster's Target" --[[Translation missing --]] L["Nameplate"] = "Nameplate" --[[Translation missing --]] -L["Nameplate Type"] = "Nameplate Type" ---[[Translation missing --]] L["Nameplates"] = "Nameplates" --[[Translation missing --]] L["Names of affected Players"] = "Names of affected Players" @@ -1617,9 +1619,9 @@ L["Progress Total"] = "Totaler Fortschritt" L["Progress Value"] = "Fortschrittswert" L["Pulse"] = "Pulsieren" L["PvP Flagged"] = "PvP aktiv" -L["PvP Talent selected"] = "Gewähltes PvP-Talent" --[[Translation missing --]] L["PvP Talent Selected"] = "PvP Talent Selected" +L["PvP Talent selected"] = "Gewähltes PvP-Talent" --[[Translation missing --]] L["Quality Id"] = "Quality Id" --[[Translation missing --]] @@ -2055,8 +2057,8 @@ L["Talent |cFFFF0000Not|r Known"] = "Talent |cFFFF0000Not|r Known" L["Talent |cFFFF0000Not|r Selected"] = "Talent |cFFFF0000Not|r Selected" --[[Translation missing --]] L["Talent Known"] = "Talent Known" -L["Talent Selected"] = "Talent gewählt" L["Talent selected"] = "Gewähltes Talent" +L["Talent Selected"] = "Talent gewählt" L["Talent Specialization"] = "Talentspezialisierung" L["Tanking And Highest"] = "Höchster und Aggro" L["Tanking But Not Highest"] = "Aggro aber nicht höchste" diff --git a/WeakAuras/Locales/enUS.lua b/WeakAuras/Locales/enUS.lua index b2b21e3..9a47bde 100644 --- a/WeakAuras/Locales/enUS.lua +++ b/WeakAuras/Locales/enUS.lua @@ -139,6 +139,7 @@ L["Ascending"] = "Ascending" L["Assigned Role"] = "Assigned Role" L["Assigned Role Icon"] = "Assigned Role Icon" L["Assist"] = "Assist" +L["Assisted Combat Next Cast"] = "Assisted Combat Next Cast" L["At Least One Enemy"] = "At Least One Enemy" L["At missing Value"] = "At missing Value" L["At Percent"] = "At Percent" @@ -498,6 +499,7 @@ L["Error decompressing. This doesn't look like a WeakAuras import."] = "Error de L["Error deserializing"] = "Error deserializing" L["Error Frame"] = "Error Frame" L["ERROR in '%s' unknown or incompatible sub element type '%s'"] = "ERROR in '%s' unknown or incompatible sub element type '%s'" +L["Error in aura '%s'"] = "Error in aura '%s'" L["Error not receiving display information from %s"] = "Error not receiving display information from %s" L["Essence"] = "Essence" L["Essence #1"] = "Essence #1" @@ -652,8 +654,8 @@ L["Hybrid"] = "Hybrid" L["Icon"] = "Icon" L["Icon Function"] = "Icon Function" L["Icon Function (fallback state)"] = "Icon Function (fallback state)" -L["Id"] = "Id" L["ID"] = "ID" +L["Id"] = "Id" L["If you require additional assistance, please open a ticket on GitHub or visit our Discord at https://discord.gg/weakauras!"] = "If you require additional assistance, please open a ticket on GitHub or visit our Discord at https://discord.gg/weakauras!" L["Ignore Dead"] = "Ignore Dead" L["Ignore Disconnected"] = "Ignore Disconnected" @@ -861,7 +863,6 @@ L["Name of the (sub-)zone currently shown above the minimap."] = "Name of the (s L["Name(s)"] = "Name(s)" L["Name/Realm of Caster's Target"] = "Name/Realm of Caster's Target" L["Nameplate"] = "Nameplate" -L["Nameplate Type"] = "Nameplate Type" L["Nameplates"] = "Nameplates" L["Names of affected Players"] = "Names of affected Players" L["Names of unaffected Players"] = "Names of unaffected Players" @@ -1069,8 +1070,8 @@ L["Progress Total"] = "Progress Total" L["Progress Value"] = "Progress Value" L["Pulse"] = "Pulse" L["PvP Flagged"] = "PvP Flagged" -L["PvP Talent selected"] = "PvP Talent selected" L["PvP Talent Selected"] = "PvP Talent Selected" +L["PvP Talent selected"] = "PvP Talent selected" L["Quality Id"] = "Quality Id" L["Quantity"] = "Quantity" L["Quantity earned this week"] = "Quantity earned this week" @@ -1341,8 +1342,8 @@ L["Talent"] = "Talent" L["Talent |cFFFF0000Not|r Known"] = "Talent |cFFFF0000Not|r Known" L["Talent |cFFFF0000Not|r Selected"] = "Talent |cFFFF0000Not|r Selected" L["Talent Known"] = "Talent Known" -L["Talent Selected"] = "Talent Selected" L["Talent selected"] = "Talent selected" +L["Talent Selected"] = "Talent Selected" L["Talent Specialization"] = "Talent Specialization" L["Tanking And Highest"] = "Tanking And Highest" L["Tanking But Not Highest"] = "Tanking But Not Highest" diff --git a/WeakAuras/Locales/esES.lua b/WeakAuras/Locales/esES.lua index 7573d80..e475008 100644 --- a/WeakAuras/Locales/esES.lua +++ b/WeakAuras/Locales/esES.lua @@ -124,6 +124,8 @@ L["Ascending"] = "Ascendente" L["Assigned Role"] = "Rol asignado" L["Assigned Role Icon"] = "Icono del rol asignado" L["Assist"] = "Ayudante" +--[[Translation missing --]] +L["Assisted Combat Next Cast"] = "Assisted Combat Next Cast" L["At Least One Enemy"] = "Como Mínimo un Enemigo" L["At missing Value"] = "Al faltar el valor" L["At Percent"] = "Al porcentaje" @@ -317,14 +319,10 @@ L["Could not load WeakAuras Archive, the addon is %s"] = "No se pudo cargar Weak L["Count"] = "Recuento" L["Counter Clockwise"] = "En sentido anti-horario" L["Create"] = "Crear" ---[[Translation missing --]] -L["Creature Family"] = "Creature Family" ---[[Translation missing --]] -L["Creature Family Name"] = "Creature Family Name" ---[[Translation missing --]] -L["Creature Type"] = "Creature Type" ---[[Translation missing --]] -L["Creature Type Name"] = "Creature Type Name" +L["Creature Family"] = "Familia de criatura" +L["Creature Family Name"] = "Nombre de familia de criatura" +L["Creature Type"] = "Tipo de criatura" +L["Creature Type Name"] = "Nombre de tipo de criatura" L["Critical"] = "Crítico" L["Critical (%)"] = "Crítico (%)" L["Critical Rating"] = "Índice de crítico" @@ -485,6 +483,7 @@ L["Error decompressing. This doesn't look like a WeakAuras import."] = "Error al L["Error deserializing"] = "Error de deserialización" L["Error Frame"] = "Marco de error" L["ERROR in '%s' unknown or incompatible sub element type '%s'"] = "ERROR en '%s' tipo de subelemento '%s' desconocido o incompatible" +L["Error in aura '%s'"] = "Error en el aura '%s'" L["Error not receiving display information from %s"] = "Error al no recibir información de visualización de %s" L["Essence"] = "Esencia" L["Essence #1"] = "Esencia #1" @@ -639,8 +638,8 @@ L["Hybrid"] = "Híbrido" L["Icon"] = "Icono" L["Icon Function"] = "Función de icono" L["Icon Function (fallback state)"] = "Función de icono (estado de reserva)" -L["Id"] = "ID" L["ID"] = "ID" +L["Id"] = "ID" L["If you require additional assistance, please open a ticket on GitHub or visit our Discord at https://discord.gg/weakauras!"] = "Si necesitas más ayuda, abre un ticket en GitHub o visita nuestro Discord en https://discord.gg/weakauras." L["Ignore Dead"] = "Ignorar muertos" L["Ignore Disconnected"] = "Ignorar desconectados" @@ -676,8 +675,8 @@ L["Instakill"] = "Muerte Instantanea" L["Install the addons BugSack and BugGrabber for detailed error logs."] = "Instala los addons BugSack y BugGrabber para obtener registros de errores detallados." L["Instance"] = "Instancia" L["Instance Difficulty"] = "Dificultad de la instancia" -L["Instance Id"] = "ID de estancia" L["Instance ID"] = "ID de estancia" +L["Instance Id"] = "ID de estancia" L["Instance Info"] = "Info de estancia" L["Instance Name"] = "Nombre de estancia" L["Instance Size Type"] = "Tipo de tamaño de estancia" @@ -846,7 +845,6 @@ L["Name of the (sub-)zone currently shown above the minimap."] = "Nombre de la ( L["Name(s)"] = "Nombre(s)" L["Name/Realm of Caster's Target"] = "Nombre/Reino del objetivo del lanzador" L["Nameplate"] = "Placa" -L["Nameplate Type"] = "Tipo de placa" L["Nameplates"] = "Placas" L["Names of affected Players"] = "Nombres de los jugadores afectados" L["Names of unaffected Players"] = "Nombres de los jugadores no afectados" @@ -1019,8 +1017,8 @@ L["Progress Total"] = "Progreso total" L["Progress Value"] = "Valor de progreso" L["Pulse"] = "Pulso" L["PvP Flagged"] = "Marcado JcJ" -L["PvP Talent selected"] = "Talento de JcJ seleccionado" L["PvP Talent Selected"] = "Talento de JcJ seleccionado" +L["PvP Talent selected"] = "Talento de JcJ seleccionado" L["Quality Id"] = "ID de calidad" L["Quantity"] = "Cantidad" L["Quantity earned this week"] = "Cantidad ganada esta semana" @@ -1285,8 +1283,8 @@ L["Talent"] = "Talento" L["Talent |cFFFF0000Not|r Known"] = "Talento |cFFFF0000desconocido|r" L["Talent |cFFFF0000Not|r Selected"] = "Talento |cFFFF0000no|r seleccionado" L["Talent Known"] = "Talento conocido" -L["Talent Selected"] = "Talento seleccionado" L["Talent selected"] = "Talento seleccionado" +L["Talent Selected"] = "Talento seleccionado" L["Talent Specialization"] = "Especialización de Talentos" L["Tanking And Highest"] = "Tanqueando y el más alto" L["Tanking But Not Highest"] = "Tanqueando pero no el mas alto" diff --git a/WeakAuras/Locales/esMX.lua b/WeakAuras/Locales/esMX.lua index 4398147..70df114 100644 --- a/WeakAuras/Locales/esMX.lua +++ b/WeakAuras/Locales/esMX.lua @@ -124,6 +124,8 @@ L["Ascending"] = "Ascendente" L["Assigned Role"] = "Rol asignado" L["Assigned Role Icon"] = "Icono del rol asignado" L["Assist"] = "Ayudante" +--[[Translation missing --]] +L["Assisted Combat Next Cast"] = "Assisted Combat Next Cast" L["At Least One Enemy"] = "Como Mínimo un Enemigo" L["At missing Value"] = "Al faltar el valor" L["At Percent"] = "Al porcentaje" @@ -317,14 +319,10 @@ L["Could not load WeakAuras Archive, the addon is %s"] = "No se pudo cargar Weak L["Count"] = "Recuento" L["Counter Clockwise"] = "En sentido anti-horario" L["Create"] = "Crear" ---[[Translation missing --]] -L["Creature Family"] = "Creature Family" ---[[Translation missing --]] -L["Creature Family Name"] = "Creature Family Name" ---[[Translation missing --]] -L["Creature Type"] = "Creature Type" ---[[Translation missing --]] -L["Creature Type Name"] = "Creature Type Name" +L["Creature Family"] = "Familia de criatura" +L["Creature Family Name"] = "Nombre de familia de criatura" +L["Creature Type"] = "Tipo de criatura" +L["Creature Type Name"] = "Nombre de tipo de criatura" L["Critical"] = "Crítico" L["Critical (%)"] = "Crítico (%)" L["Critical Rating"] = "Índice de crítico" @@ -485,6 +483,7 @@ L["Error decompressing. This doesn't look like a WeakAuras import."] = "Error al L["Error deserializing"] = "Error de deserialización" L["Error Frame"] = "Marco de error" L["ERROR in '%s' unknown or incompatible sub element type '%s'"] = "ERROR en '%s' tipo de subelemento '%s' desconocido o incompatible" +L["Error in aura '%s'"] = "Error en el aura '%s'" L["Error not receiving display information from %s"] = "Error al no recibir información de visualización de %s" L["Essence"] = "Esencia" L["Essence #1"] = "Esencia #1" @@ -639,8 +638,8 @@ L["Hybrid"] = "Híbrido" L["Icon"] = "Icono" L["Icon Function"] = "Función de icono" L["Icon Function (fallback state)"] = "Función de icono (estado de reserva)" -L["Id"] = "ID" L["ID"] = "ID" +L["Id"] = "ID" L["If you require additional assistance, please open a ticket on GitHub or visit our Discord at https://discord.gg/weakauras!"] = "Si necesitas más ayuda, abre un ticket en GitHub o visita nuestro Discord en https://discord.gg/weakauras." L["Ignore Dead"] = "Ignorar muertos" L["Ignore Disconnected"] = "Ignorar desconectados" @@ -789,8 +788,8 @@ L["Matches (Pattern)"] = "Corresponde (Patrón)" L[ [=[Matches stage number of encounter journal. Intermissions are .5 E.g. 1;2;1;2;2.5;3]=] ] = "Coincide con el número de etapa del diario de encuentros. Los intermedios son .5 Por ej. 1;2;1;2;2.5;3" -L["Max Char "] = "Caracteres máx." L["Max Char"] = "Carácter máximo" +L["Max Char "] = "Caracteres máx." L["Max Charges"] = "Cargas máx." L["Max Health"] = "Salud máx." L["Max Power"] = "Poder máx." @@ -847,7 +846,6 @@ L["Name of the (sub-)zone currently shown above the minimap."] = "Nombre de la ( L["Name(s)"] = "Nombre(s)" L["Name/Realm of Caster's Target"] = "Nombre/Reino del objetivo del lanzador" L["Nameplate"] = "Placa" -L["Nameplate Type"] = "Tipo de placa" L["Nameplates"] = "Placas" L["Names of affected Players"] = "Nombres de los jugadores afectados" L["Names of unaffected Players"] = "Nombres de los jugadores no afectados" @@ -1020,8 +1018,8 @@ L["Progress Total"] = "Progreso total" L["Progress Value"] = "Valor de progreso" L["Pulse"] = "Pulso" L["PvP Flagged"] = "Marcado JcJ" -L["PvP Talent selected"] = "Talento de JcJ seleccionado" L["PvP Talent Selected"] = "Talento de JcJ seleccionado" +L["PvP Talent selected"] = "Talento de JcJ seleccionado" L["Quality Id"] = "ID de calidad" L["Quantity"] = "Cantidad" L["Quantity earned this week"] = "Cantidad ganada esta semana" diff --git a/WeakAuras/Locales/frFR.lua b/WeakAuras/Locales/frFR.lua index 3937300..13a3ec4 100644 --- a/WeakAuras/Locales/frFR.lua +++ b/WeakAuras/Locales/frFR.lua @@ -21,22 +21,16 @@ L["|cffeda55fLeft-Click|r to toggle showing the main window."] = "|cffeda55fClic L["|cffeda55fMiddle-Click|r to toggle the minimap icon on or off."] = "Clique du milieu pour activer ou désactiver l'icône de la mini-carte." L["|cffeda55fRight-Click|r to toggle performance profiling window."] = "|cffeda55fClic-Droit|r pour basculer la fenêtre de profilage des performances." L["|cffeda55fShift-Click|r to pause addon execution."] = "|cffeda55fMaj-Clic|r Pour suspendre l'exécution de l'addon." ---[[Translation missing --]] -L["|cffff0000deprecated|r"] = "|cffff0000deprecated|r" +L["|cffff0000deprecated|r"] = "|cffff0000obsolète|r" L["|cFFFF0000Not|r Item Bonus Id Equipped"] = "ID du bonus de l'objet |cFFFF0000non|r équipé" ---[[Translation missing --]] -L["|cFFFF0000Not|r Item Equipped"] = "|cFFFF0000Not|r Item Equipped" +L["|cFFFF0000Not|r Item Equipped"] = "Objet |cFFFF0000non|r équipé" L["|cFFFF0000Not|r Player Name/Realm"] = "|cFFFF0000Not|r Nom du joueur / serveur" --[[Translation missing --]] L["|cFFFF0000Not|r Spell Known"] = "|cFFFF0000Not|r Spell Known" ---[[Translation missing --]] L[ [=[|cFFFF0000Support for unfiltered COMBAT_LOG_EVENT_UNFILTERED is deprecated|r COMBAT_LOG_EVENT_UNFILTERED without a filter are disabled as it’s very performance costly. Find more information: -https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers#events]=] ] = [=[|cFFFF0000Support for unfiltered COMBAT_LOG_EVENT_UNFILTERED is deprecated|r -COMBAT_LOG_EVENT_UNFILTERED without a filter are disabled as it’s very performance costly. -Find more information: -https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers#events]=] +https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers#events]=] ] = "|cFFFF0000La prise en charge des événements COMBAT_LOG_EVENT_UNFILTERED non filtrés est obsolète|r Les événements COMBAT_LOG_EVENT_UNFILTERED sans filtre sont désactivés, car ils nuisent fortement aux performances. Plus d'informations : https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers#events" L["|cFFffcc00Extra Options:|r %s"] = "|cFFffcc00Options supplémentaires :|r %s" L["|cFFffcc00Extra Options:|r None"] = "|cFFffcc00Options supplémentaires :|r Aucun" L[ [=[• |cff00ff00Player|r, |cff00ff00Target|r, |cff00ff00Focus|r, and |cff00ff00Pet|r correspond directly to those individual unitIDs. @@ -45,20 +39,15 @@ L[ [=[• |cff00ff00Player|r, |cff00ff00Target|r, |cff00ff00Focus|r, and |cff00f • |cffffff00Party|r, |cffffff00Raid|r, |cffffff00Boss|r, |cffffff00Arena|r, and |cffffff00Nameplate|r can match multiple corresponding unitIDs. • |cffffff00Smart Group|r adjusts to your current group type, matching just the "player" when solo, "party" units (including "player") in a party or "raid" units in a raid. -|cffffff00*|r Yellow Unit settings will create clones for each matching unit while this trigger is providing Dynamic Info to the Aura.]=] ] = [=[• |cff00ff00Joueur|r, |cff00ff00Cible|r, |cff00ff00Focalisation|r, and |cff00ff00Animal de compagnie|r -correspondent directement à ces identifiants d'unités individuelles. • |cff00ff00Unité spécifique|r vous permet de fournir un identifiant d'unité spécifique valide à surveiller. |cffff0000Note|r : Le jeu ne déclenchera pas d'événements pour tous les identifiants d'unités valides, ce qui rendra certains d'entre eux non traçables par ce déclencheur. • |cffffff00Groupe|r, |cffffff00Raid|r, |cffffff00Boss|r, |cffffff00Arène|r, et |cffffff00Nameplate|r peut correspondre à plusieurs identifiant d'unité. • Le |cffffff00groupe intelligent|r s'adapte à votre type de groupe actuel, en ne faisant correspondre que le "joueur" en solo, les unités du "groupe" (y compris le "joueur") dans un groupe ou les unités du "raid" dans un raid. |cffffff00*|r Les paramètres de l'unité jaune créeront des clones pour chaque unité correspondante pendant que ce déclencheur fournit des informations dynamiques à l'Aura.]=] ---[[Translation missing --]] -L["1. Profession 1. Accessory"] = "1. Profession 1. Accessory" ---[[Translation missing --]] -L["1. Profession 2. Accessory"] = "1. Profession 2. Accessory" ---[[Translation missing --]] -L["1. Professsion Tool"] = "1. Professsion Tool" +|cffffff00*|r Yellow Unit settings will create clones for each matching unit while this trigger is providing Dynamic Info to the Aura.]=] ] = "• |cff00ff00Joueur|r, |cff00ff00Cible|r, |cff00ff00Focalisation|r et |cff00ff00Familier|r correspondent directement à ces identifiants d’unité spécifiques. • |cff00ff00Unité spécifique|r vous permet d’indiquer un identifiant d’unité valide à surveiller. |cffff0000Remarque|r : Le jeu ne déclenche pas d’événements pour tous les identifiants d’unité valides, ce qui rend certains non traçables par ce déclencheur. • |cffffff00Groupe|r, |cffffff00Raid|r, |cffffff00Boss|r, |cffffff00Arène|r et |cffffff00Barre de vie|r peuvent correspondre à plusieurs identifiants d’unité associés. • |cffffff00Groupe intelligent|r s’ajuste en fonction de votre type de groupe actuel : il correspond uniquement au \"joueur\" en solo, aux unités du \"groupe\" (y compris le joueur) en groupe, ou aux unités du \"raid\" en raid. |cffffff00*|r Les paramètres d’unité en jaune créeront des clones pour chaque unité correspondante tant que ce déclencheur fournit des informations dynamiques à l’aura." +L["1. Profession 1. Accessory"] = "1. Profession 1. Accessoire" +L["1. Profession 2. Accessory"] = "1. Profession 2. Accessoire" +L["1. Professsion Tool"] = "1. Outil de profession" L["10 Man Raid"] = "Raid 10 Joueurs" -L["10 Player Raid"] = "Raid à 10 joueurs" -L["10 Player Raid (Heroic)"] = "Raid 10 Joueurs (Héroïque)" -L["10 Player Raid (Normal)"] = "Raid 10 Joueurs (Normal)" ---[[Translation missing --]] -L["2. Profession 1. Accessory"] = "2. Profession 1. Accessory" +L["10 Player Raid"] = "Raid à 10 Joueurs" +L["10 Player Raid (Heroic)"] = "Raid à 10 Joueurs (Héroïque)" +L["10 Player Raid (Normal)"] = "Raid à 10 Joueurs (Normal)" +L["2. Profession 1. Accessory"] = "2. Profession 1. Accessoire" --[[Translation missing --]] L["2. Profession 2. Accessory"] = "2. Profession 2. Accessory" --[[Translation missing --]] @@ -139,8 +128,7 @@ L["Amount"] = "Quantité" L["Anchoring"] = "Anchoring" --[[Translation missing --]] L["And Talent"] = "And Talent" ---[[Translation missing --]] -L["Angle and Radius"] = "Angle and Radius" +L["Angle and Radius"] = "Angle et rayon" L["Animations"] = "Animations" L["Anticlockwise"] = "Sens anti-horaire" L["Anub'Rekhan"] = "Anub'Rekhan" @@ -161,6 +149,8 @@ L["Assigned Role"] = "Rôle assigné" L["Assigned Role Icon"] = "Icône de rôle assigné" --[[Translation missing --]] L["Assist"] = "Assist" +--[[Translation missing --]] +L["Assisted Combat Next Cast"] = "Assisted Combat Next Cast" L["At Least One Enemy"] = "Au moins un ennemi" --[[Translation missing --]] L["At missing Value"] = "At missing Value" @@ -260,8 +250,7 @@ L["Black Wing Lair"] = "Black Wing Lair" --[[Translation missing --]] L["Bleed"] = "Bleed" L["Blizzard Combat Text"] = "Texte de Combat Blizzard" ---[[Translation missing --]] -L["Blizzard Cooldown Reduction"] = "Blizzard Cooldown Reduction" +L["Blizzard Cooldown Reduction"] = "Réduction du temps de recharge de Blizzard" L["Block"] = "Bloc" L["Block (%)"] = "Blocage" L["Block against Target (%)"] = "Blocage contre la cible" @@ -269,12 +258,10 @@ L["Block Value"] = "Valeur du bloc" L["Blocked"] = "Bloqué" --[[Translation missing --]] L["Blood"] = "Blood" ---[[Translation missing --]] -L["Blood Rune #1"] = "Blood Rune #1" +L["Blood Rune #1"] = "Rune de sang #1" --[[Translation missing --]] L["Blood Rune #2"] = "Blood Rune #2" ---[[Translation missing --]] -L["Bloodlord Mandokir"] = "Bloodlord Mandokir" +L["Bloodlord Mandokir"] = "Seigneur sanglant Mandokir" --[[Translation missing --]] L["Bonus Reputation Gain"] = "Bonus Reputation Gain" L["Border"] = "Encadrement" @@ -549,14 +536,12 @@ L["Destination unit's raid mark index"] = "Destination unit's raid mark index" L["Destination unit's raid mark texture"] = "Destination unit's raid mark texture" --[[Translation missing --]] L["Difficulty"] = "Difficulty" ---[[Translation missing --]] -L["Disable Spell Known Check"] = "Disable Spell Known Check" +L["Disable Spell Known Check"] = "Désactiver la vérification des sorts connus" --[[Translation missing --]] L["Disabled"] = "Disabled" --[[Translation missing --]] L["Disabled feature %q"] = "Disabled feature %q" ---[[Translation missing --]] -L["Disabled Spell Known Check"] = "Disabled Spell Known Check" +L["Disabled Spell Known Check"] = "Vérification des sorts connus désactivées" --[[Translation missing --]] L["Discovered"] = "Discovered" L["Disease"] = "Maladie" @@ -684,10 +669,11 @@ L["Error deserializing"] = "Error deserializing" L["Error Frame"] = "Fenêtre d'erreur" --[[Translation missing --]] L["ERROR in '%s' unknown or incompatible sub element type '%s'"] = "ERROR in '%s' unknown or incompatible sub element type '%s'" +--[[Translation missing --]] +L["Error in aura '%s'"] = "Error in aura '%s'" L["Error not receiving display information from %s"] = "Erreur de non-réception d'informations d'affichage de %s" --[[Translation missing --]] L["Essence"] = "Essence" ---[[Translation missing --]] L["Essence #1"] = "Essence #1" --[[Translation missing --]] L["Essence #2"] = "Essence #2" @@ -800,8 +786,7 @@ L["Friendship Reputation"] = "Friendship Reputation" --[[Translation missing --]] L["Frost"] = "Frost" L["Frost Resistance"] = "Résistance au givre" ---[[Translation missing --]] -L["Frost Rune #1"] = "Frost Rune #1" +L["Frost Rune #1"] = "Rune de givre n°1" --[[Translation missing --]] L["Frost Rune #2"] = "Frost Rune #2" L["Full"] = "Plein" @@ -887,8 +872,7 @@ L["Heroic Party"] = "Heroic Party" L["Hide"] = "Cacher" --[[Translation missing --]] L["Hide 0 cooldowns"] = "Hide 0 cooldowns" ---[[Translation missing --]] -L["Hide Timer Text"] = "Hide Timer Text" +L["Hide Timer Text"] = "Masquer le texte du minuteur" L["High Damage"] = "Dégâts élevés" --[[Translation missing --]] L["High Priest Thekal"] = "High Priest Thekal" @@ -921,10 +905,10 @@ L["Icon Function"] = "Icon Function" --[[Translation missing --]] L["Icon Function (fallback state)"] = "Icon Function (fallback state)" --[[Translation missing --]] -L["Id"] = "Id" ---[[Translation missing --]] L["ID"] = "ID" --[[Translation missing --]] +L["Id"] = "Id" +--[[Translation missing --]] L["If you require additional assistance, please open a ticket on GitHub or visit our Discord at https://discord.gg/weakauras!"] = "If you require additional assistance, please open a ticket on GitHub or visit our Discord at https://discord.gg/weakauras!" L["Ignore Dead"] = "Ignorer la mort" L["Ignore Disconnected"] = "Ignorer les déconnectés" @@ -987,8 +971,8 @@ L["Interrupt School"] = "Interrupt School" --[[Translation missing --]] L["Interrupted School Text"] = "Interrupted School Text" L["Interruptible"] = "Interruptible" -L["Inverse"] = "Inverse" -L["Inverse Pet Behavior"] = "Inverser le Comportement du Familier" +L["Inverse"] = "Inverser" +L["Inverse Pet Behavior"] = "Inverser le comportement du familier" --[[Translation missing --]] L["Is Away from Keyboard"] = "Is Away from Keyboard" --[[Translation missing --]] @@ -1182,8 +1166,7 @@ L["Missing"] = "Manquant" L["Mists of Pandaria"] = "Mists of Pandaria" L["Moam"] = "Moam" L["Model"] = "Modèle" ---[[Translation missing --]] -L["Modern Blizzard (1h 3m | 3m 7s | 10s | 2.4)"] = "Modern Blizzard (1h 3m | 3m 7s | 10s | 2.4)" +L["Modern Blizzard (1h 3m | 3m 7s | 10s | 2.4)"] = "Blizzard moderne (1h 3min | 3m 7s | 10s | 2.4)" --[[Translation missing --]] L["Modernize"] = "Modernize" --[[Translation missing --]] @@ -1202,7 +1185,7 @@ L["Monster Yell"] = "Cri de monstre" L["Moon"] = "Moon" L["Most remaining time"] = "Plus de temps restant" L["Mounted"] = "En monture" -L["Mouse Cursor"] = "Curseur de Souris" +L["Mouse Cursor"] = "Curseur de la souris" L["Movement Speed Rating"] = [=[Score de vitesse ]=] L["Multi-target"] = "Multi-cibles" @@ -1219,8 +1202,6 @@ L["Name of the (sub-)zone currently shown above the minimap."] = "Nom de la (sou L["Name(s)"] = "Name(s)" L["Name/Realm of Caster's Target"] = "Nom/Royaume de la Cible du Lanceur de sort" L["Nameplate"] = "Barre de vie" ---[[Translation missing --]] -L["Nameplate Type"] = "Nameplate Type" L["Nameplates"] = "Barres de vie" L["Names of affected Players"] = "Noms des joueurs affectés" L["Names of unaffected Players"] = "Noms des joueurs non affectés" @@ -1344,8 +1325,7 @@ L["Officer"] = "Officier" --[[Translation missing --]] L["Offset from progress"] = "Offset from progress" L["Offset Timer"] = "Décalage de la durée" ---[[Translation missing --]] -L["Old Blizzard (2h | 3m | 10s | 2.4)"] = "Old Blizzard (2h | 3m | 10s | 2.4)" +L["Old Blizzard (2h | 3m | 10s | 2.4)"] = "Blizzard ancien (2h | 3m | 10s | 2.4)" L["On Cooldown"] = "En recharge" --[[Translation missing --]] L["On Taxi"] = "On Taxi" @@ -1470,9 +1450,9 @@ L["Progress Total"] = "Progrès Total" L["Progress Value"] = "Valeur de progression" L["Pulse"] = "Pulsation" L["PvP Flagged"] = "JcJ activé" -L["PvP Talent selected"] = "Talent JcJ sélectionné" --[[Translation missing --]] L["PvP Talent Selected"] = "PvP Talent Selected" +L["PvP Talent selected"] = "Talent JcJ sélectionné" --[[Translation missing --]] L["Quality Id"] = "Quality Id" --[[Translation missing --]] @@ -1527,10 +1507,8 @@ L["Receiving display information"] = "Réception d'information de graphique de % L["Reflect"] = "Renvoi" L["Region type %s not supported"] = "Région de type %s non supporté" L["Relative"] = "Relatif" ---[[Translation missing --]] -L["Relative X-Offset"] = "Relative X-Offset" ---[[Translation missing --]] -L["Relative Y-Offset"] = "Relative Y-Offset" +L["Relative X-Offset"] = "Décalage sur l'axe X" +L["Relative Y-Offset"] = "Décalage sur l'axe Y" L["Remaining Duration"] = "Durée Restante" L["Remaining Time"] = "Temps restant" L["Remove Obsolete Auras"] = "Retirer les auras obsolètes" @@ -1969,17 +1947,13 @@ L["Toggle Options Window"] = "Activer/Désactiver la Fenêtre d'Options" --[[Translation missing --]] L["Toggle Performance Profiling Window"] = "Toggle Performance Profiling Window" L["Tooltip"] = "Info-bulle" ---[[Translation missing --]] -L["Tooltip 1"] = "Tooltip 1" ---[[Translation missing --]] -L["Tooltip 2"] = "Tooltip 2" ---[[Translation missing --]] -L["Tooltip 3"] = "Tooltip 3" +L["Tooltip 1"] = "Info-bulle 1" +L["Tooltip 2"] = "Info-bulle 2" +L["Tooltip 3"] = "Info-bulle 3" L["Tooltip Value 1"] = "Valeur de l'info-bulle 1" L["Tooltip Value 2"] = "Valeur de l'info-bulle 2" L["Tooltip Value 3"] = "Valeur de l'info-bulle 3" ---[[Translation missing --]] -L["Tooltip Value 4"] = "Tooltip Value 4" +L["Tooltip Value 4"] = "Valeur de l'info-bulle 4" L["Top"] = "Haut" L["Top Left"] = "Haut Gauche" L["Top Right"] = "Haut Droite" @@ -2091,10 +2065,8 @@ L["Use Texture"] = "Use Texture" L["Use Watched Faction"] = "Use Watched Faction" --[[Translation missing --]] L["Uses UnitInRange() to check if in range. Matches default raid frames out of range behavior, which is between 25 to 40 yards depending on your class and spec."] = "Uses UnitInRange() to check if in range. Matches default raid frames out of range behavior, which is between 25 to 40 yards depending on your class and spec." ---[[Translation missing --]] -L["Using WeakAuras.clones is deprecated. Use WeakAuras.GetRegion(id, cloneId) instead."] = "Using WeakAuras.clones is deprecated. Use WeakAuras.GetRegion(id, cloneId) instead." ---[[Translation missing --]] -L["Using WeakAuras.regions is deprecated. Use WeakAuras.GetRegion(id) instead."] = "Using WeakAuras.regions is deprecated. Use WeakAuras.GetRegion(id) instead." +L["Using WeakAuras.clones is deprecated. Use WeakAuras.GetRegion(id, cloneId) instead."] = "L'utilisation de WeakAuras.clones est obsolète. Utilisez plutôt WeakAuras.GetRegion(id, cloneId)." +L["Using WeakAuras.regions is deprecated. Use WeakAuras.GetRegion(id) instead."] = "L'utilisation de WeakAuras.regions est obsolète. Utilisez plutôt WeakAuras.GetRegion(id)." L["Vaelastrasz the Corrupt"] = "Vaelastrasz le Corrompu" L["Versatility (%)"] = "Polyvalence (%)" L["Versatility Rating"] = "Score de Polyvalence" diff --git a/WeakAuras/Locales/itIT.lua b/WeakAuras/Locales/itIT.lua index 283905c..21ff8b3 100644 --- a/WeakAuras/Locales/itIT.lua +++ b/WeakAuras/Locales/itIT.lua @@ -142,6 +142,8 @@ L["Assigned Role"] = "Ruolo assegnato" L["Assigned Role Icon"] = "Icona del ruolo assegnato" --[[Translation missing --]] L["Assist"] = "Assist" +--[[Translation missing --]] +L["Assisted Combat Next Cast"] = "Assisted Combat Next Cast" L["At Least One Enemy"] = "Almeno un nemico" L["At missing Value"] = "Al valore mancante" L["At Percent"] = "In Percentuale" @@ -694,6 +696,8 @@ L["Error Frame"] = "Error Frame" --[[Translation missing --]] L["ERROR in '%s' unknown or incompatible sub element type '%s'"] = "ERROR in '%s' unknown or incompatible sub element type '%s'" --[[Translation missing --]] +L["Error in aura '%s'"] = "Error in aura '%s'" +--[[Translation missing --]] L["Error not receiving display information from %s"] = "Error not receiving display information from %s" --[[Translation missing --]] L["Essence"] = "Essence" @@ -1000,10 +1004,10 @@ L["Icon Function"] = "Icon Function" --[[Translation missing --]] L["Icon Function (fallback state)"] = "Icon Function (fallback state)" --[[Translation missing --]] -L["Id"] = "Id" ---[[Translation missing --]] L["ID"] = "ID" --[[Translation missing --]] +L["Id"] = "Id" +--[[Translation missing --]] L["If you require additional assistance, please open a ticket on GitHub or visit our Discord at https://discord.gg/weakauras!"] = "If you require additional assistance, please open a ticket on GitHub or visit our Discord at https://discord.gg/weakauras!" --[[Translation missing --]] L["Ignore Dead"] = "Ignore Dead" @@ -1298,10 +1302,10 @@ E.g. 1;2;1;2;2.5;3]=] ] = [=[Matches stage number of encounter journal. Intermissions are .5 E.g. 1;2;1;2;2.5;3]=] --[[Translation missing --]] -L["Max Char "] = "Max Char " ---[[Translation missing --]] L["Max Char"] = "Max Char" --[[Translation missing --]] +L["Max Char "] = "Max Char " +--[[Translation missing --]] L["Max Charges"] = "Max Charges" --[[Translation missing --]] L["Max Health"] = "Max Health" @@ -1414,8 +1418,6 @@ L["Name/Realm of Caster's Target"] = "Name/Realm of Caster's Target" --[[Translation missing --]] L["Nameplate"] = "Nameplate" --[[Translation missing --]] -L["Nameplate Type"] = "Nameplate Type" ---[[Translation missing --]] L["Nameplates"] = "Nameplates" --[[Translation missing --]] L["Names of affected Players"] = "Names of affected Players" @@ -1760,10 +1762,10 @@ L["Pulse"] = "Pulse" --[[Translation missing --]] L["PvP Flagged"] = "PvP Flagged" --[[Translation missing --]] -L["PvP Talent selected"] = "PvP Talent selected" ---[[Translation missing --]] L["PvP Talent Selected"] = "PvP Talent Selected" --[[Translation missing --]] +L["PvP Talent selected"] = "PvP Talent selected" +--[[Translation missing --]] L["Quality Id"] = "Quality Id" --[[Translation missing --]] L["Quantity"] = "Quantity" @@ -2292,10 +2294,10 @@ L["Talent |cFFFF0000Not|r Selected"] = "Talent |cFFFF0000Not|r Selected" --[[Translation missing --]] L["Talent Known"] = "Talent Known" --[[Translation missing --]] -L["Talent Selected"] = "Talent Selected" ---[[Translation missing --]] L["Talent selected"] = "Talent selected" --[[Translation missing --]] +L["Talent Selected"] = "Talent Selected" +--[[Translation missing --]] L["Talent Specialization"] = "Talent Specialization" --[[Translation missing --]] L["Tanking And Highest"] = "Tanking And Highest" diff --git a/WeakAuras/Locales/koKR.lua b/WeakAuras/Locales/koKR.lua index a5c8394..155d68d 100644 --- a/WeakAuras/Locales/koKR.lua +++ b/WeakAuras/Locales/koKR.lua @@ -10,7 +10,7 @@ L[ [=[ Filter formats: 'Name', 'Name-Realm', '-Realm'. Supports multiple entries, separated by commas Can use \ to escape -.]=] ] = [=[필터 형식: '이름', '이름-서버', '-서버'. 여러 항목을 지원하며, 각 항목은 쉼표로 구분합니다. -는 앞에 \를 붙여 이스케이프를 사용해 입력합니다.]=] -L["%s Overlay Color"] = "%s 오버레이 색깔" +L["%s Overlay Color"] = "%s 오버레이색" L["* Suffix"] = "* 접미사" L["/wa help - Show this message"] = "/wa help - 이 메시지를 표시합니다" L["/wa minimap - Toggle the minimap icon"] = "/wa minimap - 미니맵 아이콘을 켜거나 끕니다" @@ -108,7 +108,7 @@ L["Alert Type"] = "경보 종류" L["Alive"] = "생존" L["All"] = "모두" L["All children of this aura will also not be loaded, to minimize the chance of further corruption."] = "이 위크오라의 모든 자식 위크오라도 불러오지 않을 것입니다. 오염 가능성을 최소화하기 위함입니다." -L["All States table contains a non table at key: '%s'."] = "올 스테이트 테이블의 키에 테이블이 아닌 것을 포함하고 있습니다: '%s'." +L["All States table contains a non table at key: '%s'."] = "All States 테이블의 키에 테이블이 아닌 데이터가 있습니다: '%s'." L["All Triggers"] = "활성 조건 전부 발동" L["Alliance"] = "얼라이언스" L["Allow partial matches"] = "부분 일치 허용" @@ -116,7 +116,7 @@ L["Alpha"] = "불투명도" L["Alternate Power"] = "보조 자원" L["Always"] = "항상" L["Always active trigger"] = "항상 활성 조건 활성화" -L["Always include realm"] = "항상 서버 포함" +L["Always include realm"] = "항상 서버명 표시" L["Always True"] = "항상 참" L["Amount"] = "수량" L["Anchoring"] = "고정 중" @@ -141,6 +141,7 @@ L["Ascending"] = "오름차순" L["Assigned Role"] = "지정된 역할" L["Assigned Role Icon"] = "지정된 역할 아이콘" L["Assist"] = "부공격대장" +L["Assisted Combat Next Cast"] = "전투 보조 다음 시전" L["At Least One Enemy"] = "최소 1명의 적 대상" L["At missing Value"] = "잃은 수치" L["At Percent"] = "백분율" @@ -187,7 +188,7 @@ L["Ayamiss the Hunter"] = "사냥꾼 아야미스" L["Azuregos"] = "아주어고스" L["Back and Forth"] = "왕복" L["Background"] = "배경" -L["Background Color"] = "배경 색깔" +L["Background Color"] = "배경색" L["Balnazzar"] = "발나자르" L["Bar Color/Gradient Start"] = "바 색깔/그라디언트 첫 색깔" L["Bar enabled in BigWigs settings"] = "타이머 바가 BigWigs 설정에서 활성화됨" @@ -359,14 +360,14 @@ L["Current Zone Group"] = "현재 있는 지역 그룹" L["Curse"] = "저주" L["Custom"] = "사용자 정의" L["Custom Action"] = "사용자 정의 동작" -L["Custom Anchor"] = "사용자 정의 방식 고정" +L["Custom Anchor"] = "사용자 정의 위치 고정" L["Custom Check"] = "사용자 정의 검사" L["Custom Color"] = "사용자 정의 색깔" L["Custom Condition Code"] = "사용자 정의 조건 코드" L["Custom Configuration"] = "사용자 정의 구성" L["Custom Fade Animation"] = "사용자 정의 사라짐 애니메이션" L["Custom Function"] = "사용자 정의 함수" -L["Custom Grow"] = "사용자 정의 확장 방식" +L["Custom Grow"] = "사용자 정의 그룹 확장" L["Custom Sort"] = "사용자 정의 정렬" L["Custom Text Function"] = "사용자 정의 텍스트 함수" L["Custom Trigger Combination"] = "사용자 정의 활성 조건 조합" @@ -436,11 +437,11 @@ L["Dungeon (Mythic+)"] = "던전 (신화+)" L["Dungeon (Normal)"] = "던전 (일반)" L["Dungeon (Timewalking)"] = "던전 (시간여행)" L["Dungeons"] = "던전" -L["Durability Damage"] = "내구도 손상" -L["Durability Damage All"] = "전부위 내구도 손상" +L["Durability Damage"] = "내구도 감소" +L["Durability Damage All"] = "전부위 내구도 감소" L["Duration"] = "지속시간" L["Duration Function"] = "지속시간 함수" -L["Duration Function (fallback state)"] = "지속시간 함수 (폴백 스테이트)" +L["Duration Function (fallback state)"] = "Duration 함수 (고장 대체 상태)" L["Ease In"] = "시작시 지연" L["Ease In and Out"] = "시작과 끝에 지연" L["Ease Out"] = "끝날때 지연" @@ -468,12 +469,12 @@ L["Empowered Fully Charged"] = "강화 주문 끝까지 충전" L["Empty"] = "비었을 때" L["Enabled feature %q"] = "%q 기능 활성화" L["Enables (incorrect) round down of seconds, which was the previous default behavior."] = "예전에 기본 작동 방식이었던 초단위 버림 계산을 활성화 합니다. (부정확함)" -L["Enchant Applied"] = "마법부여 적용" +L["Enchant Applied"] = "임시 마법부여 사용" L["Enchant Found"] = "마법부여 되있음" L["Enchant ID"] = "마법부여 ID" L["Enchant Missing"] = "마법부여 없음" L["Enchant Name or ID"] = "마법부여 이름 또는 ID" -L["Enchant Removed"] = "마법부여 사라짐" +L["Enchant Removed"] = "임시 마법부여 지워짐" L["Enchanted"] = "마법부여됨" L["Encounter ID(s)"] = "보스전(Encounter) ID (여럿 가능)" L["Energize"] = "마력 얻음" @@ -500,6 +501,7 @@ L["Error decompressing. This doesn't look like a WeakAuras import."] = "압축 L["Error deserializing"] = "역직렬화 오류" L["Error Frame"] = "오류창" L["ERROR in '%s' unknown or incompatible sub element type '%s'"] = "'%s'에서 오류 알 수 없거나 비호환 하위 요소 유형 '%s'" +L["Error in aura '%s'"] = "'%s' 위크오라에 오류 발생" L["Error not receiving display information from %s"] = "%s에게서 디스플레이 정보를 받지 못하는 오류" L["Essence"] = "정수" L["Essence #1"] = "정수 #1" @@ -511,7 +513,7 @@ L["Essence #6"] = "정수 #6" L["Evade"] = "벗어남" L["Event"] = "이벤트" L["Event(s)"] = "이벤트 (여럿 가능)" -L["Every Frame"] = "매 프레임" +L["Every Frame"] = "매 프레임마다" L["Every Frame (High CPU usage)"] = "매 프레임 (CPU 사용량 높음)" L["Evoker Essence"] = "기원사 정수" L["Exact Spell ID(s)"] = "정확한 주문 ID (여럿 가능)" @@ -552,14 +554,14 @@ L["Flamegor"] = "플레임고르" L["Flash"] = "반짝임" L["Flex Raid"] = "탄력적 공격대" L["Flip"] = "휙 넘기기" -L["Floor"] = "바닥" +L["Floor"] = "내림" L["Focus"] = "주시 대상" L["Follower Dungeon"] = "추종자 던전" L["Font"] = "글꼴" L["Font Size"] = "글꼴 크기" L["Forbidden function or table: %s"] = "금지된 함수 또는 테이블: %s" L["Foreground"] = "전경" -L["Foreground Color"] = "전경 색깔" +L["Foreground Color"] = "전경색" L["Form"] = "종류" L["Format"] = "형식" L["Format Gold"] = "골드 형식" @@ -588,7 +590,7 @@ L["Garr"] = "가르" L["Gehennas"] = "게헨나스" L["General"] = "일반" L["General Rajaxx"] = "장군 라작스" -L["GetNameAndIcon Function (fallback state)"] = "GetNameAndIcon 함수 (폴백 스테이트)" +L["GetNameAndIcon Function (fallback state)"] = "GetNameAndIcon 함수 (고장 대체 상태)" L["Glancing"] = "빗맞음" L["Global Cooldown"] = "글로벌 쿨타임" L["Glow"] = "반짝임" @@ -653,7 +655,7 @@ L["Humanoid"] = "인간형" L["Hybrid"] = "혼합" L["Icon"] = "아이콘" L["Icon Function"] = "아이콘 함수" -L["Icon Function (fallback state)"] = "아이콘 함수 (폴백 스테이트)" +L["Icon Function (fallback state)"] = "Icon 함수 (고장 대체 상태)" L["Id"] = "ID" L["ID"] = "ID" L["If you require additional assistance, please open a ticket on GitHub or visit our Discord at https://discord.gg/weakauras!"] = "더 많은 도움이 필요하다면 GitHub에서 티켓을 열거나 저희 Discord (https://discord.gg/weakauras)를 방문해 주세요!" @@ -855,13 +857,12 @@ L["Mythic Keystone"] = "신화 쐐기돌" L["Mythic+ Affix"] = "신화+ 어픽스" L["Name"] = "이름" L["Name Function"] = "이름 함수" -L["Name Function (fallback state)"] = "이름 함수 (폴백 스테이트)" +L["Name Function (fallback state)"] = "Name 함수 (고장 대체 상태)" L["Name of Caster's Target"] = "시전 대상의 이름" L["Name of the (sub-)zone currently shown above the minimap."] = "현재 있는 지역 (하위 지역 포함) 이름은 미니맵 위에 나와있습니다." L["Name(s)"] = "이름 (여럿 가능)" L["Name/Realm of Caster's Target"] = "시전 대상의 이름/서버" L["Nameplate"] = "이름표" -L["Nameplate Type"] = "이름표 종류" L["Nameplates"] = "이름표" L["Names of affected Players"] = "오라에 걸린 플레이어 이름" L["Names of unaffected Players"] = "오라에 안 걸린 플레이어 이름" @@ -894,7 +895,7 @@ L["Note: 'Hide Alone' is not available in the new aura tracking system. A load o L["Note: The available text replacements for multi triggers match the normal triggers now."] = "참고: 여러 활성 조건에서 사용할 수 있는 텍스트 대체 코드는 이제 일반 활성 조건에 맞춰집니다." L["Note: This trigger internally stores the shapeshift position, and thus is incompatible with learning stances on the fly, like e.g. the Gladiator Rune."] = "참고: 이 활성 조건은 내부적으로 변신/태세 번호를 저장하고 있으므로 비행 중에 검투사 룬 같은 태세를 배우면 제대로 호환되지 않습니다." L["Note: This trigger relies on the WoW API, which returns incorrect information in some cases."] = "참고: 이 활성 조건은 WoW API에 의존하고 있는데 API가 잘못된 정보를 가져오는 경우도 있습니다." -L["Note: This trigger type estimates the range to the hitbox of a unit. The actual range of friendly players is usually 3 yards more than the estimate. Range checking capabilities depend on your current class and known abilities as well as the type of unit being checked. Some of the ranges may also not work with certain NPCs.|n|n|cFFAAFFAAFriendly Units:|r %s|n|cFFFFAAAAHarmful Units:|r %s|n|cFFAAAAFFMiscellanous Units:|r %s"] = "참고: 이 활성 조건 유형은 유닛의 히트박스까지 거리를 측정합니다. 아군 플레이어와의 실제 거리는 측정값보다 보통 3미터 더 떨어져 있습니다. 거리 검사 정확도는 내 캐릭터의 직업과 스킬 및 검사 대상 유닛의 종류에 따라 차이를 보입니다. 특정 NPC에는 일부 구간의 거리 검사가 작동하지 않을 수 있습니다.|n|n|cFFAAFFAA아군 유닛:|r %s|n|cFFFFAAAA적 유닛:|r %s|n|cFFAAAAFF기타 유닛:|r %s" +L["Note: This trigger type estimates the range to the hitbox of a unit. The actual range of friendly players is usually 3 yards more than the estimate. Range checking capabilities depend on your current class and known abilities as well as the type of unit being checked. Some of the ranges may also not work with certain NPCs.|n|n|cFFAAFFAAFriendly Units:|r %s|n|cFFFFAAAAHarmful Units:|r %s|n|cFFAAAAFFMiscellanous Units:|r %s"] = "참고: 이 활성 조건은 유닛의 히트박스까지의 거리를 측정합니다. 아군 플레이어와의 실제 거리는 측정값보다 보통 3미터 더 떨어져 있습니다. 거리 검사 정확도는 내 캐릭터의 직업과 스킬 및 검사 대상 유닛의 종류에 따라 차이를 보입니다. 특정 NPC에는 일부 구간의 거리 검사가 작동하지 않을 수 있습니다.|n|n|cFFAAFFAA아군 유닛:|r %s|n|cFFFFAAAA적 유닛:|r %s|n|cFFAAAAFF기타 유닛:|r %s" L["Noth the Plaguebringer"] = "역병술사 노스" L["NPC"] = "NPC" L["Npc ID"] = "NPC ID" @@ -976,7 +977,7 @@ L["Offset Timer"] = "타이머 조정" L["Old Blizzard (2h | 3m | 10s | 2.4)"] = "구 블리자드식 (2h | 3m | 10s | 2.4)" L["On Cooldown"] = "쿨타임일 때" L["On Taxi"] = "비행 경로 이용 중" -L["Only if on a different realm"] = "다른 서버일때만" +L["Only if on a different realm"] = "다른 서버일때만 표시" L["Only if Primary"] = "주 자원일때만" L["Onyxia"] = "오닉시아" L["Opaque"] = "불투명" @@ -1069,8 +1070,8 @@ L["Progress Total"] = "진행 현황" L["Progress Value"] = "진행도 값" L["Pulse"] = "맥박" L["PvP Flagged"] = "플레이어 간 전투 활성화" -L["PvP Talent selected"] = "선택한 PvP 특성" L["PvP Talent Selected"] = "선택한 PvP 특성" +L["PvP Talent selected"] = "선택한 PvP 특성" L["Quality Id"] = "품질 Id" L["Quantity"] = "수량" L["Quantity earned this week"] = "이번주 획득량" @@ -1138,7 +1139,7 @@ L["Rested Experience"] = "휴식 경험치" L["Rested Experience (%)"] = "휴식 경험치 (%)" L["Resting"] = "휴식 중" L["Resurrect"] = "부활" -L["Resurrect Pending"] = "부활 수락 대기 상태" +L["Resurrect Pending"] = "부활 수락 대기" L["Right"] = "오른쪽" L["Right to Left"] = "오른쪽에서 왼쪽" L["Right, then Centered Vertical"] = "오른쪽, 수직 중앙" @@ -1181,7 +1182,7 @@ L["Second Value of Tooltip Text"] = "툴팁 텍스트의 두번째 값" L["Secondary Stats"] = "2차 능력치" L["Seconds"] = "초" L[ [=[Secure frame detected. Find more information: -https://github.com/WeakAuras/WeakAuras2/wiki/Protected-Frames]=] ] = [=[보호 중인 프레임을 감지했습니다. 자세한 정보: +https://github.com/WeakAuras/WeakAuras2/wiki/Protected-Frames]=] ] = [=[보호되고 있는 프레임을 감지했습니다. 자세한 정보: https://github.com/WeakAuras/WeakAuras2/wiki/Protected-Frames]=] L["Select Frame"] = "프레임 선택" L["Selection Mode"] = "선택 모드" @@ -1234,7 +1235,7 @@ L["Soft Friend"] = "액션 전투 아군" L["Solistrasza"] = "솔리스트라자" L["Sound"] = "소리" L["Sound by Kit ID"] = "Kit ID로 소리 재생" -L["Source"] = "행위자" +L["Source"] = "출처" L["Source Affiliation"] = "행위자 소속" L["Source GUID"] = "행위자 GUID" L["Source Info"] = "행위자 정보" @@ -1283,7 +1284,7 @@ L["Stack Count"] = "중첩 횟수" L["Stack trace:"] = "스택 트레이스:" L["Stacks"] = "중첩" L["Stacks Function"] = "중첩 함수" -L["Stacks Function (fallback state)"] = "중첩 함수 (폴백 스테이트)" +L["Stacks Function (fallback state)"] = "Stacks 함수 (고장 대체 상태)" L["Stage"] = "단계" L["Stage Counter"] = "단계 카운터" L["Stagger (%)"] = "시간차 (%)" @@ -1307,12 +1308,12 @@ L["String"] = "문자열" L["Subevent Info"] = "서브이벤트 정보" L["Subtract Cast"] = "시전 시간 빼기" L["Subtract Channel"] = "정신 집중 지속시간 빼기" -L["Subtract GCD"] = "글로벌 쿨타임 차감" +L["Subtract GCD"] = "글로벌 쿨타임 빼기" L["Subzone Name"] = "하위지역 이름" L["Success"] = "성공" L["Sulfuron Harbinger"] = "설퍼론 사자" L["Summon"] = "소환" -L["Summon Pending"] = "소환 수락 대기 상태" +L["Summon Pending"] = "소환 수락 대기" L["Sun"] = "태양" L["Supports multiple entries, separated by commas"] = "여러 항목을 지원하며 쉼표로 구분됨" L[ [=[Supports multiple entries, separated by commas @@ -1352,7 +1353,7 @@ L["Text To Speech"] = "텍스트 음성 변환" L["Text-to-speech"] = "텍스트 음성 변환" L["Texture"] = "텍스처" L["Texture Function"] = "텍스처 함수" -L["Texture Function (fallback state)"] = "텍스처 함수 (폴백 스테이트)" +L["Texture Function (fallback state)"] = "Texture 함수 (고장 대체 상태)" L["Texture Picker"] = "텍스처 선택" L["Texture Rotation"] = "텍스처 회전" L["Thaddius"] = "타디우스" @@ -1366,7 +1367,7 @@ L["The total quantity after transferring everything to your current character an L["The War Within"] = "내부 전쟁" L["There are %i updates to your auras ready to be installed!"] = "위크오라 %i개의 업데이트를 설치할 수 있습니다!" L["Thick Outline"] = "굵은 외곽선" -L["Thickness"] = "굵기" +L["Thickness"] = "두께" L["Third"] = "세 번째" L["Third Value of Tooltip Text"] = "툴팁 텍스트의 세번째 값" L["This aura calls GetData a lot, which is a slow function."] = "이 위크오라는 느린 함수인 GetData를 너무 많이 불러옵니다." @@ -1383,7 +1384,7 @@ L["Threat Value"] = "위협 수준 수치" L["Tick"] = "틱" L["Time"] = "시간" L["Time Format"] = "시간" -L["Time in GCDs"] = "글쿨 단위 시간" +L["Time in GCDs"] = "글로벌 쿨타임 기준 시간" L["Time since initial application"] = "첫 오라 걸림 이후 시간" L["Time since last refresh"] = "마지막으로 오라가 갱신된 이후 시간" L["Time since stack gain"] = "중첩 획득 이후 시간" @@ -1434,8 +1435,8 @@ L["Trigger"] = "활성 조건" L["Trigger %i"] = "활성 조건 %i" L["Trigger %s"] = "활성 조건 %s" L["Trigger 1"] = "활성 조건 1" -L["Trigger State Updater (Advanced)"] = "활성 조건 스테이트 업데이터 (고급)" -L["Trigger Update"] = "활성 조건 업데이트" +L["Trigger State Updater (Advanced)"] = "상태(State) 업데이트 활성 조건 (고급)" +L["Trigger Update"] = "활성 조건이 업데이트될 때" L["Trigger:"] = "활성 조건:" L["Trivial (Low Level)"] = "무료 체험 (저레벨)" L["True"] = "참" diff --git a/WeakAuras/Locales/ptBR.lua b/WeakAuras/Locales/ptBR.lua index 22cbef1..6f2a2f3 100644 --- a/WeakAuras/Locales/ptBR.lua +++ b/WeakAuras/Locales/ptBR.lua @@ -183,6 +183,8 @@ L["Assigned Role"] = "Função Atribuída" L["Assigned Role Icon"] = "Assigned Role Icon" --[[Translation missing --]] L["Assist"] = "Assist" +--[[Translation missing --]] +L["Assisted Combat Next Cast"] = "Assisted Combat Next Cast" L["At Least One Enemy"] = "Pelo Menos Um Inimigo" L["At missing Value"] = "No valor ausente" L["At Percent"] = "Na porcentagem" @@ -777,6 +779,8 @@ L["Error Frame"] = "Error Frame" --[[Translation missing --]] L["ERROR in '%s' unknown or incompatible sub element type '%s'"] = "ERROR in '%s' unknown or incompatible sub element type '%s'" --[[Translation missing --]] +L["Error in aura '%s'"] = "Error in aura '%s'" +--[[Translation missing --]] L["Error not receiving display information from %s"] = "Error not receiving display information from %s" --[[Translation missing --]] L["Essence"] = "Essence" @@ -1138,10 +1142,10 @@ L["Install the addons BugSack and BugGrabber for detailed error logs."] = "Insta L["Instance"] = "Instance" L["Instance Difficulty"] = "Dificuldade da Instância" --[[Translation missing --]] -L["Instance Id"] = "Instance Id" ---[[Translation missing --]] L["Instance ID"] = "Instance ID" --[[Translation missing --]] +L["Instance Id"] = "Instance Id" +--[[Translation missing --]] L["Instance Info"] = "Instance Info" --[[Translation missing --]] L["Instance Name"] = "Instance Name" @@ -1352,10 +1356,10 @@ E.g. 1;2;1;2;2.5;3]=] ] = [=[Matches stage number of encounter journal. Intermissions are .5 E.g. 1;2;1;2;2.5;3]=] --[[Translation missing --]] -L["Max Char "] = "Max Char " ---[[Translation missing --]] L["Max Char"] = "Max Char" --[[Translation missing --]] +L["Max Char "] = "Max Char " +--[[Translation missing --]] L["Max Charges"] = "Max Charges" --[[Translation missing --]] L["Max Health"] = "Max Health" @@ -1457,8 +1461,6 @@ L["Name/Realm of Caster's Target"] = "Name/Realm of Caster's Target" --[[Translation missing --]] L["Nameplate"] = "Nameplate" --[[Translation missing --]] -L["Nameplate Type"] = "Nameplate Type" ---[[Translation missing --]] L["Nameplates"] = "Nameplates" --[[Translation missing --]] L["Names of affected Players"] = "Names of affected Players" @@ -1771,10 +1773,10 @@ L["Progress Value"] = "Progress Value" L["Pulse"] = "Pulsar" L["PvP Flagged"] = "Marcado para JxJ" --[[Translation missing --]] -L["PvP Talent selected"] = "PvP Talent selected" ---[[Translation missing --]] L["PvP Talent Selected"] = "PvP Talent Selected" --[[Translation missing --]] +L["PvP Talent selected"] = "PvP Talent selected" +--[[Translation missing --]] L["Quality Id"] = "Quality Id" --[[Translation missing --]] L["Quantity"] = "Quantity" diff --git a/WeakAuras/Locales/ruRU.lua b/WeakAuras/Locales/ruRU.lua index 49ed6be..45a672b 100644 --- a/WeakAuras/Locales/ruRU.lua +++ b/WeakAuras/Locales/ruRU.lua @@ -133,6 +133,8 @@ L["Ascending"] = "По возрастанию" L["Assigned Role"] = "Выбранная роль" L["Assigned Role Icon"] = "Иконка выбранной роли" L["Assist"] = "Помощник" +--[[Translation missing --]] +L["Assisted Combat Next Cast"] = "Assisted Combat Next Cast" L["At Least One Enemy"] = "Хотя бы один противник" L["At missing Value"] = "От недостающего значения" L["At Percent"] = "В процентах" @@ -507,6 +509,8 @@ L["Error decompressing. This doesn't look like a WeakAuras import."] = "Ошиб L["Error deserializing"] = "Ошибка десериализации" L["Error Frame"] = "Область вывода ошибок" L["ERROR in '%s' unknown or incompatible sub element type '%s'"] = "Ошибка в индикации %s. Внутренний элемент неизвестного или несовместимого типа %s." +--[[Translation missing --]] +L["Error in aura '%s'"] = "Error in aura '%s'" L["Error not receiving display information from %s"] = [=[Ошибка при получении информации об индикации от %s]=] L["Essence"] = "Сущность" @@ -666,8 +670,8 @@ L["Hybrid"] = "Гибридная" L["Icon"] = "Иконка" L["Icon Function"] = "Функция иконки" L["Icon Function (fallback state)"] = "Функция иконки (резервное состояние)" -L["Id"] = "ID" L["ID"] = "ID" +L["Id"] = "ID" L["If you require additional assistance, please open a ticket on GitHub or visit our Discord at https://discord.gg/weakauras!"] = "Если вам необходима дополнительная помощь, пожалуйста, откройте запрос на GitHub или посетите наш сервер в Discord по адресу https://discord.gg/weakauras." L["Ignore Dead"] = "Не учитывать мёртвые цели" L["Ignore Disconnected"] = "Не учитывать игроков не в сети" @@ -704,8 +708,8 @@ L["Instakill"] = "Моментальное убийство" L["Install the addons BugSack and BugGrabber for detailed error logs."] = "Установите аддоны BugSack и BugGrabber для получения подробных записей об ошибках." L["Instance"] = "Подземелье" L["Instance Difficulty"] = "Сложность подземелья" -L["Instance Id"] = "ID подземелья" L["Instance ID"] = "Идентификатор подземелья" +L["Instance Id"] = "ID подземелья" L["Instance Info"] = "Информация о подземелье" L["Instance Name"] = "Название подземелья" L["Instance Size Type"] = "Тип размера подземелья" @@ -820,9 +824,9 @@ L[ [=[Matches stage number of encounter journal. Intermissions are .5 E.g. 1;2;1;2;2.5;3]=] ] = [=[Совпадает с номером фазы в журнале сражения с боссом. Смена фаз нумеруется как x.5 Например: 1, 2, 1, 2, 2.5, 3.]=] -L["Max Char "] = "Макс. количество символов" --[[Translation missing --]] L["Max Char"] = "Max Char" +L["Max Char "] = "Макс. количество символов" L["Max Charges"] = "Макс. количество зарядов" L["Max Health"] = "Макс. запас здоровья" L["Max Power"] = "Макс. запас энергии" @@ -879,7 +883,6 @@ L["Name of the (sub-)zone currently shown above the minimap."] = "Названи L["Name(s)"] = "Название" L["Name/Realm of Caster's Target"] = "Имя / Игр. мир цели заклинателя" L["Nameplate"] = "Индикатор здоровья" -L["Nameplate Type"] = "Тип индикатора здоровья" L["Nameplates"] = "Индикаторы здоровья" L["Names of affected Players"] = "Имена задействованных игроков" L["Names of unaffected Players"] = "Имена незадействованных игроков" @@ -1056,8 +1059,8 @@ L["Progress Total"] = "Общее значение" L["Progress Value"] = "Текущее значение" L["Pulse"] = "Пульсация" L["PvP Flagged"] = "В режиме PvP" -L["PvP Talent selected"] = "PvP талант выбран" L["PvP Talent Selected"] = "PvP талант выбран" +L["PvP Talent selected"] = "PvP талант выбран" L["Quality Id"] = "ID качества" L["Quantity"] = "Количество" L["Quantity earned this week"] = "Заработано на этой неделе" @@ -1331,8 +1334,8 @@ L["Talent"] = "Талант" L["Talent |cFFFF0000Not|r Known"] = "Талант |cFFFF0000НЕ|rизвестен" L["Talent |cFFFF0000Not|r Selected"] = "Талант |cFFFF0000НЕ|r выбран" L["Talent Known"] = "Талант известен" -L["Talent Selected"] = "Талант выбран" L["Talent selected"] = "Выбран талант" +L["Talent Selected"] = "Талант выбран" L["Talent Specialization"] = "Специализация" L["Tanking And Highest"] = "Вы основная цель; макс. угроза" L["Tanking But Not Highest"] = "Вы основная цель; не макс. угроза" diff --git a/WeakAuras/Locales/zhCN.lua b/WeakAuras/Locales/zhCN.lua index 70b1487..08f7237 100644 --- a/WeakAuras/Locales/zhCN.lua +++ b/WeakAuras/Locales/zhCN.lua @@ -138,6 +138,8 @@ L["Ascending"] = "升序" L["Assigned Role"] = "团队职责" L["Assigned Role Icon"] = "团队职责图标" L["Assist"] = "团队助理" +--[[Translation missing --]] +L["Assisted Combat Next Cast"] = "Assisted Combat Next Cast" L["At Least One Enemy"] = "至少一个敌人" L["At missing Value"] = "于缺失值" L["At Percent"] = "于百分比" @@ -335,10 +337,8 @@ L["Create"] = "创造物品" L["Creature Family"] = "Creature Family" --[[Translation missing --]] L["Creature Family Name"] = "Creature Family Name" ---[[Translation missing --]] -L["Creature Type"] = "Creature Type" ---[[Translation missing --]] -L["Creature Type Name"] = "Creature Type Name" +L["Creature Type"] = "生物类型" +L["Creature Type Name"] = "生物类型名称" L["Critical"] = "爆击(致命一击)" L["Critical (%)"] = "暴击 (%)" L["Critical Rating"] = "暴击等级" @@ -499,6 +499,7 @@ L["Error decompressing. This doesn't look like a WeakAuras import."] = "解压 L["Error deserializing"] = "反序列化错误。" L["Error Frame"] = "错误信息框架" L["ERROR in '%s' unknown or incompatible sub element type '%s'"] = "错误:光环 %s 中存在未知或不兼容的子元素类型 %s 。" +L["Error in aura '%s'"] = "光环'%s'发生错误" L["Error not receiving display information from %s"] = "错误:未收到来自 %s 的图示信息" L["Essence"] = "精华" L["Essence #1"] = "精华 #1" @@ -604,7 +605,7 @@ L["Gradient Pulse"] = "梯度脉动" L["Grand Widow Faerlina"] = "黑女巫法琳娜" L["Grid"] = "盒" L["Grobbulus"] = "格罗布鲁斯" -L["Group"] = "队伍" +L["Group"] = "组" L["Group Arrangement"] = "组排列" L["Group Leader/Assist"] = "团队领袖/助理" L["Group Size"] = "组大小" @@ -653,8 +654,8 @@ L["Hybrid"] = "混合" L["Icon"] = "图标" L["Icon Function"] = "图标函数" L["Icon Function (fallback state)"] = "图标函数(后备状态)" -L["Id"] = "ID" L["ID"] = "ID" +L["Id"] = "ID" L["If you require additional assistance, please open a ticket on GitHub or visit our Discord at https://discord.gg/weakauras!"] = "如果你需要进一步的协助,请在 GitHub 上提交工单或是访问我们的 Discord:https://discord.gg/weakauras!" L["Ignore Dead"] = "忽略已死亡" L["Ignore Disconnected"] = "忽略已离线" @@ -802,8 +803,8 @@ L["Matches (Pattern)"] = "匹配(表达式)" L[ [=[Matches stage number of encounter journal. Intermissions are .5 E.g. 1;2;1;2;2.5;3]=] ] = "符合冒险指南的阶段。转阶段为.5。例如1;2;1;2;2.5;3" -L["Max Char "] = "最大字符数" L["Max Char"] = "最大字符数" +L["Max Char "] = "最大字符数" L["Max Charges"] = "最大充能次数" L["Max Health"] = "最大生命值" L["Max Power"] = "最大能量值" @@ -860,7 +861,6 @@ L["Name of the (sub-)zone currently shown above the minimap."] = "(子)区 L["Name(s)"] = "名称" L["Name/Realm of Caster's Target"] = "施法者目标的名称/服务器" L["Nameplate"] = "姓名板" -L["Nameplate Type"] = "姓名板类型" L["Nameplates"] = "姓名板" L["Names of affected Players"] = "受影响玩家的姓名" L["Names of unaffected Players"] = "未受影响玩家的姓名" @@ -1068,8 +1068,8 @@ L["Progress Total"] = "进度总计" L["Progress Value"] = "进度值" L["Pulse"] = "脉动" L["PvP Flagged"] = "PvP 状态" -L["PvP Talent selected"] = "PvP 天赋选择" L["PvP Talent Selected"] = "已选择PvP天赋" +L["PvP Talent selected"] = "PvP 天赋选择" L["Quality Id"] = "品质ID" L["Quantity"] = "数量" L["Quantity earned this week"] = "本周获取数量" @@ -1335,8 +1335,8 @@ L["Talent"] = "天赋" L["Talent |cFFFF0000Not|r Known"] = "天赋|cFFFF0000不|r可用" L["Talent |cFFFF0000Not|r Selected"] = "天赋|cFFFF0000未|r选择" L["Talent Known"] = "天赋可用" -L["Talent Selected"] = "天赋选择" L["Talent selected"] = "天赋选择" +L["Talent Selected"] = "天赋选择" L["Talent Specialization"] = "专精" L["Tanking And Highest"] = "做T并且最高" L["Tanking But Not Highest"] = "做T但不是最高" diff --git a/WeakAuras/Locales/zhTW.lua b/WeakAuras/Locales/zhTW.lua index 68867bb..67d197f 100644 --- a/WeakAuras/Locales/zhTW.lua +++ b/WeakAuras/Locales/zhTW.lua @@ -128,6 +128,8 @@ L["Ascending"] = "升冪" L["Assigned Role"] = "指派的角色" L["Assigned Role Icon"] = "所屬角色職責圖示" L["Assist"] = "助理" +--[[Translation missing --]] +L["Assisted Combat Next Cast"] = "Assisted Combat Next Cast" L["At Least One Enemy"] = "至少一個敵人" L["At missing Value"] = "在缺少數值" L["At Percent"] = "在百分比" @@ -487,6 +489,7 @@ L["Error decompressing. This doesn't look like a WeakAuras import."] = "解壓 L["Error deserializing"] = "反序列化時出錯" L["Error Frame"] = "錯誤訊息框架" L["ERROR in '%s' unknown or incompatible sub element type '%s'"] = "“%s”中的錯誤未知或不相容的子元素類型“%s”" +L["Error in aura '%s'"] = "光環中的錯誤 '%s'" L["Error not receiving display information from %s"] = "錯誤:無法收到來自 %s 的顯示資訊" L["Essence"] = "精華" L["Essence #1"] = "精華 #1" @@ -849,7 +852,6 @@ L["Name of the (sub-)zone currently shown above the minimap."] = "小地圖當 L["Name(s)"] = "名字" L["Name/Realm of Caster's Target"] = "施法者目標的名字/伺服器" L["Nameplate"] = "血條/名條" -L["Nameplate Type"] = "血條/名條類型" L["Nameplates"] = "血條/名條" L["Names of affected Players"] = "受影響玩家的名字" L["Names of unaffected Players"] = "未受影響玩家的名字" @@ -1044,8 +1046,8 @@ L["Progress Total"] = "總進度" L["Progress Value"] = "進度值" L["Pulse"] = "跳動" L["PvP Flagged"] = "PvP 標幟" -L["PvP Talent selected"] = "選擇的 PvP 天賦" L["PvP Talent Selected"] = "已選擇的 PvP 天賦" +L["PvP Talent selected"] = "選擇的 PvP 天賦" L["Quality Id"] = "品質id" L["Quantity"] = "數量" L["Quantity earned this week"] = "本週獲取數量" diff --git a/WeakAuras/Media/Textures/logo_256_round_pride.tga b/WeakAuras/Media/Textures/logo_256_round_pride.tga new file mode 100644 index 0000000..d986c16 Binary files /dev/null and b/WeakAuras/Media/Textures/logo_256_round_pride.tga differ diff --git a/WeakAuras/Modernize.lua b/WeakAuras/Modernize.lua index db08bf3..bade47b 100644 --- a/WeakAuras/Modernize.lua +++ b/WeakAuras/Modernize.lua @@ -4,6 +4,7 @@ local Private = select(2, ...) local L = WeakAuras.L -- Takes as input a table of display data and attempts to update it to be compatible with the current version +--- Modernizes the aura data function Private.Modernize(data, oldSnapshot) if not data.internalVersion or data.internalVersion < 2 then WeakAuras.prettyPrint(string.format("Data for '%s' is too old, can't modernize.", data.id)) @@ -292,7 +293,7 @@ function Private.Modernize(data, oldSnapshot) -- Version 18 was a migration for stance/form trigger, but deleted later because of migration issue -- Version 19 were introduced in July 2019 in BfA - if WeakAuras.isAwesomeEnabled() then + if WeakAuras.IsAwesomeEnabled() then if data.internalVersion < 19 then if data.triggers then for triggerId, triggerData in ipairs(data.triggers) do @@ -809,9 +810,6 @@ function Private.Modernize(data, oldSnapshot) end end - -- To convert: - -- * actions - -- * conditions data.progressPrecision = nil data.totalPrecision = nil end @@ -993,6 +991,7 @@ function Private.Modernize(data, oldSnapshot) ["Totem"] = "spell", ["Ready Check"] = "event", ["BigWigs Message"] = "addons", + ["Class/Spec"] = "unit", ["Stance/Form/Aura"] = "unit", ["Weapon Enchant"] = "item", ["Global Cooldown"] = "spell", @@ -1498,7 +1497,7 @@ function Private.Modernize(data, oldSnapshot) end do local loadFields = { - "level", "itemequiped", "itemequiped" + "level", "itemequiped" } for _, field in ipairs(loadFields) do @@ -1736,6 +1735,24 @@ function Private.Modernize(data, oldSnapshot) migrateToTable(data.load, "itemequiped") end + if data.internalVersion < 70 then + local trigger_migration = { + Power = { + "power", + "power_operator" + } + } + for _, triggerData in ipairs(data.triggers) do + local t = triggerData.trigger + local fieldsToMigrate = trigger_migration[t.event] + if fieldsToMigrate then + for _, field in ipairs(fieldsToMigrate) do + migrateToTable(t, field) + end + end + end + end + if data.internalVersion < 71 then if data.regionType == 'icon' or data.regionType == 'aurabar' or data.regionType == 'progresstexture' @@ -1946,6 +1963,7 @@ function Private.Modernize(data, oldSnapshot) multi = true } } + local function fixData(data, fields) for k, v in pairs(fields) do if v == true and type(data[k]) == "table" then @@ -1969,6 +1987,7 @@ function Private.Modernize(data, oldSnapshot) end end end + for _, triggerData in ipairs(data.triggers) do fixData(triggerData.trigger, triggerFix) end @@ -1995,6 +2014,7 @@ function Private.Modernize(data, oldSnapshot) end end + if data.internalVersion < 80 then -- Use common names for anchor areas/points so -- that up/down of sub regions can adapt that @@ -2062,7 +2082,7 @@ function Private.Modernize(data, oldSnapshot) end if data.internalVersion < 83.25 then - -- Due to a Localisation issue and a bad implementation clear out all class/spec triggers that contain strings + -- Due to a Localisation issue and a bad implementation clear out all class/spec triggers that contain strings local function replaceSpecData(data, field, bt2) if data[field] then if bt2 then @@ -2106,6 +2126,91 @@ function Private.Modernize(data, oldSnapshot) end end + if data.internalVersion < 84 then + if data.triggers then + for _, triggerData in ipairs(data.triggers) do + local trigger = triggerData.trigger + if trigger and trigger.type == "addons" then + if trigger.event == "Boss Mod Timer" or trigger.event == "BigWigs Timer" or trigger.event == "DBM Timer" then + -- if trigger don't filter bars, show only those active in the addon config for triggers made before this option was added + -- show disabled bars when looking for specific ids/name + if not (trigger.use_message or trigger.use_spellId) then + trigger.use_isBarEnabled = true + end + end + end + end + end + end + + if data.internalVersion < 85 then + -- Migrate raidMarkIndex and old Combo Points triggers and Happiness + if data.triggers then + local eventTypes = { + ["Unit Characteristics"] = true, + ["Health"] = true, + ["Power"] = true, + ["Alternate Power"] = true, + ["Cast"] = true + } + for _, triggerData in ipairs(data.triggers) do + local trigger = triggerData.trigger + if trigger and trigger.type == "unit" then + -- Migrate raidMarkIndex + if eventTypes[trigger.event] then + local rt = trigger.raidMarkIndex + if type(rt) == "number" then + trigger.raidMarkIndex = { + single = rt + } + end + if trigger.use_raidMarkIndex == false then + trigger.use_raidMarkIndex = nil + end + end + -- Modernize Happiness + if trigger.event == "Power" and trigger.powertype == 4 then + trigger.powertype = 27 + end + -- Migrate old Combo Points triggers + if trigger.event == "Combo Points" then + local newTrigger = { + type = "unit", + use_unit = true, + unit = "player", + use_powertype = true, + powertype = 4, + event = "Power" + } + if trigger.combopoints and trigger.combopoints_operator then + newTrigger.use_power = true + newTrigger.power = { trigger.combopoints } + newTrigger.power_operator = { trigger.combopoints_operator } + end + triggerData.trigger = newTrigger + end + end + end + end + -- Migrates the "power" and "power_operator" fields for the Power trigger again, + -- from internalVersion < 70. Previously missed the migration. + local trigger_migration = { + Power = { + "power", + "power_operator" + } + } + for _, triggerData in ipairs(data.triggers) do + local t = triggerData.trigger + local fieldsToMigrate = trigger_migration[t.event] + if fieldsToMigrate then + for _, field in ipairs(fieldsToMigrate) do + migrateToTable(t, field) + end + end + end + end + data.internalVersion = max(data.internalVersion or 0, WeakAuras.InternalVersion()) end diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index 9b9ad78..ed515d7 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -839,26 +839,31 @@ function WeakAuras.IsSpellKnownForLoad(spell, exact) end function WeakAuras.IsSpellKnown(spell, pet) - if (spell) then - if tonumber(spell) then - if (pet) then - return IsSpellKnown(spell, pet); - end - return IsSpellKnown(spell); - else - return (GetSpellInfo(spell)) and true or false + local id = tonumber(spell) + if id then + if id > 0 and id < 2^31 then + return IsSpellKnown(id, pet) end + return false end - return false + return GetSpellInfo(spell) and true or false end function WeakAuras.IsSpellKnownIncludingPet(spell) if (not spell) then return false; end - if (WeakAuras.IsSpellKnown(spell) or WeakAuras.IsSpellKnown(spell, true)) then - return true; + return WeakAuras.IsSpellKnown(spell, false) or WeakAuras.IsSpellKnown(spell, true) +end + +function WeakAuras.IsGlyphActive(glyphID) + for slot = 1, GetNumGlyphSockets() or 6 do + local enabled, _, glyphId = GetGlyphSocketInfo(slot) + if glyphID == glyphId then + return enabled == 1 + end end + return false end function WeakAuras.GetEffectiveAttackPower() @@ -1006,53 +1011,6 @@ Private.load_prototype = { display = L["Player"], type = "description", }, - { - name = "player", - hidden = true, - init = "arg", - test = "true" - }, - { - name = "realm", - hidden = true, - init = "arg", - test = "true" - }, - - { - name = "guild", - init = "arg", - enable = false, - hidden = true - }, - { - name = "namerealm", - display = L["Player Name/Realm"], - type = "string", - multiline = true, - test = "nameRealmChecker:Check(player, realm)", - preamble = "local nameRealmChecker = Private.ExecEnv.ParseNameCheck(%q)", - desc = constants.nameRealmFilterDesc, - }, - { - name = "ignoreNameRealm", - display = L["|cFFFF0000Not|r Player Name/Realm"], - type = "string", - multiline = true, - test = "not nameRealmIgnoreChecker:Check(player, realm)", - preamble = "local nameRealmIgnoreChecker = Private.ExecEnv.ParseNameCheck(%q)", - desc = constants.nameRealmFilterDesc, - }, - { - name = "guildcheck", - display = L["Guild"], - type = "string", - multiline = true, - preamble = "local guildChecker = Private.ExecEnv.ParseStringCheck(%q)", - test = "guildChecker:Check(guild)", - desc = constants.guildFilterDesc, - events = {"GUILD_ROSTER_UPDATE"} - }, { name = "class", display = L["Player Class"], @@ -1145,6 +1103,19 @@ Private.load_prototype = { )) end }, + { + name = "glyph", + display = L["Glyph"], + type = "multiselect", + values = function(trigger) + Private.InitializeGlyphs(trigger and trigger.glyph) + return Private.glyph_types + end, + sorted = true, + sortOrder = Private.glyph_sorted, + test = "WeakAuras.IsGlyphActive(%s)", + events = {"GLYPH_ADDED", "GLYPH_REMOVED", "GLYPH_UPDATED", "USE_GLYPH"}, + }, { name = "spellknown", display = L["Spell Known"], @@ -1161,6 +1132,52 @@ Private.load_prototype = { events = {"SPELLS_CHANGED", "UNIT_PET"}, showExactOption = true }, + { + name = "player", + init = "arg", + enable = false, + hidden = true + }, + { + name = "realm", + init = "arg", + enable = false, + hidden = true + }, + { + name = "guild", + init = "arg", + enable = false, + hidden = true + }, + { + name = "namerealm", + display = L["Player Name/Realm"], + type = "string", + multiline = true, + test = "nameRealmChecker:Check(player, realm)", + preamble = "local nameRealmChecker = Private.ExecEnv.ParseNameCheck(%q)", + desc = constants.nameRealmFilterDesc, + }, + { + name = "ignoreNameRealm", + display = L["|cFFFF0000Not|r Player Name/Realm"], + type = "string", + multiline = true, + test = "not nameRealmIgnoreChecker:Check(player, realm)", + preamble = "local nameRealmIgnoreChecker = Private.ExecEnv.ParseNameCheck(%q)", + desc = constants.nameRealmFilterDesc, + }, + { + name = "guildcheck", + display = L["Guild"], + type = "string", + multiline = true, + test = "guildChecker:Check(guild)", + preamble = "local guildChecker = Private.ExecEnv.ParseStringCheck(%q)", + desc = constants.guildFilterDesc, + events = {"PLAYER_GUILD_UPDATE"} + }, { name = "race", display = L["Player Race"], @@ -1192,7 +1209,7 @@ Private.load_prototype = { type = "multiselect", values = "role_types", init = "arg", - events = {"PLAYER_TALENT_UPDATE", "PLAYER_ROLES_ASSIGNED", "SPELL_UPDATE_USABLE", "WA_DELAYED_PLAYER_ENTERING_WORLD"} + events = {"PLAYER_ROLES_ASSIGNED", "PLAYER_TALENT_UPDATE", "WA_DELAYED_PLAYER_ENTERING_WORLD"} }, { name = "spec_position", @@ -1200,7 +1217,7 @@ Private.load_prototype = { type = "multiselect", values = "spec_position_types", init = "arg", - events = {"PLAYER_TALENT_UPDATE", "PLAYER_ROLES_ASSIGNED", "SPELL_UPDATE_USABLE", "WA_DELAYED_PLAYER_ENTERING_WORLD"} + events = {"PLAYER_ROLES_ASSIGNED", "PLAYER_TALENT_UPDATE", "WA_DELAYED_PLAYER_ENTERING_WORLD"} }, { name = "raid_role", @@ -1253,8 +1270,8 @@ Private.load_prototype = { type = "string", multiline = true, init = "arg", - preamble = "local zoneChecker = Private.ExecEnv.ParseStringCheck(%q)", - test = "zoneChecker:Check(zone)", + preamble = "local checker = Private.ExecEnv.ParseStringCheck(%q)", + test = "checker:Check(zone)", events = {"ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA", "VEHICLE_UPDATE", "WA_DELAYED_PLAYER_ENTERING_WORLD" }, desc = function() return ("\n|cffffd200%s|r%s\n\n%s"):format(L["Current Zone\n"], GetRealZoneText(), L["Supports multiple entries, separated by commas. Prefix with '-' for negation."]) @@ -1263,7 +1280,7 @@ Private.load_prototype = { }, { name = "zoneId", - display = L["Zone ID(s)"], + display = L["Player Location ID(s)"], type = "string", multiline = true, init = "arg", @@ -1303,9 +1320,8 @@ Private.load_prototype = { display = L["Instance Difficulty"], type = "multiselect", values = "difficulty_types", - sorted = true, init = "arg", - events = {"PLAYER_DIFFICULTY_CHANGED", "ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA", "WA_DELAYED_PLAYER_ENTERING_WORLD" }, + events = {"PLAYER_DIFFICULTY_CHANGED", "ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA", "WA_DELAYED_PLAYER_ENTERING_WORLD"}, optional = true, }, { @@ -1462,6 +1478,41 @@ local function AddUnitEventForEvents(result, unit, event) end end +local powerEvents = { + [0] = { "UNIT_MANA", "UNIT_MAXMANA" }, + [1] = { "UNIT_RAGE", "UNIT_MAXRAGE" }, + [2] = { "UNIT_FOCUS", "UNIT_MAXFOCUS" }, + [3] = { "UNIT_ENERGY", "UNIT_MAXENERGY" }, + [27] = { "UNIT_HAPPINESS", "UNIT_MAXHAPPINESS" }, + [6] = { "UNIT_RUNIC_POWER", "UNIT_MAXRUNIC_POWER" } +} + +local function AddUnitEventForPowerEvents(result, unit, powerType) + if powerType then + if powerType == 4 then return end + for _, event in ipairs(powerEvents[powerType]) do + AddUnitEventForEvents(result, unit, event) + end + else + for _, eventsList in pairs(powerEvents) do + for _, event in ipairs(eventsList) do + AddUnitEventForEvents(result, unit, event) + end + end + end + return result +end + +local function AddTargetConditionEvents(result, useFocus) + if useFocus then + tinsert(result, "PLAYER_FOCUS_CHANGED") + end + tinsert(result, "PLAYER_TARGET_CHANGED") + return result +end + +Private.AddTargetConditionEvents = AddTargetConditionEvents + local unitHelperFunctions = { UnitChangedForceEventsWithPets = function(trigger) local events = {} @@ -1543,34 +1594,13 @@ Private.event_categories = { } } +local GetNameAndIconForSpellName = function(trigger) + if type(trigger.spellName) == "table" then return end + local name, _, icon = GetSpellInfo(trigger.spellName or 0) + return name, icon +end + Private.event_prototypes = { - ["Combo Points"] = { - type = "unit", - events = { - ["events"] = { - "UNIT_COMBO_POINTS", - "PLAYER_TARGET_CHANGED", - "PLAYER_FOCUS_CHANGED" - } - }, - force_events = "UNIT_COMBO_POINTS", - name = L["Combo Points"], - args = { - { - name = "combopoints", - display = L["Combo Points"], - type = "number", - init = "GetComboPoints(UnitInVehicle('player') and 'vehicle' or 'player', 'target')" - } - }, - durationFunc = function(trigger) - return GetComboPoints(UnitInVehicle("player") and "vehicle" or "player", "target"), 5, true; - end, - stacksFunc = function(trigger) - return GetComboPoints(UnitInVehicle("player") and "vehicle" or "player", "target"); - end, - automaticrequired = true - }, ["Unit Characteristics"] = { type = "unit", events = function(trigger) @@ -1749,9 +1779,6 @@ Private.event_prototypes = { values = "role_types", store = true, conditionType = "select", - enable = function(trigger) - return trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" or trigger.unit == "player" - end }, { name = "raid_role", @@ -1768,7 +1795,7 @@ Private.event_prototypes = { { name = "raidMarkIndex", display = L["Raid Mark"], - type = "select", + type = "multiselect", values = "raid_mark_check_type", store = true, conditionType = "select", @@ -1814,6 +1841,7 @@ Private.event_prototypes = { { name = "inRange", display = L["In Range"], + desc = L["Uses UnitInRange() to check if in range. Matches default raid frames out of range behavior, which is between 25 to 40 yards depending on your class and spec."], type = "toggle", width = WeakAuras.doubleWidth, enable = function(trigger) @@ -2349,6 +2377,11 @@ Private.event_prototypes = { limit = 2 }, }, + { + type = "header", + name = "unitCharacteristicsHeader", + display = L["Unit Characteristics"], + }, { name = "name", display = L["Unit Name"], @@ -2365,11 +2398,6 @@ Private.event_prototypes = { hidden = true, test = "true" }, - { - type = "header", - name = "unitCharacteristicsHeader", - display = L["Unit Characteristics"], - }, { name = "namerealm", display = L["Unit Name/Realm"], @@ -2455,7 +2483,7 @@ Private.event_prototypes = { { name = "raidMarkIndex", display = L["Raid Mark"], - type = "select", + type = "multiselect", values = "raid_mark_check_type", store = true, conditionType = "select", @@ -2521,6 +2549,7 @@ Private.event_prototypes = { { name = "inRange", display = L["In Range"], + desc = L["Uses UnitInRange() to check if in range. Matches default raid frames out of range behavior, which is between 25 to 40 yards depending on your class and spec."], type = "toggle", width = WeakAuras.doubleWidth, enable = function(trigger) @@ -2530,7 +2559,7 @@ Private.event_prototypes = { }, { name = "nameplateType", - display = L["Nameplate Type"], + display = L["Hostility"], type = "select", init = "WeakAuras.GetPlayerReaction(unit)", values = "hostility_types", @@ -2556,36 +2585,30 @@ Private.event_prototypes = { events = function(trigger) local unit = trigger.unit local result = {} - AddUnitEventForEvents(result, unit, "UNIT_MANA") - AddUnitEventForEvents(result, unit, "UNIT_RAGE") - AddUnitEventForEvents(result, unit, "UNIT_FOCUS") - AddUnitEventForEvents(result, unit, "UNIT_ENERGY") - AddUnitEventForEvents(result, unit, "UNIT_RUNIC_POWER") - AddUnitEventForEvents(result, unit, "UNIT_MAXMANA") - AddUnitEventForEvents(result, unit, "UNIT_MAXRAGE") - AddUnitEventForEvents(result, unit, "UNIT_MAXFOCUS") - AddUnitEventForEvents(result, unit, "UNIT_MAXENERGY") - AddUnitEventForEvents(result, unit, "UNIT_MAXRUNIC_POWER") + local powerType = trigger.use_powertype and trigger.powertype + AddUnitEventForPowerEvents(result, unit, powerType) + if trigger.powertype == 4 then + local _, class = UnitClass("player") + AddUnitEventForEvents(result, unit, "UNIT_COMBO_POINTS") + AddUnitEventForEvents(result, unit, "UNIT_TARGET") + if class == "DRUID" then + AddUnitEventForEvents(result, unit, "UNIT_MODEL_CHANGED") + end + end AddUnitEventForEvents(result, unit, "UNIT_DISPLAYPOWER") - AddUnitEventForEvents(result, unit, "UNIT_HAPPINESS") AddUnitEventForEvents(result, unit, "UNIT_NAME_UPDATE") + + -- The api for spell power costs is not meant to be for other units + if trigger.use_showCost and unit == "player" then + AddUnitEventForEvents(result, unit, "UNIT_SPELLCAST_START") + AddUnitEventForEvents(result, unit, "UNIT_SPELLCAST_STOP") + AddUnitEventForEvents(result, unit, "UNIT_SPELLCAST_FAILED") + AddUnitEventForEvents(result, unit, "UNIT_SPELLCAST_SUCCEEDED") + end + if trigger.use_ignoreDead or trigger.use_ignoreDisconnected then AddUnitEventForEvents(result, unit, "UNIT_FLAGS") end - -- The api for spell power costs is not meant to be for other units - if trigger.use_showCost and trigger.unit == "player" then - AddUnitEventForEvents(result, "player", "UNIT_SPELLCAST_START") - AddUnitEventForEvents(result, "player", "UNIT_SPELLCAST_STOP") - AddUnitEventForEvents(result, "player", "UNIT_SPELLCAST_FAILED") - AddUnitEventForEvents(result, "player", "UNIT_SPELLCAST_SUCCEEDED") - AddUnitEventForEvents(result, "player", "UPDATE_SHAPESHIFT_FORM") - end - if unit and not Private.multiUnitUnits[unit] then - if not result.events then - result.events = {} - end - tinsert(result.events, "FRAME_UPDATE") - end if trigger.use_inRange then AddUnitEventForEvents(result, unit, "UNIT_IN_RANGE_UPDATE") end @@ -2621,17 +2644,52 @@ Private.event_prototypes = { unit = string.lower(unit) local name, realm = WeakAuras.UnitNameWithRealm(unit) local smart = %s - local powerType = %s; + local powerType = %s local unitPowerType = UnitPowerType(unit); local powerTypeToCheck = powerType or unitPowerType; ]=]):format(trigger.unit == "group" and "true" or "false", trigger.use_powertype and trigger.powertype or "nil")) + local powerType = trigger.use_powertype and trigger.powertype or nil + -- Combo Points + if powerType == 4 then + local _, class = UnitClass("player") + table.insert(ret, [[ + local comboUnit = UnitInVehicle(unit) and 'vehicle' or unit + local power = GetComboPoints(comboUnit, 'target') + local total = MAX_COMBO_POINTS + ]]) + if class == "ROGUE" then + table.insert(ret, [[ + unitPowerType = 4 + ]]) + elseif class == "DRUID" then + local formName = GetSpellInfo(768) or "" + table.insert(ret, ([[ + local index = GetShapeshiftForm() or 0 + local form = index > 0 and select(2, GetShapeshiftFormInfo(index)) == %q + if form or comboUnit == 'vehicle' then + unitPowerType = 4 + end + ]]):format(formName)) + end + -- Happiness + elseif powerType == 27 then + table.insert(ret, [[ + local power = UnitPower(unit, 4) + local total = math.max(1, UnitPowerMax(unit, 4)) + ]]) + else + table.insert(ret, [[ + local power = UnitPower(unit, powerType) + local total = math.max(1, UnitPowerMax(unit, powerType)) + ]]) + end table.insert(ret, unitHelperFunctions.SpecificUnitCheck(trigger)) local canEnableShowCost = (not trigger.use_powertype) and trigger.unit == "player"; if (canEnableShowCost and trigger.use_showCost) then table.insert(ret, [[ - if (event == "UPDATE_SHAPESHIFT_FORM") then + if (event == "UNIT_DISPLAYPOWER") then local cost = WeakAuras.GetSpellCost(powerTypeToCheck) if state.cost ~= cost then state.cost = cost @@ -2666,7 +2724,13 @@ Private.event_prototypes = { name = "powertype", display = L["Power Type"], type = "select", - values = "power_types", + values = function(trigger) + if trigger and trigger.unit ~= "player" then + return Private.power_types + else + return Private.power_types_player + end + end, init = "powerTypeToCheck", test = "true", store = true, @@ -2696,7 +2760,7 @@ Private.event_prototypes = { name = "power", display = L["Power"], type = "number", - init = "UnitPower(unit, powerType)", + init = "power", store = true, conditionType = "number", multiEntry = { @@ -2715,7 +2779,7 @@ Private.event_prototypes = { { name = "total", hidden = true, - init = "math.max(1, UnitPowerMax(unit, powerType))", + init = "total", store = true, test = "true" }, @@ -2825,7 +2889,10 @@ Private.event_prototypes = { return preamble:Check(state.npcId) end, operator_types = "none", - desc = L["Supports multiple entries, separated by commas. Prefix with '-' for negation."] + desc = L["Supports multiple entries, separated by commas. Prefix with '-' for negation."], + enable = function(trigger) + return trigger.powertype ~= 4 + end }, { name = "class", @@ -2876,7 +2943,7 @@ Private.event_prototypes = { { name = "raidMarkIndex", display = L["Raid Mark"], - type = "select", + type = "multiselect", values = "raid_mark_check_type", store = true, conditionType = "select", @@ -2942,6 +3009,7 @@ Private.event_prototypes = { { name = "inRange", display = L["In Range"], + desc = L["Uses UnitInRange() to check if in range. Matches default raid frames out of range behavior, which is between 25 to 40 yards depending on your class and spec."], type = "toggle", width = WeakAuras.doubleWidth, enable = function(trigger) @@ -2951,12 +3019,15 @@ Private.event_prototypes = { }, { name = "nameplateType", - display = L["Nameplate Type"], + display = L["Hostility"], type = "select", init = "WeakAuras.GetPlayerReaction(unit)", values = "hostility_types", store = true, conditionType = "select", + enable = function(trigger) + return trigger.powertype ~= 4 + end }, { hidden = true, @@ -2992,6 +3063,7 @@ Private.event_prototypes = { args = { {}, -- timestamp ignored with _ argument {}, -- messageType ignored with _ argument (it is checked before the dynamic function) + -- {}, -- we don't have hideCaster { type = "header", name = "sourceHeader", @@ -3095,6 +3167,7 @@ Private.event_prototypes = { end end }, + -- we don't have sourceRaidFlags { type = "header", name = "destHeader", @@ -3223,6 +3296,7 @@ Private.event_prototypes = { return (trigger.subeventPrefix == "SPELL" and trigger.subeventSuffix == "_CAST_START"); end, }, + -- we don't have destRaidFlags { type = "header", name = "subeventHeader", @@ -3235,7 +3309,8 @@ Private.event_prototypes = { or trigger.subeventPrefix:find("SPELL")) or trigger.subeventSuffix and ( - trigger.subeventSuffix == "_INTERRUPT" + -- trigger.subeventSuffix == "_ABSORBED" -- we don't have that + trigger.subeventSuffix == "_INTERRUPT" or trigger.subeventSuffix == "_DISPEL" or trigger.subeventSuffix == "_DISPEL_FAILED" or trigger.subeventSuffix == "_STOLEN" @@ -3477,6 +3552,7 @@ Private.event_prototypes = { store = true, conditionType = "bool" }, + -- we don't have isOffHand :( { name = "number", display = L["Number"], @@ -3551,6 +3627,9 @@ Private.event_prototypes = { events = {}, loadInternalEventFunc = function(trigger, untrigger) local spellName = type(trigger.spellName) ~= "table" and trigger.spellName or 0; + if not trigger.use_exact_spellName then + spellName = type(spellName) == "number" and GetSpellInfo(spellName) or spellName; + end if spellName == nil then return {} end local events = { "SPELL_COOLDOWN_CHANGED:" .. spellName, @@ -3568,6 +3647,9 @@ Private.event_prototypes = { name = L["Cooldown/Charges/Count"], loadFunc = function(trigger) local spellName = type(trigger.spellName) ~= "table" and trigger.spellName or 0; + if not trigger.use_exact_spellName then + spellName = type(spellName) == "number" and GetSpellInfo(spellName) or spellName; + end WeakAuras.WatchSpellCooldown(spellName, trigger.use_matchedRune) if (trigger.use_showgcd) then WeakAuras.WatchGCD(); @@ -3575,6 +3657,12 @@ Private.event_prototypes = { end, init = function(trigger) local spellName = type(trigger.spellName) ~= "table" and trigger.spellName or 0 + if not trigger.use_exact_spellName then + spellName = type(spellName) == "number" and GetSpellInfo(spellName) or spellName; + end + if (type(spellName) == "string") then + spellName = "[[" .. spellName .. "]]"; + end local ret = {} local showOnCheck = "false"; @@ -3586,14 +3674,27 @@ Private.event_prototypes = { showOnCheck = "startTime ~= nil"; end - table.insert(ret, ([=[ + local trackSpecificCharge = trigger.use_trackcharge and trigger.trackcharge and trigger.trackcharge ~= "" + local track = trigger.track or "auto" + if track == "auto" and trackSpecificCharge then + track = "charges" + end + + table.insert(ret, ([=[ local spellname = %s local ignoreRuneCD = %s local showgcd = %s; - local name, _, icon = GetSpellInfo(spellname) - local startTime, duration, gcdCooldown = WeakAuras.GetSpellCooldown(spellname, ignoreRuneCD, showgcd); - local spellCount = WeakAuras.GetSpellCharges(spellname); - local stacks = (spellCount and spellCount > 0 and spellCount) or nil; + local ignoreSpellKnown = %s; + local track = %q + local effectiveSpellId = spellname + local name, _, icon = GetSpellInfo(effectiveSpellId) + local startTime, duration, gcdCooldown, readyTime, paused = WeakAuras.GetSpellCooldown(effectiveSpellId, ignoreRuneCD, showgcd, ignoreSpellKnown, track) + local charges, maxCharges, spellCount, chargeGainTime, chargeLostTime = WeakAuras.GetSpellCharges(effectiveSpellId, ignoreSpellKnown) + local stacks = spellCount and spellCount > 0 and spellCount or nil; + if (charges == nil) then + -- Use fake charges for spells that use GetSpellCooldown + charges = (duration == 0 or gcdCooldown) and 1 or 0; + end local genericShowOn = %s local expirationTime = startTime and duration and startTime + duration state.spellname = spellname; @@ -3601,25 +3702,79 @@ Private.event_prototypes = { spellName, (trigger.use_matchedRune and "true" or "false"), (trigger.use_showgcd and "true" or "false"), + (trigger.use_ignoreSpellKnown and "true" or "false"), + track, showOnCheck )) - table.insert(ret, ([=[ - if (state.expirationTime ~= expirationTime) then - state.expirationTime = expirationTime; - state.changed = true; - end - if (state.duration ~= duration) then - state.duration = duration; - state.changed = true; - end - state.progressType = 'timed'; - ]=])) + if (not trackSpecificCharge) then + table.insert(ret, [=[ + if paused then + if not state.paused then + state.paused = true + state.expirationTime = nil + state.changed = true + end + if state.remaining ~= startTime then + state.remaining = startTime + state.changed = true + end + else + if (state.expirationTime ~= expirationTime) then + state.expirationTime = expirationTime; + state.changed = true; + end + if state.paused then + state.paused = false + state.remaining = nil + state.changed = true + end + end + if (state.duration ~= duration) then + state.duration = duration; + state.changed = true; + end + state.progressType = 'timed'; + ]=]) + else -- Tracking charges + local trackedCharge = tonumber(trigger.trackcharge) or 1; + table.insert(ret, ([=[ + local trackedCharge = %s + if (charges > trackedCharge) then + if (state.expirationTime ~= 0) then + state.expirationTime = 0; + state.changed = true; + end + if (state.duration ~= 0) then + state.duration = 0; + state.changed = true; + end + state.value = nil; + state.total = nil; + state.progressType = 'timed'; + else + if duration then + expirationTime = expirationTime + (trackedCharge - charges) * duration + end + if (state.expirationTime ~= expirationTime) then + state.expirationTime = expirationTime; + state.changed = true; + end + if (state.duration ~= duration) then + state.duration = duration; + state.changed = true; + end + state.value = nil; + state.total = nil; + state.progressType = 'timed'; + end + ]=]):format(trackedCharge - 1)) + end if(trigger.use_remaining and trigger.genericShowOn ~= "showOnReady") then table.insert(ret, ([[ local remaining = 0; - if (expirationTime and expirationTime > 0) then + if (not paused and expirationTime and expirationTime > 0) then remaining = expirationTime - GetTime(); local remainingCheck = %s; if(remaining >= remainingCheck and remaining > 0) then @@ -3632,11 +3787,7 @@ Private.event_prototypes = { return table.concat(ret) end, - GetNameAndIcon = function(trigger) - if type(trigger.spellName) == "table" then return end - local name, _, icon = GetSpellInfo(trigger.spellName or 0) - return name or "Invalid", icon - end, + GetNameAndIcon = GetNameAndIconForSpellName, statesParameter = "one", progressType = "timed", args = { @@ -3655,6 +3806,12 @@ Private.event_prototypes = { display = function(trigger) return function() local text = ""; + if trigger.track == "charges" then + text = L["Tracking Charge CDs"] + elseif trigger.track == "cooldown" then + text = L["Tracking Only Cooldown"] + end + if trigger.use_showgcd then if text ~= "" then text = text .. "; " end text = text .. L["Show GCD"] @@ -3665,6 +3822,17 @@ Private.event_prototypes = { text = text ..L["Ignore Rune CDs"] end + if trigger.use_ignoreSpellKnown then + if text ~= "" then text = text .. "; " end + text = text .. L["Disabled Spell Known Check"] + end + + if trigger.genericShowOn ~= "showOnReady" and trigger.track ~= "cooldown" then + if trigger.use_trackcharge and trigger.trackcharge and trigger.trackcharge ~= "" then + if text ~= "" then text = text .. "; " end + text = text .. L["Tracking Charge %i"]:format(trigger.trackcharge) + end + end if text == "" then return L["|cFFffcc00Extra Options:|r None"] end @@ -3673,6 +3841,16 @@ Private.event_prototypes = { end, type = "collapse", }, + { + name = "track", + display = L["Track Cooldowns"], + type = "select", + values = "cooldown_types", + collapse = "extra Cooldown Progress (Spell)", + test = "true", + required = true, + default = "auto" + }, { name = "showgcd", display = L["Show Global Cooldown"], @@ -3687,6 +3865,24 @@ Private.event_prototypes = { test = "true", collapse = "extra Cooldown Progress (Spell)" }, + { + name = "ignoreSpellKnown", + display = L["Disable Spell Known Check"], + type = "toggle", + test = "true", + collapse = "extra Cooldown Progress (Spell)" + }, + { + name = "trackcharge", + display = L["Show CD of Charge"], + type = "number", + enable = function(trigger) + return (trigger.genericShowOn ~= "showOnReady") and trigger.track ~= "cooldown" + end, + test = "true", + noOperator = true, + collapse = "extra Cooldown Progress (Spell)" + }, { name = "remaining", display = L["Remaining Time"], @@ -3723,6 +3919,39 @@ Private.event_prototypes = { conditionType = "number", test = "true", }, + { + hidden = true, + name = "readyTime", + display = L["Since Ready"], + conditionType = "elapsedTimer", + store = true, + test = "true" + }, + { + hidden = true, + name = "chargeGainTime", + display = L["Since Charge Gain"], + conditionType = "elapsedTimer", + store = true, + test = "true" + }, + { + hidden = true, + name = "chargeLostTime", + display = L["Since Charge Lost"], + conditionType = "elapsedTimer", + store = true, + test = "true" + }, + { + hidden = true, + name = "effectiveSpellId", + display = L["Effective Spell Id"], + conditionType = "number", + store = true, + test = "true", + operator_types = "only_equal" + }, { name = "genericShowOn", display = L["Show"], @@ -3739,7 +3968,7 @@ Private.event_prototypes = { display = L["On Cooldown"], conditionType = "bool", conditionTest = function(state, needle) - return state and state.show and (not state.gcdCooldown and state.expirationTime and state.expirationTime > GetTime()) == (needle == 1) + return state and state.show and (state.paused or (not state.gcdCooldown and state.expirationTime and state.expirationTime > GetTime())) == (needle == 1) end, }, { @@ -3755,14 +3984,13 @@ Private.event_prototypes = { test = "true", conditionType = "bool", conditionTest = function(state, needle) - return state and state.show and + return state and state.show and ((IsUsableSpell((type(state.spellname) == "number" and GetSpellInfo(state.spellname)) or state.spellname) == 1 and true or false) == (needle == 1)) end, - conditionEvents = { + conditionEvents = AddTargetConditionEvents({ "SPELL_UPDATE_USABLE", - "PLAYER_TARGET_CHANGED", - "UNIT_MANA", "UNIT_RAGE", "UNIT_FOCUS", "UNIT_ENERGY", "UNIT_RUNIC_POWER" - }, + "UNIT_MANA:player", "UNIT_RAGE:player", "UNIT_FOCUS:player", "UNIT_ENERGY:player", "UNIT_RUNIC_POWER:player" + }), }, { name = "insufficientResources", @@ -3771,14 +3999,13 @@ Private.event_prototypes = { test = "true", conditionType = "bool", conditionTest = function(state, needle) - return state and state.show and + return state and state.show and ((select(2, IsUsableSpell((type(state.spellname) == "number" and GetSpellInfo(state.spellname)) or state.spellname)) == 1 and true or false) == (needle == 1)) end, - conditionEvents = { + conditionEvents = AddTargetConditionEvents({ "SPELL_UPDATE_USABLE", - "PLAYER_TARGET_CHANGED", - "UNIT_MANA", "UNIT_RAGE", "UNIT_FOCUS", "UNIT_ENERGY", "UNIT_RUNIC_POWER" - } + "UNIT_MANA:player", "UNIT_RAGE:player", "UNIT_FOCUS:player", "UNIT_ENERGY:player", "UNIT_RUNIC_POWER:player" + }), }, { name = "spellInRange", @@ -3789,10 +4016,9 @@ Private.event_prototypes = { conditionTest = function(state, needle) return state and state.show and (UnitExists('target') and state.spellname and WeakAuras.IsSpellInRange(state.spellname, 'target') == needle) end, - conditionEvents = { - "PLAYER_TARGET_CHANGED", + conditionEvents = AddTargetConditionEvents({ "WA_SPELL_RANGECHECK", - }, + }), }, { hidden = true, @@ -3822,59 +4048,37 @@ Private.event_prototypes = { type = "spell", events = {}, loadInternalEventFunc = function(trigger, untrigger) - trigger.spellName = trigger.spellName or 0; - local spellName; - if (trigger.use_exact_spellName) then - spellName = trigger.spellName; - else - spellName = type(trigger.spellName) == "number" and GetSpellInfo(trigger.spellName) or trigger.spellName; + local spellName = type(trigger.spellName) ~= "table" and trigger.spellName or 0 + if not trigger.use_exact_spellName then + spellName = type(spellName) == "number" and GetSpellInfo(spellName) or spellName; end if spellName == nil then return {} end return { "SPELL_COOLDOWN_READY:" .. spellName } end, name = L["Cooldown Ready Event"], loadFunc = function(trigger) - trigger.spellName = trigger.spellName or 0; - local spellName; - if (trigger.use_exact_spellName) then - spellName = trigger.spellName; - else - spellName = type(trigger.spellName) == "number" and GetSpellInfo(trigger.spellName) or trigger.spellName; + local spellName = type(trigger.spellName) ~= "table" and trigger.spellName or 0 + if not trigger.use_exact_spellName then + spellName = type(spellName) == "number" and GetSpellInfo(spellName) or spellName; end - WeakAuras.WatchSpellCooldown(spellName); + WeakAuras.WatchSpellCooldown(spellName, false) end, init = function(trigger) - trigger.spellName = trigger.spellName or 0; - local spellName; - if (trigger.use_exact_spellName) then - spellName = trigger.spellName; - else - spellName = type(trigger.spellName) == "number" and GetSpellInfo(trigger.spellName) or trigger.spellName; + local spellName = type(trigger.spellName) ~= "table" and trigger.spellName or 0 + if not trigger.use_exact_spellName then + spellName = type(spellName) == "number" and GetSpellInfo(spellName) or spellName; end - if (type(spellName) == "string") then spellName = "[[" .. spellName .. "]]"; end local ret = [=[ - local spellname = %s - local name, _, icon = GetSpellInfo(spellname) + local triggerSpellName = %s + local name, _, icon = GetSpellInfo(triggerSpellName) ]=] - return ret:format(spellName); - end, - GetNameAndIcon = function(trigger) - if type(trigger.spellName) == "table" then return end - local spellName - if (trigger.use_exact_spellName) then - spellName = tonumber(trigger.spellName) - else - spellName = type(trigger.spellName) == "number" and GetSpellInfo(trigger.spellName) or trigger.spellName - end - if spellName then - local name, _, icon = GetSpellInfo(spellName) - return name, icon - end + return ret:format(spellName) end, + GetNameAndIcon = GetNameAndIconForSpellName, statesParameter = "one", args = { { @@ -3884,7 +4088,7 @@ Private.event_prototypes = { type = "spell", init = "arg", showExactOption = true, - test = "spellname == spellName" + test = "true" }, { name = "name", @@ -3911,58 +4115,37 @@ Private.event_prototypes = { type = "spell", events = {}, loadInternalEventFunc = function(trigger, untrigger) - trigger.spellName = trigger.spellName or 0; - local spellName; - if (trigger.use_exact_spellName) then - spellName = trigger.spellName; - else - spellName = type(trigger.spellName) == "number" and GetSpellInfo(trigger.spellName) or trigger.spellName; + local spellName = type(trigger.spellName) ~= "table" and trigger.spellName or 0 + if not trigger.use_exact_spellName then + spellName = type(spellName) == "number" and GetSpellInfo(spellName) or spellName; end if spellName == nil then return {} end return { "SPELL_CHARGES_CHANGED:" .. spellName } end, name = L["Charges Changed Event"], loadFunc = function(trigger) - trigger.spellName = trigger.spellName or 0; - local spellName; - if (trigger.use_exact_spellName) then - spellName = trigger.spellName; - else - spellName = type(trigger.spellName) == "number" and GetSpellInfo(trigger.spellName) or trigger.spellName; + local spellName = type(trigger.spellName) ~= "table" and trigger.spellName or 0 + if not trigger.use_exact_spellName then + spellName = type(spellName) == "number" and GetSpellInfo(spellName) or spellName; end WeakAuras.WatchSpellCooldown(spellName); end, init = function(trigger) - local spellName; - if (trigger.use_exact_spellName) then - spellName = trigger.spellName; - else - spellName = type(trigger.spellName) == "number" and GetSpellInfo(trigger.spellName) or trigger.spellName - spellName = spellName or "" + local spellName = type(trigger.spellName) ~= "table" and trigger.spellName or 0 + if not trigger.use_exact_spellName then + spellName = type(spellName) == "number" and GetSpellInfo(spellName) or spellName; end if (type(spellName) == "string") then - spellName = string.format("%q", spellName) + spellName = "[[" .. spellName .. "]]"; end local ret = [=[ - local spellname = %s - local name, _, icon = GetSpellInfo(spellname) + local triggerSpellName = %s + local name, _, icon = GetSpellInfo(triggerSpellName) ]=] return ret:format(spellName) end, statesParameter = "one", - GetNameAndIcon = function(trigger) - if type(trigger.spellName) == "table" then return end - local spellName - if (trigger.use_exact_spellName) then - spellName = tonumber(trigger.spellName) - else - spellName = type(trigger.spellName) == "number" and GetSpellInfo(trigger.spellName) or trigger.spellName - end - if spellName then - local name, _, icon = GetSpellInfo(spellName) - return name, icon - end - end, + GetNameAndIcon = GetNameAndIconForSpellName, args = { { name = "spellName", @@ -3971,7 +4154,7 @@ Private.event_prototypes = { type = "spell", init = "arg", showExactOption = true, - test = "spell == spellName" + test = "true" }, { name = "direction", @@ -4084,7 +4267,7 @@ Private.event_prototypes = { type = "item", test = "true" }, - { + --[[{ maybe some day name = "itemId", display = WeakAuras.newFeatureString .. L["ItemId"], hidden = true, @@ -4093,7 +4276,7 @@ Private.event_prototypes = { store = true, conditionType = "number", operator_types = "only_equal", - }, + },]] { name = "remaining", display = L["Remaining Time"], @@ -4378,6 +4561,16 @@ Private.event_prototypes = { store = true, conditionType = "string" }, + --[[{ maybe some day + name = "itemId", + display = L["ItemId"], + hidden = true, + init = "item", + test = "true", + store = true, + conditionType = "number", + operator_types = "only_equal", + },]] { name = "icon", hidden = true, @@ -4437,6 +4630,7 @@ Private.event_prototypes = { local name = GetItemInfo(itemName) or "Invalid" local icon = GetItemIcon(itemName) or "" ]] + local itemName = type(trigger.itemName) == "number" and trigger.itemName or string.format("%q", trigger.itemName or "0") return ret:format(itemName) end, @@ -4454,8 +4648,7 @@ Private.event_prototypes = { type = "item", init = "arg" }, - --[[ - { + --[[{ maybe some day name = "itemId", display = WeakAuras.newFeatureString .. L["ItemId"], hidden = true, @@ -4464,8 +4657,7 @@ Private.event_prototypes = { store = true, conditionType = "number", operator_types = "only_equal", - }, - ]] + },]] { name = "name", display = L["Name"], @@ -4769,30 +4961,34 @@ Private.event_prototypes = { }, ["Action Usable"] = { type = "spell", - events = { - ["events"] = { + events = function() + local events = { "SPELL_UPDATE_USABLE", "ACTIONBAR_UPDATE_USABLE", "PLAYER_TARGET_CHANGED", - "RUNE_POWER_UPDATE", - "RUNE_TYPE_UPDATE", - }, - ["unit_events"] = { + } + local unit_events + if UnitPowerType("player") == 6 then + tinsert(events, "RUNE_POWER_UPDATE") + tinsert(events, "RUNE_TYPE_UPDATE") + unit_events = {} + end + return { + ["events"] = events, + ["unit_events"] = unit_events or { ["player"] = { "UNIT_POWER", "UNIT_ENERGY", "UNIT_MANA", "UNIT_RAGE" + } } } - }, + end, loadInternalEventFunc = function(trigger) - trigger.spellName = trigger.spellName or 0; - local spellName - if (trigger.use_exact_spellName) then - spellName = trigger.spellName - else - spellName = type(trigger.spellName) == "number" and GetSpellInfo(trigger.spellName) or trigger.spellName; + local spellName = type(trigger.spellName) ~= "table" and trigger.spellName or 0 + if type(trigger.spellName) == "number" then + spellName = GetSpellInfo(spellName) end if spellName == nil then return {} end return { "SPELL_COOLDOWN_CHANGED:" .. spellName } @@ -4801,34 +4997,37 @@ Private.event_prototypes = { name = L["Spell Usable"], statesParameter = "one", loadFunc = function(trigger) - trigger.spellName = trigger.spellName or 0; - local spellName; - if (trigger.use_exact_spellName) then - spellName = trigger.spellName; - else - spellName = type(trigger.spellName) == "number" and GetSpellInfo(trigger.spellName) or trigger.spellName; + local spellName = type(trigger.spellName) ~= "table" and trigger.spellName or 0 + if type(trigger.spellName) == "number" then + spellName = GetSpellInfo(spellName) end - WeakAuras.WatchSpellCooldown(spellName); + WeakAuras.WatchSpellCooldown(spellName, false); end, init = function(trigger) - trigger.spellName = trigger.spellName or 0; - local spellName; - if (trigger.use_exact_spellName) then - spellName = trigger.spellName; - else - spellName = type(trigger.spellName) == "number" and GetSpellInfo(trigger.spellName) or trigger.spellName; + local spellName = type(trigger.spellName) ~= "table" and trigger.spellName or 0 + if type(trigger.spellName) == "number" then + spellName = GetSpellInfo(spellName) or "" end local ret = [=[ local spellName = %s - local name, _, icon = GetSpellInfo(spellName) - local startTime, duration, gcdCooldown, readyTime = WeakAuras.GetSpellCooldown(spellName) - local charges = WeakAuras.GetSpellCharges(spellName) + local effectiveSpellId = spellName + local name, _, icon = GetSpellInfo(effectiveSpellId) + ]=] + + if trigger.use_ignoreSpellCooldown then + ret = ret .. [=[local active = IsUsableSpell(spellName or "")]=] + else + ret = ret .. [=[ + local startTime, duration, gcdCooldown, readyTime, paused = WeakAuras.GetSpellCooldown(effectiveSpellId) + local charges, maxCharges, spellCount, chargeGainTime, chargeLostTime = WeakAuras.GetSpellCharges(effectiveSpellId) + local stacks = spellCount and spellCount > 0 and spellCount or nil if (charges == nil) then charges = (duration == 0 or gcdCooldown) and 1 or 0; end - local ready = startTime == 0 or charges > 0 + local ready = (startTime == 0 and not paused) or charges > 0 local active = IsUsableSpell(spellName or "") and ready - ]=] + ]=] + end if(trigger.use_targetRequired) then ret = ret.."active = active and WeakAuras.IsSpellInRange(spellName or '', 'target')\n"; end @@ -4842,19 +5041,7 @@ Private.event_prototypes = { return ret:format(spellName) end, - GetNameAndIcon = function(trigger) - if type(trigger.spellName) == "table" then return end - local spellName - if (trigger.use_exact_spellName) then - spellName = tonumber(trigger.spellName) - else - spellName = type(trigger.spellName) == "number" and GetSpellInfo(trigger.spellName) or trigger.spellName - end - if spellName then - local name, _, icon = GetSpellInfo(spellName) - return name, icon - end - end, + GetNameAndIcon = GetNameAndIconForSpellName, args = { { name = "spellName", @@ -4873,11 +5060,17 @@ Private.event_prototypes = { type = "toggle", test = "true" }, + { + name = "ignoreSpellCooldown", + display = L["Ignore Spell Cooldown/Charges"], + type = "toggle", + test = "true" + }, { name = "charges", display = L["Charges"], type = "number", - enable = function(trigger) return not(trigger.use_inverse) end, + enable = function(trigger) return not trigger.use_inverse and not trigger.use_ignoreSpellCooldown end, store = true, conditionType = "number", }, @@ -4885,7 +5078,7 @@ Private.event_prototypes = { name = "spellCount", display = L["Spell Count"], type = "number", - enable = function(trigger) return not(trigger.use_inverse) end, + enable = function(trigger) return not trigger.use_ignoreSpellCooldown end, store = true, conditionType = "number", }, @@ -4895,7 +5088,8 @@ Private.event_prototypes = { display = L["Since Ready"], conditionType = "elapsedTimer", store = true, - test = "true" + test = "true", + enable = function(trigger) return not trigger.use_ignoreSpellCooldown end, }, { hidden = true, @@ -4903,7 +5097,8 @@ Private.event_prototypes = { display = L["Since Charge Gain"], conditionType = "elapsedTimer", store = true, - test = "true" + test = "true", + enable = function(trigger) return not trigger.use_ignoreSpellCooldown end, }, { hidden = true, @@ -4911,7 +5106,8 @@ Private.event_prototypes = { display = L["Since Charge Lost"], conditionType = "elapsedTimer", store = true, - test = "true" + test = "true", + enable = function(trigger) return not trigger.use_ignoreSpellCooldown end, }, { name = "inverse", @@ -4929,10 +5125,9 @@ Private.event_prototypes = { conditionTest = function(state, needle) return state and state.show and (UnitExists('target') and state.spellName and WeakAuras.IsSpellInRange(state.spellName, 'target') == needle) end, - conditionEvents = { - "PLAYER_TARGET_CHANGED", + conditionEvents = AddTargetConditionEvents({ "WA_SPELL_RANGECHECK", - } + }) }, { name = "name", @@ -4957,7 +5152,8 @@ Private.event_prototypes = { init = "stacks", test = "true", store = true, - conditionType = "number" + conditionType = "number", + enable = function(trigger) return not trigger.use_ignoreSpellCooldown end, }, { hidden = true, @@ -5354,6 +5550,16 @@ Private.event_prototypes = { showExactOption = true, test = "true" }, + --[[{ maybe some day + name = "itemId", + display = WeakAuras.newFeatureString .. L["ItemId"], + hidden = true, + init = "itemId", + test = "true", + store = true, + conditionType = "number", + operator_types = "only_equal", + },]] { name = "name", display = L["Name"], @@ -5364,18 +5570,6 @@ Private.event_prototypes = { test = "true", conditionType = "string" }, - --[[ - { - name = "itemId", - display = WeakAuras.newFeatureString .. L["ItemId"], - hidden = true, - init = "itemId", - test = "true", - store = true, - conditionType = "number", - operator_types = "only_equal", - }, - ]] { name = "includeBank", display = L["Include Bank"], @@ -5498,6 +5692,14 @@ Private.event_prototypes = { end, statesParameter = "one", args = { + { + name = "note", + type = "description", + display = "", + text = function() + return L["Note: This trigger internally stores the shapeshift position, and thus is incompatible with learning stances on the fly, like e.g. the Gladiator Rune."] + end, + }, { name = "form", display = L["Form"], @@ -5568,7 +5770,7 @@ Private.event_prototypes = { elseif triggerWeaponType == "off" then expirationTime, duration, name, shortenedName, icon, stacks = WeakAuras.GetOHTenchInfo() elseif triggerWeaponType == "ranged" then - expirationTime, duration, name, shortenedName, icon, stacks = WeakAuras.GetOHTenchInfo() + expirationTime, duration, name, shortenedName, icon, stacks = WeakAuras.GetRangeTenchInfo() end local remaining = expirationTime and expirationTime - GetTime() @@ -5658,7 +5860,7 @@ Private.event_prototypes = { { name = "name", hidden = true, - init = "spell", + init = "name", test = "true", store = true }, @@ -5685,7 +5887,10 @@ Private.event_prototypes = { name = "remaining", display = L["Remaining Time"], type = "number", - test = "true" + test = "true", + enable = function(trigger) + return not trigger.showOn or trigger.showOn == "showOnActive" + end }, { name = "showOn", @@ -5845,7 +6050,7 @@ Private.event_prototypes = { timedrequired = true, progressType = "timed" }, - --[==[ + --[==[ maybe some day ["Spell Cast Succeeded"] = { type = "event", events = function(trigger) @@ -6006,7 +6211,13 @@ Private.event_prototypes = { name = L["Death Knight Rune"], loadFunc = function(trigger) trigger.rune = trigger.rune or 0; - WeakAuras.WatchRuneCooldown(trigger.rune); + if (trigger.use_rune) then + WeakAuras.WatchRuneCooldown(trigger.rune); + else + for i = 1, 6 do + WeakAuras.WatchRuneCooldown(i); + end + end end, init = function(trigger) trigger.rune = trigger.rune or 0; @@ -6242,8 +6453,7 @@ Private.event_prototypes = { test = "true", only_exact = true }, - --[[ - { + --[[{ maybe some day name = "itemId", display = WeakAuras.newFeatureString .. L["ItemId"], hidden = true, @@ -6252,8 +6462,7 @@ Private.event_prototypes = { store = true, conditionType = "number", operator_types = "only_equal", - }, - ]] + },]] { name = "itemSlot", display = WeakAuras.newFeatureString .. L["Item Slot"], @@ -6314,6 +6523,7 @@ Private.event_prototypes = { local triggerItemSetName = %s; local inverse = %s; local partial = %s; + local itemSetName, icon, numEquipped, numItems = WeakAuras.GetEquipmentSetInfo(useItemSetName and triggerItemSetName or nil, partial); ]]; @@ -6888,7 +7098,7 @@ Private.event_prototypes = { { name = "raidMarkIndex", display = L["Raid Mark"], - type = "select", + type = "multiselect", values = "raid_mark_check_type", store = true, conditionType = "select", @@ -6904,7 +7114,7 @@ Private.event_prototypes = { }, { name = "nameplateType", - display = L["Nameplate Type"], + display = L["Hostility"], type = "select", init = "WeakAuras.GetPlayerReaction(unit)", values = "hostility_types", @@ -6919,7 +7129,7 @@ Private.event_prototypes = { values = "actual_unit_types_with_specific", conditionType = "unit", conditionTest = function(state, unit, op) - return state and state.show and state.unit and ((UnitIsUnit(state.sourceUnit, unit) == 1 and true or false) == (op == "==")) + return state and state.show and state.unit and (UnitIsUnit(state.sourceUnit, unit) == (op == "==")) end, store = true, hidden = true, @@ -6969,7 +7179,7 @@ Private.event_prototypes = { values = "actual_unit_types_with_specific", conditionType = "unit", conditionTest = function(state, unit, op) - return state and state.show and state.destUnit and ((UnitIsUnit(state.destUnit, unit) == 1 and true or false) == (op == "==")) + return state and state.show and state.destUnit and (UnitIsUnit(state.destUnit, unit) == (op == "==")) end, store = true, enable = function(trigger) return not trigger.use_inverse end, @@ -7123,7 +7333,7 @@ Private.event_prototypes = { "PLAYER_TARGET_CHANGED" }, ["unit_events"] = { - ["player"] = {"UNIT_STATS", "UNIT_ATTACK_POWER", "UNIT_AURA", "UNIT_RESISTANCES"} + ["player"] = {"UNIT_STATS", "UNIT_ATTACK_POWER", "UNIT_AURA", "PLAYER_DAMAGE_DONE_MODS", "UNIT_RESISTANCES"} } }, internal_events = function(trigger, untrigger) @@ -7135,7 +7345,7 @@ Private.event_prototypes = { end, loadFunc = function(trigger) if trigger.use_moveSpeed then - WeakAuras.WatchPlayerMoveSpeed() + WeakAuras.WatchForPlayerMoving() end end, force_events = "CONDITIONS_CHECK", @@ -7211,42 +7421,6 @@ Private.event_prototypes = { name = "secondaryStatsHeader", display = L["Secondary Stats"], }, - { - name = "attackpower", - display = L["Attack Power"], - type = "number", - init = "WeakAuras.GetEffectiveAttackPower()", - store = true, - conditionType = "number", - multiEntry = { - operator = "and", - limit = 2 - }, - }, - { - name = "spellpower", - display = L["Spell Power"], - type = "number", - init = "WeakAuras.GetEffectiveSpellPower()", - store = true, - conditionType = "number", - multiEntry = { - operator = "and", - limit = 2 - }, - }, - { - name = "rangedattackpower", - display = L["Ranged Attack Power"], - type = "number", - init = "WeakAuras.GetEffectiveRangedAttackPower()", - store = true, - conditionType = "number", - multiEntry = { - operator = "and", - limit = 2 - }, - }, { name = "criticalrating", display = L["Critical Rating"], @@ -7402,6 +7576,42 @@ Private.event_prototypes = { operator = "and", limit = 2 }, + }, + { + name = "attackpower", + display = L["Attack Power"], + type = "number", + init = "WeakAuras.GetEffectiveAttackPower()", + store = true, + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, + }, + { + name = "spellpower", + display = L["Spell Power"], + type = "number", + init = "WeakAuras.GetEffectiveSpellPower()", + store = true, + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, + }, + { + name = "rangedattackpower", + display = L["Ranged Attack Power"], + type = "number", + init = "WeakAuras.GetEffectiveRangedAttackPower()", + store = true, + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { type = "header", @@ -7619,9 +7829,8 @@ Private.event_prototypes = { tinsert(events, "PLAYER_ENTERING_WORLD") end if trigger.use_mounted ~= nil then - tinsert(events, "COMPANION_UPDATE") - tinsert(events, "PLAYER_ENTERING_WORLD") tinsert(events, "MOUNTED_UPDATE") + tinsert(events, "PLAYER_ENTERING_WORLD") end local unit_events = {} local pet_unit_events = {} @@ -7637,7 +7846,6 @@ Private.event_prototypes = { tinsert(events, "PARTY_MEMBERS_CHANGED") tinsert(events, "RAID_ROSTER_UPDATE") end - if trigger.use_instance_difficulty ~= nil or trigger.use_instance_size ~= nil then @@ -7656,7 +7864,7 @@ Private.event_prototypes = { local events = { "CONDITIONS_CHECK"}; if trigger.use_ismoving ~= nil then - tinsert(events, "PLAYER_MOVE_SPEED_UPDATE"); + tinsert(events, "PLAYER_MOVING_UPDATE"); end if trigger.use_instance_difficulty ~= nil @@ -7676,7 +7884,7 @@ Private.event_prototypes = { name = L["Conditions"], loadFunc = function(trigger) if (trigger.use_ismoving ~= nil) then - WeakAuras.WatchPlayerMoveSpeed(); + WeakAuras.WatchForPlayerMoving(); end if (trigger.use_HasPet ~= nil) then AddWatchedUnits("pet") @@ -7780,7 +7988,7 @@ Private.event_prototypes = { ["Spell Known"] = { type = "spell", events = { - ["events"] = {"SPELLS_CHANGED"}, + ["events"] = {"SPELLS_CHANGED", "PLAYER_TALENT_UPDATE"}, ["unit_events"] = { ["player"] = {"UNIT_PET"} } @@ -7950,8 +8158,7 @@ Private.event_prototypes = { }, name = L["Queued Action"], init = function(trigger) - trigger.spellName = trigger.spellName or 0 - local spellName + local spellName = type(trigger.spellName) ~= "table" and trigger.spellName or 0 if trigger.use_exact_spellName then spellName = trigger.spellName else @@ -8147,26 +8354,27 @@ Private.event_prototypes = { if type(trigger.value) ~= "string" then trigger.value = "" end if type(trigger.value_operator) ~= "string" then trigger.value_operator = "" end local ret = [=[ - local currencyID = %d - local discoveredTbl = Private.ExecEnv.GetDiscoveredCurrencies() or {} - local currencyInfo = { - name = GetItemInfo(currencyID), - quantity = GetItemCount(currencyID), - icon = GetItemIcon(currencyID), - totalEarned = Private.ExecEnv.GetTotalCountCurrencies(currencyID), - discovered = discoveredTbl[currencyID] and true or false, - } - if not currencyInfo.name then - currencyInfo = { - name = "Unknown Currency", - quantity = 0, - icon = "Interface\\Icons\\INV_Misc_QuestionMark", - totalEarned = 0, - discovered = false - } - end + local currencyID = %d + local quantity, totalEarned, icon + if currencyID == 43308 then + quantity, totalEarned = GetHonorCurrency() + icon = UnitFactionGroup("player") == "Alliance" and + "Interface/Icons/inv_misc_tournaments_symbol_human" or + "Interface/Icons/Achievement_PVP_H_16" + elseif currencyID == 43307 then + quantity, totalEarned = GetArenaCurrency() + icon = "Interface/PVPFrame/PVP-ArenaPoints-Icon" + end + local name = GetItemInfo(currencyID) + local currencyInfo = { + name = name or "Unknown Currency", + quantity = quantity or GetItemCount(currencyID) or 0, + icon = icon or GetItemIcon(currencyID) or "Interface/Icons/INV_Misc_QuestionMark", + totalEarned = totalEarned or Private.ExecEnv.GetTotalCountCurrencies(currencyID) or 0, + discovered = ((Private.ExecEnv.GetDiscoveredCurrencies() or {})[currencyID]) and true or false + } ]=] - return ret:format(tonumber(trigger.currencyId) or 1) + return ret:format(tonumber(trigger.currencyId) or 0) end, statesParameter = "one", args = { @@ -8251,8 +8459,16 @@ Private.event_prototypes = { }, }, GetNameAndIcon = function(trigger) - local name = GetItemInfo(trigger.currencyId or 0) - local icon = GetItemIcon(trigger.currencyId or 0) + local id = trigger.currencyId or 0 + local name = GetItemInfo(id) + local icon = GetItemIcon(id) + if id == 43308 then + icon = UnitFactionGroup("player") == "Alliance" and + "Interface/Icons/inv_misc_tournaments_symbol_human" or + "Interface/Icons/Achievement_PVP_H_16" + elseif id == 43307 then + icon = "Interface/PVPFrame/PVP-ArenaPoints-Icon" + end return name, icon end, automaticrequired = true @@ -8273,10 +8489,10 @@ Private.event_prototypes = { name = WeakAuras.newFeatureString..L["Location"], init = function(trigger) local ret = [=[ + local uiMapId = GetCurrentMapAreaID() local instanceName, instanceType, difficultyID = GetInstanceInfo() local minimapZoneText = GetMinimapZoneText() local zoneText = GetZoneText() - local MapId = GetCurrentMapAreaID() ]=] return ret end, @@ -8304,7 +8520,7 @@ Private.event_prototypes = { { name = "zoneId", display = L["Zone ID"], - init = "MapId", + init = "uiMapId", store = true, hidden = true, test = "true", @@ -8515,6 +8731,23 @@ Private.dynamic_texts = { } }; +-- Events in that list can be filtered by unitID +Private.UnitEventList = { + PLAYER_GUILD_UPDATE = true, + MINIMAP_PING = true, + PARTY_MEMBER_DISABLE = true, + PARTY_MEMBER_ENABLE = true, + READY_CHECK_CONFIRM = true, + PLAYER_GAINS_VEHICLE_DATA = true, + PLAYER_LOSES_VEHICLE_DATA = true, + KNOWN_TITLES_UPDATE = true, + PLAYER_DAMAGE_DONE_MODS = true, + PLAYER_FLAGS_CHANGED = true, + PLAYER_PVP_KILLS_CHANGED = true, + PLAYER_PVP_RANK_CHANGED = true, + PLAYER_XP_UPDATE = true, +} + Private.InternalEventByIDList = { ITEM_COOLDOWN_STARTED = true, ITEM_COOLDOWN_CHANGED = true, diff --git a/WeakAuras/RegionTypes/DynamicGroup.lua b/WeakAuras/RegionTypes/DynamicGroup.lua index 3c314f9..fc670cb 100644 --- a/WeakAuras/RegionTypes/DynamicGroup.lua +++ b/WeakAuras/RegionTypes/DynamicGroup.lua @@ -326,7 +326,7 @@ local sorters = { end, custom = function(data) local sortStr = data.customSort or "" - local sortFunc = WeakAuras.LoadFunction("return " .. sortStr) or noop + local sortFunc = WeakAuras.LoadFunction("return " .. sortStr, data.id) or noop local sortOn = nil local events = WeakAuras.split(data.sortOn or "") if #events > 0 then @@ -415,7 +415,7 @@ local anchorers = { end, ["CUSTOM"] = function(data) local anchorStr = data.customAnchorPerUnit or "" - local anchorFunc = WeakAuras.LoadFunction("return " .. anchorStr) or noop + local anchorFunc = WeakAuras.LoadFunction("return " .. anchorStr, data.id) or noop local anchorOn = nil local events = WeakAuras.split(data.anchorOn or "") @@ -971,7 +971,7 @@ local growers = { end, CUSTOM = function(data) local growStr = data.customGrow or "" - local growFunc = WeakAuras.LoadFunction("return " .. growStr) or noop + local growFunc = WeakAuras.LoadFunction("return " .. growStr, data.id) or noop local growOn = nil local events = WeakAuras.split(data.growOn or "") if #events > 0 then diff --git a/WeakAuras/RegionTypes/Icon.lua b/WeakAuras/RegionTypes/Icon.lua index 17e9fad..19221bd 100644 --- a/WeakAuras/RegionTypes/Icon.lua +++ b/WeakAuras/RegionTypes/Icon.lua @@ -479,13 +479,17 @@ local function modify(parent, region, data) -- If cooldown.inverse == false then effectiveReverse = not inverse -- If cooldown.inverse == true then effectiveReverse = inverse local effectiveReverse = not region.inverseDirection == not cooldown.inverse - cooldown:SetReverse(effectiveReverse) + local hasChanged = cooldown:GetReverse() ~= effectiveReverse + if hasChanged then + cooldown:SetReverse(effectiveReverse) + end if (cooldown.expirationTime and cooldown.duration and cooldown:IsShown()) then - -- WORKAROUND SetReverse not applying until next frame - cooldown:SetCooldown(0, 0) + if hasChanged then + -- WORKAROUND SetReverse not applying until next frame + cooldown:SetCooldown(0, 0) + end cooldown:SetCooldown(cooldown.expirationTime - cooldown.duration, - cooldown.duration, - cooldown.useCooldownModRate and cooldown.modRate or nil) + cooldown.duration) end end diff --git a/WeakAuras/RegionTypes/RegionPrototype.lua b/WeakAuras/RegionTypes/RegionPrototype.lua index 5737f41..235fc98 100644 --- a/WeakAuras/RegionTypes/RegionPrototype.lua +++ b/WeakAuras/RegionTypes/RegionPrototype.lua @@ -819,7 +819,7 @@ function Private.regionPrototype.modify(parent, region, data) region:SetOffsetAnim(0, 0); if data.anchorFrameType == "CUSTOM" and data.customAnchor then - region.customAnchorFunc = WeakAuras.LoadFunction("return " .. data.customAnchor) + region.customAnchorFunc = WeakAuras.LoadFunction("return " .. data.customAnchor, data.id) else region.customAnchorFunc = nil end diff --git a/WeakAuras/RegionTypes/Text.lua b/WeakAuras/RegionTypes/Text.lua index 4c91083..d00756f 100644 --- a/WeakAuras/RegionTypes/Text.lua +++ b/WeakAuras/RegionTypes/Text.lua @@ -223,7 +223,7 @@ local function modify(parent, region, data) local customTextFunc = nil if containsCustomText and data.customText and data.customText ~= "" then - customTextFunc = WeakAuras.LoadFunction("return "..data.customText) + customTextFunc = WeakAuras.LoadFunction("return "..data.customText, data.id) end function region:ConfigureTextUpdate() diff --git a/WeakAuras/SubRegionTypes/SubText.lua b/WeakAuras/SubRegionTypes/SubText.lua index 188f4c7..dc43ab6 100644 --- a/WeakAuras/SubRegionTypes/SubText.lua +++ b/WeakAuras/SubRegionTypes/SubText.lua @@ -203,7 +203,7 @@ local function modify(parent, region, parentData, data, first) end end if containsCustomText and parentData.customText and parentData.customText ~= "" then - parent.customTextFunc = WeakAuras.LoadFunction("return "..parentData.customText) + parent.customTextFunc = WeakAuras.LoadFunction("return "..parentData.customText, data.id) else parent.customTextFunc = nil end diff --git a/WeakAuras/TimeUtil.lua b/WeakAuras/TimeUtil.lua index 1573838..4f49e11 100644 --- a/WeakAuras/TimeUtil.lua +++ b/WeakAuras/TimeUtil.lua @@ -6,7 +6,7 @@ local WeakAuras = WeakAuras local L = WeakAuras.L -- Lua APIs -local time, format, floor, ceil = time, format, floor, ceil +local time, format, floor = time, format, floor -- WoW APIs local GetLocale = GetLocale @@ -274,7 +274,7 @@ function SecondsToClock(seconds, displayZeroHours) end -- Deprecated. See SecondsFormatter for intended replacement -function SecondsToTime(seconds, noSeconds, notAbbreviated, maxCount, roundUp) +--[[function SecondsToTime(seconds, noSeconds, notAbbreviated, maxCount, roundUp) local time = ""; local count = 0; local tempTime; @@ -344,7 +344,7 @@ function SecondsToTime(seconds, noSeconds, notAbbreviated, maxCount, roundUp) end end return time; -end +end]] -- Deprecated. See SecondsFormatter for intended replacement function MinutesToTime(mins, hideDays) @@ -373,7 +373,7 @@ function MinutesToTime(mins, hideDays) end -- Deprecated. See SecondsFormatter for intended replacement -function SecondsToTimeAbbrev(seconds, thresholdOverride) +--[[function SecondsToTimeAbbrev(seconds, thresholdOverride) local tempTime; local threshold = 1.5; if thresholdOverride then @@ -393,7 +393,7 @@ function SecondsToTimeAbbrev(seconds, thresholdOverride) return L["MINUTE_ONELETTER_ABBR"], tempTime; end return L["SECOND_ONELETTER_ABBR"], seconds; -end +end]] function FormatShortDate(day, month, year) local LOCALE_enGB = (GetLocale() == "enUS") or (GetLocale() == "enGB") diff --git a/WeakAuras/Types.lua b/WeakAuras/Types.lua index 8b5d802..f31f509 100644 --- a/WeakAuras/Types.lua +++ b/WeakAuras/Types.lua @@ -9,6 +9,8 @@ local LSM = LibStub("LibSharedMedia-3.0"); local wipe, tinsert = wipe, tinsert local GetNumShapeshiftForms, GetShapeshiftFormInfo = GetNumShapeshiftForms, GetShapeshiftFormInfo +local WrapTextInColorCode = WrapTextInColorCode +local MAX_NUM_TALENTS = MAX_NUM_TALENTS or 40 local function WA_GetClassColor(classFilename) local color = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[classFilename] @@ -29,7 +31,7 @@ Private.glow_frame_types = { FRAMESELECTOR = L["Frame Selector"], PARENTFRAME = L["Parent Frame"] } -if WeakAuras.isAwesomeEnabled() then +if WeakAuras.IsAwesomeEnabled() then Private.glow_frame_types.NAMEPLATE = L["Nameplate"] end @@ -735,7 +737,7 @@ Private.format_types = { if unit and UnitPlayerControlled(unit) then local classFilename = select(2, UnitClass(unit)) if classFilename then - return string.format("|c%s%s|r", WA_GetClassColor(classFilename), text) + return WrapTextInColorCode(text, WA_GetClassColor(classFilename)) end end return text @@ -894,7 +896,7 @@ Private.format_types = { if color == "class" then colorFunc = function(class, text) if class then - return string.format("|c%s%s|r", WA_GetClassColor(class), text) + return WrapTextInColorCode(text, WA_GetClassColor(class)) else return text end @@ -1090,7 +1092,6 @@ Private.format_types = { Private.format_types_display = {} for k, v in pairs(Private.format_types) do Private.format_types_display[k] = v.display end - Private.sound_channel_types = { Master = L["Master"], SFX = ENABLE_SOUNDFX, @@ -1137,7 +1138,6 @@ Private.aura_types = { DEBUFF = L["Debuff"], } - Private.debuff_class_types = { magic = L["Magic"], curse = L["Curse"], @@ -1152,20 +1152,21 @@ Private.player_target_events = { PLAYER_FOCUS_CHANGED = "focus", } -Private.unit_types = { - player = L["Player"], +local target_unit_types = { target = L["Target"], focus = L["Focus"], +} + +Private.unit_types = WeakAuras.Mixin({ + player = L["Player"], group = L["Group"], member = L["Specific Unit"], pet = L["Pet"], multi = L["Multi-target"] -} +}, target_unit_types) -Private.unit_types_bufftrigger_2 = { +Private.unit_types_bufftrigger_2 = WeakAuras.Mixin({ player = L["Player"], - target = L["Target"], - focus = L["Focus"], group = L["Smart Group"], raid = L["Raid"], party = L["Party"], @@ -1174,29 +1175,24 @@ Private.unit_types_bufftrigger_2 = { pet = L["Pet"], member = L["Specific Unit"], multi = L["Multi-target"] -} -if WeakAuras.isAwesomeEnabled() then +}, target_unit_types) +if WeakAuras.IsAwesomeEnabled() then Private.unit_types_bufftrigger_2.nameplate = L["Nameplate"] end -Private.actual_unit_types = { +Private.actual_unit_types = WeakAuras.Mixin({ player = L["Player"], pet = L["Pet"], - target = L["Target"], -} +}, target_unit_types) -Private.actual_unit_types_with_specific = { +Private.actual_unit_types_with_specific = WeakAuras.Mixin({ player = L["Player"], - target = L["Target"], - focus = L["Focus"], pet = L["Pet"], - member = L["Specific Unit"], -} + member = L["Specific Unit"] +}, target_unit_types) -Private.actual_unit_types_cast = { +Private.actual_unit_types_cast = WeakAuras.Mixin({ player = L["Player"], - target = L["Target"], - focus = L["Focus"], group = L["Smart Group"], party = L["Party"], raid = L["Raid"], @@ -1204,30 +1200,26 @@ Private.actual_unit_types_cast = { arena = L["Arena"], pet = L["Pet"], member = L["Specific Unit"], -} -if WeakAuras.isAwesomeEnabled() then +}, target_unit_types) +if WeakAuras.IsAwesomeEnabled() then Private.actual_unit_types_cast.nameplate = L["Nameplate"] end Private.actual_unit_types_cast_tooltip = L["• |cff00ff00Player|r, |cff00ff00Target|r, |cff00ff00Focus|r, and |cff00ff00Pet|r correspond directly to those individual unitIDs.\n• |cff00ff00Specific Unit|r lets you provide a specific valid unitID to watch.\n|cffff0000Note|r: The game will not fire events for all valid unitIDs, making some untrackable by this trigger.\n• |cffffff00Party|r, |cffffff00Raid|r, |cffffff00Boss|r, |cffffff00Arena|r, and |cffffff00Nameplate|r can match multiple corresponding unitIDs.\n• |cffffff00Smart Group|r adjusts to your current group type, matching just the \"player\" when solo, \"party\" units (including \"player\") in a party or \"raid\" units in a raid.\n\n|cffffff00*|r Yellow Unit settings will create clones for each matching unit while this trigger is providing Dynamic Info to the Aura."] -Private.threat_unit_types = { - target = L["Target"], - focus = L["Focus"], +Private.threat_unit_types = WeakAuras.Mixin({ boss = L["Boss"], member = L["Specific Unit"], none = L["At Least One Enemy"] -} -if WeakAuras.isAwesomeEnabled() then +}, target_unit_types) +if WeakAuras.IsAwesomeEnabled() then Private.threat_unit_types.nameplate = L["Nameplate"] end -Private.unit_types_range_check = { - target = L["Target"], - focus = L["Focus"], +Private.unit_types_range_check = WeakAuras.Mixin({ pet = L["Pet"], member = L["Specific Unit"] -} +}, target_unit_types) Private.unit_threat_situation_types = { [-1] = L["Not On Threat Table"], @@ -1239,9 +1231,13 @@ Private.unit_threat_situation_types = { WeakAuras.class_types = {} for i, class in ipairs(CLASS_SORT_ORDER) do - WeakAuras.class_types[class] = string.format("|c%s%s|r", WA_GetClassColor(class), LOCALIZED_CLASS_NAMES_MALE[class]) + WeakAuras.class_types[class] = WrapTextInColorCode(LOCALIZED_CLASS_NAMES_MALE[class], WA_GetClassColor(class)) +end +if WeakAuras.IsClassicPlusOrTBC() then + WeakAuras.class_types["DEATHKNIGHT"] = nil end +-- missing localisation WeakAuras.race_types = { Human = "Human", Orc = "Orc", @@ -1352,7 +1348,7 @@ Private.anchor_frame_types = { UNITFRAME = L["Unit Frames"], CUSTOM = L["Custom"] } -if WeakAuras.isAwesomeEnabled() then +if WeakAuras.IsAwesomeEnabled() then Private.anchor_frame_types.NAMEPLATE = L["Nameplates"] end @@ -1469,8 +1465,18 @@ Private.power_types = { [1] = RAGE, [2] = FOCUS, [3] = ENERGY, - [4] = HAPPINESS, [6] = RUNIC_POWER, + [27] = HAPPINESS, +} + +Private.power_types_player = { + [0] = MANA, + [1] = RAGE, + [2] = FOCUS, + [3] = ENERGY, + [4] = COMBAT_TEXT_SHOW_COMBO_POINTS_TEXT, + [6] = RUNIC_POWER, + [27] = HAPPINESS, } Private.miss_types = { @@ -1616,7 +1622,7 @@ local function InitializeCurrencies() local expanded = {} for index = GetCurrencyListSize(), 1, -1 do - local name, isHeader, isExpanded, _, _, _, _, _, _ = GetCurrencyListInfo(index) + local name, isHeader, isExpanded = GetCurrencyListInfo(index) if isHeader and not isExpanded then ExpandCurrencyList(index, true) expanded[name] = true @@ -1624,11 +1630,18 @@ local function InitializeCurrencies() end for index = 1, GetCurrencyListSize() do - local name, isHeader, _, _, _, _, _, iconFileID, itemID = GetCurrencyListInfo(index) - local currencyLink = tonumber(itemID) and GetItemInfo(itemID) + local name, isHeader, _, _, _, _, currencyType, iconFileID, itemID = GetCurrencyListInfo(index) - if currencyLink then - local icon = iconFileID or "Interface\\Icons\\INV_Misc_QuestionMark" --iconFileID not available on first login + local icon + if currencyType == 1 then -- Arena points + icon = "Interface/PVPFrame/PVP-ArenaPoints-Icon" + elseif currencyType == 2 then -- Honor points + icon = UnitFactionGroup("player") == "Alliance" and + "Interface/Icons/inv_misc_tournaments_symbol_human" or + "Interface/Icons/Achievement_PVP_H_16" + end + if itemID and iconFileID then + icon = icon or iconFileID or "Interface\\Icons\\INV_Misc_QuestionMark" -- iconFileID not available on first login Private.discovered_currencies[itemID] = "|T" .. icon .. ":0|t" .. name Private.discovered_currencies_sorted[itemID] = index elseif isHeader then @@ -2407,11 +2420,6 @@ Private.eventend_types = { ["custom"] = L["Custom"] } -Private.autoeventend_types = { - ["auto"] = L["Automatic"], - ["custom"] = L["Custom"] -} - Private.timedeventend_types = { ["timed"] = L["Timed"], } @@ -2455,7 +2463,7 @@ Private.grid_types = { LV = L["Left, then Centered Vertical"], RV = L["Right, then Centered Vertical"], HV = L["Centered Horizontal, then Centered Vertical"], - VH = L["Centered Vertical, then Centered Horizontal"], + VH = L["Centered Vertical, then Centered Horizontal"] } Private.centered_types_h = { @@ -2635,7 +2643,7 @@ Private.classification_types = { normal = L["Normal"], trivial = L["Trivial (Low Level)"] } -if WeakAuras.isAwesomeEnabled() then +if WeakAuras.IsAwesomeEnabled() then Private.classification_types.minus = L["Minus (Small Nameplate)"] end @@ -3498,8 +3506,8 @@ Private.array_entry_name_types = { -- the rest is auto-populated with indices which are valid entry name sources } +-- option types which can be used to generate entry names on arrays Private.name_source_option_types = { - -- option types which can be used to generate entry names on arrays input = true, number = true, range = true, @@ -3549,7 +3557,7 @@ Private.multiUnitId = { ["partypetsonly"] = true, ["raid"] = true, } -if WeakAuras.isAwesomeEnabled() then +if WeakAuras.IsAwesomeEnabled() then Private.multiUnitId["nameplate"] = true end @@ -3560,7 +3568,7 @@ Private.multiUnitUnits = { ["party"] = {}, ["raid"] = {} } -if WeakAuras.isAwesomeEnabled() then +if WeakAuras.IsAwesomeEnabled() then Private.multiUnitUnits["nameplate"] = {} end @@ -3583,7 +3591,6 @@ for i = 1, MAX_BOSS_FRAMES do Private.baseUnitId["boss"..i] = true Private.multiUnitUnits.boss["boss"..i] = true end - for i = 1, 5 do Private.baseUnitId["arena"..i] = true Private.multiUnitUnits.arena["arena"..i] = true @@ -3597,8 +3604,7 @@ for i = 1, 40 do Private.multiUnitUnits.group["raidpet"..i] = true Private.multiUnitUnits.raid["raidpet"..i] = true end - -if WeakAuras.isAwesomeEnabled() then +if WeakAuras.IsAwesomeEnabled() then for i = 1, 100 do Private.baseUnitId["nameplate"..i] = true Private.multiUnitUnits.nameplate["nameplate"..i] = true @@ -3707,6 +3713,55 @@ WeakAuras.StopMotion.animation_types = { progress = L["Progress"] } +do + local function addGlyphFromSpellID(id, sorted) + local name, _, icon = GetSpellInfo(id or 0) + if name and icon and not Private.glyph_types[id] then + Private.glyph_types[id] = "|T" .. icon .. ":0|t" .. name + table.insert(sorted, { glyphID = id, name = name }) + end + end + + local function addEquippedGlyphs(sorted) + for i = 1, GetNumGlyphSockets() or 6 do + local _, _, glyphID, icon = GetGlyphSocketInfo(i) + if glyphID and icon and not Private.glyph_types[glyphID] then + local name = GetSpellInfo(glyphID) + if name then + Private.glyph_types[glyphID] = "|T" .. icon .. ":0|t" .. name + table.insert(sorted, { glyphID = glyphID, name = name }) + end + end + end + end + + Private.InitializeGlyphs = function(glyphId) + Private.glyph_types = {} + Private.glyph_sorted = {} + local sorted = {} + + addEquippedGlyphs(sorted) + if glyphId then + if glyphId.single then + addGlyphFromSpellID(glyphId.single, sorted) + end + if glyphId.multi then + for _, id in ipairs(glyphId.multi) do + addGlyphFromSpellID(id, sorted) + end + end + end + + table.sort(sorted, function(a, b) + return a.name < b.name + end) + + for _, glyph in ipairs(sorted) do + table.insert(Private.glyph_sorted, glyph.glyphID) + end + end +end + Private.id_to_faction = { ["21"] = L["Booty Bay"], ["47"] = L["Ironforge"], diff --git a/WeakAuras/Types_ClassicPlus.lua b/WeakAuras/Types_ClassicPlus.lua index 7031e40..a4c47d7 100644 --- a/WeakAuras/Types_ClassicPlus.lua +++ b/WeakAuras/Types_ClassicPlus.lua @@ -3,7 +3,9 @@ local AddonName = ... local Private = select(2, ...) -- Talent Data for the Project Epoch Realm "Kezan" -if GetRealmName() ~= "Kezan" then return end +if not WeakAuras.IsClassicPlus() then + return +end Private.talentInfo = { ["DRUID"] = { diff --git a/WeakAuras/Types_TBC.lua b/WeakAuras/Types_TBC.lua index ea91ceb..c685ba3 100644 --- a/WeakAuras/Types_TBC.lua +++ b/WeakAuras/Types_TBC.lua @@ -3,9 +3,8 @@ local AddonName = ... local Private = select(2, ...) -- Talent Data for the Warmane TBC Realms "Onyxia" and "Blackrock TBC" -if GetRealmName() ~= "Onyxia" and - not (GetRealmName() == "Blackrock [PvP only]" and GetExpansionLevel() == 1) then - return +if not WeakAuras.IsTBC() then + return end Private.talentInfo = { diff --git a/WeakAuras/Types_Wrath.lua b/WeakAuras/Types_Wrath.lua index 6a307f9..01d4a37 100644 --- a/WeakAuras/Types_Wrath.lua +++ b/WeakAuras/Types_Wrath.lua @@ -3,11 +3,8 @@ local AddonName = ... local Private = select(2, ...) -- Talent Data for normal Wrath Realms -if GetRealmName() == "Onyxia" or - GetRealmName() == "Kezan" or - (GetRealmName() == "Blackrock [PvP only]" and GetExpansionLevel() == 1) - then - return +if not WeakAuras.IsWrath() then + return end Private.talentInfo = { diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index f22ad08..fc58e85 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -1,7 +1,7 @@ local AddonName = ... local Private = select(2, ...) -local internalVersion = 84 +local internalVersion = 85 -- Lua APIs local insert = table.insert @@ -869,31 +869,41 @@ local function LoadCustomActionFunctions(data) Private.customActionsFunctions[id] = {}; if (data.actions) then - if (data.actions.init and data.actions.init.do_custom and data.actions.init.custom) then - local func = WeakAuras.LoadFunction("return function() "..(data.actions.init.custom).."\n end"); - Private.customActionsFunctions[id]["init"] = func; + if data.actions.init then + if data.actions.init.do_custom and data.actions.init.custom then + local func = WeakAuras.LoadFunction("return function() "..(data.actions.init.custom).."\n end", data.id); + Private.customActionsFunctions[id]["init"] = func + end + if data.actions.init.do_custom_load and data.actions.init.customOnLoad then + local func = WeakAuras.LoadFunction("return function() "..(data.actions.init.customOnLoad).."\n end", data.id); + Private.customActionsFunctions[id]["load"] = func + end + if data.actions.init.do_custom_unload and data.actions.init.customOnUnload then + local func = WeakAuras.LoadFunction("return function() "..(data.actions.init.customOnUnload).."\n end", data.id); + Private.customActionsFunctions[id]["unload"] = func + end end if (data.actions.start) then if (data.actions.start.do_custom and data.actions.start.custom) then - local func = WeakAuras.LoadFunction("return function() "..(data.actions.start.custom).."\n end"); + local func = WeakAuras.LoadFunction("return function() "..(data.actions.start.custom).."\n end", data.id); Private.customActionsFunctions[id]["start"] = func; end if (data.actions.start.do_message and data.actions.start.message_custom) then - local func = WeakAuras.LoadFunction("return "..(data.actions.start.message_custom)); + local func = WeakAuras.LoadFunction("return "..(data.actions.start.message_custom), data.id); Private.customActionsFunctions[id]["start_message"] = func; end end if (data.actions.finish) then if (data.actions.finish.do_custom and data.actions.finish.custom) then - local func = WeakAuras.LoadFunction("return function() "..(data.actions.finish.custom).."\n end"); + local func = WeakAuras.LoadFunction("return function() "..(data.actions.finish.custom).."\n end", data.id); Private.customActionsFunctions[id]["finish"] = func; end if (data.actions.finish.do_message and data.actions.finish.message_custom) then - local func = WeakAuras.LoadFunction("return "..(data.actions.finish.message_custom)); + local func = WeakAuras.LoadFunction("return "..(data.actions.finish.message_custom), data.id); Private.customActionsFunctions[id]["finish_message"] = func; end end @@ -1127,6 +1137,8 @@ function Private.Login(takeNewSnapshots) db.history = nil end + coroutine.yield(3000, "login check uid corruption") + local toAdd = {}; loginFinished = false loginMessage = L["Options will open after the login process has completed."] @@ -1444,7 +1456,7 @@ local function scanForLoadsImpl(toCheck, event, arg1, ...) raidMemberType = raidMemberType + 2 end - local size, difficulty, instanceType = GetInstanceTypeAndSize() + local size, difficulty = GetInstanceTypeAndSize() local group = Private.ExecEnv.GroupType() local groupSize = GetNumGroupMembers() @@ -1459,8 +1471,8 @@ local function scanForLoadsImpl(toCheck, event, arg1, ...) if (data and not data.controlledChildren) then local loadFunc = loadFuncs[id]; local loadOpt = loadFuncsForOptions[id]; - shouldBeLoaded = loadFunc and loadFunc("ScanForLoads_Auras", inCombat, alive, pvp, vehicle, vehicleUi, mounted, player, realm, guild, class, race, faction, playerLevel, role, role, raidRole, group, groupSize, raidMemberType, zone, zoneId, subzone, size, difficulty); - couldBeLoaded = loadOpt and loadOpt("ScanForLoads_Auras", inCombat, alive, pvp, vehicle, vehicleUi, mounted, player, realm, guild, class, race, faction, playerLevel, role, role, raidRole, group, groupSize, raidMemberType, zone, zoneId, subzone, size, difficulty); + shouldBeLoaded = loadFunc and loadFunc("ScanForLoads_Auras", inCombat, alive, pvp, vehicle, vehicleUi, mounted, class, player, realm, guild, race, faction, playerLevel, role, role, raidRole, group, groupSize, raidMemberType, zone, zoneId, subzone, size, difficulty); + couldBeLoaded = loadOpt and loadOpt("ScanForLoads_Auras", inCombat, alive, pvp, vehicle, vehicleUi, mounted, class, player, realm, guild, race, faction, playerLevel, role, role, raidRole, group, groupSize, raidMemberType, zone, zoneId, subzone, size, difficulty); if(shouldBeLoaded and not loaded[id]) then changed = changed + 1; @@ -1622,6 +1634,13 @@ local function UnloadAll() for _, triggerSystem in pairs(triggerSystems) do triggerSystem.UnloadAll(); end + + for id in pairs(loaded) do + local func = Private.customActionsFunctions[id] and Private.customActionsFunctions[id]["unload"] + if func then + xpcall(func, Private.GetErrorHandlerId(id, "onUnload")) + end + end wipe(loaded); end @@ -1669,21 +1688,34 @@ function Private.LoadDisplays(toLoad, ...) for _, triggerSystem in pairs(triggerSystems) do triggerSystem.LoadDisplays(toLoad, ...); end + for id in pairs(toLoad) do + local func = Private.customActionsFunctions[id] and Private.customActionsFunctions[id]["load"] + if func then + xpcall(func, Private.GetErrorHandlerId(id, "onLoad")) + end + end end function Private.UnloadDisplays(toUnload, ...) + for id in pairs(toUnload) do + local func = Private.customActionsFunctions[id] and Private.customActionsFunctions[id]["unload"] + if func then + xpcall(func, Private.GetErrorHandlerId(id, "onUnload")) + end + end for _, triggerSystem in pairs(triggerSystems) do triggerSystem.UnloadDisplays(toUnload, ...); end for id in pairs(toUnload) do - - for i = 1, triggerState[id].numTriggers do - if (triggerState[id][i]) then - wipe(triggerState[id][i]); + if triggerState[id] then + for i = 1, triggerState[id].numTriggers do + if (triggerState[id][i]) then + wipe(triggerState[id][i]) + end end + triggerState[id].show = nil end - triggerState[id].show = nil; if (timers[id]) then for _, trigger in pairs(timers[id]) do @@ -1738,6 +1770,11 @@ function WeakAuras.Delete(data) local parentId = data.parent local parentUid = data.parent and db.displays[data.parent].uid + + if loaded[id] then + Private.UnloadDisplays({[id] = true}) + end + Private.callbacks:Fire("AboutToDelete", uid, id, parentUid, parentId) if(data.parent) then @@ -2212,6 +2249,7 @@ local function loadOrder(tbl, idtable) load(id, {}); coroutine.yield(100, "sort deps") end + return order end @@ -2258,7 +2296,7 @@ function Private.AddMany(tbl, takeSnapshots) else if next(WeakAuras.LoadFromArchive("Repository", "migration").stores) ~= nil then timer:ScheduleTimer(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 assitance on https://discord.gg/UXSc7nt."]) end, 1) end end @@ -2701,7 +2739,7 @@ function WeakAuras.PreAdd(data, snapshot) end end validateUserConfig(data, data.authorOptions, data.config) - if not(WeakAuras.isAwesomeEnabled()) then + if not(WeakAuras.IsAwesomeEnabled()) then removeNameplateUnitsAndAnchors(data) end data.init_started = nil @@ -2789,7 +2827,7 @@ function pAdd(data, simpleChange) Private.ClearAuraEnvironment(parent.id); end - db.displays[id] = data; + db.displays[id] = data if (not data.triggers.activeTriggerMode or data.triggers.activeTriggerMode > #data.triggers) then data.triggers.activeTriggerMode = Private.trigger_modes.first_active; @@ -2811,11 +2849,11 @@ function pAdd(data, simpleChange) loadEvents["SCAN_ALL"][id] = true local loadForOptionsFuncStr = ConstructFunction(load_prototype, data.load, true); - local loadFunc = Private.LoadFunction(loadFuncStr); - local loadForOptionsFunc = Private.LoadFunction(loadForOptionsFuncStr); + local loadFunc = Private.LoadFunction(loadFuncStr, id); + local loadForOptionsFunc = Private.LoadFunction(loadForOptionsFuncStr, id); local triggerLogicFunc; if data.triggers.disjunctive == "custom" then - triggerLogicFunc = WeakAuras.LoadFunction("return "..(data.triggers.customTriggerLogic or "")); + triggerLogicFunc = WeakAuras.LoadFunction("return "..(data.triggers.customTriggerLogic or ""), data.id); end LoadCustomActionFunctions(data); @@ -3005,8 +3043,8 @@ local function EnsureRegion(id) -- So we go up the list of parents and collect auras that must be created -- If we find a parent already exists, we can stop - local aurasToCreate = {} + while(id) do local data = WeakAuras.GetData(id) tinsert(aurasToCreate, data.id) @@ -3771,17 +3809,11 @@ do end end -function WeakAuras.GetAuraTooltipInfo(unit, index, filter) - local tooltip = WeakAuras.GetHiddenTooltip(); - tooltip:ClearLines(); - tooltip:SetUnitAura(unit, index, filter); - local tooltipTextLine = select(3, tooltip:GetRegions()) - - local tooltipText = tooltipTextLine and tooltipTextLine:GetObjectType() == "FontString" and tooltipTextLine:GetText() or ""; +function Private.ParseTooltipText(tooltipText) local debuffType = "none"; local tooltipSize = {}; if(tooltipText) then - for t in tooltipText:gmatch("(%d[%d%.,]*)") do + for t in tooltipText:gmatch("(-?%d[%d%.,]*)") do if (LARGE_NUMBER_SEPERATOR == ",") then t = t:gsub(",", ""); else @@ -3799,6 +3831,17 @@ function WeakAuras.GetAuraTooltipInfo(unit, index, filter) end end +function WeakAuras.GetAuraTooltipInfo(unit, index, filter) + local tooltipText = "" + local tooltip = WeakAuras.GetHiddenTooltip(); + tooltip:ClearLines(); + tooltip:SetUnitAura(unit, index, filter); + local tooltipTextLine = select(3, tooltip:GetRegions()) + tooltipText = tooltipTextLine and tooltipTextLine:GetObjectType() == "FontString" and tooltipTextLine:GetText() or ""; + + return Private.ParseTooltipText(tooltipText) +end + local FrameTimes = {}; function WeakAuras.ProfileFrames(all) UpdateAddOnCPUUsage(); diff --git a/WeakAuras/WeakAuras.toc b/WeakAuras/WeakAuras.toc index f03e9c3..5f2f390 100644 --- a/WeakAuras/WeakAuras.toc +++ b/WeakAuras/WeakAuras.toc @@ -1,7 +1,7 @@ ## Interface: 30300 ## Title: WeakAuras ## Author: The WeakAuras Team -## Version: 5.19.9 +## Version: 5.19.10 ## X-Flavor: 3.3.5 ## Notes: A powerful, comprehensive utility for displaying graphics and information based on buffs, debuffs, and other triggers. ## Notes-esES: Potente y completa aplicación que te permitirá mostrar por pantalla múltiples diseños, basados en beneficios, perjuicios y otros activadores. diff --git a/WeakAurasModelPaths/WeakAurasModelPaths.toc b/WeakAurasModelPaths/WeakAurasModelPaths.toc index 3d80be0..c7567be 100644 --- a/WeakAurasModelPaths/WeakAurasModelPaths.toc +++ b/WeakAurasModelPaths/WeakAurasModelPaths.toc @@ -1,7 +1,7 @@ ## Interface: 30300 ## Title: WeakAuras Model Paths ## Author: The WeakAuras Team -## Version: 5.19.9 +## Version: 5.19.10 ## Notes: Model paths for WeakAuras ## Notes-esES: Las rutas de modelos para WeakAuras ## Notes-esMX: Las rutas de modelos para WeakAuras diff --git a/WeakAurasOptions/ActionOptions.lua b/WeakAurasOptions/ActionOptions.lua index 2c1c96a..f6ba0f3 100644 --- a/WeakAurasOptions/ActionOptions.lua +++ b/WeakAurasOptions/ActionOptions.lua @@ -79,13 +79,25 @@ function OptionsPrivate.GetActionOptions(data) args = { init_header = { type = "header", - name = L["On Init"], - order = 0.005 + name = L["Custom Functions"], + order = 0.1 }, init_do_custom = { type = "toggle", - name = L["Custom"], - order = 0.011, + name = L["Custom Init"], + order = 0.2, + width = WeakAuras.doubleWidth + }, + init_do_custom_load = { + type = "toggle", + name = L["Custom Load"], + order = 0.3, + width = WeakAuras.doubleWidth + }, + init_do_custom_unload = { + type = "toggle", + name = L["Custom Unload"], + order = 0.4, width = WeakAuras.doubleWidth }, -- texteditor added here by AddCodeOption @@ -1086,7 +1098,12 @@ function OptionsPrivate.GetActionOptions(data) -- Text format option helpers OptionsPrivate.commonOptions.AddCodeOption(action.args, data, L["Custom Code"], "init", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#on-init", - 0.011, function() return not data.actions.init.do_custom end, {"actions", "init", "custom"}, true); + 0.21, function() return not data.actions.init.do_custom end, {"actions", "init", "custom"}, true) + + OptionsPrivate.commonOptions.AddCodeOption(action.args, data, L["Custom Code"], "customOnLoad", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#on-load", + 0.31, function() return not data.actions.init.do_custom_load end, {"actions", "init", "customOnLoad"}, true) + OptionsPrivate.commonOptions.AddCodeOption(action.args, data, L["Custom Code"], "customOnUnload", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#on-unload", + 0.41, function() return not data.actions.init.do_custom_unload end, {"actions", "init", "customOnUnload"}, true) OptionsPrivate.commonOptions.AddCodeOption(action.args, data, L["Custom Code"], "start_message", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#chat-message---custom-code", 5, function() return not (data.actions.start.do_message and (OptionsPrivate.Private.ContainsCustomPlaceHolder(data.actions.start.message) or (data.actions.start.message_type == "WHISPER" and OptionsPrivate.Private.ContainsCustomPlaceHolder(data.actions.start.message_dest)))) end, {"actions", "start", "message_custom"}, false); diff --git a/WeakAurasOptions/Changelog.lua b/WeakAurasOptions/Changelog.lua index a46c7f4..1c4e025 100644 --- a/WeakAurasOptions/Changelog.lua +++ b/WeakAurasOptions/Changelog.lua @@ -4,31 +4,46 @@ local AddonName = ... local OptionsPrivate = select(2, ...) OptionsPrivate.changelog = { - versionString = '5.19.9', - dateString = '2025-04-25', - fullChangeLogUrl = 'https://github.com/WeakAuras/WeakAuras2/compare/5.19.8...5.19.9', + versionString = '5.19.10', + dateString = '2025-05-31', + fullChangeLogUrl = 'https://github.com/WeakAuras/WeakAuras2/compare/5.19.9...5.19.10', highlightText = [==[ -- Currency trigger: Add type checking to guard against unexpected data -- Unit Characteristics trigger: add creature type & family -- TSUHelper: hide __changed from pairs()]==], commitText = [==[InfusOnWoW (4): +Fix babelfish.lua writing]==], commitText = [==[InfusOnWoW (19): -- Bump .toc files -- Icon: If OmniCC or ElvUI are installed hide blizzard cooldown numbers -- Currency trigger: Add type checking to guard against unexpected data -- Unit Characteristics trigger: add creature type & family -- TSUHelper: hide __changed from pairs() +- Fix babelfish.lua writing +- Localization: Restore a few accidentally dropped english translations +- Add a pride month logo and use it in June +- Guard against duration being 0 leading to division by zero error +- Revert "State: Don't put the trigger table into the state" +- Update Atlas File List from wago.tools +- Update Discord List +- Update Discord List +- State: Don't put the trigger table into the state +- Fix "Negator" localization +- Boss Mod Trigger: Fix count condition +- Rework TextEditor's edit error handling +- Update Discord List +- Sub Element Anchoring: Make options a bit less confussing +- Rename "Nameplate Type" to "Hostility" +- Unit Characteristics/Health/Power trigger +- On loadstring error, print a better hint where the error comes form +- Add a onLoad/onUnload custom function - Update Discord List -Stanzilla (2): +Stanzilla (4): +- Update WeakAurasModelPaths from wago.tools +- Update WeakAurasModelPaths from wago.tools - Update WeakAurasModelPaths from wago.tools - Update WeakAurasModelPaths from wago.tools -mrbuds (3): +mrbuds (5): -- Unit Characteristics trigger: add creature type & family (Retail only) -- Textute Atlas Picker: use C_Texture.GetAtlasElements on Retail -- TSUHelper: hide __changed from pairs() +- Add an "Assisted Combat Next Cast" trigger for 11.1.7 +- Fix typo +- Use spellId arg of SPELL_UPDATE_COOLDOWN +- BossMod Announce: fix count condition +- Fix tooltips with custom code using unitAuraInstanceID ]==] } diff --git a/WeakAurasOptions/CommonOptions.lua b/WeakAurasOptions/CommonOptions.lua index 138d2ef..29068f6 100644 --- a/WeakAurasOptions/CommonOptions.lua +++ b/WeakAurasOptions/CommonOptions.lua @@ -1410,7 +1410,13 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g xOffset = { type = "range", control = "WeakAurasSpinBox", - name = L["X Offset"], + name = function() + if data.anchor_mode == "area" then + return L["Extra Width"] + else + return L["X Offset"] + end + end, order = 79, width = WeakAuras.normalWidth, softMin = (-1 * screenWidth), @@ -1430,7 +1436,13 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g yOffset = { type = "range", control = "WeakAurasSpinBox", - name = L["Y Offset"], + name = function() + if data.anchor_mode == "area" then + return L["Extra Height"] + else + return L["Y Offset"] + end + end, order = 80, width = WeakAuras.normalWidth, softMin = (-1 * screenHeight), @@ -1945,7 +1957,7 @@ local function AddCodeOption(args, data, name, prefix, url, order, hiddenFunc, p code = "return " .. code; - local loadedFunction, errorString = OptionsPrivate.Private.LoadFunction(code, true); + local loadedFunction, errorString = OptionsPrivate.Private.LoadFunction(code, data.id, true); if not errorString then if options.validator then diff --git a/WeakAurasOptions/Locales/deDE.lua b/WeakAurasOptions/Locales/deDE.lua index 3a82298..46ee94c 100644 --- a/WeakAurasOptions/Locales/deDE.lua +++ b/WeakAurasOptions/Locales/deDE.lua @@ -38,6 +38,10 @@ local L = WeakAuras.L L["%s - Finish Custom Text"] = "%s - Benutzerdefinierter Endtext" L["%s - Init Action"] = "%s - Initialisierung" L["%s - Main"] = "%s - Haupt" + --[[Translation missing --]] + L["%s - OnLoad"] = "%s - OnLoad" + --[[Translation missing --]] + L["%s - OnUnload"] = "%s - OnUnload" L["%s - Option #%i has the key %s. Please choose a different option key."] = "Die %s - Option #%i hat bereits den Schlüssel %s. Bitte wähle einen anderen Optionsschlüssel." L["%s - Rotate Animation"] = "%s - Rotierungsanimation" L["%s - Scale Animation"] = "%s - Skalierungsanimation" @@ -356,6 +360,12 @@ Off Screen]=] --[[Translation missing --]] L["Custom Frames"] = "Custom Frames" --[[Translation missing --]] + L["Custom Functions"] = "Custom Functions" + --[[Translation missing --]] + L["Custom Init"] = "Custom Init" + --[[Translation missing --]] + L["Custom Load"] = "Custom Load" + --[[Translation missing --]] L["Custom Options"] = "Custom Options" L["Custom Trigger"] = "Benutzerdefinierter Auslöser" L["Custom trigger event tooltip"] = [=[Wähle die Ereignisse, die den benutzerdefinierten Auslöser aufrufen sollen. @@ -373,6 +383,8 @@ UNIT_POWER, UNIT_AURA PLAYER_TARGET_CHANGED]=] L["Custom Trigger: Ignore Lua Errors on OPTIONS event"] = "Custom Trigger: Ignore Lua Errors on OPTIONS event" --[[Translation missing --]] L["Custom Trigger: Send fake events instead of STATUS event"] = "Custom Trigger: Send fake events instead of STATUS event" + --[[Translation missing --]] + L["Custom Unload"] = "Custom Unload" L["Custom Untrigger"] = "Benutzerdefinierter Umkehrauslöser" --[[Translation missing --]] L["Debug Log"] = "Debug Log" @@ -877,7 +889,6 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] --[[Translation missing --]] L["ON"] = "ON" L["On Hide"] = "Beim Ausblenden" - L["On Init"] = "Beim Initialisieren" L["On Show"] = "Beim Einblenden" --[[Translation missing --]] L["Only Match auras cast by a player (not an npc)"] = "Only Match auras cast by a player (not an npc)" diff --git a/WeakAurasOptions/Locales/enUS.lua b/WeakAurasOptions/Locales/enUS.lua index 268a3f0..b0b3197 100644 --- a/WeakAurasOptions/Locales/enUS.lua +++ b/WeakAurasOptions/Locales/enUS.lua @@ -37,6 +37,8 @@ local L = WeakAuras.L L["%s - Finish Custom Text"] = "%s - Finish Custom Text" L["%s - Init Action"] = "%s - Init Action" L["%s - Main"] = "%s - Main" + L["%s - OnLoad"] = "%s - OnLoad" + L["%s - OnUnload"] = "%s - OnUnload" L["%s - Option #%i has the key %s. Please choose a different option key."] = "%s - Option #%i has the key %s. Please choose a different option key." L["%s - Rotate Animation"] = "%s - Rotate Animation" L["%s - Scale Animation"] = "%s - Scale Animation" @@ -166,7 +168,13 @@ Enable this setting if you want this timer to be hidden, or when using a WeakAur L["Animates progress changes"] = "Animates progress changes" L["Animation End"] = "Animation End" L["Animation Mode"] = "Animation Mode" - L["Animation relative duration description"] = "Animation relative duration description" + L["Animation relative duration description"] = [=[The duration of the animation relative to the duration of the display, expressed as a fraction (1/2), percentage (50%), or decimal (0.5). +|cFFFF0000Note:|r if a display does not have progress (it has a non-timed event trigger, is an aura with no duration, etc.), the animation will not play. + +|cFF4444FFFor Example:|r +If the animation's duration is set to |cFF00CC0010%|r, and the display's trigger is a buff that lasts 20 seconds, the start animation will play for 2 seconds. +If the animation's duration is set to |cFF00CC0010%|r, and the display's trigger is a buff that has no set duration, no start animation will play (although it would if you specified a duration in seconds)." +]=] L["Animation Sequence"] = "Animation Sequence" L["Animation Start"] = "Animation Start" L["Any of"] = "Any of" @@ -265,12 +273,33 @@ Off Screen]=] L["Custom Code"] = "Custom Code" L["Custom Code Viewer"] = "Custom Code Viewer" L["Custom Frames"] = "Custom Frames" + L["Custom Functions"] = "Custom Functions" + L["Custom Init"] = "Custom Init" + L["Custom Load"] = "Custom Load" L["Custom Options"] = "Custom Options" L["Custom Trigger"] = "Custom Trigger" - L["Custom trigger event tooltip"] = "Custom trigger event tooltip" - L["Custom trigger status tooltip"] = "Custom trigger status tooltip" + L["Custom trigger event tooltip"] = [=[Choose which events cause the custom trigger to be checked. Multiple events can be specified using commas or spaces. +• "UNIT" events can use colons to define which unitIDs will be registered. In addition to UnitIDs Unit types can be used, they include "nameplate", "group", "raid", "party", "arena", "boss". +• "CLEU" can be used instead of COMBAT_LOG_EVENT_UNFILTERED and colons can be used to separate specific "subEvents" you want to receive. +• The keyword "TRIGGER" can be used, with colons separating trigger numbers, to have the custom trigger get updated when the specified trigger(s) update. + +|cFF4444FFFor example:|r +UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:SPELL_CAST_SUCCESS TRIGGER:3:1 +]=] + L["Custom trigger status tooltip"] = [=[Choose which events cause the custom trigger to be checked. Multiple events can be specified using commas or spaces. + +• "UNIT" events can use colons to define which unitIDs will be registered. In addition to UnitIDs Unit types can be used, they include "nameplate", "group", "raid", "party", "arena", "boss". +• "CLEU" can be used instead of COMBAT_LOG_EVENT_UNFILTERED and colons can be used to separate specific "subEvents" you want to receive. +• The keyword "TRIGGER" can be used, with colons separating trigger numbers, to have the custom trigger get updated when the specified trigger(s) update. + +Since this is a status-type trigger, the specified events may be called by WeakAuras without the expected arguments. + +|cFF4444FFFor example:|r +UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:SPELL_CAST_SUCCESS TRIGGER:3:1 +]=] L["Custom Trigger: Ignore Lua Errors on OPTIONS event"] = "Custom Trigger: Ignore Lua Errors on OPTIONS event" L["Custom Trigger: Send fake events instead of STATUS event"] = "Custom Trigger: Send fake events instead of STATUS event" + L["Custom Unload"] = "Custom Unload" L["Custom Untrigger"] = "Custom Untrigger" L["Debug Log"] = "Debug Log" L["Debug Log:"] = "Debug Log:" @@ -404,7 +433,7 @@ Bleed classification via LibDispel]=] L["Glow Type"] = "Glow Type" L["Green Rune"] = "Green Rune" L["Grid direction"] = "Grid direction" - L["Group (verb)"] = "Group (verb)" + L["Group (verb)"] = "Group" L["Group Alpha"] = "Group Alpha" L[ [=[Group and anchor each auras by frame. @@ -415,7 +444,17 @@ Bleed classification via LibDispel]=] - Nameplates: attach to nameplates per unit. - Unit Frames: attach to unit frame buttons per unit. - Custom Frames: choose which frame each region should be anchored to.]=] - L["Group aura count description"] = "Group aura count description" + L["Group aura count description"] = [=[The amount of units of type '%s' which must be affected by one or more of the given auras for the display to trigger. +If the entered number is a whole number (e.g. 5), the number of affected units will be compared with the entered number. +If the entered number is a decimal (e.g. 0.5), fraction (e.g. 1/2), or percentage (e.g. 50%%), then that fraction of the %s must be affected. + +|cFF4444FFFor example:|r +|cFF00CC00> 0|r will trigger when any unit of type '%s' is affected +|cFF00CC00= 100%%|r will trigger when every unit of type '%s' is affected +|cFF00CC00!= 2|r will trigger when the number of units of type '%s' affected is not exactly 2 +|cFF00CC00<= 0.8|r will trigger when less than 80%% of the units of type '%s' is affected (4 of 5 party members, 8 of 10 or 20 of 25 raid members) +|cFF00CC00> 1/2|r will trigger when more than half of the units of type '%s' is affected +]=] L["Group by Frame"] = "Group by Frame" L["Group Description"] = "Group Description" L["Group Icon"] = "Group Icon" @@ -541,15 +580,18 @@ Bleed classification via LibDispel]=] L["Move Up"] = "Move Up" L["Moving auras: "] = "Moving auras: " L["Multiple Displays"] = "Multiple Displays" - L["Multiselect ignored tooltip"] = "Multiselect ignored tooltip" - L["Multiselect multiple tooltip"] = "Multiselect multiple tooltip" - L["Multiselect single tooltip"] = "Multiselect single tooltip" + L["Multiselect ignored tooltip"] = [=[|cFFFF0000Ignored|r - |cFF777777Single|r - |cFF777777Multiple|r +This option will not be used to determine when this display should load]=] + L["Multiselect multiple tooltip"] = [=[|cFF777777Ignored|r - |cFF777777Single|r - |cFF00FF00Multiple|r +Any number of matching values can be picked]=] + L["Multiselect single tooltip"] = [=[|cFF777777Ignored|r - |cFF00FF00Single|r - |cFF777777Multiple|r +Only a single matching value can be picked]=] L["Must be a power of 2"] = "Must be a power of 2" L["Name - The name of the display (usually an aura name), or the display's ID if there is no dynamic name"] = "Name - The name of the display (usually an aura name), or the display's ID if there is no dynamic name" L["Name Info"] = "Name Info" L["Name Pattern Match"] = "Name Pattern Match" L["Name:"] = "Name:" - L["Negator"] = "Negator" + L["Negator"] = "Not" L["New Aura"] = "New Aura" L["New Template"] = "New Template" L["New Value"] = "New Value" @@ -587,7 +629,6 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] L["Okay"] = "Okay" L["ON"] = "ON" L["On Hide"] = "On Hide" - L["On Init"] = "On Init" L["On Show"] = "On Show" L["Only Match auras cast by a player (not an npc)"] = "Only Match auras cast by a player (not an npc)" L["Only match auras cast by people other than the player or their pet"] = "Only match auras cast by people other than the player or their pet" @@ -690,7 +731,7 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] L["Shadow Color"] = "Shadow Color" L["Shadow X Offset"] = "Shadow X Offset" L["Shadow Y Offset"] = "Shadow Y Offset" - L["Shift-click to create chat link"] = "Shift-click to create chat link" + L["Shift-click to create chat link"] = "Shift-click to create a |cFF8800FF[Chat Link]" L["Show \"Edge\""] = "Show \"Edge\"" L["Show \"Swipe\""] = "Show \"Swipe\"" L["Show and Clone Settings"] = "Show and Clone Settings" @@ -859,8 +900,8 @@ Upgrade your version of WeakAuras or wait for next release before installing thi L["Url: %s"] = "Url: %s" L["Use Display Info Id"] = "Use Display Info Id" L["Use SetTransform"] = "Use SetTransform" - L["Used in Auras:"] = "Used in Auras:" L["Used in auras:"] = "Used in auras:" + L["Used in Auras:"] = "Used in Auras:" L["Uses Texture Coordinates to rotate the texture."] = "Uses Texture Coordinates to rotate the texture." L["Uses UnitIsVisible() to check if game client has loaded a object for this unit. This distance is around 100 yards. This is polled every second."] = "Uses UnitIsVisible() to check if game client has loaded a object for this unit. This distance is around 100 yards. This is polled every second." L["Value"] = "Value" diff --git a/WeakAurasOptions/Locales/esES.lua b/WeakAurasOptions/Locales/esES.lua index 8d4acd9..788b604 100644 --- a/WeakAurasOptions/Locales/esES.lua +++ b/WeakAurasOptions/Locales/esES.lua @@ -37,6 +37,8 @@ local L = WeakAuras.L L["%s - Finish Custom Text"] = "%s - Texto personalizado de terminación" L["%s - Init Action"] = "%s - Iniciar acción" L["%s - Main"] = "%s - Principal" + L["%s - OnLoad"] = "%s - Cargar" + L["%s - OnUnload"] = "%s - Descargar" L["%s - Option #%i has the key %s. Please choose a different option key."] = "%s - La opción #%i tiene un clave %s. Por favor selecciona un clave diferente." L["%s - Rotate Animation"] = "%s - Rotar animación" L["%s - Scale Animation"] = "%s - Redimensionar animación" @@ -141,8 +143,8 @@ Enable this setting if you want this timer to be hidden, or when using a WeakAur L["Anchor Mode"] = "Modo de anclaje" L["Anchor Point"] = "Punto de anclaje" L["Anchored To"] = "Anclado a" - L["And "] = "y" L["and"] = "y" + L["And "] = "y" L["and %s"] = "y %s" L["and aligned left"] = "y alineado a la izquierda" L["and aligned right"] = "y alineado a la derecha" @@ -261,12 +263,16 @@ Off Screen]=] ] = "El aura está fuera de la pantalla" L["Custom Code"] = "Código Personalizado" L["Custom Code Viewer"] = "Visor de código personalizado" L["Custom Frames"] = "Marcos personalizados" + L["Custom Functions"] = "Funciones personalizadas" + L["Custom Init"] = "Inicialización personalizada" + L["Custom Load"] = "Carga personalizada" L["Custom Options"] = "Opciones personalizadas" L["Custom Trigger"] = "Activador personalizado" L["Custom trigger event tooltip"] = "Información sobre eventos de activador personalizado" L["Custom trigger status tooltip"] = "Información sobre el estado del activador personalizado" L["Custom Trigger: Ignore Lua Errors on OPTIONS event"] = "Activador personalizado: ignorar errores de Lua en el evento OPCIONES" L["Custom Trigger: Send fake events instead of STATUS event"] = "Activador personalizado: enviar eventos falsos en lugar del evento STATUS" + L["Custom Unload"] = "Descarga personalizada" L["Custom Untrigger"] = "No-activador personalizado" L["Debug Log"] = "Registro de depuración" L["Debug Log:"] = "Registro de depuración:" @@ -582,7 +588,6 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] ] = "Ocurrencia d L["Okay"] = "Aceptar" L["ON"] = "ACTIVO" L["On Hide"] = "Ocultar" - L["On Init"] = "Al iniciar" L["On Show"] = "Mostrar" L["Only Match auras cast by a player (not an npc)"] = "Coincidir solo con auras lanzadas por un jugador (no un pnj)" L["Only match auras cast by people other than the player or their pet"] = "Coincidir solo con auras lanzadas por personas que no sean el jugador o su mascota." diff --git a/WeakAurasOptions/Locales/esMX.lua b/WeakAurasOptions/Locales/esMX.lua index 76b9ed0..a21fc96 100644 --- a/WeakAurasOptions/Locales/esMX.lua +++ b/WeakAurasOptions/Locales/esMX.lua @@ -37,6 +37,8 @@ local L = WeakAuras.L L["%s - Finish Custom Text"] = "%s - Texto personalizado de terminación" L["%s - Init Action"] = "%s - Iniciar acción" L["%s - Main"] = "%s - Principal" + L["%s - OnLoad"] = "%s - Cargar" + L["%s - OnUnload"] = "%s - Descargar" L["%s - Option #%i has the key %s. Please choose a different option key."] = "%s - La opción #%i tiene un clave %s. Por favor selecciona un clave diferente." L["%s - Rotate Animation"] = "%s - Rotar animación" L["%s - Scale Animation"] = "%s - Redimensionar animación" @@ -261,12 +263,16 @@ Off Screen]=] ] = "Aura está fuera de la pantalla" L["Custom Code"] = "Código Personalizado" L["Custom Code Viewer"] = "Visor de código personalizado" L["Custom Frames"] = "Marcos personalizados" + L["Custom Functions"] = "Funciones personalizadas" + L["Custom Init"] = "Inicialización personalizada" + L["Custom Load"] = "Carga personalizada" L["Custom Options"] = "Opciones personalizadas" L["Custom Trigger"] = "Activador personalizado" L["Custom trigger event tooltip"] = "Información sobre eventos de activador personalizado" L["Custom trigger status tooltip"] = "Información sobre el estado del activador personalizado" L["Custom Trigger: Ignore Lua Errors on OPTIONS event"] = "Activador personalizado: ignorar errores de Lua en el evento OPCIONES" L["Custom Trigger: Send fake events instead of STATUS event"] = "Activador personalizado: enviar eventos falsos en lugar del evento STATUS" + L["Custom Unload"] = "Descarga personalizada" L["Custom Untrigger"] = "No-activador personalizado" L["Debug Log"] = "Registro de depuración" L["Debug Log:"] = "Registro de depuración:" @@ -582,7 +588,6 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] ] = "Ocurrencia d L["Okay"] = "Aceptar" L["ON"] = "ACTIVO" L["On Hide"] = "Ocultar" - L["On Init"] = "Al iniciar" L["On Show"] = "Mostrar" L["Only Match auras cast by a player (not an npc)"] = "Coincidir solo con auras lanzadas por un jugador (no un pnj)" L["Only match auras cast by people other than the player or their pet"] = "Coincidir solo con auras lanzadas por personas que no sean el jugador o su mascota." @@ -853,8 +858,8 @@ Upgrade your version of WeakAuras or wait for next release before installing thi L["Url: %s"] = "URL: %s" L["Use Display Info Id"] = "Utilizar ID de información de la visualización" L["Use SetTransform"] = "Utilizar SetTransform" - L["Used in Auras:"] = "Utilizado en auras:" L["Used in auras:"] = "Utilizado en auras:" + L["Used in Auras:"] = "Utilizado en auras:" L["Uses Texture Coordinates to rotate the texture."] = "Utiliza coordenadas de textura para rotar la textura." L["Uses UnitIsVisible() to check if game client has loaded a object for this unit. This distance is around 100 yards. This is polled every second."] = "Utiliza UnitIsVisible() para comprobar si el cliente del juego ha cargado un objeto para esta unidad. Esta distancia es de unos 100 metros. Esto se encuesta cada segundo." L["Value"] = "Valor" diff --git a/WeakAurasOptions/Locales/frFR.lua b/WeakAurasOptions/Locales/frFR.lua index 375a417..a4b441c 100644 --- a/WeakAurasOptions/Locales/frFR.lua +++ b/WeakAurasOptions/Locales/frFR.lua @@ -10,14 +10,14 @@ local L = WeakAuras.L L[" and |cFFFF0000mirrored|r"] = "et |cFFFF0000mirrored|r" L["-- Do not remove this comment, it is part of this aura: "] = "-- Ne supprimez pas ce commentaire, il fait partie de cette aura :" L[" rotated |cFFFF0000%s|r degrees"] = "degrés de |cFFFF0000%s|r rotation" - L["% - To show a percent sign"] = "% - Pour afficher un symbole de pourcentage" + L["% - To show a percent sign"] = "% - Pour afficher un signe de pourcentage" L["% of Progress"] = "% de progression" L["%d |4aura:auras; added"] = "%d |4aura:auras; ajoutée(s)" L["%d |4aura:auras; deleted"] = "%d |4aura:auras; supprimée(s)" L["%d |4aura:auras; modified"] = "%d |4aura:auras; modifiée(s)" L["%d |4aura:auras; with meta data modified"] = "%d |4aura:auras; avec métadonnées modifiées" L["%d displays loaded"] = "%d affichages chargés" - L["%d displays not loaded"] = "%d affichages non chargés" + L["%d displays not loaded"] = "%d affichages non chargé" L["%d displays on standby"] = "%d affichages en attente" L["%i auras selected"] = "%i auras sélectionnées" L["%i."] = "%i." @@ -37,6 +37,10 @@ local L = WeakAuras.L L["%s - Finish Custom Text"] = "%s - Terminer le texte personnalisé" L["%s - Init Action"] = "%s - Initialiser l'action" L["%s - Main"] = "%s - Principal" + --[[Translation missing --]] + L["%s - OnLoad"] = "%s - OnLoad" + --[[Translation missing --]] + L["%s - OnUnload"] = "%s - OnUnload" L["%s - Option #%i has the key %s. Please choose a different option key."] = "%s - L'option #%i est actuellement attribuée à la touche %s. Veuillez choisir une touche différente." L["%s - Rotate Animation"] = "%s - Rotation de l'animation" L["%s - Scale Animation"] = "%s - Animation de l'échelle" @@ -107,9 +111,7 @@ local L = WeakAuras.L L["|cFFffcc00Font Flags:|r |cFFFF0000%s|r and shadow |c%sColor|r with offset |cFFFF0000%s/%s|r%s%s"] = "|cFFffcc00Font Flags:|r |cFFFF0000%s|r and shadow |c%sColor|r with offset |cFFFF0000%s/%s|r%s%s" --[[Translation missing --]] L["|cFFffcc00Font Flags:|r |cFFFF0000%s|r and shadow |c%sColor|r with offset |cFFFF0000%s/%s|r%s%s%s"] = "|cFFffcc00Font Flags:|r |cFFFF0000%s|r and shadow |c%sColor|r with offset |cFFFF0000%s/%s|r%s%s%s" - --[[Translation missing --]] - L["|cffffcc00Format Options|r"] = "|cffffcc00Format Options|r" - --[[Translation missing --]] + L["|cffffcc00Format Options|r"] = "|cffffcc00Options de formatage|r" L[ [=[• |cff00ff00Player|r, |cff00ff00Target|r, |cff00ff00Focus|r, and |cff00ff00Pet|r correspond directly to those individual unitIDs. • |cff00ff00Specific Unit|r lets you provide a specific valid unitID to watch. |cffff0000Note|r: The game will not fire events for all valid unitIDs, making some untrackable by this trigger. @@ -118,15 +120,7 @@ local L = WeakAuras.L • |cffffff00Multi-target|r attempts to use the Combat Log events, rather than unitID, to track affected units. |cffff0000Note|r: Without a direct relationship to actual unitIDs, results may vary. -|cffffff00*|r Yellow Unit settings can match multiple units and will default to being active even while no affected units are found without a Unit Count or Match Count setting.]=] ] = [=[• |cff00ff00Player|r, |cff00ff00Target|r, |cff00ff00Focus|r, and |cff00ff00Pet|r correspond directly to those individual unitIDs. -• |cff00ff00Specific Unit|r lets you provide a specific valid unitID to watch. -|cffff0000Note|r: The game will not fire events for all valid unitIDs, making some untrackable by this trigger. -• |cffffff00Party|r, |cffffff00Raid|r, |cffffff00Boss|r, |cffffff00Arena|r, and |cffffff00Nameplate|r can match multiple corresponding unitIDs. -• |cffffff00Smart Group|r adjusts to your current group type, matching just the "player" when solo, "party" units (including "player") in a party or "raid" units in a raid. -• |cffffff00Multi-target|r attempts to use the Combat Log events, rather than unitID, to track affected units. -|cffff0000Note|r: Without a direct relationship to actual unitIDs, results may vary. - -|cffffff00*|r Yellow Unit settings can match multiple units and will default to being active even while no affected units are found without a Unit Count or Match Count setting.]=] +|cffffff00*|r Yellow Unit settings can match multiple units and will default to being active even while no affected units are found without a Unit Count or Match Count setting.]=] ] = "• |cff00ff00Joueur|r, |cff00ff00Cible|r, |cff00ff00Focalisation|r et |cff00ff00Familier|r correspondent directement à ces identifiants d’unité (unitIDs) individuels. • |cff00ff00Unité spécifique|r permet d’indiquer un identifiant d’unité valide à surveiller. |cffff0000Remarque|r : Le jeu ne déclenche pas d’événements pour tous les identifiants d’unité valides, ce qui rend certains non détectables par ce déclencheur. • |cffffff00Groupe|r, |cffffff00Raid|r, |cffffff00Boss|r, |cffffff00Arène|r et |cffffff00Plaque de nom|r peuvent correspondre à plusieurs identifiants d’unité associés. • |cffffff00Groupe intelligent|r s’adapte à votre type de groupe actuel : il correspond uniquement au \"joueur\" en solo, aux unités \"groupe\" (y compris \"joueur\") en groupe, ou aux unités \"raid\" en raid. • |cffffff00Cibles multiples|r tente d’utiliser les événements du journal de combat (Combat Log), plutôt que les unitIDs, pour suivre les unités affectées. |cffff0000Remarque|r : En l’absence de lien direct avec des unitIDs réels, les résultats peuvent varier. |cffffff00\\*|r Les paramètres d’unité en jaune peuvent correspondre à plusieurs unités et seront actifs par défaut même si aucune unité affectée n’est détectée, sauf si un paramètre de nombre d’unités ou de correspondance est défini." L["A 20x20 pixels icon"] = "Une icône de 20x20 pixels" L["A 32x32 pixels icon"] = "Une icône de 32x32 pixels" L["A 40x40 pixels icon"] = "Une icône de 40x40 pixels" @@ -174,8 +168,7 @@ Enable this setting if you want this timer to be hidden, or when using a WeakAur L["Anchored To"] = "Ancré à" L["And "] = "Et" L["and"] = "et" - --[[Translation missing --]] - L["and %s"] = "and %s" + L["and %s"] = "et %s" L["and aligned left"] = "et aligné à gauche" L["and aligned right"] = "et aligné à droite" --[[Translation missing --]] @@ -209,7 +202,7 @@ Si la durée de l'animation est définie à |cFF00CC0010%|r, et le déclencheur L["Area"] = "Area" L["At a position a bit left of Left HUD position."] = "Une position à gauche de la Position ATH Gauche." L["At a position a bit left of Right HUD position"] = "Une position à droite de la Position ATH Droite." - L["At the same position as Blizzard's spell alert"] = "À la même position que l'alerte de sort de Blizzard." + L["At the same position as Blizzard's spell alert"] = "À la même position que l'alerte de sort de Blizzard" --[[Translation missing --]] L["Attach to Foreground"] = "Attach to Foreground" --[[Translation missing --]] @@ -329,6 +322,12 @@ Off Screen]=] --[[Translation missing --]] L["Custom Code Viewer"] = "Custom Code Viewer" L["Custom Frames"] = "Cadres personnalisés" + --[[Translation missing --]] + L["Custom Functions"] = "Custom Functions" + --[[Translation missing --]] + L["Custom Init"] = "Custom Init" + --[[Translation missing --]] + L["Custom Load"] = "Custom Load" L["Custom Options"] = "Options personnalisées" L["Custom Trigger"] = "Déclencheur personnalisé" L["Custom trigger event tooltip"] = [=[ @@ -350,6 +349,8 @@ UNIT_POWER, UNIT_AURA PLAYER_TARGET_CHANGED L["Custom Trigger: Ignore Lua Errors on OPTIONS event"] = "Custom Trigger: Ignore Lua Errors on OPTIONS event" --[[Translation missing --]] L["Custom Trigger: Send fake events instead of STATUS event"] = "Custom Trigger: Send fake events instead of STATUS event" + --[[Translation missing --]] + L["Custom Unload"] = "Custom Unload" L["Custom Untrigger"] = "Désactivation personnalisée" --[[Translation missing --]] L["Debug Log"] = "Debug Log" @@ -374,7 +375,7 @@ UNIT_POWER, UNIT_AURA PLAYER_TARGET_CHANGED --[[Translation missing --]] L["Discord"] = "Discord" L["Display Name"] = "Nom de l'affichage" - L["Display Text"] = "Texte d'affichage" + L["Display Text"] = "Afficher le texte" L["Displays a text, works best in combination with other displays"] = "Affiche du texte, fonctionne mieux en combinaison avec d'autres affichages." L["Distribute Horizontally"] = "Distribuer horizontalement" L["Distribute Vertically"] = "Distribuer verticalement" @@ -667,7 +668,7 @@ Si cette case est cochée, ce séparateur inclura du texte. Sinon, ce sera juste --[[Translation missing --]] L["Invalid type for '%s'. Expected 'bool', 'number', 'select', 'string', 'timer' or 'elapsedTimer'."] = "Invalid type for '%s'. Expected 'bool', 'number', 'select', 'string', 'timer' or 'elapsedTimer'." L["Invalid type for property '%s' in '%s'. Expected '%s'"] = "Type non valide pour la propriété '%s' dans '%s'. Attendu '%s'." - L["Inverse Slant"] = "Inverser l'Inclinaison" + L["Inverse Slant"] = "Inclinaison inversée" --[[Translation missing --]] L["Invert the direction of progress"] = "Invert the direction of progress" --[[Translation missing --]] @@ -809,7 +810,6 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] --[[Translation missing --]] L["ON"] = "ON" L["On Hide"] = "Au masquage" - L["On Init"] = "À l'initialisation" L["On Show"] = "A l'affichage" --[[Translation missing --]] L["Only Match auras cast by a player (not an npc)"] = "Only Match auras cast by a player (not an npc)" @@ -949,9 +949,8 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] L["Shadow X Offset"] = "Décalage X de l'ombre" L["Shadow Y Offset"] = "Décalage Y de l'ombre" L["Shift-click to create chat link"] = "Maj-Clic pour créer un lien de discussion" - --[[Translation missing --]] - L["Show \"Edge\""] = "Show \"Edge\"" - L["Show \"Swipe\""] = "Afficher le \"balayage\"" + L["Show \"Edge\""] = "Afficher le \"Bord\"" + L["Show \"Swipe\""] = "Afficher le \"Balayage\"" --[[Translation missing --]] L["Show and Clone Settings"] = "Show and Clone Settings" L["Show Border"] = "Afficher l'encadrement" @@ -1159,7 +1158,7 @@ Upgrade your version of WeakAuras or wait for next release before installing thi L["Toggle the visibility of all non-loaded displays"] = "Change la visibilité de tous les affichages non-chargés" L["Toggle the visibility of this display"] = "Activer/Désactiver la visibilité de cet affichage" L["Tooltip Content"] = "Contenu de l'info-bulle" - L["Tooltip on Mouseover"] = "Infobulle à la souris" + L["Tooltip on Mouseover"] = "Info-bulle à la souris" L["Tooltip Pattern Match"] = "Correspondance de modèle de l'info-bulle" L["Tooltip Text"] = "Texte de l'Info-bulle." L["Tooltip Value"] = "Valeur de l'info-bulle" diff --git a/WeakAurasOptions/Locales/itIT.lua b/WeakAurasOptions/Locales/itIT.lua index 9215a5a..1bf7c46 100644 --- a/WeakAurasOptions/Locales/itIT.lua +++ b/WeakAurasOptions/Locales/itIT.lua @@ -40,6 +40,10 @@ local L = WeakAuras.L L["%s - Finish Custom Text"] = "%s - Termina il Testo Personalizzato" L["%s - Init Action"] = "%s - Azione di Inizializzazione" L["%s - Main"] = "%s - Principale" + --[[Translation missing --]] + L["%s - OnLoad"] = "%s - OnLoad" + --[[Translation missing --]] + L["%s - OnUnload"] = "%s - OnUnload" L["%s - Option #%i has the key %s. Please choose a different option key."] = "%s - L'opzione #%i ha la chiave %s. Scegli una chiave di opzione diversa." L["%s - Rotate Animation"] = "%s - Ruota Animazione" L["%s - Scale Animation"] = "%s - Scala Animazione" @@ -151,8 +155,8 @@ Enable this setting if you want this timer to be hidden, or when using a WeakAur L["Anchor Mode"] = "Anchor Mode" L["Anchor Point"] = "Punto di ancoraggio" L["Anchored To"] = "Ancorato a" - L["And "] = "E" L["and"] = "e" + L["And "] = "E" L["and %s"] = "e %s" L["and aligned left"] = "e allineato a sinistra" L["and aligned right"] = "e allineato a destra" @@ -280,18 +284,43 @@ Off Screen]=] ] = "L'aura è fuori dallo schermo" --[[Translation missing --]] L["Custom Frames"] = "Custom Frames" --[[Translation missing --]] + L["Custom Functions"] = "Custom Functions" + --[[Translation missing --]] + L["Custom Init"] = "Custom Init" + --[[Translation missing --]] + L["Custom Load"] = "Custom Load" + --[[Translation missing --]] L["Custom Options"] = "Custom Options" --[[Translation missing --]] L["Custom Trigger"] = "Custom Trigger" --[[Translation missing --]] - L["Custom trigger event tooltip"] = "Custom trigger event tooltip" + L["Custom trigger event tooltip"] = [=[Choose which events cause the custom trigger to be checked. Multiple events can be specified using commas or spaces. +• "UNIT" events can use colons to define which unitIDs will be registered. In addition to UnitIDs Unit types can be used, they include "nameplate", "group", "raid", "party", "arena", "boss". +• "CLEU" can be used instead of COMBAT_LOG_EVENT_UNFILTERED and colons can be used to separate specific "subEvents" you want to receive. +• The keyword "TRIGGER" can be used, with colons separating trigger numbers, to have the custom trigger get updated when the specified trigger(s) update. + +|cFF4444FFFor example:|r +UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:SPELL_CAST_SUCCESS TRIGGER:3:1 +]=] --[[Translation missing --]] - L["Custom trigger status tooltip"] = "Custom trigger status tooltip" + L["Custom trigger status tooltip"] = [=[Choose which events cause the custom trigger to be checked. Multiple events can be specified using commas or spaces. + +• "UNIT" events can use colons to define which unitIDs will be registered. In addition to UnitIDs Unit types can be used, they include "nameplate", "group", "raid", "party", "arena", "boss". +• "CLEU" can be used instead of COMBAT_LOG_EVENT_UNFILTERED and colons can be used to separate specific "subEvents" you want to receive. +• The keyword "TRIGGER" can be used, with colons separating trigger numbers, to have the custom trigger get updated when the specified trigger(s) update. + +Since this is a status-type trigger, the specified events may be called by WeakAuras without the expected arguments. + +|cFF4444FFFor example:|r +UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:SPELL_CAST_SUCCESS TRIGGER:3:1 +]=] --[[Translation missing --]] L["Custom Trigger: Ignore Lua Errors on OPTIONS event"] = "Custom Trigger: Ignore Lua Errors on OPTIONS event" --[[Translation missing --]] L["Custom Trigger: Send fake events instead of STATUS event"] = "Custom Trigger: Send fake events instead of STATUS event" --[[Translation missing --]] + L["Custom Unload"] = "Custom Unload" + --[[Translation missing --]] L["Custom Untrigger"] = "Custom Untrigger" --[[Translation missing --]] L["Debug Log"] = "Debug Log" @@ -549,7 +578,7 @@ Bleed classification via LibDispel]=] --[[Translation missing --]] L["Grid direction"] = "Grid direction" --[[Translation missing --]] - L["Group (verb)"] = "Group (verb)" + L["Group (verb)"] = "Group" --[[Translation missing --]] L["Group Alpha"] = "Group Alpha" --[[Translation missing --]] @@ -563,7 +592,17 @@ Bleed classification via LibDispel]=] - Unit Frames: attach to unit frame buttons per unit. - Custom Frames: choose which frame each region should be anchored to.]=] --[[Translation missing --]] - L["Group aura count description"] = "Group aura count description" + L["Group aura count description"] = [=[The amount of units of type '%s' which must be affected by one or more of the given auras for the display to trigger. +If the entered number is a whole number (e.g. 5), the number of affected units will be compared with the entered number. +If the entered number is a decimal (e.g. 0.5), fraction (e.g. 1/2), or percentage (e.g. 50%%), then that fraction of the %s must be affected. + +|cFF4444FFFor example:|r +|cFF00CC00> 0|r will trigger when any unit of type '%s' is affected +|cFF00CC00= 100%%|r will trigger when every unit of type '%s' is affected +|cFF00CC00!= 2|r will trigger when the number of units of type '%s' affected is not exactly 2 +|cFF00CC00<= 0.8|r will trigger when less than 80%% of the units of type '%s' is affected (4 of 5 party members, 8 of 10 or 20 of 25 raid members) +|cFF00CC00> 1/2|r will trigger when more than half of the units of type '%s' is affected +]=] --[[Translation missing --]] L["Group by Frame"] = "Group by Frame" --[[Translation missing --]] @@ -815,11 +854,14 @@ Bleed classification via LibDispel]=] --[[Translation missing --]] L["Multiple Displays"] = "Multiple Displays" --[[Translation missing --]] - L["Multiselect ignored tooltip"] = "Multiselect ignored tooltip" + L["Multiselect ignored tooltip"] = [=[|cFFFF0000Ignored|r - |cFF777777Single|r - |cFF777777Multiple|r +This option will not be used to determine when this display should load]=] --[[Translation missing --]] - L["Multiselect multiple tooltip"] = "Multiselect multiple tooltip" + L["Multiselect multiple tooltip"] = [=[|cFF777777Ignored|r - |cFF777777Single|r - |cFF00FF00Multiple|r +Any number of matching values can be picked]=] --[[Translation missing --]] - L["Multiselect single tooltip"] = "Multiselect single tooltip" + L["Multiselect single tooltip"] = [=[|cFF777777Ignored|r - |cFF00FF00Single|r - |cFF777777Multiple|r +Only a single matching value can be picked]=] --[[Translation missing --]] L["Must be a power of 2"] = "Must be a power of 2" --[[Translation missing --]] @@ -831,7 +873,7 @@ Bleed classification via LibDispel]=] --[[Translation missing --]] L["Name:"] = "Name:" --[[Translation missing --]] - L["Negator"] = "Negator" + L["Negator"] = "Not" --[[Translation missing --]] L["New Aura"] = "New Aura" --[[Translation missing --]] @@ -889,8 +931,6 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] --[[Translation missing --]] L["On Hide"] = "On Hide" --[[Translation missing --]] - L["On Init"] = "On Init" - --[[Translation missing --]] L["On Show"] = "On Show" --[[Translation missing --]] L["Only Match auras cast by a player (not an npc)"] = "Only Match auras cast by a player (not an npc)" @@ -1095,7 +1135,7 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] --[[Translation missing --]] L["Shadow Y Offset"] = "Shadow Y Offset" --[[Translation missing --]] - L["Shift-click to create chat link"] = "Shift-click to create chat link" + L["Shift-click to create chat link"] = "Shift-click to create a |cFF8800FF[Chat Link]" --[[Translation missing --]] L["Show \"Edge\""] = "Show \"Edge\"" --[[Translation missing --]] @@ -1427,10 +1467,10 @@ Upgrade your version of WeakAuras or wait for next release before installing thi --[[Translation missing --]] L["Use SetTransform"] = "Use SetTransform" --[[Translation missing --]] - L["Used in Auras:"] = "Used in Auras:" - --[[Translation missing --]] L["Used in auras:"] = "Used in auras:" --[[Translation missing --]] + L["Used in Auras:"] = "Used in Auras:" + --[[Translation missing --]] L["Uses Texture Coordinates to rotate the texture."] = "Uses Texture Coordinates to rotate the texture." --[[Translation missing --]] L["Uses UnitIsVisible() to check if game client has loaded a object for this unit. This distance is around 100 yards. This is polled every second."] = "Uses UnitIsVisible() to check if game client has loaded a object for this unit. This distance is around 100 yards. This is polled every second." diff --git a/WeakAurasOptions/Locales/koKR.lua b/WeakAurasOptions/Locales/koKR.lua index 1b21bd1..2f9cc26 100644 --- a/WeakAurasOptions/Locales/koKR.lua +++ b/WeakAurasOptions/Locales/koKR.lua @@ -12,10 +12,10 @@ local L = WeakAuras.L L[" rotated |cFFFF0000%s|r degrees"] = "|cFFFF0000%s|r도 회전" L["% - To show a percent sign"] = "% - 백분율 기호 표시" L["% of Progress"] = "진행 %" - L["%d |4aura:auras; added"] = "%d개의 위크오라가 추가됐습니다" - L["%d |4aura:auras; deleted"] = "%d개의 위크오라가 삭제됐습니다" - L["%d |4aura:auras; modified"] = "%d개의 위크오라가 변경됐습니다" - L["%d |4aura:auras; with meta data modified"] = "%d개의 위크오라가 메타 데이터가 변경됐습니다" + L["%d |4aura:auras; added"] = "%d개의 위크오라가 추가됨" + L["%d |4aura:auras; deleted"] = "%d개의 위크오라가 삭제됨" + L["%d |4aura:auras; modified"] = "%d개의 위크오라가 변경됨" + L["%d |4aura:auras; with meta data modified"] = "%d개의 위크오라가 메타 데이터와 함께 변경됨" L["%d displays loaded"] = "디스플레이 %d개 불러옴" L["%d displays not loaded"] = "디스플레이 %d개 불러오지 않음" L["%d displays on standby"] = "디스플레이 %d개 대기 중" @@ -28,15 +28,17 @@ local L = WeakAuras.L L["%s - Condition Custom Chat %s"] = "%s - 조건 사용자 정의 대화 %s" L["%s - Condition Custom Check %s"] = "%s - 조건 사용자 정의 검사 %s" L["%s - Condition Custom Code %s"] = "%s - 조건 사용자 정의 코드 %s" - L["%s - Custom Anchor"] = "%s - 사용자 정의 위치 부착" - L["%s - Custom Grow"] = "%s - 사용자 정의 확장 방식" + L["%s - Custom Anchor"] = "%s - 사용자 정의 위치 고정" + L["%s - Custom Grow"] = "%s - 사용자 정의 그룹 확장" L["%s - Custom Sort"] = "%s - 사용자 정의 정렬" L["%s - Custom Text"] = "%s - 사용자 정의 텍스트" L["%s - Finish"] = "%s - 종료" L["%s - Finish Action"] = "%s - 종료시 동작" L["%s - Finish Custom Text"] = "%s - 사용자 정의 텍스트 종료" - L["%s - Init Action"] = "%s - 초기 시작시 동작" + L["%s - Init Action"] = "%s - 초기 동작" L["%s - Main"] = "%s - 메인" + L["%s - OnLoad"] = "%s - 활성화 시" + L["%s - OnUnload"] = "%s - 비활성화 시" L["%s - Option #%i has the key %s. Please choose a different option key."] = "%s - #%i 옵션이 %s 키를 갖고 있습니다. 다른 옵션 키를 산택해주세요." L["%s - Rotate Animation"] = "%s - 애니메이션 회전" L["%s - Scale Animation"] = "%s - 애니메이션 크기" @@ -213,13 +215,13 @@ Off Screen]=] ] = "위크오라가 화면 밖에 있습니다" L["Blue Sparkle Orb"] = "푸른 불꽃 구슬" L["Border %s"] = "테두리 %s" L["Border Anchor"] = "테두리 고정" - L["Border Color"] = "테두리 색깔" + L["Border Color"] = "테두리색" L["Border in Front"] = "앞쪽 테두리" L["Border Inset"] = "테두리 삽입" L["Border Offset"] = "테두리 위치 조정" L["Border Settings"] = "테두리 설정" L["Border Size"] = "테두리 크기" - L["Border Style"] = "테두리 모양" + L["Border Style"] = "테두리 스타일" L["Bracket Matching"] = "괄호 맞춤" L["Browse Wago, the largest collection of auras."] = "세상에서 가장 큰 위크오라 모음 사이트 Wago를 둘러보세요." L["By default this shows the information from the trigger selected via dynamic information. The information from a specific trigger can be shown via e.g. %2.p."] = "기본값으로 동적 정보를 통해 선택된 활성 조건의 정보를 표시합니다. 특정 활성 조건의 정보 표시는 %2.p 같은 식으로 할 수 있습니다." @@ -229,9 +231,9 @@ Off Screen]=] ] = "위크오라가 화면 밖에 있습니다" L["Case Insensitive"] = "대소문자 구분 안함" L["Cast by a Player Character"] = "플레이어 캐릭터가 시전" L["Categories to Update"] = "업데이트할 카테고리" - L["Changelog"] = "업데이트 정보" + L["Changelog"] = "업데이트 내역" L["Chat with WeakAuras experts on our Discord server."] = "우리의 Discord 서버에서 WeakAuras 전문가들과 이야기를 나누어 보세요." - L["Check On..."] = "검사 기준..." + L["Check On..."] = "상태 확인 시점..." L["Check out our wiki for a large collection of examples and snippets."] = "방대한 사례와 스니펫 모음을 보려면 위키를 확인하세요." L["Children:"] = "자식 위크오라:" L["Choose"] = "선택" @@ -277,9 +279,12 @@ Off Screen]=] ] = "위크오라가 화면 밖에 있습니다" L["Custom Code"] = "사용자 정의 코드" L["Custom Code Viewer"] = "사용자 정의 코드 뷰어" L["Custom Frames"] = "사용자 정의 프레임" + L["Custom Functions"] = "사용자 정의 함수" + L["Custom Init"] = "사용자 정의 초기 동작" + L["Custom Load"] = "사용자 정의 활성화" L["Custom Options"] = "사용자 정의 옵션" L["Custom Trigger"] = "사용자 정의 활성 조건" - L["Custom trigger event tooltip"] = [=[사용자 정의 활성 조건을 확인할 이벤트를 선택하세요. 쉼표나 공백으로 여러 이벤트를 지정할 수 있습니다. + L["Custom trigger event tooltip"] = [=[사용자 정의 활성 조건 확인에 사용할 이벤트를 선택하세요. 쉼표나 공백으로 여러 이벤트를 지정할 수 있습니다. • "UNIT" 이벤트는 콜론을 사용해 등록할 유닛 ID를 정할 수 있습니다. "nameplate", "group", "raid", "party", "arena", "boss"와 같은 유닛 유형을 유닛ID로 사용할 수 있습니다. @@ -288,7 +293,7 @@ Off Screen]=] ] = "위크오라가 화면 밖에 있습니다" |cFF4444FF예시:|r UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:SPELL_CAST_SUCCESS TRIGGER:3:1]=] - L["Custom trigger status tooltip"] = [=[사용자 정의 활성 조건을 확인할 이벤트를 선택하세요. 쉼표나 공백으로 여러 이벤트를 지정할 수 있습니다. + L["Custom trigger status tooltip"] = [=[사용자 정의 활성 조건 확인에 사용할 이벤트를 선택하세요. 쉼표나 공백으로 여러 이벤트를 지정할 수 있습니다. • "UNIT" 이벤트는 콜론을 사용해 등록할 유닛 ID를 정할 수 있습니다. "nameplate", "group", "raid", "party", "arena", "boss"와 같은 유닛 유형을 유닛ID로 사용할 수 있습니다. @@ -301,6 +306,7 @@ UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:S UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:SPELL_CAST_SUCCESS TRIGGER:3:1]=] L["Custom Trigger: Ignore Lua Errors on OPTIONS event"] = "사용자 정의 활성 조건: OPTIONS 이벤트에서 Lua 오류 무시" L["Custom Trigger: Send fake events instead of STATUS event"] = "사용자 정의 활성 조건: STATUS 이벤트 대신 가짜 이벤트 보내기" + L["Custom Unload"] = "사용자 정의 비활성화" L["Custom Untrigger"] = "사용자 정의 비활성 조건" L["Debug Log"] = "디버그 로그" L["Debug Log:"] = "디버그 로그:" @@ -324,7 +330,7 @@ UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:S L["Distribute Vertically"] = "세로 분산 배치" L["Do not group this display"] = "이 디스플레이를 그룹에 넣지 않습니다" L["Do you want to enable updates for this aura"] = "이 위크오라의 업데이트를 활성화 할까요?" - L["Do you want to ignore updates for this aura"] = "이 위크오라의 업데이트를 무시할까요?" + L["Do you want to ignore updates for this aura"] = "이 위크오라의 업데이트를 무시하고 싶으면 체크하세요" L["Documentation"] = "참고 문서" L["Done"] = "완료" L["Drag to move"] = "드래그로 이동" @@ -630,7 +636,6 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] ] = [=[이벤트 L["Okay"] = "확인" L["ON"] = "켜짐" L["On Hide"] = "숨겨질 때" - L["On Init"] = "초기 실행 시" L["On Show"] = "표시될 때" L["Only Match auras cast by a player (not an npc)"] = "(NPC가 아닌) 플레이어가 시전한 오라만 걸러냅니다" L["Only match auras cast by people other than the player or their pet"] = "나 또는 내 소환수 말고 다른 사람이 시전한 오라만 걸러냅니다" @@ -710,7 +715,7 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] ] = [=[이벤트 L["Rotate Text"] = "텍스트 회전" L["Rotation Mode"] = "회전 모드" L["Row Space"] = "행 간격" - L["Row Width"] = "행 넓이" + L["Row Width"] = "행 너비" L["Rows"] = "행" L["Run on..."] = "실행 조건..." L["Same"] = "전경과 동일" @@ -730,7 +735,7 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] ] = [=[이벤트 L["Set Thumbnail Icon"] = "썸네일 아이콘을 설정합니다" L["Sets the anchored frame as the aura's parent, causing the aura to inherit attributes such as visibility and scale."] = "위치가 고정된 프레임을 위크오라의 부모로 설정하여 외관이나 크기 등의 속성을 상속받도록 합니다." L["Settings"] = "설정" - L["Shadow Color"] = "그림자 색깔" + L["Shadow Color"] = "그림자색" L["Shadow X Offset"] = "그림자 X 위치 조정" L["Shadow Y Offset"] = "그림자 Y 위치 조정" L["Shift-click to create chat link"] = "Shift+클릭으로 대화창 링크 생성" @@ -815,7 +820,7 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] ] = [=[이벤트 L["Templates could not be loaded, the addon is %s"] = "템플릿을 불러올 수 없습니다. 애드온은 %s입니다." L["Temporary Group"] = "임시 그룹" L["Text %s"] = "텍스트 %s" - L["Text Color"] = "텍스트 색깔" + L["Text Color"] = "텍스트색" L["Text Settings"] = "텍스트 설정" L["Texture %s"] = "텍스처 %s" L["Texture Info"] = "텍스처 정보" @@ -825,8 +830,8 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] ] = [=[이벤트 L["Texture X Offset"] = "텍스처 X 위치 조정" L["Texture Y Offset"] = "텍스처 Y 위치 조정" L["Thanks"] = "감사 인사" - L["The addon ElvUI is enabled. It might add cooldown numbers to the swipe. You can configure these in the ElvUI settings"] = "ElvUI 애드온이 활성화 되었습니다. 회전 애니메이션에 쿨타임 시간이 표시됩니다. ElvUI 설정에서 조정할 수 있습니다" - L["The addon OmniCC is enabled. It might add cooldown numbers to the swipe. You can configure these in the OmniCC settings"] = "OmniCC 애드온이 활성화 되었습니다. 회전 애니메이션에 쿨타임 시간이 표시됩니다. OmniCC 설정에서 조정할 수 있습니다" + L["The addon ElvUI is enabled. It might add cooldown numbers to the swipe. You can configure these in the ElvUI settings"] = "ElvUI 애드온을 사용중이므로 회전 애니메이션에 쿨타임 시간이 표시될 것입니다. 시간 텍스트는 ElvUI 설정에서 조정할 수 있습니다" + L["The addon OmniCC is enabled. It might add cooldown numbers to the swipe. You can configure these in the OmniCC settings"] = "OmniCC 애드온을 사용중이므로 회전 애니메이션에 쿨타임 시간이 표시될 것입니다. 시간 텍스트는 OmniCC 설정에서 조정할 수 있습니다" L["The duration of the animation in seconds."] = "애니메이션 지속시간 (초)" L["The duration of the animation in seconds. The finish animation does not start playing until after the display would normally be hidden."] = "애니메이션의 초단위 지속시간입니다. 종료 애니메이션은 일반적으로는 디스플레이가 숨겨지기 전까진 재생을 시작하지 않습니다." L["The group and all direct children will share the same base frame level."] = "이 그룹과 모든 직속 자식 위크오라는 같은 기반의 프레임 레벨을 공유합니다." @@ -935,11 +940,11 @@ Upgrade your version of WeakAuras or wait for next release before installing thi L["You are about to delete a trigger. |cFFFF0000This cannot be undone!|r Would you like to continue?"] = "이 활성 조건을 삭제하려고 합니다. |cFFFF0000이는 되돌릴 수 없습니다!|r 계속할까요?" L[ [=[You can add a comma-separated list of state values here that (when changed) WeakAuras should also run the Anchor Code on. -WeakAuras will always run custom anchor code if you include 'changed' in this list, or when a region is added, removed, or re-ordered.]=] ] = "이곳에 스테이트 값들의 목록을 쉼표로 구분해서 넣을 수 있으며 (changed가 발동하면) WeakAuras가 위치 고정 코드를 실행하게 됩니다. 이 목록에 'changed'가 들어있거나 구역(region)이 추가, 삭제, 재정렬시 WeakAuras가 사용자 정의 고정 코드를 실행합니다." +WeakAuras will always run custom anchor code if you include 'changed' in this list, or when a region is added, removed, or re-ordered.]=] ] = "이곳에 State 테이블 값들을 쉼표로 구분해서 목록으로 만들어 넣을 수 있으며 (값이 바뀔 때) WeakAuras가 위치 고정 코드를 실행하게 됩니다. 이 목록에 테이블 값 'changed'를 넣을 경우 또는 구역(region)이 추가, 삭제, 재정렬 될 때 WeakAuras는 반드시 사용자 정의 고정 코드를 실행합니다." L[ [=[You can add a comma-separated list of state values here that (when changed) WeakAuras should also run the Grow Code on. -WeakAuras will always run custom grow code if you include 'changed' in this list, or when a region is added, removed, or re-ordered.]=] ] = "이곳에 스테이트 값들의 목록을 쉼표로 구분해서 넣을 수 있으며 (changed가 발동하면) WeakAuras가 그룹 확장 코드를 실행하게 됩니다. 이 목록에 'changed'가 들어있거나 구역(region)이 추가, 삭제, 재정렬시 WeakAuras가 사용자 정의 그룹 확장 코드를 실행합니다." - L["You can add a comma-separated list of state values here that (when changed) WeakAuras should also run the sort code on.WeakAuras will always run custom sort code if you include 'changed' in this list, or when a region is added, removed."] = "이곳에 스테이트 값들의 목록을 쉼표로 구분해서 넣을 수 있으며 (changed가 발동하면) WeakAuras가 정렬 코드를 실행하게 됩니다. 이 목록에 'changed'가 들어있거나 구역(region)이 추가, 삭제, 재정렬시 WeakAuras가 사용자 정의 정렬 코드를 실행합니다." +WeakAuras will always run custom grow code if you include 'changed' in this list, or when a region is added, removed, or re-ordered.]=] ] = "이곳에 State 테이블 값들을 쉼표로 구분해서 목록으로 만들어 넣을 수 있으며 (값이 바뀔 때) WeakAuras가 그룹 확장 코드를 실행하게 됩니다. 이 목록에 테이블 값 'changed'를 넣을 경우 또는 구역(region)이 추가, 삭제, 재정렬 될 때 WeakAuras는 반드시 사용자 정의 그룹 확장 코드를 실행합니다." + L["You can add a comma-separated list of state values here that (when changed) WeakAuras should also run the sort code on.WeakAuras will always run custom sort code if you include 'changed' in this list, or when a region is added, removed."] = "이곳에 State 테이블 값들을 쉼표로 구분해서 목록으로 만들어 넣을 수 있으며 (값이 바뀔 때) WeakAuras가 정렬 코드를 실행하게 됩니다. 이 목록에 테이블 값 'changed'를 넣을 경우 또는 구역(region)이 추가, 삭제, 재정렬 될 때 WeakAuras는 반드시 사용자 정의 정렬 코드를 실행합니다." L["Your Saved Snippets"] = "저장된 스니펫" L["Z Offset"] = "Z 위치 조정" L["Z Rotation"] = "Z 회전" diff --git a/WeakAurasOptions/Locales/ptBR.lua b/WeakAurasOptions/Locales/ptBR.lua index 0cd3a30..a3cfa54 100644 --- a/WeakAurasOptions/Locales/ptBR.lua +++ b/WeakAurasOptions/Locales/ptBR.lua @@ -61,6 +61,10 @@ local L = WeakAuras.L L["%s - Init Action"] = "%s - Init Action" --[[Translation missing --]] L["%s - Main"] = "%s - Main" + --[[Translation missing --]] + L["%s - OnLoad"] = "%s - OnLoad" + --[[Translation missing --]] + L["%s - OnUnload"] = "%s - OnUnload" L["%s - Option #%i has the key %s. Please choose a different option key."] = "%s - Option #%i possui a chave %s. Por favor, selecione uma opção diferente de chave." --[[Translation missing --]] L["%s - Rotate Animation"] = "%s - Rotate Animation" @@ -392,17 +396,42 @@ Off Screen]=] ] = "Aura está fora da tela" --[[Translation missing --]] L["Custom Frames"] = "Custom Frames" --[[Translation missing --]] + L["Custom Functions"] = "Custom Functions" + --[[Translation missing --]] + L["Custom Init"] = "Custom Init" + --[[Translation missing --]] + L["Custom Load"] = "Custom Load" + --[[Translation missing --]] L["Custom Options"] = "Custom Options" L["Custom Trigger"] = "Gatilho personalizado" --[[Translation missing --]] - L["Custom trigger event tooltip"] = "Custom trigger event tooltip" + L["Custom trigger event tooltip"] = [=[Choose which events cause the custom trigger to be checked. Multiple events can be specified using commas or spaces. +• "UNIT" events can use colons to define which unitIDs will be registered. In addition to UnitIDs Unit types can be used, they include "nameplate", "group", "raid", "party", "arena", "boss". +• "CLEU" can be used instead of COMBAT_LOG_EVENT_UNFILTERED and colons can be used to separate specific "subEvents" you want to receive. +• The keyword "TRIGGER" can be used, with colons separating trigger numbers, to have the custom trigger get updated when the specified trigger(s) update. + +|cFF4444FFFor example:|r +UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:SPELL_CAST_SUCCESS TRIGGER:3:1 +]=] --[[Translation missing --]] - L["Custom trigger status tooltip"] = "Custom trigger status tooltip" + L["Custom trigger status tooltip"] = [=[Choose which events cause the custom trigger to be checked. Multiple events can be specified using commas or spaces. + +• "UNIT" events can use colons to define which unitIDs will be registered. In addition to UnitIDs Unit types can be used, they include "nameplate", "group", "raid", "party", "arena", "boss". +• "CLEU" can be used instead of COMBAT_LOG_EVENT_UNFILTERED and colons can be used to separate specific "subEvents" you want to receive. +• The keyword "TRIGGER" can be used, with colons separating trigger numbers, to have the custom trigger get updated when the specified trigger(s) update. + +Since this is a status-type trigger, the specified events may be called by WeakAuras without the expected arguments. + +|cFF4444FFFor example:|r +UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:SPELL_CAST_SUCCESS TRIGGER:3:1 +]=] --[[Translation missing --]] L["Custom Trigger: Ignore Lua Errors on OPTIONS event"] = "Custom Trigger: Ignore Lua Errors on OPTIONS event" --[[Translation missing --]] L["Custom Trigger: Send fake events instead of STATUS event"] = "Custom Trigger: Send fake events instead of STATUS event" --[[Translation missing --]] + L["Custom Unload"] = "Custom Unload" + --[[Translation missing --]] L["Custom Untrigger"] = "Custom Untrigger" --[[Translation missing --]] L["Debug Log"] = "Debug Log" @@ -630,7 +659,7 @@ Bleed classification via LibDispel]=] --[[Translation missing --]] L["Grid direction"] = "Grid direction" --[[Translation missing --]] - L["Group (verb)"] = "Group (verb)" + L["Group (verb)"] = "Group" --[[Translation missing --]] L["Group Alpha"] = "Group Alpha" --[[Translation missing --]] @@ -644,7 +673,17 @@ Bleed classification via LibDispel]=] - Unit Frames: attach to unit frame buttons per unit. - Custom Frames: choose which frame each region should be anchored to.]=] --[[Translation missing --]] - L["Group aura count description"] = "Group aura count description" + L["Group aura count description"] = [=[The amount of units of type '%s' which must be affected by one or more of the given auras for the display to trigger. +If the entered number is a whole number (e.g. 5), the number of affected units will be compared with the entered number. +If the entered number is a decimal (e.g. 0.5), fraction (e.g. 1/2), or percentage (e.g. 50%%), then that fraction of the %s must be affected. + +|cFF4444FFFor example:|r +|cFF00CC00> 0|r will trigger when any unit of type '%s' is affected +|cFF00CC00= 100%%|r will trigger when every unit of type '%s' is affected +|cFF00CC00!= 2|r will trigger when the number of units of type '%s' affected is not exactly 2 +|cFF00CC00<= 0.8|r will trigger when less than 80%% of the units of type '%s' is affected (4 of 5 party members, 8 of 10 or 20 of 25 raid members) +|cFF00CC00> 1/2|r will trigger when more than half of the units of type '%s' is affected +]=] --[[Translation missing --]] L["Group by Frame"] = "Group by Frame" --[[Translation missing --]] @@ -877,11 +916,14 @@ Bleed classification via LibDispel]=] L["Moving auras: "] = "Moving auras: " L["Multiple Displays"] = "Múltiplos displays" --[[Translation missing --]] - L["Multiselect ignored tooltip"] = "Multiselect ignored tooltip" + L["Multiselect ignored tooltip"] = [=[|cFFFF0000Ignored|r - |cFF777777Single|r - |cFF777777Multiple|r +This option will not be used to determine when this display should load]=] --[[Translation missing --]] - L["Multiselect multiple tooltip"] = "Multiselect multiple tooltip" + L["Multiselect multiple tooltip"] = [=[|cFF777777Ignored|r - |cFF777777Single|r - |cFF00FF00Multiple|r +Any number of matching values can be picked]=] --[[Translation missing --]] - L["Multiselect single tooltip"] = "Multiselect single tooltip" + L["Multiselect single tooltip"] = [=[|cFF777777Ignored|r - |cFF00FF00Single|r - |cFF777777Multiple|r +Only a single matching value can be picked]=] --[[Translation missing --]] L["Must be a power of 2"] = "Must be a power of 2" --[[Translation missing --]] @@ -942,7 +984,6 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] --[[Translation missing --]] L["ON"] = "ON" L["On Hide"] = "Quando sumir" - L["On Init"] = "No início" L["On Show"] = "Quando mostrar" --[[Translation missing --]] L["Only Match auras cast by a player (not an npc)"] = "Only Match auras cast by a player (not an npc)" @@ -1125,7 +1166,7 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] --[[Translation missing --]] L["Shadow Y Offset"] = "Shadow Y Offset" --[[Translation missing --]] - L["Shift-click to create chat link"] = "Shift-click to create chat link" + L["Shift-click to create chat link"] = "Shift-click to create a |cFF8800FF[Chat Link]" --[[Translation missing --]] L["Show \"Edge\""] = "Show \"Edge\"" --[[Translation missing --]] diff --git a/WeakAurasOptions/Locales/ruRU.lua b/WeakAurasOptions/Locales/ruRU.lua index b188fe1..740c838 100644 --- a/WeakAurasOptions/Locales/ruRU.lua +++ b/WeakAurasOptions/Locales/ruRU.lua @@ -7,7 +7,7 @@ end local L = WeakAuras.L -- WeakAuras/Options - L[" and |cFFFF0000mirrored|r"] = "и |cFFFF0000mirrored|r" + L[" and |cFFFF0000mirrored|r"] = "и |cFFFF0000отражать|r" L["-- Do not remove this comment, it is part of this aura: "] = "-- Не удаляйте этот комментарий! Он является частью кода индикации " L[" rotated |cFFFF0000%s|r degrees"] = "; Поворот %.4g" L["% - To show a percent sign"] = "% — отображение знака процента" @@ -37,6 +37,10 @@ local L = WeakAuras.L L["%s - Finish Custom Text"] = "%s - Сообщение в чат при скрытии" L["%s - Init Action"] = "%s - Действие при инициализации" L["%s - Main"] = "%s - Основная" + --[[Translation missing --]] + L["%s - OnLoad"] = "%s - OnLoad" + --[[Translation missing --]] + L["%s - OnUnload"] = "%s - OnUnload" L["%s - Option #%i has the key %s. Please choose a different option key."] = "%s — опция #%i имеет ключ %s. Пожалуйста, выберите другой ключ опции." L["%s - Rotate Animation"] = "%s анимация вращения" L["%s - Scale Animation"] = "%s анимация масштаба" @@ -267,6 +271,12 @@ Off Screen]=] ] = [=[Индикация за L["Custom Code"] = "Свой код" L["Custom Code Viewer"] = "Средство просмотра кода" L["Custom Frames"] = "Свои кадры" + --[[Translation missing --]] + L["Custom Functions"] = "Custom Functions" + --[[Translation missing --]] + L["Custom Init"] = "Custom Init" + --[[Translation missing --]] + L["Custom Load"] = "Custom Load" L["Custom Options"] = "Свои параметры" L["Custom Trigger"] = "Свой триггер" L["Custom trigger event tooltip"] = [=[Напишите события, которые будут вызывать проверку вашего триггера. Несколько событий должны быть разделены запятыми или пробелами. @@ -280,6 +290,8 @@ UNIT_POWER UNIT_AURA, PLAYER_TARGET_CHANGED]=] UNIT_POWER UNIT_AURA, PLAYER_TARGET_CHANGED]=] L["Custom Trigger: Ignore Lua Errors on OPTIONS event"] = "Свой триггер: игнорировать ошибки Lua при событии OPTIONS" L["Custom Trigger: Send fake events instead of STATUS event"] = "Свой триггер: отправлять фиктивные события вместо события STATUS" + --[[Translation missing --]] + L["Custom Unload"] = "Custom Unload" L["Custom Untrigger"] = "Свой детриггер" L["Debug Log"] = "Журнал отладки" L["Debug Log:"] = "Журнал отладки:" @@ -605,7 +617,6 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] ] = "Время L["Okay"] = "Ок" L["ON"] = "ВКЛ." L["On Hide"] = "При скрытии" - L["On Init"] = "При инициализации" L["On Show"] = "При появлении" L["Only Match auras cast by a player (not an npc)"] = "Эффект применён каким-либо игроком, а не NPC" L["Only match auras cast by people other than the player or their pet"] = "Эффекты, применённые другими людьми, но не игроком или его питомцем" diff --git a/WeakAurasOptions/Locales/zhCN.lua b/WeakAurasOptions/Locales/zhCN.lua index 22a7cae..7629e15 100644 --- a/WeakAurasOptions/Locales/zhCN.lua +++ b/WeakAurasOptions/Locales/zhCN.lua @@ -37,6 +37,8 @@ local L = WeakAuras.L L["%s - Finish Custom Text"] = "%s - 结束自定义文本" L["%s - Init Action"] = "%s - 初始动作" L["%s - Main"] = "%s - 主要" + L["%s - OnLoad"] = "%s - 已载入" + L["%s - OnUnload"] = "%s - 未载入" L["%s - Option #%i has the key %s. Please choose a different option key."] = "%s - 选项#%i已经使用了键%s,请选择一个其他的键。" L["%s - Rotate Animation"] = "%s - 旋转动画" L["%s - Scale Animation"] = "%s - 缩放动画" @@ -267,6 +269,10 @@ Off Screen]=] ] = "光环在屏幕外" L["Custom Code"] = "自定义代码" L["Custom Code Viewer"] = "自定义代码查看器" L["Custom Frames"] = "自定义框架" + --[[Translation missing --]] + L["Custom Functions"] = "Custom Functions" + L["Custom Init"] = "自定义初始化" + L["Custom Load"] = "自定义已载入" L["Custom Options"] = "自定义选项" L["Custom Trigger"] = "自定义触发器" L["Custom trigger event tooltip"] = [=[选择用于检查自定义触发器的事件。 @@ -282,6 +288,7 @@ UNIT_POWER, UNIT_AURA PLAYER_TARGET_CHANGED]=] UNIT_POWER, UNIT_AURA PLAYER_TARGET_CHANGED]=] L["Custom Trigger: Ignore Lua Errors on OPTIONS event"] = "自定义触发器:忽略OPTIONS事件的Lua错误" L["Custom Trigger: Send fake events instead of STATUS event"] = "自定义触发器:发送虚假事件而不是STATUS事件" + L["Custom Unload"] = "自定义未载入" L["Custom Untrigger"] = "自定义取消触发器" L["Debug Log"] = "调试日志" L["Debug Log:"] = "调试日志:" @@ -609,7 +616,6 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] ] = [=[事件发 L["Okay"] = "好" L["ON"] = "开启" L["On Hide"] = "图示隐藏时" - L["On Init"] = "初始化时" L["On Show"] = "图示显示时" L["Only Match auras cast by a player (not an npc)"] = "只匹配由玩家(而不是NPC)施放的光环" L["Only match auras cast by people other than the player or their pet"] = "只匹配由不是玩家自身或宠物施放的光环" diff --git a/WeakAurasOptions/Locales/zhTW.lua b/WeakAurasOptions/Locales/zhTW.lua index c8841c4..065295e 100644 --- a/WeakAurasOptions/Locales/zhTW.lua +++ b/WeakAurasOptions/Locales/zhTW.lua @@ -37,6 +37,8 @@ local L = WeakAuras.L L["%s - Finish Custom Text"] = "%s - 結束自訂文字" L["%s - Init Action"] = "%s - 初始動作" L["%s - Main"] = "%s - 主要" + L["%s - OnLoad"] = "%s - 在載入" + L["%s - OnUnload"] = "%s - 在未載入" L["%s - Option #%i has the key %s. Please choose a different option key."] = "%s - 選項 #%i 已經有 key %s。請選擇另一個不同的選項 key。" L["%s - Rotate Animation"] = "%s - 旋轉動畫" L["%s - Scale Animation"] = "%s - 縮放動畫" @@ -141,8 +143,8 @@ Enable this setting if you want this timer to be hidden, or when using a WeakAur L["Anchor Mode"] = "定位模式" L["Anchor Point"] = "對齊點" L["Anchored To"] = "對齊到" - L["And "] = "和 " L["and"] = "和" + L["And "] = "和 " L["and %s"] = "以及 %s" L["and aligned left"] = "和靠左對齊" L["and aligned right"] = "和靠右對齊" @@ -261,6 +263,9 @@ Off Screen]=] ] = [=[提醒效果 L["Custom Code"] = "自訂程式碼" L["Custom Code Viewer"] = "自訂程式碼檢視器" L["Custom Frames"] = "自訂框架" + L["Custom Functions"] = "自訂功能" + L["Custom Init"] = "自訂初始化" + L["Custom Load"] = "自訂載入" L["Custom Options"] = "自訂選項" L["Custom Trigger"] = "自訂觸發" L["Custom trigger event tooltip"] = [=[選擇自訂觸發要檢查的事件。 @@ -276,6 +281,7 @@ UNIT_POWER, UNIT_AURA PLAYER_TARGET_CHANGED]=] UNIT_POWER, UNIT_AURA PLAYER_TARGET_CHANGED]=] L["Custom Trigger: Ignore Lua Errors on OPTIONS event"] = "自訂觸發: 忽略 OPTIONS 事件的 Lua 錯誤" L["Custom Trigger: Send fake events instead of STATUS event"] = "自訂觸發: 發送假的事件而不是 STATUS 事件" + L["Custom Unload"] = "自訂未載入" L["Custom Untrigger"] = "自訂取消觸發" L["Debug Log"] = "偵錯紀錄" L["Debug Log:"] = "偵錯紀錄:" @@ -603,7 +609,6 @@ every 3 events starting from 2nd and ending at 11th: 2-11/3]=] ] = [=[事件發 L["Okay"] = "確認" L["ON"] = "開啟" L["On Hide"] = "消失時" - L["On Init"] = "初始化時" L["On Show"] = "出現時" L["Only Match auras cast by a player (not an npc)"] = "只符合玩家 (非 NPC) 施放的光環" L["Only match auras cast by people other than the player or their pet"] = "只符合玩家或他們的寵物以外的人施放的光環" diff --git a/WeakAurasOptions/OptionsFrames/OptionsFrame.lua b/WeakAurasOptions/OptionsFrames/OptionsFrame.lua index 5b69dec..2659998 100644 --- a/WeakAurasOptions/OptionsFrames/OptionsFrame.lua +++ b/WeakAurasOptions/OptionsFrames/OptionsFrame.lua @@ -110,7 +110,16 @@ function OptionsPrivate.CreateFrame() frame:SetResizable(true) frame:SetMinResize(minWidth, minHeight) frame:SetFrameStrata("DIALOG") - frame.PortraitContainer.portrait:SetTexture([[Interface\AddOns\WeakAuras\Media\Textures\logo_256_round.tga]]) + + local now = time() + local y = date("*t", now).year + local inJune = now >= time{year=y, month=6, day=1, hour=0} and now < time{year=y, month=7, day=1, hour=0} + if inJune then + frame.PortraitContainer.portrait:SetTexture([[Interface\AddOns\WeakAuras\Media\Textures\logo_256_round_pride.tga]]) + else + frame.PortraitContainer.portrait:SetTexture([[Interface\AddOns\WeakAuras\Media\Textures\logo_256_round.tga]]) + end + frame.window = "default" local xOffset, yOffset @@ -508,7 +517,7 @@ function OptionsPrivate.CreateFrame() end local awesomeWotlkButton - if not WeakAuras.isAwesomeEnabled() then + if not WeakAuras.IsAwesomeEnabled() then awesomeWotlkButton = addFooter("Awesome WotLK", [[Interface\AddOns\WeakAuras\Media\Textures\GitHub.tga]], "https://github.com/FrostAtom/awesome_wotlk/releases", L["Unlock nameplate anchoring & units in WeakAuras with the Awesome WotLK client patch"]) awesomeWotlkButton:SetParent(tipFrame) diff --git a/WeakAurasOptions/OptionsFrames/TextEditor.lua b/WeakAurasOptions/OptionsFrames/TextEditor.lua index 62e3267..df257e5 100644 --- a/WeakAurasOptions/OptionsFrames/TextEditor.lua +++ b/WeakAurasOptions/OptionsFrames/TextEditor.lua @@ -157,6 +157,7 @@ local function ConstructTextEditor(frame) group:SetLayout("flow") local editor = AceGUI:Create("MultiLineEditBox") + editor.editBox.group = group editor:SetFullWidth(true) editor:SetFullHeight(true) editor:DisableButton(true) @@ -504,7 +505,7 @@ local function ConstructTextEditor(frame) editor.editBox.timeMachine = {} editor.editBox.timeMachinePos = 1 local TimeMachineMaximumRollback = 10 - + --[[ Doesn't exist, we need a workaround for that editor.editBox:HookScript( "OnKeyDown", function(self, key) @@ -539,10 +540,35 @@ local function ConstructTextEditor(frame) end end ) + ]] editor.editBox:HookScript( "OnTextChanged", function(self, userInput) + local str = editor.editBox:GetText() + if not str or str:trim() == "" or editor.combinedText == true then + self.group.editorError:SetText("") + else + local func, errorString + if (self.group.enclose) then + func, errorString = OptionsPrivate.Private.LoadFunction("return function() " .. str .. "\n end", self.group.data.id, true) + else + func, errorString = OptionsPrivate.Private.LoadFunction("return " .. str, self.group.data.id, true) + end + if not errorString and self.group.validator then + errorString = self.group.validator(func) + end + if errorString then + if self.url then + helpButton:Show() + end + self.group.editorError:Show() + self.group.editorError:SetText(errorString) + else + self.group.editorError:SetText("") + end + end + if not userInput then return end if self.skipOnTextChanged then self.skipOnTextChanged = false @@ -596,6 +622,7 @@ local function ConstructTextEditor(frame) editorError:SetTextColor(1, 0, 0) editorError:SetPoint("LEFT", helpButton, "RIGHT", 0, 4) editorError:SetPoint("RIGHT", settings_frame, "LEFT") + group.editorError = editorError local editorLine = CreateFrame("EditBox", nil, group.frame, "WA_InputBoxTemplate") -- Set script on enter pressed.. @@ -658,6 +685,8 @@ local function ConstructTextEditor(frame) self.reloadOptions = reloadOptions self.setOnParent = setOnParent self.url = url + self.enclose = enclose + self.validator = validator if url then helpButton:Show() else @@ -694,36 +723,6 @@ local function ConstructTextEditor(frame) -- catch it so that escape doesn't default to losing focus (after which another escape would close config) end ) - self.oldOnTextChanged = editor.editBox:GetScript("OnTextChanged") - editor.editBox:SetScript( - "OnTextChanged", - function(...) - local str = editor.editBox:GetText() - if not str or str:trim() == "" or editor.combinedText == true then - editorError:SetText("") - else - local func, errorString - if (enclose) then - func, errorString = OptionsPrivate.Private.LoadFunction("return function() " .. str .. "\n end", true) - else - func, errorString = OptionsPrivate.Private.LoadFunction("return " .. str, true) - end - if not errorString and validator then - errorString = validator(func) - end - if errorString then - if self.url then - helpButton:Show() - end - editorError:Show() - editorError:SetText(errorString) - else - editorError:SetText("") - end - end - self.oldOnTextChanged(...) - end - ) if setOnParent then editor:SetText(OptionsPrivate.Private.ValueFromPath(data, path) or "") @@ -767,7 +766,6 @@ local function ConstructTextEditor(frame) end function group.CancelClose(self) - editor.editBox:SetScript("OnTextChanged", self.oldOnTextChanged) editor:ClearFocus() frame:HideTip() frame.window = "default" @@ -827,7 +825,6 @@ local function ConstructTextEditor(frame) WeakAuras.ClearAndUpdateOptions(self.data.id) - editor.editBox:SetScript("OnTextChanged", self.oldOnTextChanged) editor:ClearFocus() frame.window = "default" diff --git a/WeakAurasOptions/OptionsFrames/Update.lua b/WeakAurasOptions/OptionsFrames/Update.lua index f35c2cd..e1b831b 100644 --- a/WeakAurasOptions/OptionsFrames/Update.lua +++ b/WeakAurasOptions/OptionsFrames/Update.lua @@ -73,7 +73,10 @@ local function scamCheck(codes, data) if (data.actions) then if data.actions.init then addCode(codes, L["%s - Init Action"]:format(data.id), data.actions.init.custom, data.actions.init.do_custom) + addCode(codes, L["%s - OnLoad"]:format(data.id), data.actions.init.customOnLoad, data.actions.init.do_custom_load) + addCode(codes, L["%s - OnUnload"]:format(data.id), data.actions.init.customOnUnload, data.actions.init.do_custom_unload) end + if data.actions.start then addCode(codes, L["%s - Start Action"]:format(data.id), data.actions.start.custom, data.actions.start.do_custom) addCode(codes, L["%s - Start Custom Text"]:format(data.id), data.actions.start.message_custom, data.actions.start.do_message) diff --git a/WeakAurasOptions/RegionOptions/DynamicGroup.lua b/WeakAurasOptions/RegionOptions/DynamicGroup.lua index 3246bd6..b0dd42b 100644 --- a/WeakAurasOptions/RegionOptions/DynamicGroup.lua +++ b/WeakAurasOptions/RegionOptions/DynamicGroup.lua @@ -175,7 +175,7 @@ local function createOptions(id, data) ["UNITFRAME"] = L["Unit Frames"], ["CUSTOM"] = L["Custom Frames"] } - if WeakAuras.isAwesomeEnabled() then + if WeakAuras.IsAwesomeEnabled() then v["NAMEPLATE"] = L["Nameplates"] end return v diff --git a/WeakAurasOptions/VersionCheck.lua b/WeakAurasOptions/VersionCheck.lua index e9e4dd4..ba9ab04 100644 --- a/WeakAurasOptions/VersionCheck.lua +++ b/WeakAurasOptions/VersionCheck.lua @@ -3,7 +3,7 @@ local Private = select(2, ...) local L = WeakAuras.L -local optionsVersion = "5.19.9" +local optionsVersion = "5.19.10" if optionsVersion .. " Beta" ~= WeakAuras.versionString then local message = string.format(L["The WeakAuras Options Addon version %s doesn't match the WeakAuras version %s. If you updated the addon while the game was running, try restarting World of Warcraft. Otherwise try reinstalling WeakAuras"], diff --git a/WeakAurasOptions/WeakAurasOptions.toc b/WeakAurasOptions/WeakAurasOptions.toc index 75f052a..d7f41a5 100644 --- a/WeakAurasOptions/WeakAurasOptions.toc +++ b/WeakAurasOptions/WeakAurasOptions.toc @@ -1,7 +1,7 @@ ## Interface: 30300 ## Title: WeakAuras Options ## Author: The WeakAuras Team -## Version: 5.19.9 +## Version: 5.19.10 ## Notes: Options for WeakAuras ## Notes-esES: Opciones para WeakAuras ## Notes-esMX: Opciones para WeakAuras