mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
fcf156e048 | |||
aa559113eb |
@ -18,7 +18,7 @@ IceClassPowerCounter.prototype.requiredSpec = nil
|
|||||||
IceClassPowerCounter.prototype.shouldShowUnmodified = false
|
IceClassPowerCounter.prototype.shouldShowUnmodified = false
|
||||||
IceClassPowerCounter.prototype.unmodifiedMaxPerRune = 10
|
IceClassPowerCounter.prototype.unmodifiedMaxPerRune = 10
|
||||||
IceClassPowerCounter.prototype.unit = "player"
|
IceClassPowerCounter.prototype.unit = "player"
|
||||||
|
IceClassPowerCounter.prototype.round = ceil
|
||||||
IceClassPowerCounter.prototype.growModes = { width = 1, height = 2 }
|
IceClassPowerCounter.prototype.growModes = { width = 1, height = 2 }
|
||||||
IceClassPowerCounter.prototype.currentGrowMode = nil
|
IceClassPowerCounter.prototype.currentGrowMode = nil
|
||||||
|
|
||||||
@ -501,13 +501,17 @@ function IceClassPowerCounter.prototype:UpdateRunePower(event, arg1, arg2)
|
|||||||
local percentReady = self.shouldShowUnmodified and (UnitPower("player", self.unitPower, true) / self.unmodifiedMaxPerRune) or numReady
|
local percentReady = self.shouldShowUnmodified and (UnitPower("player", self.unitPower, true) / self.unmodifiedMaxPerRune) or numReady
|
||||||
|
|
||||||
if self:GetRuneMode() == "Numeric" or self.moduleSettings.alsoShowNumeric then
|
if self:GetRuneMode() == "Numeric" or self.moduleSettings.alsoShowNumeric then
|
||||||
self.frame.numeric:SetText(tostring(percentReady))
|
if self.numericFormat then
|
||||||
|
self.frame.numeric:SetText(format(self.numericFormat, percentReady))
|
||||||
|
else
|
||||||
|
self.frame.numeric:SetText(tostring(percentReady))
|
||||||
|
end
|
||||||
self.frame.numeric:SetTextColor(self:GetColor(self.numericColor))
|
self.frame.numeric:SetTextColor(self:GetColor(self.numericColor))
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:GetRuneMode() ~= "Numeric" then
|
if self:GetRuneMode() ~= "Numeric" then
|
||||||
for i=1, self.numRunes do
|
for i=1, self.numRunes do
|
||||||
if i <= ceil(percentReady) then
|
if i <= self.round(percentReady) then
|
||||||
if self:GetRuneMode() == "Graphical" then
|
if self:GetRuneMode() == "Graphical" then
|
||||||
self.frame.graphical[i].rune:SetVertexColor(1, 1, 1)
|
self.frame.graphical[i].rune:SetVertexColor(1, 1, 1)
|
||||||
else
|
else
|
||||||
|
@ -3,14 +3,26 @@ local ShardCounter = IceCore_CreateClass(IceClassPowerCounter)
|
|||||||
|
|
||||||
local CurrentSpec = nil
|
local CurrentSpec = nil
|
||||||
|
|
||||||
local AfflictionCoords =
|
local AfflictionCoords
|
||||||
{
|
if IceHUD.WowVer < 70200 then
|
||||||
{0.01562500, 0.28125000, 0.00781250, 0.13281250},
|
AfflictionCoords =
|
||||||
{0.01562500, 0.28125000, 0.00781250, 0.13281250},
|
{
|
||||||
{0.01562500, 0.28125000, 0.00781250, 0.13281250},
|
{0.01562500, 0.28125000, 0.00781250, 0.13281250},
|
||||||
{0.01562500, 0.28125000, 0.00781250, 0.13281250},
|
{0.01562500, 0.28125000, 0.00781250, 0.13281250},
|
||||||
{0.01562500, 0.28125000, 0.00781250, 0.13281250},
|
{0.01562500, 0.28125000, 0.00781250, 0.13281250},
|
||||||
}
|
{0.01562500, 0.28125000, 0.00781250, 0.13281250},
|
||||||
|
{0.01562500, 0.28125000, 0.00781250, 0.13281250},
|
||||||
|
}
|
||||||
|
else
|
||||||
|
AfflictionCoords =
|
||||||
|
{
|
||||||
|
{0, 1, 0, 1},
|
||||||
|
{0, 1, 0, 1},
|
||||||
|
{0, 1, 0, 1},
|
||||||
|
{0, 1, 0, 1},
|
||||||
|
{0, 1, 0, 1},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
local DestructionCoords =
|
local DestructionCoords =
|
||||||
{
|
{
|
||||||
@ -36,6 +48,10 @@ function ShardCounter.prototype:init()
|
|||||||
if IceHUD.WowVer >= 70000 then
|
if IceHUD.WowVer >= 70000 then
|
||||||
self.runeHeight = 23
|
self.runeHeight = 23
|
||||||
self.runeWidth = 26
|
self.runeWidth = 26
|
||||||
|
if IceHUD.WowVer >= 70200 then
|
||||||
|
self.runeHeight = 27
|
||||||
|
self.runeWidth = 22
|
||||||
|
end
|
||||||
self.runeCoords = AfflictionCoords
|
self.runeCoords = AfflictionCoords
|
||||||
self.unitPower = SPELL_POWER_SOUL_SHARDS
|
self.unitPower = SPELL_POWER_SOUL_SHARDS
|
||||||
self.unit = "player"
|
self.unit = "player"
|
||||||
@ -45,6 +61,16 @@ end
|
|||||||
function ShardCounter.prototype:Enable(core)
|
function ShardCounter.prototype:Enable(core)
|
||||||
if IceHUD.WowVer >= 70000 then
|
if IceHUD.WowVer >= 70000 then
|
||||||
self.numRunes = UnitPowerMax(self.unit, self.unitPower)
|
self.numRunes = UnitPowerMax(self.unit, self.unitPower)
|
||||||
|
|
||||||
|
if GetSpecialization() == SPEC_WARLOCK_DESTRUCTION then
|
||||||
|
self.shouldShowUnmodified = true
|
||||||
|
self.numericFormat = "%.1f"
|
||||||
|
self.round = floor
|
||||||
|
else
|
||||||
|
self.shouldShowUnmodified = nil
|
||||||
|
self.numericFormat = nil
|
||||||
|
self.round = nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ShardCounter.super.prototype.Enable(self, core)
|
ShardCounter.super.prototype.Enable(self, core)
|
||||||
@ -205,6 +231,10 @@ function ShardCounter.prototype:GetDefaultSettings()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ShardCounter.prototype:GetRuneTexture(rune)
|
function ShardCounter.prototype:GetRuneTexture(rune)
|
||||||
|
if IceHUD.WowVer >= 70200 then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
if not rune or rune ~= tonumber(rune) then
|
if not rune or rune ~= tonumber(rune) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -222,6 +252,10 @@ function ShardCounter.prototype:GetRuneTexture(rune)
|
|||||||
return "Interface\\PlayerFrame\\UI-WarlockShard"
|
return "Interface\\PlayerFrame\\UI-WarlockShard"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function ShardCounter.prototype:GetRuneAtlas(rune)
|
||||||
|
return "Warlock-ReadyShard"
|
||||||
|
end
|
||||||
|
|
||||||
function ShardCounter.prototype:ShowBlizz()
|
function ShardCounter.prototype:ShowBlizz()
|
||||||
WarlockPowerFrame:Show()
|
WarlockPowerFrame:Show()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user