from retail

This commit is contained in:
NoM0Re
2025-02-09 14:21:45 +01:00
parent 4f40aa0b40
commit f3a7bb8993
3 changed files with 31 additions and 5 deletions
+2 -2
View File
@@ -8,11 +8,11 @@ WeakAuras.halfWidth = WeakAuras.normalWidth / 2
WeakAuras.doubleWidth = WeakAuras.normalWidth * 2
local versionStringFromToc = GetAddOnMetadata("WeakAuras", "Version")
local versionString = "5.19.0"
local versionString = "5.19.0 Beta"
local buildTime = "20250127040000"
local isAwesomeEnabled = C_NamePlate and C_NamePlate.GetNamePlateForUnit or false
WeakAuras.versionString = versionStringFromToc
WeakAuras.versionString = versionString
WeakAuras.buildTime = buildTime
WeakAuras.newFeatureString = "|TInterface\\OptionsFrame\\UI-OptionsFrame-NewFeatureIcon:0|t"
WeakAuras.BuildInfo = select(4, GetBuildInfo())
+28 -2
View File
@@ -403,6 +403,8 @@ local function UpdateProgressFromState(self, minMaxConfig, state, progressSource
local inverseProperty = progressSource[5]
local pausedProperty = progressSource[6]
local remainingProperty = progressSource[7]
local useAdditionalProgress = progressSource[8]
if progressType == "number" then
local value = state[property]
if type(value) ~= "number" then value = 0 end
@@ -435,6 +437,13 @@ local function UpdateProgressFromState(self, minMaxConfig, state, progressSource
if self.UpdateValue then
self:UpdateValue()
end
if self.SetAdditionalProgress then
if useAdditionalProgress then
self:SetAdditionalProgress(state.additionalProgress, adjustMin, max, false)
else
self:SetAdditionalProgress(nil)
end
end
elseif progressType == "timer" then
local expirationTime
local paused = pausedProperty and state[pausedProperty]
@@ -484,6 +493,13 @@ local function UpdateProgressFromState(self, minMaxConfig, state, progressSource
if self.UpdateTime then
self:UpdateTime()
end
if self.SetAdditionalProgress then
if useAdditionalProgress then
self:SetAdditionalProgress(state.additionalProgress, adjustMin, max, inverse)
else
self:SetAdditionalProgress(nil)
end
end
elseif progressType == "elapsedTimer" then
local startTime = state[property] or math.huge
local duration = totalProperty and state[totalProperty] or 0
@@ -514,11 +530,18 @@ local function UpdateProgressFromState(self, minMaxConfig, state, progressSource
if self.UpdateTime then
self:UpdateTime()
end
if self.SetAdditionalProgress then
if useAdditionalProgress then
self:SetAdditionalProgress(state.additionalProgress, adjustMin, max, false)
else
self:SetAdditionalProgress(nil)
end
end
end
end
local autoTimedProgressSource = {-1, "timer", "expirationTime", "duration", "inverse", "paused", "remaining"}
local autoStaticProgressSource = {-1, "number", "value", "total", nil, nil, nil, nil}
local autoTimedProgressSource = {-1, "timer", "expirationTime", "duration", "inverse", "paused", "remaining", true}
local autoStaticProgressSource = {-1, "number", "value", "total", nil, nil, nil, nil, true}
local function UpdateProgressFromAuto(self, minMaxConfig, state)
if state.progressType == "timed" then
UpdateProgressFromState(self, minMaxConfig, state, autoTimedProgressSource)
@@ -535,6 +558,9 @@ local function UpdateProgressFromAuto(self, minMaxConfig, state)
if self.UpdateTime then
self:UpdateTime()
end
if self.SetAdditionalProgress then
self:SetAdditionalProgress(nil)
end
end
end
+1 -1
View File
@@ -4,7 +4,7 @@ local L = WeakAuras.L
local optionsVersion = GetAddOnMetadata(AddonName, "Version")
if optionsVersion ~= WeakAuras.versionString then
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"],
optionsVersion, WeakAuras.versionString)
WeakAuras.IsLibsOk = function() return false end