mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Continue replacement of WowVer checks
This commit is contained in:
@ -229,7 +229,7 @@ function ComboPoints.prototype:GetOptions()
|
||||
order = 35
|
||||
}
|
||||
|
||||
if IceHUD.WowVer >= 90000 then
|
||||
if GetUnitChargedPowerPoints then
|
||||
opts["bShowAnimaCharged"] = {
|
||||
type = 'toggle',
|
||||
width = 'double',
|
||||
@ -307,7 +307,7 @@ function ComboPoints.prototype:Enable(core)
|
||||
self:RegisterEvent("PLAYER_COMBO_POINTS", "UpdateComboPoints")
|
||||
end
|
||||
|
||||
if IceHUD.WowVer >= 90000 then
|
||||
if GetUnitChargedPowerPoints then
|
||||
self:RegisterEvent("UNIT_POWER_POINT_CHARGE", "UpdateChargedComboPoints")
|
||||
end
|
||||
|
||||
@ -515,7 +515,7 @@ function ComboPoints.prototype:UpdateComboPoints(...)
|
||||
local points, anticipate, _
|
||||
if IceHUD.IceCore:IsInConfigMode() then
|
||||
points = self:GetMaxComboPoints()
|
||||
elseif IceHUD.WowVer >= 30000 or IceHUD.WowClassic or IceHUD.WowClassicBC then
|
||||
elseif UnitHasVehicleUI then
|
||||
-- Parnic: apparently some fights have combo points while the player is in a vehicle?
|
||||
local isInVehicle = UnitHasVehicleUI and UnitHasVehicleUI("player")
|
||||
local checkUnit = isInVehicle and "vehicle" or "player"
|
||||
|
@ -90,7 +90,7 @@ function ComboPointsBar.prototype:Enable(core)
|
||||
self:RegisterEvent("PLAYER_COMBO_POINTS", "UpdateComboPoints")
|
||||
end
|
||||
|
||||
if IceHUD.WowVer >= 90000 then
|
||||
if GetUnitChargedPowerPoints then
|
||||
self:RegisterEvent("UNIT_POWER_POINT_CHARGE", "UpdateChargedComboPoints")
|
||||
end
|
||||
|
||||
@ -119,7 +119,7 @@ function ComboPointsBar.prototype:UpdateComboPoints(...)
|
||||
local points
|
||||
if IceHUD.IceCore:IsInConfigMode() then
|
||||
points = UnitPowerMax("player", SPELL_POWER_COMBO_POINTS)
|
||||
elseif IceHUD.WowVer >= 30000 or IceHUD.WowClassic or IceHUD.WowClassicBC then
|
||||
elseif UnitHasVehicleUI then
|
||||
-- Parnic: apparently some fights have combo points while the player is in a vehicle?
|
||||
local isInVehicle = UnitHasVehicleUI and UnitHasVehicleUI("player")
|
||||
local checkUnit = isInVehicle and "vehicle" or "player"
|
||||
|
@ -119,7 +119,7 @@ function EclipseBar.prototype:UpdateShown()
|
||||
|
||||
if form == MOONKIN_FORM or not form then
|
||||
local PrimaryTalentTree = 0
|
||||
if IceHUD.WowVer >= 50000 then
|
||||
if GetSpecialization then
|
||||
PrimaryTalentTree = GetSpecialization()
|
||||
else
|
||||
PrimaryTalentTree = GetPrimaryTalentTree()
|
||||
|
@ -2,6 +2,9 @@ local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
|
||||
local HarmonyPower = IceCore_CreateClass(IceClassPowerCounter)
|
||||
|
||||
local SPELL_POWER_CHI = SPELL_POWER_CHI
|
||||
if not SPELL_POWER_CHI then
|
||||
SPELL_POWER_CHI = SPELL_POWER_LIGHT_FORCE
|
||||
end
|
||||
if Enum and Enum.PowerType then
|
||||
SPELL_POWER_CHI = Enum.PowerType.Chi
|
||||
end
|
||||
@ -23,11 +26,7 @@ function HarmonyPower.prototype:init()
|
||||
}
|
||||
self.numRunes = 4
|
||||
self.numericColor = "ChiNumeric"
|
||||
if IceHUD.WowVer >= 50100 then
|
||||
self.unitPower = SPELL_POWER_CHI
|
||||
else
|
||||
self.unitPower = SPELL_POWER_LIGHT_FORCE
|
||||
end
|
||||
self.unitPower = SPELL_POWER_CHI
|
||||
if IceHUD.WowVer >= 70000 then
|
||||
self.requiredSpec = SPEC_MONK_WINDWALKER
|
||||
end
|
||||
@ -117,6 +116,6 @@ end
|
||||
|
||||
-- Load us up
|
||||
local _, unitClass = UnitClass("player")
|
||||
if (unitClass == "MONK" and IceHUD.WowVer >= 50000) then
|
||||
if unitClass == "MONK" then
|
||||
IceHUD.HarmonyPower = HarmonyPower:new()
|
||||
end
|
||||
|
@ -38,7 +38,7 @@ function HolyPower.prototype:init()
|
||||
self.bTreatEmptyAsFull = true
|
||||
self.unit = "player"
|
||||
self.numRunes = 5
|
||||
if IceHUD.WowVer >= 50000 then
|
||||
if HOLY_POWER_FULL then
|
||||
self.numConsideredFull = HOLY_POWER_FULL
|
||||
else
|
||||
self.numConsideredFull = 3
|
||||
|
@ -49,7 +49,7 @@ function PetHealth.prototype:Enable(core)
|
||||
self:RegisterEvent("UNIT_PET", "CheckPet");
|
||||
|
||||
self:RegisterEvent("UNIT_HEALTH", "UpdateEvent")
|
||||
if IceHUD.WowVer < 90000 then
|
||||
if IceHUD.EventExistsUnitHealthFrequent then
|
||||
self:RegisterEvent("UNIT_HEALTH_FREQUENT", "UpdateEvent")
|
||||
end
|
||||
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateEvent")
|
||||
|
@ -68,7 +68,7 @@ function PlayerHealth.prototype:Enable(core)
|
||||
PlayerHealth.super.prototype.Enable(self, core)
|
||||
|
||||
self:RegisterEvent("UNIT_HEALTH", "UpdateEvent")
|
||||
if IceHUD.WowVer < 90000 then
|
||||
if IceHUD.EventExistsUnitHealthFrequent then
|
||||
self:RegisterEvent("UNIT_HEALTH_FREQUENT", "UpdateEvent")
|
||||
end
|
||||
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateEvent")
|
||||
|
@ -353,13 +353,13 @@ function PlayerMana.prototype:Update(unit, powertype)
|
||||
color = "PlayerRunicPower"
|
||||
elseif (self.manaType == SPELL_POWER_FOCUS) then
|
||||
color = "PlayerFocus"
|
||||
elseif (IceHUD.WowVer >= 70000 and self.manaType == SPELL_POWER_INSANITY) then
|
||||
elseif (self.manaType == SPELL_POWER_INSANITY) then
|
||||
color = "PlayerInsanity"
|
||||
elseif (IceHUD.WowVer >= 70000 and self.manaType == SPELL_POWER_FURY) then
|
||||
elseif (self.manaType == SPELL_POWER_FURY) then
|
||||
color = "PlayerFury"
|
||||
elseif (IceHUD.WowVer >= 70000 and self.manaType == SPELL_POWER_MAELSTROM) then
|
||||
elseif (self.manaType == SPELL_POWER_MAELSTROM) then
|
||||
color = "PlayerMaelstrom"
|
||||
elseif (IceHUD.WowVer >= 70000 and self.manaType == SPELL_POWER_PAIN) then
|
||||
elseif (self.manaType == SPELL_POWER_PAIN) then
|
||||
color = "PlayerPain"
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user