Compare commits

...

8 Commits

Author SHA1 Message Date
0dddbd9b1a Show text on Absorb and AltMana with DogTags disabled 2018-02-10 17:45:09 -06:00
8105567792 Fixed Insanity display with DogTags disabled
Apparently internally Insanity is multiplied by 100 from the value that's actually displayed on the ui (so the internal max for my test character is 10500 while the displayed amount is 105).
2018-02-10 17:44:32 -06:00
5cf4ec7457 Moved Round down for other modules to use 2018-02-10 17:41:44 -06:00
6d2a6392eb Updated TOC for 7.3 2017-08-31 16:10:36 -05:00
89f60cb34f Added raid icon toggle to Info modules 2017-08-30 23:29:20 -05:00
3ce982bb71 Updated changelog 2017-08-30 23:18:03 -05:00
fcf156e048 Updated shard texture for Warlocks 2017-08-30 23:10:22 -05:00
aa559113eb Updated shard display for Destro Warlocks
Ticket #234, thanks stencil!
2017-06-17 20:38:12 -05:00
11 changed files with 118 additions and 28 deletions

View File

@ -1433,6 +1433,16 @@ function IceBarElement.prototype:SetScaledColor(colorVar, percent, maxColor, min
colorVar.b = ((maxColor.b - minColor.b) * percent) + minColor.b
end
function IceBarElement.prototype:Round(num)
if (num > 1000000) then
return IceHUD:MathRound(num/1000000, 1) .. "M"
end
if (num > 1000) then
return IceHUD:MathRound(num/1000, 1) .. "k"
end
return num
end
-- To be overridden
function IceBarElement.prototype:Update()
end

View File

@ -1,4 +1,4 @@
## Interface: 70200
## Interface: 70300
## Author: Parnic, originally created by Iceroth
## Name: IceHUD
## Title: IceHUD |cff7fff7f-Ace3-|r
@ -6,7 +6,7 @@
## Version: @project-version@
## SavedVariables: IceCoreDB
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibDogTag-3.0, LibDogTag-Unit-3.0, LibRangeCheck-2.0, LibDualSpec-1.0, LibDBIcon-1.0, AceGUI-3.0-SharedMediaWidgets
## X-Compatible-With: 70100
## X-Compatible-With: 70200
## X-Category: HUDs
## X-Website: https://www.wowace.com/projects/ice-hud
## X-WoWI-ID: 8149

View File

@ -1,4 +1,4 @@
## Interface: 70200
## Interface: 70300
## Title: IceHUD |cff7fff7f-Options-|r
## Author: Parnic
## Version: @project-version@

View File

@ -227,6 +227,10 @@ function IceUnitBar.prototype:Update()
self.mana = UnitPower(self.unit, UnitPowerType(self.unit))
self.maxMana = UnitPowerMax(self.unit, UnitPowerType(self.unit))
if IceHUD.WowVer >= 70300 and UnitPowerType(self.unit) == SPELL_POWER_INSANITY then
self.mana = IceHUD:MathRound(self.mana / 100)
self.maxMana = IceHUD:MathRound(self.maxMana / 100)
end
self.manaPercentage = self.maxMana ~= 0 and (self.mana/self.maxMana) or 0
local locClass

View File

@ -1,8 +1,18 @@
v1.10.16.1:
- Added option to hide the raid icon for Info frames.
- Updated TOC for 7.3
v1.10.16:
- Updated shard texture for Warlocks.
v1.10.15.2:
- Updated shard display for Destro Warlocks (ticket #234, thanks stencil!).
v1.10.15.1:
- Fixed an error in IceHUD's usage of GetLFGProposal()'s return values exposed by the 7.2.5 Chromie quests
- Fixed an error in IceHUD's usage of GetLFGProposal()'s return values exposed by the 7.2.5 Chromie quests.
v1.10.15:
- Fixed error on 7.2 due to a CVar being removed
- Fixed error on 7.2 due to a CVar being removed.
- Updated TOC for 7.2
v1.10.14:

View File

@ -18,7 +18,7 @@ IceClassPowerCounter.prototype.requiredSpec = nil
IceClassPowerCounter.prototype.shouldShowUnmodified = false
IceClassPowerCounter.prototype.unmodifiedMaxPerRune = 10
IceClassPowerCounter.prototype.unit = "player"
IceClassPowerCounter.prototype.round = ceil
IceClassPowerCounter.prototype.growModes = { width = 1, height = 2 }
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
if self:GetRuneMode() == "Numeric" or self.moduleSettings.alsoShowNumeric then
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))
end
if self:GetRuneMode() ~= "Numeric" then
for i=1, self.numRunes do
if i <= ceil(percentReady) then
if i <= self.round(percentReady) then
if self:GetRuneMode() == "Graphical" then
self.frame.graphical[i].rune:SetVertexColor(1, 1, 1)
else

View File

@ -76,6 +76,7 @@ function PlayerAltMana.prototype:Update()
self.PlayerAltMana = UnitPower(self.unit, SPELL_POWER_MANA)
self.PlayerAltManaMax = UnitPowerMax(self.unit, SPELL_POWER_MANA)
self.PlayerAltManaPercentage = self.PlayerAltManaMax ~= 0 and (self.PlayerAltMana/self.PlayerAltManaMax) or 0
if (not self.alive or not ShouldShow(self.unit) or not self.PlayerAltMana or not self.PlayerAltManaMax or self.PlayerAltManaMax == 0) then
self:Show(false)
@ -84,6 +85,16 @@ function PlayerAltMana.prototype:Update()
self:Show(true)
end
if not IceHUD.IceCore:ShouldUseDogTags() and self.frame:IsVisible() then
self:SetBottomText1(math.floor(self.PlayerAltManaPercentage * 100))
if (self.PlayerAltManaMax ~= 100) then
self:SetBottomText2(self:GetFormattedText(self:Round(self.PlayerAltMana), self:Round(self.PlayerAltManaMax)), "PlayerMana")
else
self:SetBottomText2()
end
end
self:UpdateBar(self.PlayerAltManaMax ~= 0 and self.PlayerAltMana / self.PlayerAltManaMax or 0, "PlayerAltMana")
end

View File

@ -3,7 +3,9 @@ local ShardCounter = IceCore_CreateClass(IceClassPowerCounter)
local CurrentSpec = nil
local AfflictionCoords =
local AfflictionCoords
if IceHUD.WowVer < 70200 then
AfflictionCoords =
{
{0.01562500, 0.28125000, 0.00781250, 0.13281250},
{0.01562500, 0.28125000, 0.00781250, 0.13281250},
@ -11,6 +13,16 @@ local AfflictionCoords =
{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 =
{
@ -36,6 +48,10 @@ function ShardCounter.prototype:init()
if IceHUD.WowVer >= 70000 then
self.runeHeight = 23
self.runeWidth = 26
if IceHUD.WowVer >= 70200 then
self.runeHeight = 27
self.runeWidth = 22
end
self.runeCoords = AfflictionCoords
self.unitPower = SPELL_POWER_SOUL_SHARDS
self.unit = "player"
@ -45,6 +61,16 @@ end
function ShardCounter.prototype:Enable(core)
if IceHUD.WowVer >= 70000 then
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
ShardCounter.super.prototype.Enable(self, core)
@ -205,6 +231,10 @@ function ShardCounter.prototype:GetDefaultSettings()
end
function ShardCounter.prototype:GetRuneTexture(rune)
if IceHUD.WowVer >= 70200 then
return nil
end
if not rune or rune ~= tonumber(rune) then
return
end
@ -222,6 +252,10 @@ function ShardCounter.prototype:GetRuneTexture(rune)
return "Interface\\PlayerFrame\\UI-WarlockShard"
end
function ShardCounter.prototype:GetRuneAtlas(rune)
return "Warlock-ReadyShard"
end
function ShardCounter.prototype:ShowBlizz()
WarlockPowerFrame:Show()

View File

@ -63,12 +63,22 @@ function IceTargetAbsorb.prototype:UpdateAbsorbAmount(event, unit)
self.highestAbsorbSinceLastZero = absorbAmount
end
self.absorbPercent = self.highestAbsorbSinceLastZero ~= 0 and absorbAmount / self.highestAbsorbSinceLastZero or 0
if absorbAmount <= 0 or self.highestAbsorbSinceLastZero <= 0 then
self:Show(false)
else
self:Show(true)
self:UpdateBar(absorbAmount / self.highestAbsorbSinceLastZero, self.ColorName)
end
if not IceHUD.IceCore:ShouldUseDogTags() and self.frame:IsVisible() then
if (self.PlayerAltManaMax ~= 100) then
self:SetBottomText1(self:GetFormattedText(self:Round(absorbAmount)), self.ColorName)
else
self:SetBottomText1()
end
end
end
function IceTargetAbsorb.prototype:Disable(core)

View File

@ -972,17 +972,6 @@ function IceTargetHealth.prototype:UpdateRaidTargetIcon()
end
function IceTargetHealth.prototype:Round(health)
if (health > 1000000) then
return IceHUD:MathRound(health/1000000, 1) .. "M"
end
if (health > 1000) then
return IceHUD:MathRound(health/1000, 1) .. "k"
end
return health
end
function IceTargetHealth.prototype:CheckPvP()
local pvpMode = nil
local minx, maxx, miny, maxy

View File

@ -958,6 +958,23 @@ function IceTargetInfo.prototype:GetOptions()
order = 39.3,
}
opts["showRaidIcon"] = {
type = 'toggle',
name = L['Show raid icon'],
desc = L['Whether or not to show the raid icon for this unit.'],
get = function()
return self.moduleSettings.showRaidIcon
end,
set = function(info, v)
self.moduleSettings.showRaidIcon = v
self:UpdateRaidTargetIcon()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 37.02,
}
return opts
end
@ -1011,6 +1028,7 @@ function IceTargetInfo.prototype:GetDefaultSettings()
["sortByExpiration"] = true,
}
}
defaults["showRaidIcon"] = true
return defaults
end
@ -1480,7 +1498,7 @@ function IceTargetInfo.prototype:AuraChanged(event, unit)
end
function IceTargetInfo.prototype:UpdateRaidTargetIcon()
if not (UnitExists(self.unit)) then
if not (UnitExists(self.unit)) or not self.moduleSettings.showRaidIcon then
self.frame.raidIcon:Hide()
return
end