Compare commits

...

18 Commits

Author SHA1 Message Date
a201aa5149 Fixed incorrect texture drawing behind power counters
Looks like at some point I modified how "darkened" inactive powers worked and ended up drawing two copies of the darkened power counter for each inactive power. "runebg" is superfluous since we're just setting the color of the actual counter to black and partially transparent instead. For some power counters, such as Paladins, the runebg texture was actually wrong and drawing the entire atlas rather than just the texture we wanted.
2016-07-26 21:37:45 -05:00
34d3060df3 Fixed castbar interruption on 7.0 clients
Looks like some things changed in spellcast events on 7.0 which necessitate using the spellcast GUID to identify when a specific cast starts or stops. Now we use those GUIDs which restores the castbar to its appropriate behavior. (ticket #215)
2016-07-25 13:02:14 -05:00
9e7b34d43c Disabled Resolved for 7.0 clients 2016-07-25 12:33:20 -05:00
2d4d32fa1f Fixed SnD error introduced in 46152e92 2016-07-24 19:01:54 -05:00
ca544384b8 Fixed bar rotation breaking low thresholds
I guess something in the 7.0 client must have changed how animations work for inherited frames because it would appear that the RotateFrame call for the child flashFrame is now causing issues somehow. Removing the call allows the flash/low threshold frame to travel alongside the parent frame when rotating.
2016-07-24 17:04:07 -05:00
46152e92f4 Fixed rotation not resetting on profile change
When the player had one profile with a bar rotated 90 degrees and another profile with the same bar not rotated, the non-rotated profile would fail to put the bar back in its original location. Thanks for the detailed report, spacegato!
2016-07-24 16:52:12 -05:00
f0cafee719 Added recent FAQs 2016-07-23 21:43:49 -05:00
f8c7875501 Fixed HarmonyPower Hide Blizzard option generating errors 2016-07-22 11:45:35 -05:00
715f9584fb Fixed "Hide Blizzard" option in Holy Power module in 7.0 2016-07-20 12:42:03 -05:00
6824721947 Fixed TargetMana to match PlayerMana colors/alpha
Forgot to update this module to match the new 7.0/Legion stuff like PlayerMana was already doing. I really should be sharing all this code, but alas.
2016-07-19 23:49:54 -05:00
0ac00068b3 Added new mana types to consider 0 as "full"
For the purposes of alpha settings, 0 is "full" for several mana types, such as the new/changed 7.0 ones (astral power, insanity, fury).
2016-07-19 23:45:51 -05:00
5ca6f20944 Fixed minor inefficient texture access
Also fixed an issue where we were looking for a variable that was not declared in the scope we were looking for it in.
2016-07-19 10:11:58 -05:00
d9218343d5 Updated Website address 2016-07-16 11:32:48 -05:00
e9020becc0 Updated to 7.0 TOC 2016-07-16 11:32:30 -05:00
c0771ea8f4 Enabled useful debug print
Converted to use IceHUD:Debug() so that we can turn it on and off.
2016-06-07 00:35:20 -05:00
5771f990c7 Suppressed noisy debug message
This message prints constantly against training dummies, so let's just turn it off.
2016-06-07 00:35:01 -05:00
702ebbd86a Fixed Death Runes never showing up on Live
UnitPowerMax for SPELL_POWER_RUNES is 0 on live, so numRunes was 0 which was causing UpdateRuneType to throw out the update.
2016-06-07 00:34:31 -05:00
f214c945af Added second argument to UnitPower
I keep seeing things online saying the one-argument version of UnitPower has been deprecated, so I figured I'd go ahead and update my few uses of it in case it actually gets removed at some point. I haven't had any trouble with it, though.
2016-06-01 00:11:33 -05:00
16 changed files with 1154 additions and 1133 deletions

View File

@ -946,6 +946,8 @@ function IceBarElement.prototype:CreateFrame()
if self.moduleSettings.rotateBar then
self:RotateHorizontal()
else
self:ResetRotation()
end
end

View File

@ -413,30 +413,30 @@ end
-- NORMAL SPELLS --
-------------------------------------------------------------------------------
function IceCastBar.prototype:SpellCastSent(event, unit, spell, rank, target)
function IceCastBar.prototype:SpellCastSent(event, unit, spell, rank, target, lineId)
if (unit ~= self.unit) then return end
IceHUD:Debug("SpellCastSent", unit, spell, rank, target)
IceHUD:Debug("SpellCastSent", unit, spell, rank, target, lineId)
end
function IceCastBar.prototype:SpellCastChanged(event, arg1)
IceHUD:Debug("SpellCastChanged", arg1)
end
function IceCastBar.prototype:SpellCastStart(event, unit, spell, rank)
function IceCastBar.prototype:SpellCastStart(event, unit, spell, rank, lineId, spellId)
if (unit ~= self.unit) then return end
IceHUD:Debug("SpellCastStart", unit, spell, rank)
IceHUD:Debug("SpellCastStart", unit, spell, rank, lineId, spellId)
--UnitCastingInfo(unit)
self:StartBar(IceCastBar.Actions.Cast)
self.current = spell
self.current = lineId
end
function IceCastBar.prototype:SpellCastStop(event, unit, spell, rank)
function IceCastBar.prototype:SpellCastStop(event, unit, spell, rank, lineId, spellId)
if (unit ~= self.unit) then return end
IceHUD:Debug("SpellCastStop", unit, spell, self.current)
IceHUD:Debug("SpellCastStop", unit, spell, self.current, rank, lineId, spellId)
-- ignore if not coming from current spell
if (self.current and spell and self.current ~= spell) then
if (self.current and lineId and self.current ~= lineId) then
return
end
@ -450,12 +450,12 @@ function IceCastBar.prototype:SpellCastStop(event, unit, spell, rank)
end
function IceCastBar.prototype:SpellCastFailed(event, unit, spell, rank)
function IceCastBar.prototype:SpellCastFailed(event, unit, spell, rank, lineId, spellId)
if (unit ~= self.unit) then return end
IceHUD:Debug("SpellCastFailed", unit, self.current)
IceHUD:Debug("SpellCastFailed", unit, self.current, lineId, spellId)
-- ignore if not coming from current spell
if (self.current and spell and self.current ~= spell) then
if (self.current and lineId and self.current ~= lineId) then
return
end
@ -478,12 +478,12 @@ function IceCastBar.prototype:SpellCastFailed(event, unit, spell, rank)
self:StartBar(IceCastBar.Actions.Failure, "Failed")
end
function IceCastBar.prototype:SpellCastInterrupted(event, unit, spell, rank)
function IceCastBar.prototype:SpellCastInterrupted(event, unit, spell, rank, lineId, spellId)
if (unit ~= self.unit) then return end
IceHUD:Debug("SpellCastInterrupted", unit, self.current)
IceHUD:Debug("SpellCastInterrupted", unit, self.current, lineId, spellId)
-- ignore if not coming from current spell
if (self.current and spell and self.current ~= spell) then
if (self.current and lineId and self.current ~= lineId) then
return
end
@ -505,7 +505,7 @@ function IceCastBar.prototype:SpellCastDelayed(event, unit, delay)
end
function IceCastBar.prototype:SpellCastSucceeded(event, unit, spell, rank)
function IceCastBar.prototype:SpellCastSucceeded(event, unit, spell, rank, lineId, spellId)
if (unit ~= self.unit) then return end
--IceHUD:Debug("SpellCastSucceeded", unit, spell, rank)
@ -515,7 +515,7 @@ function IceCastBar.prototype:SpellCastSucceeded(event, unit, spell, rank)
end
-- ignore if not coming from current spell
if (self.current and self.current ~= spell) then
if (self.current and self.current ~= lineId) then
return
end

View File

@ -1,4 +1,4 @@
## Interface: 60200
## Interface: 70000
## Author: Parnic, originally created by Iceroth
## Name: IceHUD
## Title: IceHUD |cff7fff7f-Ace3-|r
@ -6,9 +6,9 @@
## 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: 70000
## X-Compatible-With: 60200
## X-Category: HUDs
## X-Website: http://www.wowace.com/projects/ice-hud/
## X-Website: http://www.wowace.com/addons/ice-hud/
## X-WoWI-ID: 8149
#@no-lib-strip@

View File

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

View File

@ -77,7 +77,13 @@ This module is called HarmonyPower. Harmony was the original name for Chi back w
If you have DogTags enabled, you can open the Text Settings for the module in question and add SeparateDigits() around the tag you're trying to split up. To display Health/MaxHealth with commas, use: [(SeparateDigits(HP):HPColor "/" SeparateDigits(MaxHP):HPColor):Bracket]. To use periods instead of commas, use: [(SeparateDigits(HP, "."):HPColor "/" SeparateDigits(MaxHP, "."):HPColor):Bracket]. Use the /dog help menu to build your own similar tags for Mana, etc.
|cff9999ff16. The countdown timers on buffs and debuffs completely obscure the icon. How do I disable the timer text?|r
IceHUD is not responsible for this countdown text and cannot control it. The 6.0 patch added an option in the game client to display counts on top of cooldowns. Look at the Action Bars menu under the game's Interface options. You can turn the text on or off there. Mods like OmniCC or CooldownCount will generally give you the same feature but allow you to control when, where, and how the text shows up.]]
IceHUD is not responsible for this countdown text and cannot control it. The 6.0 patch added an option in the game client to display counts on top of cooldowns. Look at the Action Bars menu under the game's Interface options. You can turn the text on or off there. Mods like OmniCC or CooldownCount will generally give you the same feature but allow you to control when, where, and how the text shows up.
|cff9999ff17. When I rotate some modules 90 degrees, such as the castbar, the bar appears to wiggle up and down as it fills or empties. How do I fix this?|r
This is a side effect of the animation API that I'm co-opting to force a rotation without having to provide duplicates of every bar texture in the mod. Any bar moving sufficiently quickly and updating rapidly will cause this. IceHUD is intended to be a vertically-oriented mod, so the rotation feature is there for people who are willing to accept the side effects that come with it. My suggestion is to use one of the many horizontally-oriented bar mods out there if you're wanting horizontal bars. Quartz is a good castbar replacement that you can use and disable IceHUD's built-in castbar, for example.
|cff9999ff18. How do I get rid of the bars that showed up beneath the player in the 7.0 patch?|r
Blizzard added a "Personal Resource Display" feature in the 7.0 game client. You can disable it in the Game options -> Interface -> Names -> Personal Resource Display.]]
}
}
},

View File

@ -197,13 +197,15 @@ end
function IceUnitBar.prototype:RotateHorizontal()
IceUnitBar.super.prototype.RotateHorizontal(self)
self:RotateFrame(self.flashFrame)
if IceHUD.WowVer < 70000 then
self:RotateFrame(self.flashFrame)
end
end
function IceUnitBar.prototype:ResetRotation()
IceUnitBar.super.prototype.ResetRotation(self)
if self.flashFrame.anim then
if IceHUD.WowVer < 70000 and self.flashFrame and self.flashFrame.anim then
self.flashFrame.anim:Stop()
end
end
@ -223,8 +225,8 @@ function IceUnitBar.prototype:Update()
self.maxHealth = UnitHealthMax(self.unit)
self.healthPercentage = self.maxHealth ~= 0 and (self.health/self.maxHealth) or 0
self.mana = UnitPower(self.unit)
self.maxMana = UnitPowerMax(self.unit)
self.mana = UnitPower(self.unit, UnitPowerType(self.unit))
self.maxMana = UnitPowerMax(self.unit, UnitPowerType(self.unit))
self.manaPercentage = self.maxMana ~= 0 and (self.mana/self.maxMana) or 0
local locClass

View File

@ -404,14 +404,14 @@ end
-- OVERRIDE
function CastBar.prototype:SpellCastSent(event, unit, spell, rank, target)
CastBar.super.prototype.SpellCastSent(self, event, unit, spell, rank, target)
function CastBar.prototype:SpellCastSent(event, unit, spell, rank, target, lineId)
CastBar.super.prototype.SpellCastSent(self, event, unit, spell, rank, target, lineId)
if (unit ~= self.unit) then return end
if IceHUD.WowVer < 70000 then
self.spellCastSent = GetTime()
end
self.sentSpell = spell
self.sentSpell = lineId
end
-- OVERRIDE
@ -423,15 +423,15 @@ function CastBar.prototype:SpellCastChanged(event, arg1)
end
-- OVERRIDE
function CastBar.prototype:SpellCastStart(event, unit, spell, rank)
CastBar.super.prototype.SpellCastStart(self, event, unit, spell, rank)
function CastBar.prototype:SpellCastStart(event, unit, spell, rank, lineId, spellId)
CastBar.super.prototype.SpellCastStart(self, event, unit, spell, rank, lineId, spellId)
if (unit ~= self.unit) then return end
if not self:IsVisible() or not self.actionDuration then
return
end
if self.sentSpell ~= spell then
if self.sentSpell ~= lineId then
self.spellCastSent = nil
end

View File

@ -684,11 +684,6 @@ function IceClassPowerCounter.prototype:SetDisplayMode()
for i=1, self.numRunes do
self:SetupRuneTexture(i)
self.frame.graphical[i]:Show()
if self.moduleSettings.inactiveDisplayMode == "Darkened" then
self.frame.graphical[i].runebg:Show()
else
self.frame.graphical[i].runebg:Hide()
end
end
end
end
@ -723,8 +718,6 @@ function IceClassPowerCounter.prototype:CreateRune(i)
self.frame.graphical[i].rune = self.frame.graphical[i]:CreateTexture(nil, "ARTWORK")
self.frame.graphical[i].rune:SetVertexColor(0, 0, 0)
self.frame.graphical[i].runebg = self.frame.graphical[i]:CreateTexture(nil, "BACKGROUND")
self.frame.graphical[i].runebg:SetVertexColor(0, 0, 0)
self:SetupRuneTexture(i)
self.frame.graphical[i].shine = self.frame.graphical[i]:CreateTexture(nil, "OVERLAY")
@ -749,14 +742,10 @@ function IceClassPowerCounter.prototype:CreateRune(i)
self.frame.graphical[i]:SetHeight(self.runeHeight)
self.frame.graphical[i].rune:SetWidth(self.runeWidth)
self.frame.graphical[i].rune:SetHeight(self.runeHeight)
self.frame.graphical[i].runebg:SetWidth(self.runeWidth)
self.frame.graphical[i].runebg:SetHeight(self.runeHeight)
if self.currentGrowMode == self.growModes["width"] then
self.frame.graphical[i].rune:SetPoint("LEFT", self.frame.graphical[i], "LEFT")
self.frame.graphical[i].runebg:SetPoint("LEFT", self.frame.graphical[i], "LEFT")
else
self.frame.graphical[i].rune:SetPoint("BOTTOM", self.frame.graphical[i], "BOTTOM")
self.frame.graphical[i].runebg:SetPoint("BOTTOM", self.frame.graphical[i], "BOTTOM")
end
end
@ -774,7 +763,6 @@ function IceClassPowerCounter.prototype:SetupRuneTexture(rune)
-- make sure any texture aside from the special one is square and has the proper coordinates
self.frame.graphical[rune].rune:SetTexCoord(a, b, c, d)
self.frame.graphical[rune].runebg:SetTexCoord(a, b, c, d)
self.frame.graphical[rune]:SetWidth(width)
self.frame:SetWidth(width*self.numRunes)
local runeAdjust = rune - (self.numRunes / 2) - 0.5
@ -787,7 +775,7 @@ function IceClassPowerCounter.prototype:SetupRuneTexture(rune)
if self:GetRuneMode() == "Graphical" then
local tex = self:GetRuneTexture(rune)
if tex then
self.frame.graphical[rune].rune:SetTexture(self:GetRuneTexture(rune))
self.frame.graphical[rune].rune:SetTexture(tex)
else
self.frame.graphical[rune].rune:SetAtlas(self:GetRuneAtlas(rune), self:UseAtlasSize(rune))
end
@ -800,11 +788,6 @@ function IceClassPowerCounter.prototype:SetupRuneTexture(rune)
elseif self:GetRuneMode() == "Graphical Clean Circle" then
self.frame.graphical[rune].rune:SetTexture(IceElement.TexturePath .. "ComboCleanCurves")
end
if tex then
self.frame.graphical[rune].runebg:SetTexture(self.frame.graphical[rune].rune:GetTexture())
else
self.frame.graphical[rune].runebg:SetAtlas(self.frame.graphical[rune].rune:GetAtlas())
end
end
function IceClassPowerCounter.prototype:GetAlphaAdd()

View File

@ -91,15 +91,23 @@ function HarmonyPower.prototype:GetRuneTexture(rune)
end
function HarmonyPower.prototype:ShowBlizz()
MonkHarmonyBar:Show()
local frame = MonkHarmonyBarFrame
if frame == nil then
frame = MonkHarmonyBar
end
MonkHarmonyBar:GetScript("OnLoad")(MonkHarmonyBar)
frame:Show()
frame:GetScript("OnLoad")(frame)
end
function HarmonyPower.prototype:HideBlizz()
MonkHarmonyBar:Hide()
local frame = MonkHarmonyBarFrame
if frame == nil then
frame = MonkHarmonyBar
end
MonkHarmonyBar:UnregisterAllEvents()
frame:Hide()
frame:UnregisterAllEvents()
end
-- Load us up

View File

@ -78,15 +78,23 @@ function HolyPower.prototype:GetRuneTexture(rune)
end
function HolyPower.prototype:ShowBlizz()
PaladinPowerBar:Show()
local frame = PaladinPowerBarFrame
if frame == nil then
frame = PaladinPowerBar
end
PaladinPowerBar:GetScript("OnLoad")(PaladinPowerBar)
frame:Show()
frame:GetScript("OnLoad")(frame)
end
function HolyPower.prototype:HideBlizz()
PaladinPowerBar:Hide()
local frame = PaladinPowerBarFrame
if frame == nil then
frame = PaladinPowerBar
end
PaladinPowerBar:UnregisterAllEvents()
frame:Hide()
frame:UnregisterAllEvents()
end
function HolyPower.prototype:UpdateRunePower(event)

View File

@ -237,15 +237,16 @@ function PlayerMana.prototype:ManaType(event, unit)
end
end
if self.manaType == SPELL_POWER_RAGE or self.manaType == SPELL_POWER_RUNIC_POWER then
self.bTreatEmptyAsFull = true
else
self.bTreatEmptyAsFull = false
end
self.bTreatEmptyAsFull = self:TreatEmptyAsFull()
self:Update(self.unit)
end
function PlayerMana.prototype:TreatEmptyAsFull()
return self.manaType == SPELL_POWER_RAGE or self.manaType == SPELL_POWER_RUNIC_POWER
or (IceHUD.WowVer >= 70000 and (self.manaType == SPELL_POWER_LUNAR_POWER or self.manaType == SPELL_POWER_INSANITY
or self.manaType == SPELL_POWER_FURY))
end
function PlayerMana.prototype:UpdateEvent(event, unit, powertype)
self:Update(unit, powertype)
@ -304,8 +305,8 @@ function PlayerMana.prototype:Update(unit, powertype)
self:ConditionalUpdateFlash()
if (self.manaPercentage == 1 and self.manaType ~= SPELL_POWER_RAGE and self.manaType ~= SPELL_POWER_RUNIC_POWER)
or (self.manaPercentage == 0 and (self.manaType == SPELL_POWER_RAGE or self.manaType == SPELL_POWER_RUNIC_POWER)) then
if (self.manaPercentage == 1 and not self:TreatEmptyAsFull())
or (self.manaPercentage == 0 and self:TreatEmptyAsFull()) then
self:SetupOnUpdate(false)
else
self:SetupOnUpdate(true)
@ -355,13 +356,13 @@ function PlayerMana.prototype:UpdateEnergy(event, unit)
return
end
self.previousEnergy = UnitPower(self.unit)
self.previousEnergy = UnitPower(self.unit, UnitPowerType(self.unit))
if IceHUD.WowVer < 40000 then
self:Update(unit)
end
if self:ShouldUseTicker() and
((not (self.previousEnergy) or (self.previousEnergy <= UnitPower(self.unit))) and
((not (self.previousEnergy) or (self.previousEnergy <= UnitPower(self.unit, UnitPowerType(self.unit)))) and
(self.moduleSettings.tickerEnabled) and self.manaType == SPELL_POWER_ENERGY) then
self.tickStart = GetTime()
self.tickerFrame:Show()

View File

@ -80,6 +80,6 @@ end
-- Load for tanks only
local _, unitClass = UnitClass("player")
if ((unitClass == "DEATHKNIGHT" or unitClass == "DRUID" or unitClass == "PALADIN" or unitClass == "WARRIOR" or unitClass == "MONK")
and IceHUD.WowVer >= 60000) then
and IceHUD.WowVer >= 60000 and IceHUD.WowVer < 70000) then
IceHUD.Resolve = Resolve:new()
end

View File

@ -208,7 +208,9 @@ end
-- OVERRIDE
function Runes.prototype:Enable(core)
self.numRunes = UnitPowerMax("player", SPELL_POWER_RUNES)
if IceHUD.WowVer >= 70000 then
self.numRunes = UnitPowerMax("player", SPELL_POWER_RUNES)
end
Runes.super.prototype.Enable(self, core)
@ -299,7 +301,7 @@ function Runes.prototype:ShineFinished(rune)
end
function Runes.prototype:UpdateRuneType(event, rune)
-- DEFAULT_CHAT_FRAME:AddMessage("Runes.prototype:UpdateRuneType: rune="..rune.." GetRuneType(rune)="..GetRuneType(rune));
IceHUD:Debug("Runes.prototype:UpdateRuneType: rune="..rune.." GetRuneType(rune)="..GetRuneType(rune));
if not rune or tonumber(rune) ~= rune or rune < 1 or rune > self.numRunes then
return

View File

@ -196,7 +196,7 @@ end
function SliceAndDice.prototype:ResetRotation()
SliceAndDice.super.prototype.ResetRotation(self)
if self.durationFrame.anim then
if self.durationFrame and self.durationFrame.anim then
self.durationFrame.anim:Stop()
end
end

View File

@ -18,6 +18,10 @@ function IceTargetMana.prototype:init(moduleName, unit)
self:SetDefaultColor("TargetEnergy", 228, 242, 31)
self:SetDefaultColor("TargetFocus", 242, 149, 98)
self:SetDefaultColor("TargetRunicPower", 52, 64, 221)
if IceHUD.WowVer >= 70000 then
self:SetDefaultColor("TargetInsanity", 150, 50, 255)
self:SetDefaultColor("TargetFury", 255, 50, 255)
end
end
@ -105,6 +109,10 @@ function IceTargetMana.prototype:Update(unit)
self.color = "TargetEnergy"
elseif (manaType == SPELL_POWER_RUNIC_POWER) then
self.color = "TargetRunicPower"
elseif (IceHUD.WowVer >= 70000 and self.manaType == SPELL_POWER_INSANITY) then
self.color = "TargetInsanity"
elseif (IceHUD.WowVer >= 70000 and self.manaType == SPELL_POWER_FURY) then
self.color = "TargetFury"
end
if (self.tapped) then
@ -112,11 +120,7 @@ function IceTargetMana.prototype:Update(unit)
end
end
if manaType == SPELL_POWER_RAGE or manaType == SPELL_POWER_RUNIC_POWER then
self.bTreatEmptyAsFull = true
else
self.bTreatEmptyAsFull = false
end
self.bTreatEmptyAsFull = self:TreatEmptyAsFull(manaType)
self:UpdateBar(self.manaPercentage, self.color)
@ -126,6 +130,11 @@ function IceTargetMana.prototype:Update(unit)
end
end
function IceTargetMana.prototype:TreatEmptyAsFull(manaType)
return manaType == SPELL_POWER_RAGE or manaType == SPELL_POWER_RUNIC_POWER
or (IceHUD.WowVer >= 70000 and (manaType == SPELL_POWER_LUNAR_POWER or manaType == SPELL_POWER_INSANITY
or manaType == SPELL_POWER_FURY))
end
-- OVERRIDE
function IceTargetMana.prototype:GetOptions()

View File

@ -332,7 +332,7 @@ threatValue = 100
scaledPercentZeroToOne = 0
scaledPercent = 0
IceHUD:Debug( "Threat: nil threat on valid target" )
--IceHUD:Debug( "Threat: nil threat on valid target" )
else
if self.moduleSettings.showScaledThreat then
scaledPercentZeroToOne = scaledPercent / 100