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