mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
More culling of WowVer checks
This commit is contained in:
@ -146,7 +146,7 @@ function IceCastBar.prototype:GetOptions()
|
||||
end,
|
||||
order = 39.998
|
||||
}
|
||||
if IceHUD.WowVer < 80000 then
|
||||
if IceHUD.SpellFunctionsReturnRank then
|
||||
opts["showSpellRank"] =
|
||||
{
|
||||
type = 'toggle',
|
||||
@ -470,7 +470,7 @@ function IceCastBar.prototype:StopBar()
|
||||
end
|
||||
|
||||
function IceCastBar.prototype:GetShortRank(rank)
|
||||
if IceHUD.WowVer < 80000 and rank then
|
||||
if IceHUD.SpellFunctionsReturnRank and rank then
|
||||
local _, _, sRank = string.find(rank, "(%d+)")
|
||||
if (sRank) then
|
||||
return " (" .. sRank .. ")"
|
||||
|
@ -307,7 +307,7 @@ function IceCore.prototype:Enable(userToggle)
|
||||
return
|
||||
end
|
||||
|
||||
if IceHUD.IceCore.settings.bHideDuringShellGame and IceHUD:HasAnyDebuff("player", {271571}) and UnitInVehicle("player") then
|
||||
if IceHUD.IceCore.settings.bHideDuringShellGame and IceHUD:HasAnyDebuff("player", {IceHUD.ShellGameSpellID}) and UnitInVehicle("player") then
|
||||
self:RegisterEvent("UNIT_EXITED_VEHICLE")
|
||||
self:Hide()
|
||||
elseif C_Map then
|
||||
|
@ -57,6 +57,8 @@ IceHUD.DeathKnightUnholyFrostRunesSwapped = IceHUD.WowVer < 70300 and not IceHUD
|
||||
IceHUD.UseFallbackPaladinGCDSpell = IceHUD.WowClassic or IceHUD.WowClassicBC or IceHUD.WowClassicWrath
|
||||
IceHUD.SupportsHealPrediction = IceHUD.WowVer >= 40000 or IceHUD.WowClassicWrath
|
||||
IceHUD.UnitGroupRolesReturnsRoleString = IceHUD.WowVer >= 40000 or IceHUD.WowClassicWrath
|
||||
IceHUD.ShellGameSpellID = 271571
|
||||
IceHUD.HasShellGame = GetSpellInfo(IceHUD.ShellGameSpellID)
|
||||
|
||||
IceHUD.UnitPowerEvent = "UNIT_POWER_UPDATE"
|
||||
|
||||
|
@ -423,7 +423,7 @@ The Classic game client doesn't provide this information to addons because it wa
|
||||
IceHUD.IceCore.IceHUDFrame:Show()
|
||||
end
|
||||
end,
|
||||
hidden = IceHUD.WowVer < 80000,
|
||||
hidden = not IceHUD.HasShellGame,
|
||||
order = 36,
|
||||
},
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ function ComboPoints.prototype:Enable(core)
|
||||
self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateComboPoints")
|
||||
else
|
||||
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateComboPoints")
|
||||
if IceHUD.WowVer < 80000 then
|
||||
if IceHUD.EventExistsUnitMaxPower then
|
||||
self:RegisterEvent("UNIT_MAXPOWER", "UpdateMaxComboPoints")
|
||||
end
|
||||
end
|
||||
@ -593,7 +593,7 @@ do
|
||||
function ComboPoints.prototype:CheckAnticipation(e, unit) -- UNIT_AURA handler
|
||||
if UnitIsUnit(unit, "player") then
|
||||
local _, _, _, newAntStacks
|
||||
if IceHUD.WowVer < 80000 then
|
||||
if IceHUD.SpellFunctionsReturnRank then
|
||||
_, _, _, newAntStacks = UnitAura("player", GetSpellInfo(AnticipationSpellId))
|
||||
else
|
||||
_, _, newAntStacks = UnitAura("player", GetSpellInfo(AnticipationSpellId))
|
||||
|
@ -29,7 +29,7 @@ function IceHUDPlayerAlternatePower.prototype:Enable(core)
|
||||
IceHUDPlayerAlternatePower.super.prototype.Enable(self, core)
|
||||
|
||||
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent")
|
||||
if IceHUD.WowVer < 80000 then
|
||||
if IceHUD.EventExistsUnitMaxPower then
|
||||
self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent")
|
||||
end
|
||||
self:RegisterEvent("UNIT_POWER_BAR_SHOW", "PowerBarShow")
|
||||
|
@ -235,7 +235,7 @@ end
|
||||
function RollTheBones.prototype:GetBuffDuration(unitName, ids)
|
||||
local i = 1
|
||||
local buff, _, type, duration, endTime, spellId
|
||||
if IceHUD.WowVer < 80000 then
|
||||
if IceHUD.SpellFunctionsReturnRank then
|
||||
buff, _, _, _, type, duration, endTime, _, _, _, spellId = UnitBuff(unitName, i)
|
||||
else
|
||||
buff, _, _, type, duration, endTime, _, _, _, spellId = UnitBuff(unitName, i)
|
||||
@ -256,7 +256,7 @@ function RollTheBones.prototype:GetBuffDuration(unitName, ids)
|
||||
|
||||
i = i + 1;
|
||||
|
||||
if IceHUD.WowVer < 80000 then
|
||||
if IceHUD.SpellFunctionsReturnRank then
|
||||
buff, _, _, _, type, duration, endTime, _, _, _, spellId = UnitBuff(unitName, i)
|
||||
else
|
||||
buff, _, _, type, duration, endTime, _, _, _, spellId = UnitBuff(unitName, i)
|
||||
|
@ -185,7 +185,7 @@ function StaggerBar.prototype:GetDebuffInfo()
|
||||
local staggerLevel = 1
|
||||
|
||||
for i = 1, IceCore.BuffLimit do
|
||||
local debuffID = select(IceHUD.WowVer < 80000 and 11 or 10, UnitDebuff(self.unit, i))
|
||||
local debuffID = select(IceHUD.SpellFunctionsReturnRank and 11 or 10, UnitDebuff(self.unit, i))
|
||||
|
||||
if debuffID == LightID or debuffID == ModerateID or debuffID == HeavyID then
|
||||
local spellName = UnitDebuff(self.unit, i)
|
||||
@ -236,7 +236,7 @@ end
|
||||
|
||||
function StaggerBar.prototype:GetDebuffDuration(unitName, buffId)
|
||||
local name, _, duration, endTime
|
||||
if IceHUD.WowVer < 80000 then
|
||||
if IceHUD.SpellFunctionsReturnRank then
|
||||
name, _, _, _, _, duration, endTime = UnitDebuff(unitName, buffName)
|
||||
else
|
||||
for i = 1, IceCore.BuffLimit do
|
||||
|
@ -183,11 +183,11 @@ function TargetCast.prototype:StartBar(action, message)
|
||||
local spell, notInterruptible
|
||||
if UnitCastingInfo then
|
||||
spell = UnitCastingInfo(self.unit)
|
||||
notInterruptible = select(IceHUD.WowVer < 80000 and 9 or 8, UnitCastingInfo(self.unit))
|
||||
notInterruptible = select(IceHUD.SpellFunctionsReturnRank and 9 or 8, UnitCastingInfo(self.unit))
|
||||
end
|
||||
if UnitChannelInfo and not spell then
|
||||
spell = UnitChannelInfo(self.unit)
|
||||
notInterruptible = select(IceHUD.WowVer < 80000 and 8 or 7, UnitChannelInfo(self.unit))
|
||||
notInterruptible = select(IceHUD.SpellFunctionsReturnRank and 8 or 7, UnitChannelInfo(self.unit))
|
||||
|
||||
if not spell then
|
||||
return
|
||||
|
Reference in New Issue
Block a user