ascott18 / TellMeWhen

TellMeWhen is a combat tracking AddOn for World of Warcraft Retail and Classic
https://wow.curseforge.com/projects/tellmewhen
GNU General Public License v3.0
86 stars 11 forks source link

Counters don't reset to default value when closing the config window #2112

Closed simes007us closed 11 months ago

simes007us commented 11 months ago

WoW Version

Retail

TellMeWhen Version

10.1.6

Describe the bug

Counters don't reset to default value when closing the config window. I've made a buff counter for Rogue's Roll the Bones If you're editing when the counter is active it won't clear itself and will force you to reload ui.

Export Strings

^1^T^SGroups^T ^N1^T ^SGUID^STMW:group:1a3FrTgZMJym ^SPoint^T ^Sy^F6978227713081344 ^f-46^Sx ^F7506091004919808^f-52 ^Spoint^SBOTTOM ^SrelativePoint^SBOTTOM ^t^SIcons^T ^N1^T ^SShowTimer^B ^SType^Sbuff ^SName^SSlice~`and~`Dice ^SShowTimerText^B ^SEnabled^B ^t^N2^T ^SUnit^S ^SType^Sconditionicon ^SConditions^T ^N1^T ^SType^SCOUNTER ^SOperator^S< ^SLevel^N2 ^SName^Sbuffs ^t^N2^T ^SType^SBUFFNUMBER ^SChecked^B ^SOperator^S~|= ^SAndOr^SOR ^SName^SSkull~`and~`Crossbones ^SLevel^N1 ^t^Sn^N2 ^t^SIcons^T ^N1^STMW:icon:1bEn1MNiVdOx ^t^SEnabled^B ^SSettingsPerView^T ^Sicon^T ^STexts^T ^N1^S[Counter("buffs")] ^N2^S[Stacks:Hide(0)] ^t^t^t^SCustomTex^S315508 ^t^N3^T ^SShowTimer^B ^SType^Sbuff ^SName^SBlade~`Flurry ^SShowTimerText^B ^SEnabled^B ^t^t^SName^SRogue ^t^N2^T ^SGUID^STMW:group:1bEmxjBOqqmF ^SScale^F5191634060836864 ^f-51^SPoint ^T^Sy^F-8902103970908198 ^f-48^Sx ^F5595598022442355^f-45 ^t^SColumns^N6 ^SIcons^T ^N1^T ^SShowTimer^B ^SType^Sbuff ^SIcons^T ^N1^STMW:icon:1bEmxjBUIIOd ^t^SName^SGrand~`Melee ^SGUID^STMW:icon:1bEmxjBR3Z8U ^SOnlyMine^B ^SShowTimerText^B ^SEvents^T ^N1^T ^SType^SCounter ^SCounter^Sbuffs ^SEvent^SOnStart ^t^N2^T ^SType^SCounter ^SCounter^Sbuffs ^SCounterOperation^S- ^SEvent^SOnFinish ^t^Sn^N2 ^t^SCustomTex^S193358 ^SFakeHidden^B ^SEnabled^B ^t^N2^T ^SShowTimer^B ^SType^Sbuff ^SName^STrue~`Bearing ^SGUID^STMW:icon:1bEmxjBUIIOd ^SOnlyMine^B ^SShowTimerText^B ^SEvents^T ^N1^T ^SType^SCounter ^SCounter^Sbuffs ^SEvent^SOnStart ^t^N2^T ^SType^SCounter ^SCounter^Sbuffs ^SCounterOperation^S- ^SEvent^SOnFinish ^t^Sn^N2 ^t^SCustomTex^S193359 ^SFakeHidden^B ^SEnabled^B ^t^N3^T ^SShowTimer^B ^SType^Sbuff ^SName^SBroadside ^SGUID^STMW:icon:1bEmxjBXX9Si ^SOnlyMine^B ^SShowTimerText^B ^SEvents^T ^N1^T ^SType^SCounter ^SCounter^Sbuffs ^SEvent^SOnStart ^t^N2^T ^SType^SCounter ^SCounter^Sbuffs ^SCounterOperation^S- ^SEvent^SOnFinish ^t^Sn^N2 ^t^SCustomTex^S193356 ^SFakeHidden^B ^SEnabled^B ^t^N4^T ^SShowTimer^B ^SType^Sbuff ^SName^SRuthless~`Precision ^SGUID^STMW:icon:1bEmxjBb4gO3 ^SOnlyMine^B ^SShowTimerText^B ^SEvents^T ^N1^T ^SType^SCounter ^SCounter^Sbuffs ^SEvent^SOnStart ^t^N2^T ^SType^SCounter ^SCounter^Sbuffs ^SCounterOperation^S- ^SEvent^SOnFinish ^t^Sn^N2 ^t^SCustomTex^S193357 ^SFakeHidden^B ^SEnabled^B ^t^N5^T ^SShowTimer^B ^SType^Sbuff ^SName^SSkull~`and~`Crossbones ^SGUID^STMW:icon:1bEmyUcaJpKC ^SOnlyMine^B ^SShowTimerText^B ^SEvents^T ^N1^T ^SType^SCounter ^SCounter^Sbuffs ^SEvent^SOnStart ^t^N2^T ^SType^SCounter ^SCounter^Sbuffs ^SCounterOperation^S- ^SEvent^SOnFinish ^t^Sn^N2 ^t^SCustomTex^S199603 ^SFakeHidden^B ^SEnabled^B ^t^N6^T ^SShowTimer^B ^SType^Sbuff ^SName^SBuried~`Treasure ^SGUID^STMW:icon:1bEn1MNiVdOx ^SOnlyMine^B ^SShowTimerText^B ^SEvents^T ^N1^T ^SType^SCounter ^SCounter^Sbuffs ^SEvent^SOnStart ^t^N2^T ^SType^SCounter ^SCounter^Sbuffs ^SCounterOperation^S- ^SEvent^SOnFinish ^t^Sn^N2 ^t^SCustomTex^S199600 ^SFakeHidden^B ^SEnabled^B ^t^t^SName^SRoll~`the~`Bones ^t^t^SNumGroups^N2 ^SVersion^N101600 ^t^N101600^S~`~| ^Sprofile^SScruff~`-~`Galakrond ^^
Alwies commented 11 months ago

Disclaimer I do not develop TMW.

That's expect behavior. There's plenty of scenarios where you wouldn't want counters to reset. There also isn't a default value to reset to.

But you don't need to reload UI. There's a trigger "on icon setup" that will trigger every time an icon initializes, which means on login, after a /reload or when exiting TMW config mode. So you can use this to set the counter to a specific value on exiting TMW options.

Do note though, this will create a new issue where if you open/close TMW while the buffs are active it'll reset the counter to 0. Then when the buffs disappear it'll still apply the -1 meaning you counter will go into the negatives. Another reason why having a default value is a bad idea. Of course just opening/closing TMW config mode is a relatively easy fix.

simes007us commented 11 months ago

Thanks! I think the on initialization notification will fix my issue. I'm making a buff counter for roll the bones on rogue

Simon

On Sat, Oct 28, 2023, 8:20 PM Alwies @.***> wrote:

Disclaimer I do not develop TMW.

That's expect behavior. There's plenty of scenarios where you wouldn't want counters to reset. There also isn't a default value to reset to.

But you don't need to reload UI. There's a trigger "on icon setup" that will trigger every time an icon initializes, which means on login, after a /reload or when exiting TMW config mode. So you can use this to set the counter to a specific value on exiting TMW options.

Do note though, this will create a new issue where if you open/close TMW while the buffs are active it'll reset the counter to 0. Then when the buffs disappear it'll still apply the -1 meaning you counter will go into the negatives. Another reason why having a default value is a bad idea. Of course just opening/closing TMW config mode is a relatively easy fix.

— Reply to this email directly, view it on GitHub https://github.com/ascott18/TellMeWhen/issues/2112#issuecomment-1783986885, or unsubscribe https://github.com/notifications/unsubscribe-auth/A36PQBR4GY4YOJVNILMKAW3YBW4NTAVCNFSM6AAAAAA6SDZP62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTHE4DMOBYGU . You are receiving this because you authored the thread.Message ID: @.***>

ascott18 commented 11 months ago

Thanks @Alwies. This is indeed working as intended.