mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
59f2792ce8
|
|||
a80daface7
|
|||
f6db2f3b7c
|
|||
5d09cad6cb
|
|||
8fc2e326aa
|
|||
d775603ec0
|
|||
70bba2f186
|
|||
8ac9bee610
|
|||
07bda8e84d
|
|||
5712114eb8
|
|||
2a0db2eb01
|
|||
7d32b6d8c6
|
|||
60d44601d1
|
|||
b3cf33a945
|
|||
3ddc2f9d2f
|
|||
d6adaedc93
|
@ -393,6 +393,8 @@ function IceCastBar.prototype:MyOnUpdate()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self:UpdateBar(1, self:GetCurrentCastingColor())
|
||||||
|
|
||||||
if (self.action == IceCastBar.Actions.Failure) then
|
if (self.action == IceCastBar.Actions.Failure) then
|
||||||
self:FlashBar("CastFail", 1-scale, self.actionMessage, "CastFail")
|
self:FlashBar("CastFail", 1-scale, self.actionMessage, "CastFail")
|
||||||
else
|
else
|
||||||
@ -478,7 +480,7 @@ function IceCastBar.prototype:FlashBar(color, alpha, text, textColor)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function IceCastBar.prototype:StartBar(action, message)
|
function IceCastBar.prototype:StartBar(action, message, spellId)
|
||||||
local spell, rank, displayName, icon, startTime, endTime, isTradeSkill, numStages
|
local spell, rank, displayName, icon, startTime, endTime, isTradeSkill, numStages
|
||||||
if IceHUD.SpellFunctionsReturnRank then
|
if IceHUD.SpellFunctionsReturnRank then
|
||||||
spell, rank, displayName, icon, startTime, endTime, isTradeSkill = UnitCastingInfo(self.unit)
|
spell, rank, displayName, icon, startTime, endTime, isTradeSkill = UnitCastingInfo(self.unit)
|
||||||
@ -493,6 +495,10 @@ function IceCastBar.prototype:StartBar(action, message)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if spellId and not spell then
|
||||||
|
spell, rank, icon = GetSpellInfo(spellId)
|
||||||
|
end
|
||||||
|
|
||||||
local isChargeSpell = numStages and numStages > 0
|
local isChargeSpell = numStages and numStages > 0
|
||||||
if isChargeSpell then
|
if isChargeSpell then
|
||||||
self.NumStages = numStages
|
self.NumStages = numStages
|
||||||
@ -514,7 +520,7 @@ function IceCastBar.prototype:StartBar(action, message)
|
|||||||
if LibClassicCasterino and not spell then
|
if LibClassicCasterino and not spell then
|
||||||
self:StopBar()
|
self:StopBar()
|
||||||
elseif not spell then
|
elseif not spell then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if icon ~= nil then
|
if icon ~= nil then
|
||||||
@ -590,7 +596,7 @@ function IceCastBar.prototype:SpellCastStart(event, unit, castGuid, spellId)
|
|||||||
IceHUD:Debug("SpellCastStart", unit, castGuid, spellId)
|
IceHUD:Debug("SpellCastStart", unit, castGuid, spellId)
|
||||||
--UnitCastingInfo(unit)
|
--UnitCastingInfo(unit)
|
||||||
|
|
||||||
self:StartBar(IceCastBar.Actions.Cast)
|
self:StartBar(IceCastBar.Actions.Cast, nil, spellId)
|
||||||
self.current = castGuid
|
self.current = castGuid
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -609,8 +615,9 @@ function IceCastBar.prototype:SpellCastStop(event, unit, castGuid, spellId)
|
|||||||
self.action ~= IceCastBar.Actions.ReverseChannel)
|
self.action ~= IceCastBar.Actions.ReverseChannel)
|
||||||
then
|
then
|
||||||
self:StopBar()
|
self:StopBar()
|
||||||
self.current = nil
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self.current = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -639,7 +646,7 @@ function IceCastBar.prototype:SpellCastFailed(event, unit, castGuid, spellId)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self:StartBar(IceCastBar.Actions.Failure, "Failed")
|
self:StartBar(IceCastBar.Actions.Failure, "Failed", nil, spellId)
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceCastBar.prototype:SpellCastInterrupted(event, unit, castGuid, spellId)
|
function IceCastBar.prototype:SpellCastInterrupted(event, unit, castGuid, spellId)
|
||||||
@ -653,7 +660,7 @@ function IceCastBar.prototype:SpellCastInterrupted(event, unit, castGuid, spellI
|
|||||||
|
|
||||||
self.current = nil
|
self.current = nil
|
||||||
|
|
||||||
self:StartBar(IceCastBar.Actions.Failure, "Interrupted")
|
self:StartBar(IceCastBar.Actions.Failure, "Interrupted", spellId)
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceCastBar.prototype:SpellCastDelayed(event, unit, castGuid, spellId)
|
function IceCastBar.prototype:SpellCastDelayed(event, unit, castGuid, spellId)
|
||||||
@ -687,7 +694,7 @@ function IceCastBar.prototype:SpellCastSucceeded(event, unit, castGuid, spellId)
|
|||||||
|
|
||||||
-- show after normal successfull cast
|
-- show after normal successfull cast
|
||||||
if (self.action == IceCastBar.Actions.Cast) then
|
if (self.action == IceCastBar.Actions.Cast) then
|
||||||
self:StartBar(IceCastBar.Actions.Success, spell.. self:GetShortRank(rank))
|
self:StartBar(IceCastBar.Actions.Success, spell.. self:GetShortRank(rank), spellId)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -700,7 +707,12 @@ function IceCastBar.prototype:SpellCastSucceeded(event, unit, castGuid, spellId)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self:StartBar(IceCastBar.Actions.Success, spell.. self:GetShortRank(rank))
|
-- handle special spells that are used for quests or other things that don't apply to the player
|
||||||
|
if self.unit == "player" and not IsPlayerSpell(spellId) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
self:StartBar(IceCastBar.Actions.Success, spell.. self:GetShortRank(rank), spellId)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -645,10 +645,11 @@ function IceCore.prototype:GetModuleOptions()
|
|||||||
|
|
||||||
for i = 1, table.getn(self.elements) do
|
for i = 1, table.getn(self.elements) do
|
||||||
local modName = self.elements[i]:GetElementName()
|
local modName = self.elements[i]:GetElementName()
|
||||||
|
local modDesc = self.elements[i]:GetElementDescription()
|
||||||
local opt = self.elements[i]:GetOptions()
|
local opt = self.elements[i]:GetOptions()
|
||||||
options[modName] = {
|
options[modName] = {
|
||||||
type = 'group',
|
type = 'group',
|
||||||
desc = L["Module options"],
|
desc = modDesc,
|
||||||
name = modName,
|
name = modName,
|
||||||
args = opt
|
args = opt
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,10 @@ function IceElement.prototype:GetElementName()
|
|||||||
return self.elementName
|
return self.elementName
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function IceElement.prototype:GetElementDescription()
|
||||||
|
return L["Module options"]
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function IceElement.prototype:Create(parent)
|
function IceElement.prototype:Create(parent)
|
||||||
assert(parent, "IceElement 'parent' can't be nil")
|
assert(parent, "IceElement 'parent' can't be nil")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
## Interface: 100000
|
## Interface: 100002
|
||||||
## Interface-Retail: 100000
|
## Interface-Retail: 100002
|
||||||
## Interface-Classic: 11403
|
## Interface-Classic: 11403
|
||||||
## Interface-BCC: 20504
|
## Interface-BCC: 20504
|
||||||
## Interface-Wrath: 30400
|
## Interface-Wrath: 30400
|
||||||
@ -100,6 +100,7 @@ modules\PlayerAltMana.lua
|
|||||||
modules\ArcaneCharges.lua
|
modules\ArcaneCharges.lua
|
||||||
modules\RollTheBones.lua
|
modules\RollTheBones.lua
|
||||||
modules\EssencePower.lua
|
modules\EssencePower.lua
|
||||||
|
modules\DruidEnergy.lua
|
||||||
|
|
||||||
#@do-not-package@
|
#@do-not-package@
|
||||||
IceHUD_Options\Json.lua
|
IceHUD_Options\Json.lua
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
## Interface: 100000
|
## Interface: 100002
|
||||||
## Interface-Retail: 100000
|
## Interface-Retail: 100002
|
||||||
## Interface-Classic: 11403
|
## Interface-Classic: 11403
|
||||||
## Interface-BCC: 20504
|
## Interface-BCC: 20504
|
||||||
## Interface-Wrath: 30400
|
## Interface-Wrath: 30400
|
||||||
|
@ -85,13 +85,13 @@ If you have |cff42ffffDogTags|r enabled, you can open the Text Settings for the
|
|||||||
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. |cff9999ffIceHUD|r 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. |cff42ffffQuartz|r is a good castbar replacement that you can use and disable |cff9999ffIceHUD|r's built-in castbar, for example.
|
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. |cff9999ffIceHUD|r 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. |cff42ffffQuartz|r is a good castbar replacement that you can use and disable |cff9999ffIceHUD|r'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
|
|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.
|
Blizzard added a "Personal Resource Display" feature in the 7.0 game client. You can disable it in the Game options -> |cffffdc42Interface|r -> |cffffdc42Names|r -> |cffffdc42Personal Resource Display|r (or Options -> |cffffdc42Combat|r -> |cffffdc42Personal Resource Display|r, in 10.0+).
|
||||||
|
|
||||||
|cff9999ff19. Why is there no target castbar for Classic?|r
|
|cff9999ff19. Why is there no target castbar for Classic?|r
|
||||||
The Classic game client doesn't offer a reliable way to show castbars for anyone except the player. You can install the LibCasterCasterino addon to enable support, but it's a best guess and not at all accurate.
|
The Classic game client doesn't offer a reliable way to show castbars for anyone except the player. You can install the |cff42ffffLibCasterCasterino|r addon to enable support, but it's a best guess and not at all accurate.
|
||||||
|
|
||||||
|cff9999ff20. Why do buff/debuff timers not work in Classic?|r
|
|cff9999ff20. Why do buff/debuff timers not work in Classic?|r
|
||||||
The Classic game client doesn't provide this information to addons because it wasn't a feature when the game first released. You can install the LibClassicDurations addon to enable support, but it's a best guess and not at all accurate.]]
|
The Classic game client doesn't provide this information to addons because it wasn't a feature when the game first released. You can install the |cff42ffffLibClassicDurations|r addon to enable support, but it's a best guess and not at all accurate.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -278,14 +278,14 @@ function IceUnitBar.prototype:Update()
|
|||||||
-- This looks slightly quirky. Basically the easiest way for me to achieve this is to have lowThresholdColor override
|
-- This looks slightly quirky. Basically the easiest way for me to achieve this is to have lowThresholdColor override
|
||||||
-- the scaled color. You'll need to switch them both on to get things to work.
|
-- the scaled color. You'll need to switch them both on to get things to work.
|
||||||
if( self.moduleSettings.lowThresholdColor ) then
|
if( self.moduleSettings.lowThresholdColor ) then
|
||||||
if( self.healthPercentage < self.moduleSettings.lowThreshold ) then
|
if( self.healthPercentage <= self.moduleSettings.lowThreshold ) then
|
||||||
self.settings.colors[ "ScaledHealthColor" ] = self.settings.colors[ "MinHealthColor" ]
|
self.settings.colors[ "ScaledHealthColor" ] = self.settings.colors[ "MinHealthColor" ]
|
||||||
else
|
elseif not self.moduleSettings.scaleHealthColor then
|
||||||
self.settings.colors[ "ScaledHealthColor" ] = self.settings.colors[ "MaxHealthColor" ]
|
self.settings.colors[ "ScaledHealthColor" ] = self.settings.colors[ "MaxHealthColor" ]
|
||||||
end
|
end
|
||||||
if( self.manaPercentage < self.moduleSettings.lowThreshold ) then
|
if( self.manaPercentage <= self.moduleSettings.lowThreshold ) then
|
||||||
self.settings.colors[ "ScaledManaColor" ] = self.settings.colors[ "MinManaColor" ]
|
self.settings.colors[ "ScaledManaColor" ] = self.settings.colors[ "MinManaColor" ]
|
||||||
else
|
elseif not self.moduleSettings.scaleManaColor then
|
||||||
self.settings.colors[ "ScaledManaColor" ] = self.settings.colors[ "MaxManaColor" ]
|
self.settings.colors[ "ScaledManaColor" ] = self.settings.colors[ "MaxManaColor" ]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
25
changelog.md
25
changelog.md
@ -1,5 +1,30 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
v1.14.8:
|
||||||
|
|
||||||
|
- Fix Color By Health % to work with Low Threshold Color option. Previously, if Low Threshold was set, the color was always either MaxHealth/MaxMana or MinHealth/MinMana, it would never be colored by health %. Now if both are set, it will scale by health % until it reaches the low threshold, at which point it will switch to the Min color.
|
||||||
|
- Fix Low Threshold color and flashing to work at the same percentage. Previously these were slightly different such that it would start flashing at 40% but not turn to the Min color until 39.9999%, for example.
|
||||||
|
|
||||||
|
v1.14.7:
|
||||||
|
|
||||||
|
- Add option to scale absorb bar by the unit's maximum health.
|
||||||
|
|
||||||
|
v1.14.6:
|
||||||
|
|
||||||
|
- Add ability for buff/debuff watchers to only display when the specified buff/debuff is missing. This also adds the ability to require that the given unit exists. So if you had Unit set to Target, Display mode set to Missing, and Only if unit exists checked, you'd show the bar if you have a target and they don't have the given buff/debuff.
|
||||||
|
- Don't flash the castbar for instant-cast spells that the player didn't cast (such as internal quest spells).
|
||||||
|
- Add DruidEnergy module (disabled by default). This module will show the player's Energy level if they're a Druid and currently shapeshifted to a non-energy-using form (eligible forms are configurable by the user).
|
||||||
|
|
||||||
|
v1.14.5:
|
||||||
|
|
||||||
|
- Fix castbar flashing. There are controls on the player castbar module for flashing when a spell succeeds or fails, and separate controls for flashing when an instant cast completes. Those were broken, but now work again.
|
||||||
|
- Add "@" after the number when the Combo Points module is in Numeric mode, "Show Charged points" is enabled, and the current combo point is charged.
|
||||||
|
- Fix Charged point support in the ComboPointsBar module.
|
||||||
|
|
||||||
|
v1.14.4:
|
||||||
|
|
||||||
|
- Update TOC for 10.0.2
|
||||||
|
|
||||||
v1.14.3:
|
v1.14.3:
|
||||||
|
|
||||||
- Add Spell ID support for aura tracking.
|
- Add Spell ID support for aura tracking.
|
||||||
|
@ -545,6 +545,9 @@ function ComboPoints.prototype:UpdateComboPoints(...)
|
|||||||
self.frame.numeric:SetTextColor(r, g, b, 0.7)
|
self.frame.numeric:SetTextColor(r, g, b, 0.7)
|
||||||
|
|
||||||
local pointsText = tostring(points)
|
local pointsText = tostring(points)
|
||||||
|
if self.moduleSettings.bShowCharged and self:IsChargedPoint(points) then
|
||||||
|
pointsText = pointsText.."@"
|
||||||
|
end
|
||||||
if anticipate > 0 then
|
if anticipate > 0 then
|
||||||
pointsText = pointsText.."+"..tostring(anticipate)
|
pointsText = pointsText.."+"..tostring(anticipate)
|
||||||
end
|
end
|
||||||
|
@ -11,6 +11,7 @@ function ComboPointsBar.prototype:init()
|
|||||||
|
|
||||||
self:SetDefaultColor("ComboPointsBarMin", 1, 1, 0)
|
self:SetDefaultColor("ComboPointsBarMin", 1, 1, 0)
|
||||||
self:SetDefaultColor("ComboPointsBarMax", 0, 1, 0)
|
self:SetDefaultColor("ComboPointsBarMax", 0, 1, 0)
|
||||||
|
self:SetDefaultColor("ChargedComboPointBar", 0.3137254901960784, 0.3725490196078432, 1)
|
||||||
|
|
||||||
self.bTreatEmptyAsFull = true
|
self.bTreatEmptyAsFull = true
|
||||||
end
|
end
|
||||||
@ -52,6 +53,26 @@ function ComboPointsBar.prototype:GetOptions()
|
|||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
opts["bShowCharged"] = {
|
||||||
|
type = 'toggle',
|
||||||
|
width = 'double',
|
||||||
|
name = L["Show Charged points"],
|
||||||
|
desc = L["Whether or not to color a charged combo point a separate color and append an @ sign to the number. Set the ChargedComboPointBar color to the color you would like it to be."],
|
||||||
|
get = function()
|
||||||
|
return self.moduleSettings.bShowCharged
|
||||||
|
end,
|
||||||
|
set = function(info, v)
|
||||||
|
self.moduleSettings.bShowCharged = v
|
||||||
|
self:UpdateComboPoints()
|
||||||
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
|
hidden = function()
|
||||||
|
return not GetUnitChargedPowerPoints
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
return opts
|
return opts
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -62,6 +83,7 @@ function ComboPointsBar.prototype:GetDefaultSettings()
|
|||||||
defaults.alwaysDisplay = false
|
defaults.alwaysDisplay = false
|
||||||
defaults.desiredLerpTime = 0.05
|
defaults.desiredLerpTime = 0.05
|
||||||
defaults.bShowWithNoTarget = true
|
defaults.bShowWithNoTarget = true
|
||||||
|
defaults.bShowCharged = true
|
||||||
return defaults
|
return defaults
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -84,17 +106,7 @@ function ComboPointsBar.prototype:Enable(core)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if GetUnitChargedPowerPoints then
|
if GetUnitChargedPowerPoints then
|
||||||
self:RegisterEvent("UNIT_POWER_POINT_CHARGE", "UpdateChargedComboPoints")
|
self:RegisterEvent("UNIT_POWER_POINT_CHARGE", "UpdateComboPoints")
|
||||||
end
|
|
||||||
|
|
||||||
self:UpdateChargedComboPoints()
|
|
||||||
end
|
|
||||||
|
|
||||||
function ComboPointsBar.prototype:UpdateChargedComboPoints()
|
|
||||||
if GetUnitChargedPowerPoints then
|
|
||||||
local chargedPowerPoints = GetUnitChargedPowerPoints("player")
|
|
||||||
self.chargedPowerPointIndex = chargedPowerPoints and chargedPowerPoints[1]
|
|
||||||
self:UpdateComboPoints()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -131,20 +143,46 @@ function ComboPointsBar.prototype:UpdateComboPoints(...)
|
|||||||
points = nil
|
points = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local isCharged = self:IsChargedPoint(points) and self.moduleSettings.bShowCharged
|
||||||
|
|
||||||
if points == nil or points == 0 or (not UnitExists("target") and not self.moduleSettings.bShowWithNoTarget) then
|
if points == nil or points == 0 or (not UnitExists("target") and not self.moduleSettings.bShowWithNoTarget) then
|
||||||
self:Show(self.moduleSettings.alwaysDisplay)
|
self:Show(self.moduleSettings.alwaysDisplay)
|
||||||
self:UpdateBar(0, "undef")
|
self:UpdateBar(0, "undef")
|
||||||
else
|
else
|
||||||
self:Show(true)
|
self:Show(true)
|
||||||
self:SetScaledColor(color, (points - 1) / 4.0, self.settings.colors["ComboPointsBarMax"], self.settings.colors["ComboPointsBarMin"])
|
if isCharged then
|
||||||
|
color.r, color.g, color.b = self:GetColor("ChargedComboPointBar")
|
||||||
|
else
|
||||||
|
self:SetScaledColor(color, (points - 1) / 4.0, self.settings.colors["ComboPointsBarMax"], self.settings.colors["ComboPointsBarMin"])
|
||||||
|
end
|
||||||
self:UpdateBar(points / UnitPowerMax("player", SPELL_POWER_COMBO_POINTS), "undef")
|
self:UpdateBar(points / UnitPowerMax("player", SPELL_POWER_COMBO_POINTS), "undef")
|
||||||
self.barFrame.bar:SetVertexColor(color.r, color.g, color.b, self.alpha)
|
self.barFrame.bar:SetVertexColor(color.r, color.g, color.b, self.alpha)
|
||||||
end
|
end
|
||||||
|
|
||||||
self:SetBottomText1(points or "0")
|
local pointsText = tostring(points or 0)
|
||||||
if self.chargedPowerPointIndex then
|
if isCharged then
|
||||||
self:SetBottomText2(self.chargedPowerPointIndex)
|
pointsText = pointsText .. "@"
|
||||||
end
|
end
|
||||||
|
self:SetBottomText1(pointsText or "0")
|
||||||
|
end
|
||||||
|
|
||||||
|
function ComboPointsBar.prototype:IsChargedPoint(point)
|
||||||
|
if not GetUnitChargedPowerPoints or not point then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local chargedPoints = GetUnitChargedPowerPoints("player")
|
||||||
|
if not chargedPoints then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
for i=1, #chargedPoints do
|
||||||
|
if chargedPoints[i] == point then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
function ComboPointsBar.prototype:Update()
|
function ComboPointsBar.prototype:Update()
|
||||||
|
@ -10,6 +10,7 @@ local buffOrDebuff = {"buff", "debuff"}
|
|||||||
local validBuffTimers = {"none", "seconds", "minutes:seconds", "minutes"}
|
local validBuffTimers = {"none", "seconds", "minutes:seconds", "minutes"}
|
||||||
local AuraIconWidth = 20
|
local AuraIconWidth = 20
|
||||||
local AuraIconHeight = 20
|
local AuraIconHeight = 20
|
||||||
|
local displayModes = {NORMAL = L["When present"], ALWAYS = L["Always"], WHEN_TARGETING = L["Always, when targeting"], MISSING = L["When missing"]}
|
||||||
|
|
||||||
IceCustomBar.prototype.auraDuration = -1
|
IceCustomBar.prototype.auraDuration = -1
|
||||||
IceCustomBar.prototype.auraEndTime = -1
|
IceCustomBar.prototype.auraEndTime = -1
|
||||||
@ -28,6 +29,16 @@ end
|
|||||||
function IceCustomBar.prototype:Enable(core)
|
function IceCustomBar.prototype:Enable(core)
|
||||||
IceCustomBar.super.prototype.Enable(self, core)
|
IceCustomBar.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
|
-- fix up for new display mode setting
|
||||||
|
if self.moduleSettings.displayWhenTargeting then
|
||||||
|
self.moduleSettings.displayMode = displayModes.WHEN_TARGETING
|
||||||
|
self.moduleSettings.displayWhenTargeting = nil
|
||||||
|
end
|
||||||
|
if self.moduleSettings.displayWhenEmpty then
|
||||||
|
self.moduleSettings.displayMode = displayModes.ALWAYS
|
||||||
|
self.moduleSettings.displayWhenEmpty = nil
|
||||||
|
end
|
||||||
|
|
||||||
if IceHUD.IceCore:ShouldUseDogTags() then
|
if IceHUD.IceCore:ShouldUseDogTags() then
|
||||||
DogTag = LibStub("LibDogTag-3.0", true)
|
DogTag = LibStub("LibDogTag-3.0", true)
|
||||||
if DogTag then
|
if DogTag then
|
||||||
@ -149,8 +160,7 @@ function IceCustomBar.prototype:GetDefaultSettings()
|
|||||||
settings["buffOrDebuff"] = "buff"
|
settings["buffOrDebuff"] = "buff"
|
||||||
settings["barColor"] = {r=1, g=0, b=0, a=1}
|
settings["barColor"] = {r=1, g=0, b=0, a=1}
|
||||||
settings["trackOnlyMine"] = true
|
settings["trackOnlyMine"] = true
|
||||||
settings["displayWhenEmpty"] = false
|
settings["displayMode"] = displayModes.NORMAL
|
||||||
settings["displayWhenTargeting"] = false
|
|
||||||
settings["hideAnimationSettings"] = true
|
settings["hideAnimationSettings"] = true
|
||||||
settings["buffTimerDisplay"] = "minutes"
|
settings["buffTimerDisplay"] = "minutes"
|
||||||
settings["maxDuration"] = 0
|
settings["maxDuration"] = 0
|
||||||
@ -431,38 +441,39 @@ function IceCustomBar.prototype:GetOptions()
|
|||||||
order = 30.8,
|
order = 30.8,
|
||||||
}
|
}
|
||||||
|
|
||||||
opts["displayWhenEmpty"] = {
|
opts["displayMode"] = {
|
||||||
type = 'toggle',
|
type = 'select',
|
||||||
name = L["Display when empty"],
|
values = displayModes,
|
||||||
desc = L["Whether or not to display this bar even if the buff/debuff specified is not present."],
|
name = L["Display mode"],
|
||||||
get = function()
|
desc = L["When to show the bar"],
|
||||||
return self.moduleSettings.displayWhenEmpty
|
get = function(info)
|
||||||
|
return IceHUD:GetSelectValue(info, self.moduleSettings.displayMode)
|
||||||
end,
|
end,
|
||||||
set = function(info, v)
|
set = function(info, v)
|
||||||
self.moduleSettings.displayWhenEmpty = v
|
self.moduleSettings.displayMode = info.option.values[v]
|
||||||
self:UpdateCustomBar()
|
self:UpdateCustomBar()
|
||||||
end,
|
end,
|
||||||
disabled = function()
|
disabled = function()
|
||||||
return not self.moduleSettings.enabled
|
return not self.moduleSettings.enabled
|
||||||
end,
|
end,
|
||||||
order = 30.9
|
order = 30.9,
|
||||||
}
|
}
|
||||||
|
|
||||||
opts["displayWhenTargeting"] = {
|
opts["displayWhenUnitExists"] = {
|
||||||
type = 'toggle',
|
type = 'toggle',
|
||||||
name = L["Display when targeting"],
|
name = L["Only if unit exists"],
|
||||||
desc = L["Whether to display this bar when you target a unit, even if the buff/debuff specified is not present."],
|
desc = L["If checked, the bar will only be displayed (according to the 'Display mode' rules) when the Unit to Track exists (e.g. if set to Target and you're targeting something)."],
|
||||||
get = function()
|
get = function(info)
|
||||||
return self.moduleSettings.displayWhenTargeting
|
return self.moduleSettings.displayWhenUnitExists
|
||||||
end,
|
end,
|
||||||
set = function(info, v)
|
set = function(info, v)
|
||||||
self.moduleSettings.displayWhenTargeting = v
|
self.moduleSettings.displayWhenUnitExists = v
|
||||||
self:UpdateCustomBar()
|
self:UpdateCustomBar()
|
||||||
end,
|
end,
|
||||||
disabled = function()
|
disabled = function()
|
||||||
return not self.moduleSettings.enabled
|
return not self.moduleSettings.enabled
|
||||||
end,
|
end,
|
||||||
order = 30.91
|
order = 30.91,
|
||||||
}
|
}
|
||||||
|
|
||||||
opts["buffTimerDisplay"] = {
|
opts["buffTimerDisplay"] = {
|
||||||
@ -866,9 +877,16 @@ function IceCustomBar.prototype:Show(bShouldShow, bForceHide)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.moduleSettings.displayWhenTargeting and self.target then
|
if self.moduleSettings.displayWhenUnitExists and not UnitExists(self.unit) then
|
||||||
|
IceCustomBar.super.prototype.Show(self, false)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.moduleSettings.displayMode == displayModes.MISSING then
|
||||||
|
IceCustomBar.super.prototype.Show(self, not bShouldShow)
|
||||||
|
elseif self.moduleSettings.displayMode == displayModes.WHEN_TARGETING and self.target then
|
||||||
IceCustomBar.super.prototype.Show(self, true)
|
IceCustomBar.super.prototype.Show(self, true)
|
||||||
elseif self.moduleSettings.displayWhenEmpty then
|
elseif self.moduleSettings.displayMode == displayModes.ALWAYS then
|
||||||
if not self.bIsVisible then
|
if not self.bIsVisible then
|
||||||
IceCustomBar.super.prototype.Show(self, true)
|
IceCustomBar.super.prototype.Show(self, true)
|
||||||
end
|
end
|
||||||
|
123
modules/DruidEnergy.lua
Normal file
123
modules/DruidEnergy.lua
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
|
||||||
|
local DruidEnergy = IceCore_CreateClass(IceUnitBar)
|
||||||
|
|
||||||
|
DruidEnergy.prototype.DruidEnergy = nil
|
||||||
|
DruidEnergy.prototype.DruidEnergyMax = nil
|
||||||
|
|
||||||
|
local _, unitClass = UnitClass("player")
|
||||||
|
|
||||||
|
local FORM_NONE = 0
|
||||||
|
local FORM_BEAR = 1
|
||||||
|
local FORM_TRAVEL = 3
|
||||||
|
|
||||||
|
local SPELL_POWER_ENERGY = SPELL_POWER_ENERGY
|
||||||
|
if Enum and Enum.PowerType then
|
||||||
|
SPELL_POWER_ENERGY = Enum.PowerType.Energy
|
||||||
|
end
|
||||||
|
|
||||||
|
local shapeshiftFormValues = {NONE = L["No form"], BEAR = L["Bear"], TRAVEL = L["Travel"], OTHER = L["Other"]}
|
||||||
|
local shapeshiftFormIds = {NONE = FORM_NONE, BEAR = FORM_BEAR, TRAVEL = FORM_TRAVEL}
|
||||||
|
|
||||||
|
function DruidEnergy.prototype:init()
|
||||||
|
DruidEnergy.super.prototype.init(self, "DruidEnergy", "player")
|
||||||
|
|
||||||
|
self.side = IceCore.Side.Left
|
||||||
|
self.offset = 5
|
||||||
|
|
||||||
|
self:SetDefaultColor("DruidEnergy", 218, 231, 31)
|
||||||
|
end
|
||||||
|
|
||||||
|
function DruidEnergy.prototype:GetDefaultSettings()
|
||||||
|
local settings = DruidEnergy.super.prototype.GetDefaultSettings(self)
|
||||||
|
|
||||||
|
settings["side"] = IceCore.Side.Left
|
||||||
|
settings["offset"] = 5
|
||||||
|
settings["textVisible"] = {upper = true, lower = false}
|
||||||
|
settings["upperText"] = "[PercentMP(type='Energy'):Round]"
|
||||||
|
settings["lowerText"] = "[FractionalMP(type='Energy'):Color('dae71f'):Bracket]"
|
||||||
|
settings.enabled = false
|
||||||
|
settings.whileInForm = {["BEAR"] = true}
|
||||||
|
|
||||||
|
return settings
|
||||||
|
end
|
||||||
|
|
||||||
|
function DruidEnergy.prototype:GetOptions()
|
||||||
|
local opts = DruidEnergy.super.prototype.GetOptions(self)
|
||||||
|
|
||||||
|
opts["whileInForm"] = {
|
||||||
|
type = 'multiselect',
|
||||||
|
values = shapeshiftFormValues,
|
||||||
|
name = L["Show in form"],
|
||||||
|
desc = L["When the player is in one of the chosen shapeshift forms the bar will be shown, otherwise it will be hidden."],
|
||||||
|
get = function(info, v)
|
||||||
|
for key, value in pairs(self.moduleSettings.whileInForm) do
|
||||||
|
if key == v then
|
||||||
|
return value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end,
|
||||||
|
set = function(info, v, state)
|
||||||
|
self.moduleSettings.whileInForm[v] = state
|
||||||
|
self:Update()
|
||||||
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
return opts
|
||||||
|
end
|
||||||
|
|
||||||
|
function DruidEnergy.prototype:Enable(core)
|
||||||
|
DruidEnergy.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
|
self:RegisterEvent("UPDATE_SHAPESHIFT_FORM", "Update")
|
||||||
|
self:RegisterEvent("UNIT_POWER_FREQUENT", "Update")
|
||||||
|
self:RegisterEvent("UNIT_MAXPOWER", "Update")
|
||||||
|
end
|
||||||
|
|
||||||
|
function DruidEnergy.prototype:GetElementDescription()
|
||||||
|
return L["Always shows the Druid's Energy level while in non-energy-using forms."]
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function DruidEnergy.prototype:ShouldShow(unit)
|
||||||
|
local currentForm = GetShapeshiftForm()
|
||||||
|
for k, v in pairs(self.moduleSettings.whileInForm) do
|
||||||
|
if currentForm > FORM_TRAVEL and k == "OTHER" then
|
||||||
|
return v
|
||||||
|
elseif currentForm == shapeshiftFormIds[k] then
|
||||||
|
return v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function DruidEnergy.prototype:Update()
|
||||||
|
DruidEnergy.super.prototype.Update(self)
|
||||||
|
|
||||||
|
self.DruidEnergy = UnitPower(self.unit, SPELL_POWER_ENERGY)
|
||||||
|
self.DruidEnergyMax = UnitPowerMax(self.unit, SPELL_POWER_ENERGY)
|
||||||
|
self.DruidEnergyPercentage = self.DruidEnergyMax ~= 0 and (self.DruidEnergy/self.DruidEnergyMax) or 0
|
||||||
|
|
||||||
|
if (not self.alive or not self:ShouldShow(self.unit) or not self.DruidEnergy or not self.DruidEnergyMax or self.DruidEnergyMax == 0) then
|
||||||
|
self:Show(false)
|
||||||
|
return
|
||||||
|
else
|
||||||
|
self:Show(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
if not IceHUD.IceCore:ShouldUseDogTags() and self.frame:IsVisible() then
|
||||||
|
self:SetBottomText1(math.floor(self.DruidEnergyPercentage * 100))
|
||||||
|
self:SetBottomText2(self:GetFormattedText(self:Round(self.DruidEnergy), self:Round(self.DruidEnergyMax)), "DruidEnergy")
|
||||||
|
end
|
||||||
|
|
||||||
|
self:UpdateBar(self.DruidEnergyMax ~= 0 and self.DruidEnergy / self.DruidEnergyMax or 0, "DruidEnergy")
|
||||||
|
end
|
||||||
|
|
||||||
|
if unitClass == "DRUID" then
|
||||||
|
IceHUD.DruidEnergy = DruidEnergy:new()
|
||||||
|
end
|
@ -1,3 +1,4 @@
|
|||||||
|
local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
|
||||||
IceTargetAbsorb = IceCore_CreateClass(IceUnitBar)
|
IceTargetAbsorb = IceCore_CreateClass(IceUnitBar)
|
||||||
|
|
||||||
IceTargetAbsorb.prototype.highestAbsorbSinceLastZero = 0
|
IceTargetAbsorb.prototype.highestAbsorbSinceLastZero = 0
|
||||||
@ -29,6 +30,28 @@ function IceTargetAbsorb.prototype:GetDefaultSettings()
|
|||||||
return settings
|
return settings
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function IceTargetAbsorb.prototype:GetOptions()
|
||||||
|
local opts = IceTargetAbsorb.super.prototype.GetOptions(self)
|
||||||
|
|
||||||
|
opts["scaleToUnitHealth"] = {
|
||||||
|
type = 'toggle',
|
||||||
|
name = L["Scale to health"],
|
||||||
|
desc = L["Whether the bar's maximum value should be set to the unit's maximum health or not. If set, any absorb above that amount will not be shown."],
|
||||||
|
get = function()
|
||||||
|
return self.moduleSettings.scaleToUnitHealth
|
||||||
|
end,
|
||||||
|
set = function(info, v)
|
||||||
|
self.moduleSettings.scaleToUnitHealth = v
|
||||||
|
self:Update()
|
||||||
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
return opts
|
||||||
|
end
|
||||||
|
|
||||||
function IceTargetAbsorb.prototype:Enable(core)
|
function IceTargetAbsorb.prototype:Enable(core)
|
||||||
IceTargetAbsorb.super.prototype.Enable(self, core)
|
IceTargetAbsorb.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
@ -47,6 +70,7 @@ function IceTargetAbsorb.prototype:MyUnregisterCustomEvents()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function IceTargetAbsorb.prototype:Update()
|
function IceTargetAbsorb.prototype:Update()
|
||||||
|
IceTargetAbsorb.super.prototype.Update(self)
|
||||||
self:UpdateAbsorbAmount()
|
self:UpdateAbsorbAmount()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -63,13 +87,17 @@ function IceTargetAbsorb.prototype:UpdateAbsorbAmount(event, unit)
|
|||||||
self.highestAbsorbSinceLastZero = absorbAmount
|
self.highestAbsorbSinceLastZero = absorbAmount
|
||||||
end
|
end
|
||||||
|
|
||||||
self.absorbPercent = self.highestAbsorbSinceLastZero ~= 0 and absorbAmount / self.highestAbsorbSinceLastZero or 0
|
local maxAbsorb = self.highestAbsorbSinceLastZero
|
||||||
|
if self.moduleSettings.scaleToUnitHealth then
|
||||||
|
maxAbsorb = self.maxHealth
|
||||||
|
end
|
||||||
|
self.absorbPercent = maxAbsorb ~= 0 and IceHUD:Clamp(absorbAmount / maxAbsorb, 0, 1) or 0
|
||||||
|
|
||||||
if absorbAmount <= 0 or self.highestAbsorbSinceLastZero <= 0 then
|
if absorbAmount <= 0 or maxAbsorb <= 0 then
|
||||||
self:Show(false)
|
self:Show(false)
|
||||||
else
|
else
|
||||||
self:Show(true)
|
self:Show(true)
|
||||||
self:UpdateBar(absorbAmount / self.highestAbsorbSinceLastZero, self.ColorName)
|
self:UpdateBar(self.absorbPercent, self.ColorName)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not IceHUD.IceCore:ShouldUseDogTags() and self.frame:IsVisible() then
|
if not IceHUD.IceCore:ShouldUseDogTags() and self.frame:IsVisible() then
|
||||||
|
@ -1,5 +1,30 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
v1.14.8:
|
||||||
|
|
||||||
|
- Fix Color By Health % to work with Low Threshold Color option. Previously, if Low Threshold was set, the color was always either MaxHealth/MaxMana or MinHealth/MinMana, it would never be colored by health %. Now if both are set, it will scale by health % until it reaches the low threshold, at which point it will switch to the Min color.
|
||||||
|
- Fix Low Threshold color and flashing to work at the same percentage. Previously these were slightly different such that it would start flashing at 40% but not turn to the Min color until 39.9999%, for example.
|
||||||
|
|
||||||
|
v1.14.7:
|
||||||
|
|
||||||
|
- Add option to scale absorb bar by the unit's maximum health.
|
||||||
|
|
||||||
|
v1.14.6:
|
||||||
|
|
||||||
|
- Add ability for buff/debuff watchers to only display when the specified buff/debuff is missing. This also adds the ability to require that the given unit exists. So if you had Unit set to Target, Display mode set to Missing, and Only if unit exists checked, you'd show the bar if you have a target and they don't have the given buff/debuff.
|
||||||
|
- Don't flash the castbar for instant-cast spells that the player didn't cast (such as internal quest spells).
|
||||||
|
- Add DruidEnergy module (disabled by default). This module will show the player's Energy level if they're a Druid and currently shapeshifted to a non-energy-using form (eligible forms are configurable by the user).
|
||||||
|
|
||||||
|
v1.14.5:
|
||||||
|
|
||||||
|
- Fix castbar flashing. There are controls on the player castbar module for flashing when a spell succeeds or fails, and separate controls for flashing when an instant cast completes. Those were broken, but now work again.
|
||||||
|
- Add "@" after the number when the Combo Points module is in Numeric mode, "Show Charged points" is enabled, and the current combo point is charged.
|
||||||
|
- Fix Charged point support in the ComboPointsBar module.
|
||||||
|
|
||||||
|
v1.14.4:
|
||||||
|
|
||||||
|
- Update TOC for 10.0.2
|
||||||
|
|
||||||
v1.14.3:
|
v1.14.3:
|
||||||
|
|
||||||
- Add Spell ID support for aura tracking.
|
- Add Spell ID support for aura tracking.
|
||||||
|
Reference in New Issue
Block a user