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:
if(cd and not icons.disableCooldown) then
if(duration and duration > 0) then
print(icon:GetName() .. ": " .. timeLeft)
print(icon:GetName() .. ": " .. timeLeft - duration .. ", " .. duration)
cd:SetCooldown(timeLeft - duration, duration)
cd:Show()
else
cd:Hide()
end
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:
A.CreateAura = function(f, unit)
A.CreateBuffs(f, unit);
A.CreateDebuffs(f, unit);
end
A.CreateBuffs = function(f, unit)
local Buffs = CreateFrame("Frame", "$parentBuffs", f);
Buffs:SetPoint("BOTTOMLEFT", f, "TOPLEFT", 0, 20);
Buffs:SetSize(G["buff"]["frameSize"], G["buff"]["frameSize"] * 2 - G["buff"]["spacing"]);
Buffs.size = G["buff"]["size"];
Buffs.spacing = G["buff"]["spacing"];
Buffs.num = 32;
f.Buffs = Buffs;
end
A.CreateDebuffs = function(f, unit)
local Debuffs = CreateFrame("Frame", "$parentDebuffs", f);
Debuffs:SetPoint("BOTTOMRIGHT", f, "TOPRIGHT", 0, 20);
Debuffs:SetSize(G["buff"]["frameSize"], G["buff"]["frameSize"] * 2 - G["buff"]["spacing"]);
Debuffs.size = G["buff"]["size"];
Debuffs.spacing = G["buff"]["spacing"];
Debuffs['growth-x'] = "LEFT";
Debuffs.initialAnchor = "BOTTOMRIGHT";
Debuffs.num = 32;
f.Debuffs = Debuffs;
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