Skip to content

Commit 3331624

Browse files
committed
fix: #2410 - Buff/Debuff icons rarely failing to emit a duration object
1 parent 9922c22 commit 3331624

6 files changed

Lines changed: 14 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v12.0.12
2+
* Fix #2410 - Buff/Debuff icons rarely failing to emit a duration object
3+
14
## v12.0.11
25
* Fix #2401 - Lua Value icon type to not break when the user code returns secrets.
36
* Fix #2381 - Icon sometimes has a delay in showing as ready.

Components/IconModules/IconModule_CooldownSweep/CooldownSweep.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,10 @@ if TMW.clientHasSecrets then
333333
cd:SetCooldownFromDurationObject(self.durObj)
334334
else
335335
if issecretvalue(mainStart) or issecretvalue(mainDuration) or issecretvalue(self.modRate) then
336-
error(("TMW %s: Unexpected secret to SetCooldown. %s, %s, %s, %s, %s"):format(TELLMEWHEN_VERSIONNUMBER, tostring(self.icon), self.icon.Type, tostring(issecretvalue(mainStart)), tostring(issecretvalue(mainDuration)), tostring(issecretvalue(self.modRate))))
336+
TMW:Error(("Unexpected secret to SetCooldown. %s, %s, %s, %s, %s"):format(tostring(self.icon), self.icon.Type, tostring(issecretvalue(mainStart)), tostring(issecretvalue(mainDuration)), tostring(issecretvalue(self.modRate))))
337+
else
338+
cd:SetCooldown(mainStart, mainDuration, self.modRate)
337339
end
338-
cd:SetCooldown(mainStart, mainDuration, self.modRate)
339340
end
340341

341342
-- Handle charges of spells that aren't completely depleted.

Components/IconTypes/IconType_buff/buff.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,8 @@ function Type:HandleYieldedInfo(icon, iconToSet, unit, instance)
872872
if issecretvalue(instance.duration) then
873873
-- Match secret state of unknown start so secret tests don't mismatch between start + duration
874874
start = secretwrap(start)
875+
-- Ensure non-nil durObj so we don't attempt SetCooldown with secrets.
876+
durObj = C_DurationUtil.CreateDuration()
875877
end
876878
end
877879

Components/IconTypes/IconType_buffcheck/buffcheck.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ function Type:HandleYieldedInfo(icon, iconToSet, unit, instance)
338338
if issecretvalue(instance.duration) then
339339
-- Match secret state of unknown start so secret tests don't mismatch between start + duration
340340
start = secretwrap(start)
341+
-- Ensure non-nil durObj so we don't attempt SetCooldown with secrets.
342+
durObj = C_DurationUtil.CreateDuration()
341343
end
342344
end
343345
else

Options/CHANGELOG.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ if not TMW then return end
33
TMW.CHANGELOG_LASTVER="10.0.0"
44

55
TMW.CHANGELOG = [==[
6+
## v12.0.12
7+
* Fix #2410 - Buff/Debuff icons rarely failing to emit a duration object
8+
69
## v12.0.11
710
* Fix #2401 - Lua Value icon type to not break when the user code returns secrets.
811
* Fix #2381 - Icon sometimes has a delay in showing as ready.

TellMeWhen.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
## X-WoWI-ID: 10855
1919
## X-Wago-ID: ZQ6aZqKW
2020

21-
## Version: 12.0.11
21+
## Version: 12.0.12
2222
## Author: Cybeloras of Aerie Peak
2323
## IconTexture: Interface\Addons\TellMeWhen\Textures\LDB Icon
2424
## AddonCompartmentFunc: TellMeWhen_OnAddonCompartmentClick

0 commit comments

Comments
 (0)