mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
Add feature flag for Heal Prediction
And turn it on for Wrath Classic, because apparently it works there.
This commit is contained in:
@ -51,6 +51,7 @@ IceHUD.UsesUIPanelButtonTemplate = IceHUD.WowVer >= 50000 or IceHUD.WowClassic o
|
|||||||
IceHUD.EventExistsSpellcastInterruptible = IceHUD.WowVer >= 30200 and not IceHUD.WowClassicWrath
|
IceHUD.EventExistsSpellcastInterruptible = IceHUD.WowVer >= 30200 and not IceHUD.WowClassicWrath
|
||||||
IceHUD.DeathKnightUnholyFrostRunesSwapped = IceHUD.WowVer < 70300 and not IceHUD.WowClassicWrath
|
IceHUD.DeathKnightUnholyFrostRunesSwapped = IceHUD.WowVer < 70300 and not IceHUD.WowClassicWrath
|
||||||
IceHUD.UseFallbackPaladinGCDSpell = IceHUD.WowClassic or IceHUD.WowClassicBC or IceHUD.WowClassicWrath
|
IceHUD.UseFallbackPaladinGCDSpell = IceHUD.WowClassic or IceHUD.WowClassicBC or IceHUD.WowClassicWrath
|
||||||
|
IceHUD.SupportsHealPrediction = IceHUD.WowVer >= 40000 or IceHUD.WowClassicWrath
|
||||||
|
|
||||||
IceHUD.UnitPowerEvent = "UNIT_POWER_UPDATE"
|
IceHUD.UnitPowerEvent = "UNIT_POWER_UPDATE"
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ function PlayerHealth.prototype:Enable(core)
|
|||||||
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
|
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
|
||||||
end
|
end
|
||||||
|
|
||||||
if IceHUD.WowVer < 40000 then
|
if not IceHUD.SupportsHealPrediction then
|
||||||
HealComm = LibStub("LibHealComm-4.0", true)
|
HealComm = LibStub("LibHealComm-4.0", true)
|
||||||
if HealComm then
|
if HealComm then
|
||||||
HealComm.RegisterCallback(self, "HealComm_HealStarted", function(event, casterGUID, spellID, spellType, endTime, ...) self:HealComm_HealEvent(event, casterGUID, spellID, spellType, endTime, ...) end)
|
HealComm.RegisterCallback(self, "HealComm_HealStarted", function(event, casterGUID, spellID, spellType, endTime, ...) self:HealComm_HealEvent(event, casterGUID, spellID, spellType, endTime, ...) end)
|
||||||
@ -169,7 +169,7 @@ function PlayerHealth.prototype:HealComm_ModifierChanged(event, guid)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function PlayerHealth.prototype:IncomingHealPrediction(event, unit)
|
function PlayerHealth.prototype:IncomingHealPrediction(event, unit)
|
||||||
if IceHUD.WowVer >= 40000 then
|
if IceHUD.SupportsHealPrediction then
|
||||||
if unit and unit ~= self.unit then
|
if unit and unit ~= self.unit then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -321,7 +321,7 @@ function PlayerHealth.prototype:GetOptions()
|
|||||||
self:Update()
|
self:Update()
|
||||||
end,
|
end,
|
||||||
disabled = function()
|
disabled = function()
|
||||||
return not (self.moduleSettings.enabled and (IceHUD.WowVer >= 40000 or HealComm))
|
return not (self.moduleSettings.enabled and (IceHUD.SupportsHealPrediction or HealComm))
|
||||||
end,
|
end,
|
||||||
order = 43.6
|
order = 43.6
|
||||||
}
|
}
|
||||||
@ -942,7 +942,7 @@ function PlayerHealth.prototype:CreateHealBar()
|
|||||||
|
|
||||||
self:UpdateBar(1, "undef")
|
self:UpdateBar(1, "undef")
|
||||||
|
|
||||||
if not self.moduleSettings.showIncomingHeals or (IceHUD.WowVer < 40000 and not HealComm) then
|
if not self.moduleSettings.showIncomingHeals or (not IceHUD.SupportsHealPrediction and not HealComm) then
|
||||||
self.healFrame.bar:Hide()
|
self.healFrame.bar:Hide()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user