diff --git a/WeakAuras/BossMods.lua b/WeakAuras/BossMods.lua index 7502571..023ed91 100644 --- a/WeakAuras/BossMods.lua +++ b/WeakAuras/BossMods.lua @@ -16,7 +16,6 @@ Private.ExecEnv.BossMods.DBM = { CopyBarToState = function(self, bar, states, timerId, extendTimer) extendTimer = extendTimer or 0 - if extendTimer + bar.duration < 0 then return end states[timerId] = states[timerId] or {} local state = states[timerId] state.show = true @@ -127,10 +126,21 @@ Private.ExecEnv.BossMods.DBM = { for timerId, bar in pairs(self.bars) do if not bar.paused then if bar.expirationTime < now then - self.bars[timerId] = nil - WeakAuras.ScanEvents("DBM_TimerStop", timerId) - if self.isGeneric then - WeakAuras.ScanEvents("BossMod_TimerStop", timerId) + if bar.scheduledScanExpireAt == nil or bar.scheduledScanExpireAt <= GetTime() then + self.bars[timerId] = nil + else + if self.nextExpire == nil then + self.nextExpire = bar.scheduledScanExpireAt + elseif bar.scheduledScanExpireAt < self.nextExpire then + self.nextExpire = bar.scheduledScanExpireAt + end + end + if not bar.expired then + bar.expired = true + WeakAuras.ScanEvents("DBM_TimerStop", timerId) + if self.isGeneric then + WeakAuras.ScanEvents("BossMod_TimerStop", timerId) + end end elseif self.nextExpire == nil then self.nextExpire = bar.expirationTime @@ -166,6 +176,7 @@ Private.ExecEnv.BossMods.DBM = { bar.spellId = tostring(spellId) bar.count = timerCount and tostring(timerCount) or "0" bar.dbmType = dbmType + bar.expired = nil local r, g, b = 0, 0, 0 if DBT.GetColorForType then @@ -212,10 +223,16 @@ Private.ExecEnv.BossMods.DBM = { end elseif event == "DBM_TimerStop" then local timerId = ... - self.bars[timerId] = nil - WeakAuras.ScanEvents("DBM_TimerStop", timerId) - if self.isGeneric then - WeakAuras.ScanEvents("BossMod_TimerStop", timerId) + local bar = self.bars[timerId] + if bar then + if bar.scheduledScanExpireAt == nil or bar.scheduledScanExpireAt <= GetTime() then + self.bars[timerId] = nil + end + bar.expired = true + WeakAuras.ScanEvents("DBM_TimerStop", timerId) + if self.isGeneric then + WeakAuras.ScanEvents("BossMod_TimerStop", timerId) + end end elseif event == "DBM_TimerPause" then local timerId = ... @@ -321,7 +338,7 @@ Private.ExecEnv.BossMods.DBM = { ScheduleCheck = function(self, fireTime) if not self.scheduled_scans[fireTime] then - self.scheduled_scans[fireTime] = timer:ScheduleTimerFixed(self.DoScan, fireTime - GetTime() + 0.1, self, fireTime) + self.scheduled_scans[fireTime] = timer:ScheduleTimerFixed(self.DoScan, fireTime - GetTime(), self, fireTime) end end } @@ -384,6 +401,7 @@ Private.event_prototypes["DBM Announce"] = { type = "spell", noValidation = true, showExactOption = false, + negativeIsEJ = true }, { name = "message", @@ -453,28 +471,43 @@ Private.event_prototypes["DBM Timer"] = { local counter = counter function copyOrSchedule(bar, cloneId) + local remainingTime + local changed + if bar.paused then + remainingTime = bar.remaining + extendTimer + else + remainingTime = bar.expirationTime - GetTime() + extendTimer + end if triggerUseRemaining then - local remainingTime - if bar.paused then - remainingTime = bar.remaining + extendTimer - else - remainingTime = bar.expirationTime - GetTime() + extendTimer - end - if remainingTime %s triggerRemaining then + if remainingTime > 0 and remainingTime %s triggerRemaining then Private.ExecEnv.BossMods.DBM:CopyBarToState(bar, states, cloneId, extendTimer) + changed = true else local state = states[cloneId] if state and state.show then state.show = false state.changed = true + changed = true end end - if remainingTime >= triggerRemaining and not bar.paused then - Private.ExecEnv.BossMods.DBM:ScheduleCheck(bar.expirationTime - triggerRemaining + extendTimer) + if not bar.paused then + if extendTimer > 0 then + bar.scheduledScanExpireAt = math.max(bar.scheduledScanExpireAt or 0, bar.expirationTime + extendTimer) + end + if remainingTime >= triggerRemaining then + Private.ExecEnv.BossMods.DBM:ScheduleCheck(bar.expirationTime - triggerRemaining + extendTimer) + end end else - Private.ExecEnv.BossMods.DBM:CopyBarToState(bar, states, cloneId, extendTimer) + if not bar.paused and extendTimer > 0 then + bar.scheduledScanExpireAt = math.max(bar.scheduledScanExpireAt or 0, bar.expirationTime + extendTimer) + end + if remainingTime > 0 then + Private.ExecEnv.BossMods.DBM:CopyBarToState(bar, states, cloneId, extendTimer) + changed = true + end end + return changed end if useClone then @@ -485,13 +518,12 @@ Private.event_prototypes["DBM Timer"] = { if Private.ExecEnv.BossMods.DBM:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerId, triggerDbmType) then local bar = Private.ExecEnv.BossMods.DBM:GetTimerById(timerId) if bar then - copyOrSchedule(bar, cloneId) - return true + return copyOrSchedule(bar, cloneId) end end elseif event == "DBM_TimerStop" and state then - local bar_remainingTime = GetTime() - state.expirationTime + (state.extend or 0) - if state.extend == 0 or bar_remainingTime > 0.2 then + local bar_remainingTime = state.expirationTime - GetTime() + (state.extend or 0) + if state.extend == 0 or bar_remainingTime <= 0 then state.show = false state.changed = true return true @@ -500,13 +532,12 @@ Private.event_prototypes["DBM Timer"] = { local changed for timerId, bar in pairs(Private.ExecEnv.BossMods.DBM:GetAllTimers()) do if Private.ExecEnv.BossMods.DBM:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerId, triggerDbmType) then - copyOrSchedule(bar, timerId) - changed = true + changed = copyOrSchedule(bar, timerId) or changed else local state = states[timerId] if state then - local bar_remainingTime = GetTime() - state.expirationTime + (state.extend or 0) - if state.extend == 0 or bar_remainingTime > 0.2 then + local bar_remainingTime = state.expirationTime - GetTime() + (state.extend or 0) + if state.extend == 0 or bar_remainingTime <= 0 then state.show = false state.changed = true changed = true @@ -524,8 +555,7 @@ Private.event_prototypes["DBM Timer"] = { end for timerId, bar in pairs(Private.ExecEnv.BossMods.DBM:GetAllTimers()) do if Private.ExecEnv.BossMods.DBM:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerId, triggerDbmType) then - copyOrSchedule(bar, timerId) - changed = true + changed = copyOrSchedule(bar, timerId) or changed end end return changed @@ -545,13 +575,12 @@ Private.event_prototypes["DBM Timer"] = { or not (state and state.show) or (state and state.show and state.expirationTime > (bar.expirationTime + extendTimer)) then - copyOrSchedule(bar, cloneId) - return true + return copyOrSchedule(bar, cloneId) end else if state and state.show then - local bar_remainingTime = GetTime() - state.expirationTime + (state.extend or 0) - if state.extend == 0 or bar_remainingTime > 0.2 then + local bar_remainingTime = state.expirationTime - GetTime() + (state.extend or 0) + if state.extend == 0 or bar_remainingTime <= 0 then state.show = false state.changed = true return true @@ -565,7 +594,7 @@ Private.event_prototypes["DBM Timer"] = { return ret:format( trigger.use_count and trigger.count or "", trigger.use_id and trigger.id or "", - trigger.use_spellId and trigger.spellId or "", + trigger.use_spellId and tostring(trigger.spellId) or "", trigger.use_message and trigger.message or "", trigger.use_message and trigger.message_operator or "", trigger.use_cloneId and "true" or "false", @@ -591,6 +620,7 @@ Private.event_prototypes["DBM Timer"] = { conditionType = "string", noValidation = true, showExactOption = false, + negativeIsEJ = true }, { name = "message", @@ -644,7 +674,6 @@ Private.ExecEnv.BossMods.BigWigs = { CopyBarToState = function(self, bar, states, timerId, extendTimer) extendTimer = extendTimer or 0 - if extendTimer + bar.duration < 0 then return end states[timerId] = states[timerId] or {} local state = states[timerId] state.show = true @@ -749,10 +778,21 @@ Private.ExecEnv.BossMods.BigWigs = { for timerId, bar in pairs(self.bars) do if not bar.paused then if bar.expirationTime < now then - self.bars[timerId] = nil - WeakAuras.ScanEvents("BigWigs_StopBar", timerId) - if self.isGeneric then - WeakAuras.ScanEvents("BossMod_TimerStop", timerId) + if bar.scheduledScanExpireAt == nil or bar.scheduledScanExpireAt <= GetTime() then + self.bars[timerId] = nil + else + if self.nextExpire == nil then + self.nextExpire = bar.scheduledScanExpireAt + elseif bar.scheduledScanExpireAt < self.nextExpire then + self.nextExpire = bar.scheduledScanExpireAt + end + end + if not bar.expired then + bar.expired = true + WeakAuras.ScanEvents("BigWigs_StopBar", timerId) + if self.isGeneric then + WeakAuras.ScanEvents("BossMod_TimerStop", timerId) + end end elseif self.nextExpire == nil then self.nextExpire = bar.expirationTime @@ -789,6 +829,7 @@ Private.ExecEnv.BossMods.BigWigs = { bar.expirationTime = expirationTime bar.icon = icon bar.isCooldown = isCD or false + bar.expired = nil local BWColorModule = BigWigs:GetPlugin("Colors") bar.bwBarColor = BWColorModule:GetColorTable("barColor", addon, spellId) bar.bwTextColor = BWColorModule:GetColorTable("barText", addon, spellId) @@ -810,8 +851,11 @@ Private.ExecEnv.BossMods.BigWigs = { end elseif event == "BigWigs_StopBar" then local addon, text = ... - if self.bars[text] then - self.bars[text] = nil + local bar = self.bars[text] + if bar then + if bar.scheduledScanExpireAt == nil or bar.scheduledScanExpireAt <= GetTime() then + self.bars[text] = nil + end WeakAuras.ScanEvents("BigWigs_StopBar", text) if self.isGeneric then WeakAuras.ScanEvents("BossMod_TimerStop", text) @@ -934,7 +978,7 @@ Private.ExecEnv.BossMods.BigWigs = { ScheduleCheck = function(self, fireTime) if not self.scheduled_scans[fireTime] then - self.scheduled_scans[fireTime] = timer:ScheduleTimerFixed(self.DoScan, fireTime - GetTime() + 0.1, self, fireTime) + self.scheduled_scans[fireTime] = timer:ScheduleTimerFixed(self.DoScan, fireTime - GetTime(), self, fireTime) end end } @@ -994,6 +1038,7 @@ Private.event_prototypes["BigWigs Message"] = { conditionType = "string", noValidation = true, showExactOption = false, + negativeIsEJ = true }, { name = "text", @@ -1064,28 +1109,43 @@ Private.event_prototypes["BigWigs Timer"] = { local counter = counter function copyOrSchedule(bar, cloneId) + local remainingTime + local changed + if bar.paused then + remainingTime = bar.remaining + extendTimer + else + remainingTime = bar.expirationTime - GetTime() + extendTimer + end if triggerUseRemaining then - local remainingTime - if bar.paused then - remainingTime = bar.remaining + extendTimer - else - remainingTime = bar.expirationTime - GetTime() + extendTimer - end - if remainingTime %s triggerRemaining then + if remainingTime > 0 and remainingTime %s triggerRemaining then Private.ExecEnv.BossMods.BigWigs:CopyBarToState(bar, states, cloneId, extendTimer) + changed = true else local state = states[cloneId] if state and state.show then state.show = false state.changed = true + changed = true end end - if remainingTime >= triggerRemaining and not bar.paused then - Private.ExecEnv.BossMods.BigWigs:ScheduleCheck(bar.expirationTime - triggerRemaining + extendTimer) + if not bar.paused then + if extendTimer > 0 then + bar.scheduledScanExpireAt = math.max(bar.scheduledScanExpireAt or 0, bar.expirationTime + extendTimer) + end + if remainingTime >= triggerRemaining then + Private.ExecEnv.BossMods.BigWigs:ScheduleCheck(bar.expirationTime - triggerRemaining + extendTimer) + end end else - Private.ExecEnv.BossMods.BigWigs:CopyBarToState(bar, states, cloneId, extendTimer) + if not bar.paused and extendTimer > 0 then + bar.scheduledScanExpireAt = math.max(bar.scheduledScanExpireAt or 0, bar.expirationTime + extendTimer) + end + if remainingTime > 0 then + Private.ExecEnv.BossMods.BigWigs:CopyBarToState(bar, states, cloneId, extendTimer) + changed = true + end end + return changed end if useClone then @@ -1096,13 +1156,12 @@ Private.event_prototypes["BigWigs Timer"] = { if Private.ExecEnv.BossMods.BigWigs:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerCast, triggerIsCooldown) then local bar = Private.ExecEnv.BossMods.BigWigs:GetTimerById(timerId) if bar then - copyOrSchedule(bar, cloneId) - return true + return copyOrSchedule(bar, cloneId) end end elseif event == "BigWigs_StopBar" and state then - local bar_remainingTime = GetTime() - state.expirationTime + (state.extend or 0) - if state.extend == 0 or bar_remainingTime > 0.2 then + local bar_remainingTime = state.expirationTime - GetTime() + (state.extend or 0) + if state.extend == 0 or bar_remainingTime <= 0 then state.show = false state.changed = true return true @@ -1111,8 +1170,7 @@ Private.event_prototypes["BigWigs Timer"] = { local changed for timerId, bar in pairs(Private.ExecEnv.BossMods.BigWigs:GetAllTimers()) do if Private.ExecEnv.BossMods.BigWigs:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerCast, triggerIsCooldown) then - copyOrSchedule(bar, timerId) - changed = true + changed = copyOrSchedule(bar, timerId) or changed end end return changed @@ -1125,8 +1183,7 @@ Private.event_prototypes["BigWigs Timer"] = { end for timerId, bar in pairs(Private.ExecEnv.BossMods.BigWigs:GetAllTimers()) do if Private.ExecEnv.BossMods.BigWigs:TimerMatches(timerId, triggerText, triggerTextOperator, triggerSpellId, counter, triggerCast, triggerIsCooldown) then - copyOrSchedule(bar, timerId) - changed = true + changed = copyOrSchedule(bar, timerId) or changed end end return changed @@ -1146,13 +1203,12 @@ Private.event_prototypes["BigWigs Timer"] = { or not (state and state.show) or (state and state.show and state.expirationTime > (bar.expirationTime + extendTimer)) then - copyOrSchedule(bar, cloneId) - return true + return copyOrSchedule(bar, cloneId) end else if state and state.show then - local bar_remainingTime = GetTime() - state.expirationTime + (state.extend or 0) - if state.extend == 0 or bar_remainingTime > 0.2 then + local bar_remainingTime = state.expirationTime - GetTime() + (state.extend or 0) + if state.extend == 0 or bar_remainingTime <= 0 then state.show = false state.changed = true return true @@ -1164,7 +1220,7 @@ Private.event_prototypes["BigWigs Timer"] = { ]=] return ret:format( trigger.use_count and trigger.count or "", - trigger.use_spellId and trigger.spellId or "", + trigger.use_spellId and tostring(trigger.spellId) or "", trigger.use_text and trigger.text or "", trigger.use_text and trigger.text_operator or "", trigger.use_cloneId and "true" or "false", @@ -1186,6 +1242,7 @@ Private.event_prototypes["BigWigs Timer"] = { conditionType = "string", noValidation = true, showExactOption = false, + negativeIsEJ = true }, { name = "text", @@ -1353,6 +1410,7 @@ Private.event_prototypes["Boss Mod Announce"] = { conditionType = "string", noValidation = true, showExactOption = false, + negativeIsEJ = true }, { name = "message", @@ -1429,28 +1487,43 @@ Private.event_prototypes["Boss Mod Timer"] = { local counter = counter function copyOrSchedule(bar, cloneId) + local remainingTime + local changed + if bar.paused then + remainingTime = bar.remaining + extendTimer + else + remainingTime = bar.expirationTime - GetTime() + extendTimer + end if triggerUseRemaining then - local remainingTime - if bar.paused then - remainingTime = bar.remaining + extendTimer - else - remainingTime = bar.expirationTime - GetTime() + extendTimer - end - if remainingTime %s triggerRemaining then + if remainingTime > 0 and remainingTime %s triggerRemaining then Private.ExecEnv.BossMods.Generic:CopyBarToState(bar, states, cloneId, extendTimer) + changed = true else local state = states[cloneId] if state and state.show then state.show = false state.changed = true + changed = true end end - if remainingTime >= triggerRemaining and not bar.paused then - Private.ExecEnv.BossMods.Generic:ScheduleCheck(bar.expirationTime - triggerRemaining + extendTimer) + if not bar.paused then + if extendTimer > 0 then + bar.scheduledScanExpireAt = math.max(bar.scheduledScanExpireAt or 0, bar.expirationTime + extendTimer) + end + if remainingTime >= triggerRemaining then + Private.ExecEnv.BossMods.Generic:ScheduleCheck(bar.expirationTime - triggerRemaining + extendTimer) + end end else - Private.ExecEnv.BossMods.Generic:CopyBarToState(bar, states, cloneId, extendTimer) + if not bar.paused and extendTimer > 0 then + bar.scheduledScanExpireAt = math.max(bar.scheduledScanExpireAt or 0, bar.expirationTime + extendTimer) + end + if remainingTime > 0 then + Private.ExecEnv.BossMods.Generic:CopyBarToState(bar, states, cloneId, extendTimer) + changed = true + end end + return changed end if useClone then @@ -1461,13 +1534,12 @@ Private.event_prototypes["Boss Mod Timer"] = { if Private.ExecEnv.BossMods.Generic:TimerMatchesGeneric(timerId, triggerText, triggerTextOperator, triggerSpellId, counter) then local bar = Private.ExecEnv.BossMods.Generic:GetTimerById(timerId) if bar then - copyOrSchedule(bar, cloneId) - return true + return copyOrSchedule(bar, cloneId) end end elseif event == "BossMod_TimerStop" and state then - local bar_remainingTime = GetTime() - state.expirationTime + (state.extend or 0) - if state.extend == 0 or bar_remainingTime > 0.2 then + local bar_remainingTime = state.expirationTime - GetTime() + (state.extend or 0) + if state.extend == 0 or bar_remainingTime <= 0 then state.show = false state.changed = true return true @@ -1476,13 +1548,12 @@ Private.event_prototypes["Boss Mod Timer"] = { local changed for timerId, bar in pairs(Private.ExecEnv.BossMods.Generic:GetAllTimers()) do if Private.ExecEnv.BossMods.Generic:TimerMatchesGeneric(timerId, triggerText, triggerTextOperator, triggerSpellId, counter) then - copyOrSchedule(bar, timerId) - changed = true + changed = copyOrSchedule(bar, timerId) or changed else local state = states[timerId] if state then - local bar_remainingTime = GetTime() - state.expirationTime + (state.extend or 0) - if state.extend == 0 or bar_remainingTime > 0.2 then + local bar_remainingTime = state.expirationTime - GetTime() + (state.extend or 0) + if state.extend == 0 or bar_remainingTime <= 0 then state.show = false state.changed = true changed = true @@ -1500,8 +1571,7 @@ Private.event_prototypes["Boss Mod Timer"] = { end for timerId, bar in pairs(Private.ExecEnv.BossMods.Generic:GetAllTimers()) do if Private.ExecEnv.BossMods.Generic:TimerMatchesGeneric(timerId, triggerText, triggerTextOperator, triggerSpellId, counter) then - copyOrSchedule(bar, timerId) - changed = true + changed = copyOrSchedule(bar, timerId) or changed end end return changed @@ -1521,13 +1591,12 @@ Private.event_prototypes["Boss Mod Timer"] = { or not (state and state.show) or (state and state.show and state.expirationTime > (bar.expirationTime + extendTimer)) then - copyOrSchedule(bar, cloneId) - return true + return copyOrSchedule(bar, cloneId) end else if state and state.show then - local bar_remainingTime = GetTime() - state.expirationTime + (state.extend or 0) - if state.extend == 0 or bar_remainingTime > 0.2 then + local bar_remainingTime = state.expirationTime - GetTime() + (state.extend or 0) + if state.extend == 0 or bar_remainingTime <= 0 then state.show = false state.changed = true return true @@ -1540,7 +1609,7 @@ Private.event_prototypes["Boss Mod Timer"] = { return ret:format( trigger.use_count and trigger.count or "", - trigger.use_spellId and trigger.spellId or "", + trigger.use_spellId and tostring(trigger.spellId) or "", trigger.use_message and trigger.message or "", trigger.use_message and trigger.message_operator or "", trigger.use_cloneId and "true" or "false", @@ -1560,6 +1629,7 @@ Private.event_prototypes["Boss Mod Timer"] = { conditionType = "string", noValidation = true, showExactOption = false, + negativeIsEJ = true }, { name = "message", diff --git a/WeakAuras/BuffTrigger2.lua b/WeakAuras/BuffTrigger2.lua index a7ab98a..c29afe7 100644 --- a/WeakAuras/BuffTrigger2.lua +++ b/WeakAuras/BuffTrigger2.lua @@ -365,7 +365,11 @@ local function UpdateMatchData(time, matchDataChanged, unit, index, filter, name -- Tell old auras that used this match data for id, triggerData in pairs(data.auras) do for triggernum in pairs(triggerData) do - if matchDataByTrigger[id] and matchDataByTrigger[id][triggernum] and matchDataByTrigger[id][triggernum][unit] and matchDataByTrigger[id][triggernum][unit][index] then + if matchDataByTrigger[id] + and matchDataByTrigger[id][triggernum] + and matchDataByTrigger[id][triggernum][unit] + and matchDataByTrigger[id][triggernum][unit][index] + then matchDataByTrigger[id][triggernum][unit][index] = nil matchDataChanged[id] = matchDataChanged[id] or {} matchDataChanged[id][triggernum] = true @@ -1815,6 +1819,17 @@ local function EventHandler(frame, event, arg1, arg2, ...) tinsert(unitsToRemove, unit) end end + + if arg1 then + -- Initial login has a bug where the tooltip information is not available, + -- so update tooltips 2s after login + timer:ScheduleTimer(function() + for unit, matchtDataPerUnit in pairs(matchData) do + EventHandler(frame, "UNIT_AURA", unit) + end + end, 2) + end + elseif event == "RAID_TARGET_UPDATE" then ScanRaidMarkScanFunc(matchDataChanged) end diff --git a/WeakAuras/Modernize.lua b/WeakAuras/Modernize.lua index 9d1dd96..cde1b76 100644 --- a/WeakAuras/Modernize.lua +++ b/WeakAuras/Modernize.lua @@ -1398,10 +1398,13 @@ function Private.Modernize(data) "spellId", "spellName", }, + ["Spell Cast Succeeded"] = { + "spellId" + }, ["Location"] = { "zone", "subzone", - } + }, } for _, triggerData in ipairs(data.triggers) do local t = triggerData.trigger diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index ba7cbab..6f1927c 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -985,7 +985,7 @@ Private.load_prototype = { name = "spellknown", display = L["Spell Known"], type = "spell", - test = "WeakAuras.IsSpellKnownForLoad(%s, %s)", + test = "WeakAuras.IsSpellKnownForLoad(%q, %s)", events = {"SPELLS_CHANGED", "UNIT_PET"}, showExactOption = true }, @@ -993,7 +993,7 @@ Private.load_prototype = { name = "not_spellknown", display = WeakAuras.newFeatureString .. L["|cFFFF0000Not|r Spell Known"], type = "spell", - test = "not WeakAuras.IsSpellKnownForLoad(%s, %s)", + test = "not WeakAuras.IsSpellKnownForLoad(%q, %s)", events = {"SPELLS_CHANGED", "UNIT_PET"}, showExactOption = true }, diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index cac4106..721635a 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -5114,7 +5114,7 @@ function Private.AnchorFrame(data, region, parent, force) local anchorPoint = data.anchorPoint if data.parent then - if data.anchorFrameType == "SCREEN" or data.anchorFrameType == "UIPARENT" or data.anchorFrameType == "MOUSE" then + if data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE" then anchorPoint = "CENTER" end else diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingUpdateButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingUpdateButton.lua index e3d48bd..9e2a95e 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingUpdateButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingUpdateButton.lua @@ -71,54 +71,12 @@ local methods = { self.menu = {} - self.frame:SetScript("OnMouseUp", function() - Hide_Tooltip() - self:SetMenu() - EasyMenu(self.menu, WeakAuras_DropDownMenu, self.frame, 0, 0, "MENU") - end) - self.frame:SetScript("OnEnter", function() self:SetNormalTooltip() Show_Long_Tooltip(self.frame, self.frame.description) end) self.frame:SetScript("OnLeave", Hide_Tooltip) end, - ["SetMenu"] = function(self) - wipe(self.menu) - for auraId in pairs(self.linkedAuras) do - if not self.linkedChildren[auraId] then - tinsert(self.menu, - { - text = auraId, - notCheckable = true, - hasArrow = true, - menuList = { - { - text = L["Update"], - notCheckable = true, - func = function() - local auraData = WeakAuras.GetData(auraId) - if auraData then - local success, error = WeakAuras.Import(self.companionData.encoded, auraData) - if not success and error ~= nil then - WeakAuras.prettyPrint(error) - end - end - end - }, - { - text = L["Ignore updates"], - notCheckable = true, - func = function() - StaticPopup_Show("WEAKAURAS_CONFIRM_IGNORE_UPDATES", "", "", auraId) - end - } - } - } - ) - end - end - end, ["SetLogo"] = function(self, path) self.frame.updateLogo.tex:SetTexture(path) end, diff --git a/WeakAurasOptions/BuffTrigger2.lua b/WeakAurasOptions/BuffTrigger2.lua index 07d7c83..821c299 100644 --- a/WeakAurasOptions/BuffTrigger2.lua +++ b/WeakAurasOptions/BuffTrigger2.lua @@ -205,7 +205,6 @@ local function CreateNameOptions(aura_options, data, trigger, size, isExactSpell end, validate = isExactSpellId and WeakAuras.ValidateNumeric or nil, control = "WeakAurasInputFocus", - getWithFocus = function() return trigger[optionKey] and trigger[optionKey][i] or "" end } end -- VALIDATE ? diff --git a/WeakAurasOptions/CommonOptions.lua b/WeakAurasOptions/CommonOptions.lua index 2799cd5..c05975c 100644 --- a/WeakAurasOptions/CommonOptions.lua +++ b/WeakAurasOptions/CommonOptions.lua @@ -1158,7 +1158,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g if IsParentDynamicGroup() then return true end - return data.anchorFrameType == "SCREEN" or data.anchorFrameType == "UIPARENT" or data.anchorFrameType == "MOUSE"; + return data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE"; else return data.anchorFrameType == "MOUSE"; end @@ -1175,7 +1175,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g if IsGroupByFrame() then return true end - if (data.anchorFrameType ~= "SCREEN" and data.anchorFrameType ~= "UIPARENT") then + if (data.anchorFrameType ~= "SCREEN") then return true; end if (data.parent) then