mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
- 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:
@ -107,11 +107,11 @@ function PlayerMana.prototype:Enable(core)
|
|||||||
self:RegisterEvent("UNIT_MAXENERGY", "Update")
|
self:RegisterEvent("UNIT_MAXENERGY", "Update")
|
||||||
-- DK rune stuff
|
-- DK rune stuff
|
||||||
if IceHUD.WowVer >= 30000 then
|
if IceHUD.WowVer >= 30000 then
|
||||||
if GetCVarBool("predictedPower") and self.frame then
|
-- if GetCVarBool("predictedPower") and self.frame then
|
||||||
self.frame:SetScript("OnUpdate", function() self:Update(self.unit) end)
|
-- self.frame:SetScript("OnUpdate", function() self:Update(self.unit) end)
|
||||||
else
|
-- else
|
||||||
self:RegisterEvent("UNIT_RUNIC_POWER", "Update")
|
self:RegisterEvent("UNIT_RUNIC_POWER", "Update")
|
||||||
end
|
-- end
|
||||||
self:RegisterEvent("UNIT_MAXRUNIC_POWER", "Update")
|
self:RegisterEvent("UNIT_MAXRUNIC_POWER", "Update")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -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
|
-- 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)
|
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
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -245,7 +245,16 @@ function Runes.prototype:CreateRune(i, type, name)
|
|||||||
self.frame.graphicalBG[i]:SetFrameStrata("BACKGROUND")
|
self.frame.graphicalBG[i]:SetFrameStrata("BACKGROUND")
|
||||||
self.frame.graphicalBG[i]:SetWidth(self.runeSize)
|
self.frame.graphicalBG[i]:SetWidth(self.runeSize)
|
||||||
self.frame.graphicalBG[i]:SetHeight(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]:SetAlpha(0.25)
|
||||||
|
|
||||||
self.frame.graphicalBG[i]:SetStatusBarColor(self:GetColor("Runes"..name))
|
self.frame.graphicalBG[i]:SetStatusBarColor(self:GetColor("Runes"..name))
|
||||||
|
@ -41,11 +41,11 @@ function TargetMana.prototype:Enable(core)
|
|||||||
self:RegisterEvent("UNIT_FLAGS", "Update")
|
self:RegisterEvent("UNIT_FLAGS", "Update")
|
||||||
-- DK rune stuff
|
-- DK rune stuff
|
||||||
if IceHUD.WowVer >= 30000 then
|
if IceHUD.WowVer >= 30000 then
|
||||||
if GetCVarBool("predictedPower") and self.frame then
|
-- if GetCVarBool("predictedPower") and self.frame then
|
||||||
self.frame:SetScript("OnUpdate", function() self:Update(self.unit) end)
|
-- self.frame:SetScript("OnUpdate", function() self:Update(self.unit) end)
|
||||||
else
|
-- else
|
||||||
self:RegisterEvent("UNIT_RUNIC_POWER", "Update")
|
self:RegisterEvent("UNIT_RUNIC_POWER", "Update")
|
||||||
end
|
-- end
|
||||||
self:RegisterEvent("UNIT_MAXRUNIC_POWER", "Update")
|
self:RegisterEvent("UNIT_MAXRUNIC_POWER", "Update")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user