Fix Vigor with new mount type(s)

I explicitly added what I believe to be the spell id for the new Grotto Netherwing Drake so it *should* work regardless, but then also discovered that the flying mount's UnitPowerMax is 0 unless you're on a Dragonriding mount, so that should be the longer-term fix for whenever old-world mounts add Dragonriding capability (10.1.5?).
This commit is contained in:
Parnic
2023-07-04 10:01:31 -05:00
parent 4d71dcc660
commit 9a727e4893
3 changed files with 7 additions and 1 deletions

View File

@ -7,10 +7,12 @@ local DragonridingBuffs = {
368899, -- Windborn Velocidrake
368901, -- Cliffside Wylderdrake
368893, -- Winding Slitherdrake
412088, -- Grotto Netherwing Drake
}
local vigorWidgetSetID = 283
local vigorWidgetID = 4460
local knowsAlternateMountEnum = Enum and Enum.PowerType and Enum.PowerType.AlternateMount
local unitPowerType = Enum and Enum.PowerType and Enum.PowerType.AlternateMount
unitPowerType = unitPowerType or ALTERNATE_POWER_INDEX
@ -52,7 +54,9 @@ function DragonridingVigor.prototype:CheckShouldShow(event, unit, info)
return
end
if IceHUD:HasAnyBuff("player", DragonridingBuffs) then
if knowsAlternateMountEnum and UnitPowerMax(self.unit, unitPowerType) > 0 then
self:Show(true)
elseif IceHUD:HasAnyBuff("player", DragonridingBuffs) then
self:Show(true)
else
self:Show(false)