Compare commits

...

3 Commits

Author SHA1 Message Date
7e4a6ecab6 Attempt to fix other uses of PowerBarContainer
Apparently other things are now using the game's UIWidgetPowerBarContainerFrame but we're forcing it to be hidden due to a variety of factors. This attempts to restrict the Hide behavior of that frame to only when we're Dragonriding.
2024-01-21 12:36:15 -06:00
af33ab9781 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.
2024-01-19 09:02:41 -06:00
c0262de622 Only use HasBuff method as a fallback
If we can check the power type, we should rely on only that.
2024-01-19 07:26:55 -06:00
3 changed files with 40 additions and 6 deletions

View File

@ -1,5 +1,13 @@
# Changelog
v1.14.35:
- Fix IceHUD stomping on other uses of the PowerBarContainer such as the Digging bar for the Archive event.
v1.14.34:
- Fix Vigor showing up sometimes when it shouldn't.
v1.14.33:
- Update TOC for Dragonflight to 10.2.5

View File

@ -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,29 @@ function DragonridingVigor.prototype:CheckShouldShow(event, unit, info)
return
end
if knowsAlternateMountEnum and UnitPowerMax(self.unit, unitPowerType) > 0 then
self:Show(true)
elseif 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)
self.suppressHideBlizz = true
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)
@ -78,6 +92,8 @@ function DragonridingVigor.prototype:UpdateVigorRecharge(event, widget)
return
end
self.suppressHideBlizz = false
if event ~= "internal" then
if self.moduleSettings.hideBlizz then
self:HideBlizz()
@ -154,7 +170,9 @@ function DragonridingVigor.prototype:ShowBlizz()
end
function DragonridingVigor.prototype:HideBlizz()
UIWidgetPowerBarContainerFrame:Hide()
if not self.suppressHideBlizz then
UIWidgetPowerBarContainerFrame:Hide()
end
end
-- Load us up

View File

@ -1,5 +1,13 @@
# Changelog
v1.14.35:
- Fix IceHUD stomping on other uses of the PowerBarContainer such as the Digging bar for the Archive event.
v1.14.34:
- Fix Vigor showing up sometimes when it shouldn't.
v1.14.33:
- Update TOC for Dragonflight to 10.2.5