Compare commits

...

12 Commits
1.9.1 ... 1.9.4

Author SHA1 Message Date
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
13 changed files with 158 additions and 56 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,7 +372,7 @@ 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

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

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

@ -60,30 +60,31 @@ 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)
-- 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

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

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