mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user