Thread Tools Display Modes
08-06-16, 01:54 AM   #1
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Could it be a bug with aura element?

Hi all,

I have noticed this issue(?) about 2 days ago, tried to figure it out by myself and failed...

The current bug is about the cooldown display of aura element.

Let's say I have these 5 different buffs.



As I get them, cooldowns of each buffs will be displayed properly.

However, when I log-out and re-enter the toon, this strange thing will happen.



The cooldown is increased by '1h'.
(Yeah, I know that '1h' does not actually mean a whole hour in this case, but it is still increased ...)

I've set some prints within L#201~L#208 to see what is going wrong.

Lua Code:
  1. if(cd and not icons.disableCooldown) then
  2.     if(duration and duration > 0) then
  3.         print(icon:GetName() .. ": " .. timeLeft)
  4.         print(icon:GetName() .. ": " .. timeLeft - duration .. ", " .. duration)
  5.  
  6.         cd:SetCooldown(timeLeft - duration, duration)
  7.         cd:Show()
  8.     else
  9.         cd:Hide()
  10.     end
  11. end

And here's the result that I got when I re-entered a toon 3 times.



If my understanding is correct, "timeLeft" variable should remain still, but it is actually (slightly...) increased by certain amount.

The cooldown text '2h' does not seem to be changing until it's expiration as well.

I thought my custom CreateIcon constructor was the one that caused this issue, but it seems to be acting same with default constructor.

Lua Code:
  1. A.CreateAura = function(f, unit)
  2.     A.CreateBuffs(f, unit);
  3.     A.CreateDebuffs(f, unit);
  4. end
  5.  
  6. A.CreateBuffs = function(f, unit)
  7.     local Buffs = CreateFrame("Frame", "$parentBuffs", f);
  8.     Buffs:SetPoint("BOTTOMLEFT", f, "TOPLEFT", 0, 20);
  9.     Buffs:SetSize(G["buff"]["frameSize"], G["buff"]["frameSize"] * 2 - G["buff"]["spacing"]);
  10.  
  11.     Buffs.size = G["buff"]["size"];
  12.     Buffs.spacing = G["buff"]["spacing"];
  13.     Buffs.num = 32;
  14.  
  15.     f.Buffs = Buffs;
  16. end
  17.  
  18. A.CreateDebuffs = function(f, unit)
  19.     local Debuffs = CreateFrame("Frame", "$parentDebuffs", f);
  20.     Debuffs:SetPoint("BOTTOMRIGHT", f, "TOPRIGHT", 0, 20);
  21.     Debuffs:SetSize(G["buff"]["frameSize"], G["buff"]["frameSize"] * 2 - G["buff"]["spacing"]);
  22.  
  23.     Debuffs.size = G["buff"]["size"];
  24.     Debuffs.spacing = G["buff"]["spacing"];
  25.     Debuffs['growth-x'] = "LEFT";
  26.     Debuffs.initialAnchor = "BOTTOMRIGHT";
  27.     Debuffs.num = 32;
  28.  
  29.     f.Debuffs = Debuffs;
  30. end

EDIT: For 30 minutes buff, the cooldown text displays '31m' even if it acutally expires after 25 minutes.

EDIT1: As long as the toon is logged in, it works fine. However, once I log off and re-enter the toon, this strange thing happens

Last edited by Layback_ : 08-06-16 at 02:46 AM.
  Reply With Quote
08-06-16, 03:27 AM   #2
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
That's just how things work on blizz side. oUF doesn't create these values, it gets them via API.
__________________
  Reply With Quote
08-06-16, 03:52 AM   #3
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Originally Posted by lightspark View Post
That's just how things work on blizz side. oUF doesn't create these values, it gets them via API.
Yeah, it looks like i missed L#139 where it gets data from UnitAura(unit, index, filter) jeez...

really sorry about that...

I'm so stupid D:

But, I still don't get why and how it is resulting in such error(?)...

Last edited by Layback_ : 08-06-16 at 03:57 AM.
  Reply With Quote
08-06-16, 03:59 AM   #4
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by Layback_ View Post
Yeah, it looks like i missed L#139 where it gets data from UnitAura(unit, index, filter) jeez...

really sorry about that...

I'm so stupid D:

But, I still don't get why and how it is resulting in such error(?)...
Even default CDs have same behaviour. No one knows why and how, as I said, that's just how things are on blizz side, deal w/ it.
__________________
  Reply With Quote
08-06-16, 04:28 AM   #5
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Originally Posted by lightspark View Post
Even default CDs have same behaviour. No one knows why and how, as I said, that's just how things are on blizz side, deal w/ it.
oh... I thought you meant by that weird variation on timeLeft variable.

If that's how the default CD ones behave, I should deal with it then.

Thank you for letting me know!

EDIT: nvm... I guess the value of timeLeft variable should vary as the expiration time changes on new session...

Sorry about confusion...

Last edited by Layback_ : 08-06-16 at 06:28 AM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Could it be a bug with aura element?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off