mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Fix Vigor showing up sometimes when it shouldn't
Seems like UnitPowerMax for the AlternateMount power returns the actual max from PLAYER_ENTERING_WORLD until you mount and then dismount a Dragonriding mount. This wasn't previously the case. Now we rely on the native widget info to tell us whether it believes it should be on or not.
This commit is contained in:
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
v1.14.34:
|
||||
|
||||
- Fix Vigor showing up sometimes when it shouldn't.
|
||||
|
||||
v1.14.33:
|
||||
|
||||
- Update TOC for Dragonflight to 10.2.5
|
||||
|
@ -38,6 +38,7 @@ function DragonridingVigor.prototype:Enable(core)
|
||||
end
|
||||
|
||||
DragonridingVigor.super.prototype.Enable(self, core)
|
||||
self:Show(false)
|
||||
|
||||
self:RegisterEvent("UNIT_AURA", "CheckShouldShow")
|
||||
self:RegisterEvent("UPDATE_UI_WIDGET", "UpdateVigorRecharge")
|
||||
@ -54,16 +55,28 @@ function DragonridingVigor.prototype:CheckShouldShow(event, unit, info)
|
||||
return
|
||||
end
|
||||
|
||||
if knowsAlternateMountEnum and UnitPowerMax(self.unit, unitPowerType) > 0 then
|
||||
self:Show(true)
|
||||
elseif not knowsAlternateMountEnum and IceHUD:HasAnyBuff("player", DragonridingBuffs) then
|
||||
self:Show(true)
|
||||
else
|
||||
local info = C_UIWidgetManager.GetFillUpFramesWidgetVisualizationInfo(vigorWidgetID)
|
||||
if not info or info.shownState == 0 then
|
||||
self:Show(false)
|
||||
if self.moduleSettings.hideBlizz then
|
||||
self:ShowBlizz()
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
self:Show(true)
|
||||
|
||||
-- if knowsAlternateMountEnum and UnitPowerMax(self.unit, unitPowerType) > 0 then
|
||||
-- self:Show(true)
|
||||
-- elseif not knowsAlternateMountEnum and IceHUD:HasAnyBuff("player", DragonridingBuffs) then
|
||||
-- self:Show(true)
|
||||
-- else
|
||||
-- self:Show(false)
|
||||
-- if self.moduleSettings.hideBlizz then
|
||||
-- self:ShowBlizz()
|
||||
-- end
|
||||
-- end
|
||||
end
|
||||
|
||||
function DragonridingVigor.prototype:UpdateRunePower(event, arg1, arg2)
|
||||
|
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
v1.14.34:
|
||||
|
||||
- Fix Vigor showing up sometimes when it shouldn't.
|
||||
|
||||
v1.14.33:
|
||||
|
||||
- Update TOC for Dragonflight to 10.2.5
|
||||
|
Reference in New Issue
Block a user