Fixed bad SetCooldown usage in the Runes frame (ticket #189).

This commit is contained in:
Parnic
2015-06-25 10:45:16 -05:00
parent d946fe36dd
commit 1dfbd13d67

View File

@ -224,10 +224,10 @@ function Runes.prototype:UpdateRunePower(event, rune, dontFlash)
return return
end end
-- DEFAULT_CHAT_FRAME:AddMessage("Runes.prototype:UpdateRunePower: rune="..rune.." usable="..(usable and "yes" or "no").." GetRuneType(rune)="..GetRuneType(rune));
local start, duration, usable = GetRuneCooldown(rune) local start, duration, usable = GetRuneCooldown(rune)
-- print("Runes.prototype:UpdateRunePower: rune="..rune.." usable="..(usable and "yes" or "no").." GetRuneType(rune)="..GetRuneType(rune));
if usable then if usable then
if self.moduleSettings.cooldownMode == "Cooldown" then if self.moduleSettings.cooldownMode == "Cooldown" then
self.frame.graphical[rune].cd:Hide() self.frame.graphical[rune].cd:Hide()
@ -249,12 +249,12 @@ function Runes.prototype:UpdateRunePower(event, rune, dontFlash)
end end
else else
if self.moduleSettings.cooldownMode == "Cooldown" then if self.moduleSettings.cooldownMode == "Cooldown" then
self.frame.graphical[rune].cd:SetCooldown(GetRuneCooldown(rune)) self.frame.graphical[rune].cd:SetCooldown(start, duration)
self.frame.graphical[rune].cd:Show() self.frame.graphical[rune].cd:Show()
elseif self.moduleSettings.cooldownMode == "Alpha" then elseif self.moduleSettings.cooldownMode == "Alpha" then
self.frame.graphical[rune]:SetAlpha(0.2) self.frame.graphical[rune]:SetAlpha(0.2)
elseif self.moduleSettings.cooldownMode == "Both" then elseif self.moduleSettings.cooldownMode == "Both" then
self.frame.graphical[rune].cd:SetCooldown(GetRuneCooldown(rune)) self.frame.graphical[rune].cd:SetCooldown(start, duration)
self.frame.graphical[rune].cd:Show() self.frame.graphical[rune].cd:Show()
self.frame.graphical[rune]:SetAlpha(0.2) self.frame.graphical[rune]:SetAlpha(0.2)
end end