diff --git a/modules/ComboPoints.lua b/modules/ComboPoints.lua index 9c61c33..cd51c89 100644 --- a/modules/ComboPoints.lua +++ b/modules/ComboPoints.lua @@ -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" diff --git a/modules/ComboPointsBar.lua b/modules/ComboPointsBar.lua index e5be02c..5dc7b35 100644 --- a/modules/ComboPointsBar.lua +++ b/modules/ComboPointsBar.lua @@ -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" diff --git a/modules/EclipseBar.lua b/modules/EclipseBar.lua index 49400e9..0930432 100644 --- a/modules/EclipseBar.lua +++ b/modules/EclipseBar.lua @@ -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() diff --git a/modules/HarmonyPower.lua b/modules/HarmonyPower.lua index 68bab94..6bdc40f 100644 --- a/modules/HarmonyPower.lua +++ b/modules/HarmonyPower.lua @@ -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 diff --git a/modules/HolyPower.lua b/modules/HolyPower.lua index 2321c8f..e66d395 100644 --- a/modules/HolyPower.lua +++ b/modules/HolyPower.lua @@ -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 diff --git a/modules/PetHealth.lua b/modules/PetHealth.lua index 0c84069..4b4686c 100644 --- a/modules/PetHealth.lua +++ b/modules/PetHealth.lua @@ -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") diff --git a/modules/PlayerHealth.lua b/modules/PlayerHealth.lua index 910b2a9..387810a 100644 --- a/modules/PlayerHealth.lua +++ b/modules/PlayerHealth.lua @@ -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") diff --git a/modules/PlayerMana.lua b/modules/PlayerMana.lua index 2244cf5..0ab0bce 100644 --- a/modules/PlayerMana.lua +++ b/modules/PlayerMana.lua @@ -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