Compare commits

...

20 Commits
1.9.1 ... 1.9.6

Author SHA1 Message Date
5e04739306 Fixed a bug where Monks with more than 4 Chi would not draw the additional Chi properly on initial load into the world 2014-11-22 02:11:54 -06:00
605b4884df Removed project-revision from the version number string since we've been away from svn for a while now 2014-11-22 01:51:49 -06:00
d30d971cda Updated with new return values for GetWeaponEnchantInfo in 6.0 (ticket #183 - thanks slippycheeze!) 2014-11-22 01:49:24 -06:00
1a62f6b33a - Added support for a 6th Chi. 2014-11-15 00:37:51 -06:00
63462ae340 Fixed being able to cancel a buff when the frame's alpha was zero. Unfortunately the mouse click is still eaten, but at least your buffs don't pop off. 2014-11-07 00:41:32 -06:00
d9571c6636 Worked around a bug Blizzard created in 6.0 with cooldown wipes not updating alpha with their parent frame. See http://www.wowinterface.com/forums/showthread.php?t=49950 for discussion. 2014-11-07 00:41:26 -06:00
866c439621 Updated FAQ. 2014-10-31 11:22:23 -05:00
5e778647ff Fixed ComboPointsBar not setting the proper alpha value sometimes. 2014-10-27 20:20:42 -05:00
54469655f6 Inactive mode "Darkened" on class power counters now displays a darkened background behind a full/partially full rune as well as the old behavior of showing empty runes as darkened forms. This aids in class powers like demonology warlocks who need to be able to see the full bar. 2014-10-25 23:02:33 -05:00
bfcf8de7b4 Fixed "divide by zero" errors that could happen in class power counters when switching specs. 2014-10-25 22:42:47 -05:00
07ff89e8f8 - Fixed Hide Blizzard Frame option not properly hiding and showing all Warlock Power built-in frames for all specs. 2014-10-25 18:03:34 -05:00
7258f037ee Info modules now display a random stack count from 1 to 5 when in configuration mode for easier Stack Font Size configuring. 2014-10-23 20:53:44 -05:00
5f48afadff - Fixed error generated by configuration mode with a CC module enabled. 2014-10-23 20:42:04 -05:00
149d22ad3a Allow players to cancel their buffs outside of combat 2014-10-22 20:07:57 +02:00
996942ae0e - Added support for ComboPoints, ComboPointsBar, and SliceAndDice to display with no target selected using UnitPower(unit, 4) which is apparently combo points now. 2014-10-21 23:36:46 -05:00
be6d1f6862 - Okay, sunder is apparently gone too. 2014-10-19 00:31:17 -05:00
3334bb6286 - Disable Vengeance module on WoW 6.0 clients. Will possibly overhaul it for Resolve in the future. 2014-10-18 17:57:39 -05:00
ed5b8f90a9 - More protections against a nil auraName that is coming up repeatedly somehow. 2014-10-17 14:16:27 -05:00
9a3b8fb0bd - Added guards against nil auraName in CustomCount causing an error. 2014-10-16 17:34:55 -05:00
980cfd2f8e - Added mailmap to alias a couple of users correctly. 2014-10-15 11:03:09 -05:00
17 changed files with 209 additions and 66 deletions

2
.mailmap Normal file
View File

@ -0,0 +1,2 @@
Parnic <parnic@parnic.com> Parnic <chris@parnic.com>
rokiyo <rokiyo@example.com> Rokiyo <Rokiyo@example.com>

View File

@ -261,12 +261,12 @@ end
function IceCore.prototype:RedirectRemovedModules()
local _, class = UnitClass("player")
if class == "WARRIOR" and self.settings.modules["SunderCount"] then
if class == "WARRIOR" and self.settings.modules["SunderCount"] and IceHUD.WowVer < 60000 then
if self.settings.modules["SunderCount"].enabled or self.settings.modules["SunderCount"].enabled == nil then
local bFound = false
for k,v in pairs(self.elements) do
if v.moduleSettings.customBarType == "Counter"
if v.moduleSettings.customBarType == "Counter" and v.moduleSettings.auraName
and string.upper(v.moduleSettings.auraName) == string.upper(GetSpellInfo(SUNDER_SPELL_ID)) then
bFound = true
break
@ -302,7 +302,7 @@ function IceCore.prototype:RedirectRemovedModules()
if self.settings.modules["LacerateCount"].enabled or self.settings.modules["LacerateCount"].enabled == nil then
local bFound = false
for k,v in pairs(self.elements) do
if v.moduleSettings.customBarType == "Counter"
if v.moduleSettings.customBarType == "Counter" and v.moduleSettings.auraName
and string.upper(v.moduleSettings.auraName) == string.upper(GetSpellInfo(LACERATE_SPELL_ID)) then
bFound = true
break
@ -339,7 +339,7 @@ function IceCore.prototype:RedirectRemovedModules()
if self.settings.modules["MaelstromCount"].enabled or self.settings.modules["MaelstromCount"].enabled == nil then
local bFound = false
for k,v in pairs(self.elements) do
if v.moduleSettings.customBarType == "Counter"
if v.moduleSettings.customBarType == "Counter" and v.moduleSettings.auraName
and string.upper(v.moduleSettings.auraName) == string.upper(GetSpellInfo(MAELSTROM_SPELL_ID)) then
bFound = true
break

View File

@ -372,12 +372,12 @@ function IceHUD:GetDebuffCount(unit, ability, onlyMine, matchByName)
end
function IceHUD:GetAuraCount(auraType, unit, ability, onlyMine, matchByName)
if not unit then
if not unit or not ability then
return 0
end
if unit == "main hand weapon" or unit == "off hand weapon" then
local hasMainHandEnchant, mainHandExpiration, mainHandCharges, hasOffHandEnchant, offHandExpiration, offHandCharges
local hasMainHandEnchant, mainHandExpiration, mainHandCharges, mainHandEnchantID, hasOffHandEnchant, offHandExpiration, offHandCharges, offHandEnchantID
= GetWeaponEnchantInfo()
if unit == "main hand weapon" and hasMainHandEnchant then

View File

@ -3,7 +3,7 @@
## Name: IceHUD
## Title: IceHUD |cff7fff7f-Ace3-|r
## Notes: Another HUD addon
## Version: @project-version@ (Revision: @project-revision@)
## 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: 50400

View File

@ -71,7 +71,13 @@ This isn't |cff9999ffIceHUD|r - it's Blizzard's new Spell Alerts they added in 4
Expand "|cffffdc42Module Settings|r", expand whatever module you want to move (e.g. PlayerHealth, PlayerMana), and adjust the "Side" and "Offset" settings. "Side" controls whether it's on the left or the right and "Offset" controls how far from center it is.
|cff9999ff14. Which module displays Monk Chi power?|r
This module is called HarmonyPower. Harmony was the original name for Chi back when 5.0 was in beta, so I used Blizzard's name for it while I was developing for Cataclysm. I feel like it's too late to change now that many people are familiar with the Harmony name.]]
This module is called HarmonyPower. Harmony was the original name for Chi back when 5.0 was in beta, so I used Blizzard's name for it while I was developing for Cataclysm. I feel like it's too late to change now that many people are familiar with the Harmony name.
|cff9999ff15. How do I add commas/periods into big numbers like health?|r
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.]]
}
}
},

View File

@ -659,6 +659,11 @@ 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
@ -691,8 +696,10 @@ function IceClassPowerCounter.prototype:CreateRune(i)
self.frame.graphical[i] = CreateFrame("Frame", nil, self.frame)
self.frame.graphical[i]:SetFrameStrata("BACKGROUND")
self.frame.graphical[i].rune = self.frame.graphical[i]:CreateTexture(nil, "LOW")
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")
@ -713,10 +720,14 @@ 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
@ -734,6 +745,7 @@ 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
@ -754,6 +766,7 @@ function IceClassPowerCounter.prototype:SetupRuneTexture(rune)
elseif self:GetRuneMode() == "Graphical Clean Circle" then
self.frame.graphical[rune].rune:SetTexture(IceElement.TexturePath .. "ComboCleanCurves")
end
self.frame.graphical[rune].runebg:SetTexture(self.frame.graphical[rune].rune:GetTexture())
end
function IceClassPowerCounter.prototype:GetAlphaAdd()
@ -771,7 +784,7 @@ end
function IceClassPowerCounter.prototype:GetGradientColor(curr)
local r, g, b = self:GetCustomColor()
local mr, mg, mb = self:GetCustomMinColor()
local scale = (curr-1)/(self.numRunes-1)
local scale = self.numRunes == 1 and 0 or ((curr-1)/(self.numRunes-1))
if r < mr then
r = ((r-mr)*scale) + mr

View File

@ -185,6 +185,23 @@ function ComboPoints.prototype:GetOptions()
order = 34
}
opts["bShowWithNoTarget"] =
{
type = 'toggle',
name = L["Show with no target"],
desc = L["Whether or not to display when you have no target selected but have combo points available"],
get = function()
return self.moduleSettings.bShowWithNoTarget
end,
set = function(info, v)
self.moduleSettings.bShowWithNoTarget = v
self:UpdateComboPoints()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
}
return opts
end
@ -202,6 +219,7 @@ function ComboPoints.prototype:GetDefaultSettings()
defaults["graphicalLayout"] = "Horizontal"
defaults["comboGap"] = 0
defaults["showAnticipation"] = true
defaults["bShowWithNoTarget"] = true
return defaults
end
@ -395,7 +413,12 @@ function ComboPoints.prototype:UpdateComboPoints()
elseif IceHUD.WowVer >= 30000 then
-- Parnic: apparently some fights have combo points while the player is in a vehicle?
local isInVehicle = UnitHasVehicleUI("player")
points = GetComboPoints(isInVehicle and "vehicle" or "player", "target")
local checkUnit = isInVehicle and "vehicle" or "player"
if IceHUD.WowVer >= 60000 then
points = UnitPower(checkUnit, 4)
else
points = GetComboPoints(checkUnit, "target")
end
_, _, _, anticipate = UnitAura("player", AnticipationAuraName)
else
points = GetComboPoints("target")
@ -416,7 +439,7 @@ function ComboPoints.prototype:UpdateComboPoints()
pointsText = pointsText.."+"..tostring(anticipate)
end
if points == 0 and anticipate == 0 then
if (points == 0 and anticipate == 0) or (not UnitExists("target") and not self.moduleSettings.bShowWithNoTarget) then
self.frame.numeric:SetText(nil)
else
self.frame.numeric:SetText(pointsText)
@ -425,19 +448,21 @@ function ComboPoints.prototype:UpdateComboPoints()
self.frame.numeric:SetText()
for i = 1, table.getn(self.frame.graphical) do
if (points > 0) or (anticipate > 0) then
local hideIfNoTarget = not UnitExists("target") and not self.moduleSettings.bShowWithNoTarget
if ((points > 0) or (anticipate > 0)) and not hideIfNoTarget then
self.frame.graphicalBG[i]:Show()
else
self.frame.graphicalBG[i]:Hide()
end
if (i <= points) then
if (i <= points) and not hideIfNoTarget then
self.frame.graphical[i]:Show()
else
self.frame.graphical[i]:Hide()
end
if (i <= anticipate) then
if (i <= anticipate) and not hideIfNoTarget then
self.frame.graphicalAnt[i]:Show()
else
self.frame.graphicalAnt[i]:Hide()

View File

@ -30,6 +30,23 @@ function ComboPointsBar.prototype:GetOptions()
order = 31
}
opts["bShowWithNoTarget"] =
{
type = 'toggle',
name = L["Show with no target"],
desc = L["Whether or not to display when you have no target selected but have combo points available"],
get = function()
return self.moduleSettings.bShowWithNoTarget
end,
set = function(info, v)
self.moduleSettings.bShowWithNoTarget = v
self:UpdateComboPoints()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
}
return opts
end
@ -40,6 +57,7 @@ function ComboPointsBar.prototype:GetDefaultSettings()
defaults.enabled = false
defaults.alwaysDisplay = false
defaults.desiredLerpTime = 0.05
defaults.bShowWithNoTarget = true
return defaults
end
@ -69,7 +87,12 @@ function ComboPointsBar.prototype:UpdateComboPoints()
elseif IceHUD.WowVer >= 30000 then
-- Parnic: apparently some fights have combo points while the player is in a vehicle?
local isInVehicle = UnitHasVehicleUI("player")
points = GetComboPoints(isInVehicle and "vehicle" or "player", "target")
local checkUnit = isInVehicle and "vehicle" or "player"
if IceHUD.WowVer >= 60000 then
points = UnitPower(checkUnit, 4)
else
points = GetComboPoints(checkUnit, "target")
end
else
points = GetComboPoints("target")
end
@ -78,7 +101,7 @@ function ComboPointsBar.prototype:UpdateComboPoints()
points = nil
end
if points == nil or points == 0 then
if points == nil or points == 0 or (not UnitExists("target") and not self.moduleSettings.bShowWithNoTarget) then
self:Show(self.moduleSettings.alwaysDisplay)
self:UpdateBar(0, "undef")
else
@ -86,10 +109,14 @@ function ComboPointsBar.prototype:UpdateComboPoints()
local color = {}
self:SetScaledColor(color, (points - 1) / 4.0, self.settings.colors["ComboPointsBarMax"], self.settings.colors["ComboPointsBarMin"])
self:UpdateBar(points / 5.0, "undef")
self.barFrame.bar:SetVertexColor(color.r, color.g, color.b, 1)
self.barFrame.bar:SetVertexColor(color.r, color.g, color.b, self.alpha)
end
self:SetBottomText1(points or "0")
end
function ComboPointsBar.prototype:Update()
self:UpdateComboPoints()
end
IceHUD.ComboPointsBar = ComboPointsBar:new()

View File

@ -619,7 +619,7 @@ function IceCustomBar.prototype:GetAuraDuration(unitName, buffName)
end
if unitName == "main hand weapon" or unitName == "off hand weapon" then
local hasMainHandEnchant, mainHandExpiration, mainHandCharges, hasOffHandEnchant, offHandExpiration, offHandCharges
local hasMainHandEnchant, mainHandExpiration, mainHandCharges, mainHandEnchantID, hasOffHandEnchant, offHandExpiration, offHandCharges, offHandEnchantID
= GetWeaponEnchantInfo()
if unitName == "main hand weapon" and hasMainHandEnchant then

View File

@ -549,6 +549,10 @@ end
function IceCustomCount.prototype:UpdateCustomCount()
if not self.moduleSettings.auraName then
return
end
local points
if IceHUD.IceCore:IsInConfigMode() then
points = tonumber(self.moduleSettings.maxCount)

View File

@ -14,6 +14,7 @@ function HarmonyPower.prototype:init()
{0.00390625, 0.08593750, 0.71093750, 0.87500000},
{0.00390625, 0.08593750, 0.71093750, 0.87500000},
{0.00390625, 0.08593750, 0.71093750, 0.87500000},
{0.00390625, 0.08593750, 0.71093750, 0.87500000},
}
self.numRunes = 4
self.numericColor = "HarmonyPowerNumeric"
@ -32,6 +33,8 @@ function HarmonyPower.prototype:Enable(core)
HarmonyPower.super.prototype.Enable(self, core)
self:RegisterEvent("UNIT_POWER_FREQUENT", "UpdateRunePower")
self:Redraw()
end
function HarmonyPower.prototype:UpdateRunePower(event, arg1, arg2)

View File

@ -60,30 +60,35 @@ StaticPopupDialogs["ICEHUD_BUFF_DISMISS_UNAVAILABLE"] =
hideOnEscape = 0,
}
local function OnBuffMouseUp(frame, button)
if IceHUD.WowVer >= 40000 then
if button == "RightButton" then
StaticPopup_Show("ICEHUD_BUFF_DISMISS_UNAVAILABLE")
end
else
--[[ if( button == "RightButton" ) then
if buffs[i].type == "mh" then
CancelItemTempEnchantment(1)
elseif buffs[i].type == "oh" then
CancelItemTempEnchantment(2)
else
CancelUnitBuff("player", i)
end
end]]
-- playerinfo buffclick event handle
function PlayerInfo.prototype:BuffClick(this,event)
if not self:AllowMouseBuffInteraction(this) then
return
end
-- We want to catch the rightbutton click.
-- We also need to check for combat lockdown. The api won't allow cancelling during combat lockdown.
if( event == "RightButton" ) and not InCombatLockdown() then
if this.type == "mh" then
CancelItemTempEnchantment(1)
elseif this.type == "oh" then
CancelItemTempEnchantment(2)
else
CancelUnitBuff(self.unit, this.id)
end
end
end
function PlayerInfo.prototype:CreateIconFrames(parent, direction, buffs, type)
local buffs = PlayerInfo.super.prototype.CreateIconFrames(self, parent, direction, buffs, type)
if not self.MyOnClickBuffFunc then
self.MyOnClickBuffFunc = function(this,event) self:BuffClick(this,event) end
end
for i = 1, IceCore.BuffLimit do
if (self.moduleSettings.mouseBuff) then
buffs[i]:SetScript("OnMouseUp", OnBuffMouseUp)
buffs[i]:SetScript("OnMouseUp", self.MyOnClickBuffFunc)
else
buffs[i]:SetScript("OnMouseUp", nil)
end
@ -136,7 +141,7 @@ function PlayerInfo.prototype:UpdateBuffs(unit, fromRepeated)
PlayerInfo.super.prototype.UpdateBuffs(self)
end
local hasMainHandEnchant, mainHandExpiration, mainHandCharges, hasOffHandEnchant, offHandExpiration, offHandCharges
local hasMainHandEnchant, mainHandExpiration, mainHandCharges, mainHandEnchantID, hasOffHandEnchant, offHandExpiration, offHandCharges, offHandEnchantID
= GetWeaponEnchantInfo()
local startingNum = 0

View File

@ -195,15 +195,15 @@ function ShardCounter.prototype:GetRuneTexture(rune)
end
function ShardCounter.prototype:ShowBlizz()
ShardBarFrame:Show()
WarlockPowerFrame:Show()
ShardBarFrame:GetScript("OnLoad")(ShardBarFrame)
WarlockPowerFrame:GetScript("OnLoad")(WarlockPowerFrame)
end
function ShardCounter.prototype:HideBlizz()
ShardBarFrame:Hide()
WarlockPowerFrame:Hide()
ShardBarFrame:UnregisterAllEvents()
WarlockPowerFrame:UnregisterAllEvents()
end
-- Load us up

View File

@ -50,7 +50,7 @@ function SliceAndDice.prototype:Enable(core)
SliceAndDice.super.prototype.Enable(self, core)
self:RegisterEvent("UNIT_AURA", "UpdateSliceAndDice")
self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateDurationBar")
self:RegisterEvent("UNIT_COMBO_POINTS", "ComboPointsChanged")
if not self.moduleSettings.alwaysFullAlpha then
self:Show(false)
@ -61,16 +61,15 @@ function SliceAndDice.prototype:Enable(core)
self:SetBottomText1("")
end
function SliceAndDice.prototype:TargetChanged()
SliceAndDice.super.prototype.TargetChanged(self)
self:UpdateDurationBar()
self:UpdateSliceAndDice()
end
function SliceAndDice.prototype:Disable(core)
SliceAndDice.super.prototype.Disable(self, core)
end
function SliceAndDice.prototype:ComboPointsChanged()
self:TargetChanged()
self:UpdateDurationBar()
end
-- OVERRIDE
function SliceAndDice.prototype:GetDefaultSettings()
local settings = SliceAndDice.super.prototype.GetDefaultSettings(self)
@ -90,6 +89,7 @@ function SliceAndDice.prototype:GetDefaultSettings()
settings["lowerTextVisible"] = false
settings["hideAnimationSettings"] = true
settings["bAllowExpand"] = true
settings["bShowWithNoTarget"] = true
return settings
end
@ -137,6 +137,23 @@ function SliceAndDice.prototype:GetOptions()
end
}
opts["bShowWithNoTarget"] =
{
type = 'toggle',
name = L["Show with no target"],
desc = L["Whether or not to display when you have no target selected but have combo points available"],
get = function()
return self.moduleSettings.bShowWithNoTarget
end,
set = function(info, v)
self.moduleSettings.bShowWithNoTarget = v
self:ComboPointsChanged()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
}
return opts
end
@ -212,11 +229,21 @@ function SliceAndDice.prototype:MyOnUpdate()
if self.bUpdateSnd then
self:UpdateSliceAndDice(nil, self.unit, true)
end
if self.target then
if self.target or self.moduleSettings.bShowWithNoTarget then
self:UpdateDurationBar()
end
end
local function SNDGetComboPoints(unit)
if IceHUD.WowVer >= 60000 then
return UnitPower(unit, 4)
elseif IceHUD.WowVer >= 30000 then
return GetComboPoints(unit, "target")
else
return GetComboPoints()
end
end
function SliceAndDice.prototype:UpdateSliceAndDice(event, unit, fromUpdate)
if unit and unit ~= self.unit then
return
@ -249,7 +276,7 @@ function SliceAndDice.prototype:UpdateSliceAndDice(event, unit, fromUpdate)
else
self:UpdateBar(0, "SliceAndDice")
if ((IceHUD.WowVer >= 30000 and GetComboPoints(self.unit, "target") == 0) or (IceHUD.WowVer < 30000 and GetComboPoints() == 0)) or not UnitExists("target") then
if SNDGetComboPoints(self.unit) == 0 or (not UnitExists("target") and not self.moduleSettings.bShowWithNoTarget) then
if self.bIsVisible then
self.bUpdateSnd = nil
end
@ -267,18 +294,24 @@ function SliceAndDice.prototype:UpdateSliceAndDice(event, unit, fromUpdate)
end
end
function SliceAndDice.prototype:TargetChanged()
if self.moduleSettings.bShowWithNoTarget and SNDGetComboPoints(self.unit) > 0 then
self.target = true
else
self.target = UnitExists("target")
end
self:Update(self.unit)
self:UpdateDurationBar()
self:UpdateSliceAndDice()
end
function SliceAndDice.prototype:UpdateDurationBar(event, unit)
if unit and unit ~= self.unit then
return
end
local points
if IceHUD.WowVer >= 30000 then
points = GetComboPoints(self.unit, "target")
else
points = GetComboPoints("target")
end
local scale
local points = SNDGetComboPoints(self.unit)
-- first, set the cached upper limit of SnD duration
CurrMaxSnDDuration = self:GetMaxBuffTime(maxComboPoints)
@ -295,7 +328,7 @@ function SliceAndDice.prototype:UpdateDurationBar(event, unit)
self.durationFrame:Show()
-- if we have combo points and a target selected, go ahead and show the bar so the duration bar can be seen
if points > 0 and UnitExists("target") then
if points > 0 and (UnitExists("target") or self.moduleSettings.bShowWithNoTarget) then
self:Show(true)
end
@ -303,7 +336,7 @@ function SliceAndDice.prototype:UpdateDurationBar(event, unit)
PotentialSnDDuration = self:GetMaxBuffTime(points)
-- compute the scale from the current number of combo points
scale = IceHUD:Clamp(PotentialSnDDuration / CurrMaxSnDDuration, 0, 1)
local scale = IceHUD:Clamp(PotentialSnDDuration / CurrMaxSnDDuration, 0, 1)
-- sadly, animation uses bar-local variables so we can't use the animation for 2 bar textures on the same bar element
if (self.moduleSettings.reverse) then

View File

@ -344,7 +344,7 @@ end
function TargetCC.prototype:UpdateTargetDebuffs(event, unit, isUpdate)
local name, duration, remaining
if not isUpdate then
if not isUpdate or not self.lastUpdateTime then
self.debuffName, self.debuffDuration, self.debuffRemaining = self:GetMaxDebuffDuration(self.unit, self.debuffList)
else
self.debuffRemaining = math.max(0, self.debuffRemaining - (GetTime() - self.lastUpdateTime))

View File

@ -1390,7 +1390,7 @@ function IceTargetInfo.prototype:UpdateBuffType(aura)
icon = [[Interface\Icons\Spell_Frost_Frost]]
duration = 60
expirationTime = GetTime() + 59
count = 1
count = math.random(5)
end
if icon then
@ -1669,6 +1669,19 @@ function IceTargetInfo.prototype:Update(unit)
self:UpdateAlpha()
end
function IceTargetInfo.prototype:UpdateAlpha()
IceTargetInfo.super.prototype.UpdateAlpha(self)
-- Temp until Blizzard fixes their cooldown wipes. http://www.wowinterface.com/forums/showthread.php?t=49950
for i = 1, #self.frame["buffFrame"].iconFrames do
self.frame["buffFrame"].iconFrames[i].cd:SetSwipeColor(0, 0, 0, self.alpha)
self.frame["buffFrame"].iconFrames[i].cd:SetDrawEdge(false)
end
for i = 1, #self.frame["debuffFrame"].iconFrames do
self.frame["debuffFrame"].iconFrames[i].cd:SetSwipeColor(0, 0, 0, self.alpha)
self.frame["debuffFrame"].iconFrames[i].cd:SetDrawEdge(false)
end
end
function IceTargetInfo.prototype:OnEnter(frame)
if self.moduleSettings.mouseTooltip then
@ -1685,13 +1698,24 @@ function IceTargetInfo.prototype:OnLeave(frame)
self.frame.highLight:Hide()
end
function IceTargetInfo.prototype:BuffOnEnter(this)
function IceTargetInfo.prototype:AllowMouseBuffInteraction(id)
if (not self:IsVisible()) then
return
return false
end
if not self.unit or not this.id then
if not self.unit or not id then
return false
end
if self.alpha == 0 then
return false
end
return true
end
function IceTargetInfo.prototype:BuffOnEnter(this)
if not self:AllowMouseBuffInteraction(this.id) then
return
end

View File

@ -120,6 +120,7 @@ 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 >= 40000) then
if ((unitClass == "DEATHKNIGHT" or unitClass == "DRUID" or unitClass == "PALADIN" or unitClass == "WARRIOR" or unitClass == "MONK")
and IceHUD.WowVer >= 40000 and IceHUD.WowVer < 60000) then
IceHUD.Vengeance = Vengeance:new()
end
end