- removed UNIT_RUNIC_POWER hack in player & target mana modules since blizzard seems to have fixed the bug in the latest beta build

- fixed bug with runes module where the last rune would never show as being used (because i was thinking in 0-based array world)
- added hax to the runes module to swap placement of frost and unholy runes since blizzard has had their hack in for 2 builds now
This commit is contained in:
Parnic
2008-08-14 04:30:36 +00:00
parent 3edac3cacd
commit 5667cb0cc6
3 changed files with 19 additions and 10 deletions

View File

@ -107,11 +107,11 @@ function PlayerMana.prototype:Enable(core)
self:RegisterEvent("UNIT_MAXENERGY", "Update")
-- DK rune stuff
if IceHUD.WowVer >= 30000 then
if GetCVarBool("predictedPower") and self.frame then
self.frame:SetScript("OnUpdate", function() self:Update(self.unit) end)
else
-- if GetCVarBool("predictedPower") and self.frame then
-- self.frame:SetScript("OnUpdate", function() self:Update(self.unit) end)
-- else
self:RegisterEvent("UNIT_RUNIC_POWER", "Update")
end
-- end
self:RegisterEvent("UNIT_MAXRUNIC_POWER", "Update")
end

View File

@ -162,7 +162,7 @@ end
-- simply shows/hides the foreground rune when it becomes usable/unusable. this allows the background transparent rune to show only
function Runes.prototype:UpdateRunePower(rune, usable)
if not rune or not self.frame.graphical or #self.frame.graphical <= rune then
if not rune or not self.frame.graphical or #self.frame.graphical < rune then
return
end
@ -245,7 +245,16 @@ function Runes.prototype:CreateRune(i, type, name)
self.frame.graphicalBG[i]:SetFrameStrata("BACKGROUND")
self.frame.graphicalBG[i]:SetWidth(self.runeSize)
self.frame.graphicalBG[i]:SetHeight(self.runeSize)
self.frame.graphicalBG[i]:SetPoint("TOPLEFT", (i-1) * (self.runeSize-5) + (i-1), 0)
-- hax for blizzard's swapping the unholy and frost rune placement on the default ui...
local runeSwapI
if i == 3 or i == 4 then
runeSwapI = i + 2
elseif i == 5 or i == 6 then
runeSwapI = i - 2
else
runeSwapI = i
end
self.frame.graphicalBG[i]:SetPoint("TOPLEFT", (runeSwapI-1) * (self.runeSize-5) + (runeSwapI-1), 0)
self.frame.graphicalBG[i]:SetAlpha(0.25)
self.frame.graphicalBG[i]:SetStatusBarColor(self:GetColor("Runes"..name))

View File

@ -41,11 +41,11 @@ function TargetMana.prototype:Enable(core)
self:RegisterEvent("UNIT_FLAGS", "Update")
-- DK rune stuff
if IceHUD.WowVer >= 30000 then
if GetCVarBool("predictedPower") and self.frame then
self.frame:SetScript("OnUpdate", function() self:Update(self.unit) end)
else
-- if GetCVarBool("predictedPower") and self.frame then
-- self.frame:SetScript("OnUpdate", function() self:Update(self.unit) end)
-- else
self:RegisterEvent("UNIT_RUNIC_POWER", "Update")
end
-- end
self:RegisterEvent("UNIT_MAXRUNIC_POWER", "Update")
end