First batch of WoW Classic compatibility updates

This has been tested on Classic with a Rogue up to level 5 using various modules and casually checked against a few level 1 classes. I'm sure there's a lot more to do here. I also made sure to test on Live.

Where possible I tried to check for API availability rather than specific client versions or program IDs. There are many cases where that's impractical, however, so version/program ID checks were used.

This was tested with:
* Ace3 @r1225
* AceGUI-3.0-SharedMediaWidgets @r61
* LibDBIcon-1.0 @v8.2.0
* LibDogTag-3.0 @v80200.1
* LibDogTag-Unit-3.0 @v80200.1-2-g93a898d-alpha
* LibRangeCheck-2.0 @v4.2.3 (with a couple of local changes)
* LibSharedMedia-3.0 @r113-alpha
This commit is contained in:
Parnic
2019-08-11 23:21:06 -05:00
parent 5b71a4f819
commit ba8748ecca
44 changed files with 262 additions and 149 deletions

View File

@ -13,10 +13,16 @@ IceCastBar.prototype.unit = nil
IceCastBar.prototype.current = nil
local SPELL_POWER_MANA = SPELL_POWER_MANA
if IceHUD.WowVer >= 80000 then
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_MANA = Enum.PowerType.Mana
end
local UnitCastingInfo, UnitChannelInfo = UnitCastingInfo, UnitChannelInfo
if IceHUD.WowClassic then
UnitCastingInfo = CastingInfo
UnitChannelInfo = ChannelInfo
end
local AuraIconWidth = 20
local AuraIconHeight = 20
@ -352,13 +358,13 @@ end
function IceCastBar.prototype:StartBar(action, message)
local spell, rank, displayName, icon, startTime, endTime, isTradeSkill
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
spell, rank, displayName, icon, startTime, endTime, isTradeSkill = UnitCastingInfo(self.unit)
else
spell, displayName, icon, startTime, endTime, isTradeSkill = UnitCastingInfo(self.unit)
end
if not (spell) then
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
spell, rank, displayName, icon, startTime, endTime = UnitChannelInfo(self.unit)
else
spell, displayName, icon, startTime, endTime = UnitChannelInfo(self.unit)
@ -510,7 +516,7 @@ function IceCastBar.prototype:SpellCastDelayed(event, unit, castGuid, spellId)
if (unit ~= self.unit) then return end
--IceHUD:Debug("SpellCastDelayed", unit, UnitCastingInfo(unit))
local endTime = select(IceHUD.WowVer < 80000 and 6 or 5, UnitCastingInfo(self.unit))
local endTime = select((IceHUD.WowVer < 80000 and not IceHUD.WowClassic) and 6 or 5, UnitCastingInfo(self.unit))
if (endTime and self.actionStartTime) then
-- apparently this check is needed, got nils during a horrible lag spike
@ -571,7 +577,7 @@ function IceCastBar.prototype:SpellCastChannelUpdate(event, unit)
--IceHUD:Debug("SpellCastChannelUpdate", unit, UnitChannelInfo(unit))
local spell, rank, displayName, icon, startTime, endTime
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
spell, rank, displayName, icon, startTime, endTime = UnitChannelInfo(unit)
else
spell, displayName, icon, startTime, endTime = UnitChannelInfo(unit)

View File

@ -251,10 +251,14 @@ function IceCore.prototype:Enable(userToggle)
IceHUD_Options:GenerateModuleOptions()
end
self.IceHUDFrame:RegisterEvent("PET_BATTLE_OPENING_START")
self.IceHUDFrame:RegisterEvent("PET_BATTLE_OVER")
self.IceHUDFrame:RegisterEvent("BARBER_SHOP_OPEN")
self.IceHUDFrame:RegisterEvent("BARBER_SHOP_CLOSE")
if UnitCanPetBattle then
self.IceHUDFrame:RegisterEvent("PET_BATTLE_OPENING_START")
self.IceHUDFrame:RegisterEvent("PET_BATTLE_OVER")
end
if GetBarberShopStyleInfo then
self.IceHUDFrame:RegisterEvent("BARBER_SHOP_OPEN")
self.IceHUDFrame:RegisterEvent("BARBER_SHOP_CLOSE")
end
self.IceHUDFrame:RegisterEvent("UNIT_AURA")
self.IceHUDFrame:SetScript("OnEvent", function(self, event, ...)
if (event == "PET_BATTLE_OPENING_START") then

View File

@ -6,7 +6,7 @@ local IceHUD = IceHUD
local SML = LibStub("LibSharedMedia-3.0")
local ACR = LibStub("AceConfigRegistry-3.0")
local ConfigDialog = LibStub("AceConfigDialog-3.0")
local icon = LibStub("LibDBIcon-1.0")
local icon = LibStub("LibDBIcon-1.0", true)
local AceGUI = LibStub("AceGUI-3.0")
local AceSerializer = LibStub("AceSerializer-3.0", 1)
@ -17,8 +17,9 @@ IceHUD.CurrTagVersion = 3
IceHUD.debugging = false
IceHUD.WowVer = select(4, GetBuildInfo())
IceHUD.WowClassic = WOW_PROJECT_ID and WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
IceHUD.UnitPowerEvent = IceHUD.WowVer < 80000 and "UNIT_POWER" or "UNIT_POWER_UPDATE"
IceHUD.UnitPowerEvent = "UNIT_POWER_UPDATE"
IceHUD.validBarList = { "Bar", "HiBar", "RoundBar", "ColorBar", "RivetBar", "RivetBar2", "CleanCurves", "GlowArc",
"BloodGlaives", "ArcHUD", "FangRune", "DHUD", "CleanCurvesOut", "CleanTank", "PillTank", "GemTank" }
@ -324,7 +325,7 @@ end
-- blizzard interface options
local blizOptionsPanel = CreateFrame("FRAME", "IceHUDConfigPanel", UIParent)
blizOptionsPanel.name = "IceHUD"
blizOptionsPanel.button = CreateFrame("BUTTON", "IceHUDOpenConfigButton", blizOptionsPanel, IceHUD.WowVer >= 50000 and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
blizOptionsPanel.button = CreateFrame("BUTTON", "IceHUDOpenConfigButton", blizOptionsPanel, (IceHUD.WowVer >= 50000 or IceHUD.WowClassic) and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
blizOptionsPanel.button:SetText("Open IceHUD configuration")
blizOptionsPanel.button:SetWidth(240)
blizOptionsPanel.button:SetHeight(30)
@ -412,7 +413,7 @@ function IceHUD:GetAuraCount(auraType, unit, ability, onlyMine, matchByName)
local i = 1
local name, _, texture, applications
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
name, _, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or ""))
else
name, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or ""))
@ -424,7 +425,7 @@ function IceHUD:GetAuraCount(auraType, unit, ability, onlyMine, matchByName)
end
i = i + 1
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
name, _, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or ""))
else
name, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or ""))
@ -444,7 +445,7 @@ do
local i = 1
local name, _, texture, applications, _, _, _, _, _, _, auraID
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter)
else
name, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter)
@ -458,7 +459,7 @@ do
end
i = i + 1
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter)
else
name, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter)
@ -605,6 +606,10 @@ local function CheckLFGMode(mode)
end
function IceHUD:GetIsInLFGGroup()
if not GetLFGMode then
return false
end
local mode, submode
if IceHUD.WowVer >= 50000 then
mode, submode = GetLFGMode(LE_LFG_CATEGORY_LFD)

View File

@ -9,6 +9,7 @@
## X-Category: HUDs
## X-Website: https://www.wowace.com/projects/ice-hud
## X-WoWI-ID: 8149
## X-Compatible-With: 11302
#@no-lib-strip@
# Libraries

View File

@ -1,6 +1,6 @@
local LibDualSpec = LibStub('LibDualSpec-1.0', true)
local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
local icon = LibStub("LibDBIcon-1.0")
local icon = LibStub("LibDBIcon-1.0", true)
local lastCustomModule = "Bar"
IceHUD_Options = {}
@ -379,6 +379,7 @@ Blizzard added a "Personal Resource Display" feature in the 7.0 game client. You
IceHUD.IceCore.IceHUDFrame:Show()
end
end,
hidden = not UnitCanPetBattle,
order = 34,
},
@ -396,6 +397,7 @@ Blizzard added a "Personal Resource Display" feature in the 7.0 game client. You
IceHUD.IceCore.IceHUDFrame:Show()
end
end,
hidden = not GetBarberShopStyleInfo,
order = 35,
},
@ -413,6 +415,7 @@ Blizzard added a "Personal Resource Display" feature in the 7.0 game client. You
IceHUD.IceCore.IceHUDFrame:Show()
end
end,
hidden = IceHUD.WowVer < 80000,
order = 36,
},
}

View File

@ -131,7 +131,9 @@ function IceStackCounter_Enable(frame)
if IceHUD.WowVer < 80000 then
frame:RegisterEvent("PLAYER_PET_CHANGED", "UpdateCustomCount")
end
frame:RegisterEvent("PLAYER_FOCUS_CHANGED", "UpdateCustomCount")
if FocusUnit then
frame:RegisterEvent("PLAYER_FOCUS_CHANGED", "UpdateCustomCount")
end
frame:RegisterEvent("PLAYER_DEAD", "UpdateCustomCount")
frame:RegisterEvent("SPELL_UPDATE_CHARGES", "UpdateCustomCount")

View File

@ -20,7 +20,7 @@ IceUnitBar.prototype.hasPet = nil
IceUnitBar.prototype.noFlash = nil
local SPELL_POWER_INSANITY = SPELL_POWER_INSANITY
if IceHUD.WowVer >= 80000 then
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_INSANITY = Enum.PowerType.Insanity
end
@ -220,7 +220,7 @@ end
function IceUnitBar.prototype:Update()
IceUnitBar.super.prototype.Update(self)
if IceHUD.WowVer < 70000 then
if UnitIsTapped then
self.tapped = UnitIsTapped(self.unit) and (not UnitIsTappedByPlayer(self.unit))
else
self.tapped = UnitIsTapDenied(self.unit)

View File

@ -1,3 +1,6 @@
unreleased:
- WoW Classic compatibility
v1.11.11:
- Updated TOC to 8.2

View File

@ -2,7 +2,7 @@ local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
local ArcaneCharges = IceCore_CreateClass(IceClassPowerCounter)
local SPELL_POWER_ARCANE_CHARGES = SPELL_POWER_ARCANE_CHARGES
if IceHUD.WowVer >= 80000 then
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_ARCANE_CHARGES = Enum.PowerType.ArcaneCharges
end

View File

@ -313,8 +313,10 @@ end
function CastBar.prototype:Enable(core)
CastBar.super.prototype.Enable(self, core)
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
if UnitHasVehicleUI then
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
end
self:RegisterEvent("PLAYER_ENTERING_WORLD", "CheckVehicle")
self:RegisterEvent("CVAR_UPDATE", "CVarUpdate")
@ -348,10 +350,12 @@ end
function CastBar.prototype:CheckVehicle()
if UnitHasVehicleUI("player") then
self:EnteringVehicle(nil, "player", true)
else
self:ExitingVehicle(nil, "player")
if UnitHasVehicleUI then
if UnitHasVehicleUI("player") then
self:EnteringVehicle(nil, "player", true)
else
self:ExitingVehicle(nil, "player")
end
end
end

View File

@ -8,7 +8,7 @@ local AnticipationSpellId = 114015
ComboPoints.prototype.comboSize = 20
local SPELL_POWER_COMBO_POINTS = SPELL_POWER_COMBO_POINTS
if IceHUD.WowVer >= 80000 then
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_COMBO_POINTS = Enum.PowerType.ComboPoints
end
@ -163,7 +163,7 @@ function ComboPoints.prototype:GetOptions()
order = 33.2
}
if IceHUD.WowVer < 70000 then
if IceHUD.WowVer < 70000 and not IceHUD.WowClassic then
opts["anticipation"] = {
type = "toggle",
name = L["Show Anticipation"],
@ -253,8 +253,8 @@ function ComboPoints.prototype:Enable(core)
ComboPoints.super.prototype.Enable(self, core)
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateComboPoints")
if IceHUD.WowVer >= 30000 then
if IceHUD.WowVer < 70000 then
if IceHUD.WowVer >= 30000 or IceHUD.WowClassic then
if IceHUD.WowVer < 70000 and not IceHUD.WowClassic then
self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateComboPoints")
else
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateComboPoints")
@ -262,9 +262,11 @@ function ComboPoints.prototype:Enable(core)
self:RegisterEvent("UNIT_MAXPOWER", "UpdateMaxComboPoints")
end
end
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "UpdateComboPoints")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "UpdateComboPoints")
if IceHUD.WowVer < 70000 then
if UnitHasVehicleUI then
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "UpdateComboPoints")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "UpdateComboPoints")
end
if IceHUD.WowVer < 70000 and not IceHUD.WowClassic then
self:RegisterEvent("PLAYER_TALENT_UPDATE", "AddAnticipation")
self:AddAnticipation()
end
@ -450,22 +452,18 @@ function ComboPoints.prototype:UpdateComboPoints(...)
local points, anticipate, _
if IceHUD.IceCore:IsInConfigMode() then
points = self:GetMaxComboPoints()
elseif IceHUD.WowVer >= 30000 then
elseif IceHUD.WowVer >= 30000 or IceHUD.WowClassic then
-- Parnic: apparently some fights have combo points while the player is in a vehicle?
local isInVehicle = UnitHasVehicleUI("player")
local isInVehicle = UnitHasVehicleUI and UnitHasVehicleUI("player")
local checkUnit = isInVehicle and "vehicle" or "player"
if IceHUD.WowVer >= 60000 then
if IceHUD.WowVer >= 60000 or IceHUD.WowClassic then
points = UnitPower(checkUnit, SPELL_POWER_COMBO_POINTS)
else
points = GetComboPoints(checkUnit, "target")
end
if IceHUD.WowVer < 70000 then
if IceHUD.WowVer < 80000 then
_, _, _, anticipate = UnitAura("player", GetSpellInfo(AnticipationSpellId))
else
_, _, anticipate = UnitAura("player", GetSpellInfo(AnticipationSpellId))
end
if IceHUD.WowVer < 70000 and IceHUD.WowVer >= 50000 then
_, _, _, anticipate = UnitAura("player", GetSpellInfo(AnticipationSpellId))
else
anticipate = 0
end

View File

@ -2,7 +2,7 @@ local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
local ComboPointsBar = IceCore_CreateClass(IceBarElement)
local SPELL_POWER_COMBO_POINTS = SPELL_POWER_COMBO_POINTS
if IceHUD.WowVer >= 80000 then
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_COMBO_POINTS = Enum.PowerType.ComboPoints
end
@ -70,14 +70,16 @@ function ComboPointsBar.prototype:Enable(core)
ComboPointsBar.super.prototype.Enable(self, core)
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateComboPoints")
if IceHUD.WowVer >= 30000 then
if IceHUD.WowVer < 70000 then
if IceHUD.WowVer >= 30000 or IceHUD.WowClassic then
if IceHUD.WowVer < 70000 and not IceHUD.WowClassic then
self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateComboPoints")
else
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateComboPoints")
end
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "UpdateComboPoints")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "UpdateComboPoints")
if UnitHasVehicleUI then
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "UpdateComboPoints")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "UpdateComboPoints")
end
else
self:RegisterEvent("PLAYER_COMBO_POINTS", "UpdateComboPoints")
end
@ -99,11 +101,11 @@ function ComboPointsBar.prototype:UpdateComboPoints(...)
local points
if IceHUD.IceCore:IsInConfigMode() then
points = UnitPowerMax("player", SPELL_POWER_COMBO_POINTS)
elseif IceHUD.WowVer >= 30000 then
elseif IceHUD.WowVer >= 30000 or IceHUD.WowClassic then
-- Parnic: apparently some fights have combo points while the player is in a vehicle?
local isInVehicle = UnitHasVehicleUI("player")
local isInVehicle = UnitHasVehicleUI and UnitHasVehicleUI("player")
local checkUnit = isInVehicle and "vehicle" or "player"
if IceHUD.WowVer >= 60000 then
if IceHUD.WowVer >= 60000 or IceHUD.WowClassic then
points = UnitPower(checkUnit, SPELL_POWER_COMBO_POINTS)
else
points = GetComboPoints(checkUnit, "target")

View File

@ -36,10 +36,12 @@ function IceCustomBar.prototype:Enable(core)
self:RegisterEvent("UNIT_AURA", "UpdateCustomBarEvent")
self:RegisterEvent("UNIT_PET", "UpdateCustomBarEvent")
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
self:RegisterEvent("PLAYER_PET_CHANGED", "UpdateCustomBarEvent")
end
self:RegisterEvent("PLAYER_FOCUS_CHANGED", "UpdateCustomBarEvent")
if FocusUnit then
self:RegisterEvent("PLAYER_FOCUS_CHANGED", "UpdateCustomBarEvent")
end
if self.unitClass == "SHAMAN" then
self:RegisterEvent("PLAYER_TOTEM_UPDATE", "UpdateTotems")
end
@ -665,7 +667,7 @@ function IceCustomBar.prototype:GetAuraDuration(unitName, buffName)
local isBuff = self.moduleSettings.buffOrDebuff == "buff" and true or false
local buffFilter = (isBuff and "HELPFUL" or "HARMFUL") .. (self.moduleSettings.trackOnlyMine and "|PLAYER" or "")
local buff, rank, texture, count, type, duration, endTime, unitCaster, _, _, spellId
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
buff, rank, texture, count, type, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, buffFilter)
else
buff, texture, count, type, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, buffFilter)
@ -695,7 +697,7 @@ function IceCustomBar.prototype:GetAuraDuration(unitName, buffName)
i = i + 1;
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
buff, rank, texture, count, type, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, buffFilter)
else
buff, texture, count, type, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, buffFilter)

View File

@ -26,4 +26,6 @@ function FocusAbsorb.prototype:MyUnregisterCustomEvents()
end
-- Load us up
IceHUD.FocusAbsorb = FocusAbsorb:new()
if UnitGetTotalAbsorbs ~= nil then
IceHUD.FocusAbsorb = FocusAbsorb:new()
end

View File

@ -23,4 +23,6 @@ end
-- 'Protected' methods --------------------------------------------------------
-- Load us up
IceHUD.FocusCC = FocusCC:new()
if FocusUnit then
IceHUD.FocusCC = FocusCC:new()
end

View File

@ -1,6 +1,12 @@
local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
local FocusCast = IceCore_CreateClass(IceCastBar)
local UnitCastingInfo, UnitChannelInfo = UnitCastingInfo, UnitChannelInfo
if IceHUD.WowClassic then
UnitCastingInfo = CastingInfo
UnitChannelInfo = ChannelInfo
end
-- Constructor --
function FocusCast.prototype:init()
FocusCast.super.prototype.init(self, "FocusCast")
@ -112,4 +118,6 @@ end
-- Load us up
IceHUD.FocusCast = FocusCast:new()
if FocusUnit then
IceHUD.FocusCast = FocusCast:new()
end

View File

@ -471,4 +471,6 @@ function FocusHealth.prototype:HideBlizz()
end
-- Load us up
IceHUD.FocusHealth = FocusHealth:new()
if FocusUnit then
IceHUD.FocusHealth = FocusHealth:new()
end

View File

@ -4,7 +4,7 @@ local FocusMana = IceCore_CreateClass(IceUnitBar)
local SPELL_POWER_RAGE = SPELL_POWER_RAGE
local SPELL_POWER_FOCUS = SPELL_POWER_FOCUS
local SPELL_POWER_ENERGY = SPELL_POWER_ENERGY
if IceHUD.WowVer >= 80000 then
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_RAGE = Enum.PowerType.Rage
SPELL_POWER_FOCUS = Enum.PowerType.Focus
SPELL_POWER_ENERGY = Enum.PowerType.Energy
@ -136,4 +136,6 @@ end
-- Load us up
IceHUD.FocusMana = FocusMana:new()
if FocusUnit then
IceHUD.FocusMana = FocusMana:new()
end

View File

@ -16,4 +16,6 @@ function IceFocusThreat.prototype:GetDefaultSettings()
end
-- Load us up
IceHUD.IceFocusThreat = IceFocusThreat:new()
if FocusUnit then
IceHUD.IceFocusThreat = IceFocusThreat:new()
end

View File

@ -2,7 +2,7 @@ local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
local HarmonyPower = IceCore_CreateClass(IceClassPowerCounter)
local SPELL_POWER_CHI = SPELL_POWER_CHI
if IceHUD.WowVer >= 80000 then
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_CHI = Enum.PowerType.Chi
end

View File

@ -2,7 +2,7 @@ local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
local HolyPower = IceCore_CreateClass(IceClassPowerCounter)
local SPELL_POWER_HOLY_POWER = SPELL_POWER_HOLY_POWER
if IceHUD.WowVer >= 80000 then
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_HOLY_POWER = Enum.PowerType.HolyPower
end

View File

@ -42,18 +42,20 @@ function PetHealth.prototype:Enable(core)
PetHealth.super.prototype.Enable(self, core)
self:RegisterEvent("PET_UI_UPDATE", "CheckPet");
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
self:RegisterEvent("PLAYER_PET_CHANGED", "CheckPet");
end
self:RegisterEvent(IceHUD.WowVer < 80000 and "PET_BAR_CHANGED" or "PET_BAR_UPDATE_USABLE", "CheckPet");
self:RegisterEvent("PET_BAR_UPDATE_USABLE", "CheckPet");
self:RegisterEvent("UNIT_PET", "CheckPet");
self:RegisterEvent("UNIT_HEALTH", "UpdateEvent")
self:RegisterEvent("UNIT_HEALTH_FREQUENT", "UpdateEvent")
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateEvent")
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
if UnitHasVehicleUI then
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
end
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
self.frame:SetAttribute("unit", self.unit)
@ -223,10 +225,12 @@ end
function PetHealth.prototype:EnteringWorld()
self:Update(self.unit)
if UnitHasVehicleUI("player") then
self:EnteringVehicle(nil, "player", true)
else
self:ExitingVehicle(nil, "player")
if UnitHasVehicleUI then
if UnitHasVehicleUI("player") then
self:EnteringVehicle(nil, "player", true)
else
self:ExitingVehicle(nil, "player")
end
end
end

View File

@ -5,7 +5,7 @@ local SPELL_POWER_RAGE = SPELL_POWER_RAGE
local SPELL_POWER_FOCUS = SPELL_POWER_FOCUS
local SPELL_POWER_ENERGY = SPELL_POWER_ENERGY
local SPELL_POWER_RUNIC_POWER = SPELL_POWER_RUNIC_POWER
if IceHUD.WowVer >= 80000 then
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_RAGE = Enum.PowerType.Rage
SPELL_POWER_FOCUS = Enum.PowerType.Focus
SPELL_POWER_ENERGY = Enum.PowerType.Energy
@ -62,15 +62,15 @@ function PetMana.prototype:Enable(core)
PetMana.super.prototype.Enable(self, core)
self:RegisterEvent("PET_UI_UPDATE", "CheckPet")
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
self:RegisterEvent("PLAYER_PET_CHANGED", "CheckPet")
end
self:RegisterEvent(IceHUD.WowVer < 80000 and "PET_BAR_CHANGED" or "PET_BAR_UPDATE_USABLE", "CheckPet")
self:RegisterEvent(IceHUD.WowVer < 80000 and not IceHUD.WowClassic and "PET_BAR_CHANGED" or "PET_BAR_UPDATE_USABLE", "CheckPet")
self:RegisterEvent("UNIT_PET", "CheckPet")
if IceHUD.WowVer >= 40000 then
if IceHUD.WowVer >= 40000 or IceHUD.WowClassic then
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent")
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent")
end
else
@ -86,8 +86,10 @@ function PetMana.prototype:Enable(core)
self:RegisterEvent("UNIT_DISPLAYPOWER", "ManaType")
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
if UnitHasVehicleUI then
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
end
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
self:CheckPet()
@ -242,10 +244,12 @@ end
function PetMana.prototype:EnteringWorld()
self:Update(self.unit)
if UnitHasVehicleUI("player") then
self:EnteringVehicle(nil, "player", true)
else
self:ExitingVehicle(nil, "player")
if UnitHasVehicleUI then
if UnitHasVehicleUI("player") then
self:EnteringVehicle(nil, "player", true)
else
self:ExitingVehicle(nil, "player")
end
end
end

View File

@ -19,4 +19,6 @@ function PlayerAbsorb.prototype:GetDefaultSettings()
end
-- Load us up
IceHUD.PlayerAbsorb = PlayerAbsorb:new()
if UnitGetTotalAbsorbs ~= nil then
IceHUD.PlayerAbsorb = PlayerAbsorb:new()
end

View File

@ -8,7 +8,7 @@ local _, unitClass = UnitClass("player")
local SPELL_POWER_MANA = SPELL_POWER_MANA
local SPELL_POWER_INSANITY = SPELL_POWER_INSANITY
if IceHUD.WowVer >= 80000 then
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_MANA = Enum.PowerType.Mana
SPELL_POWER_INSANITY = Enum.PowerType.Insanity
end

View File

@ -132,4 +132,6 @@ function IceHUDPlayerAlternatePower.prototype:HideBlizz()
end
-- Load us up
IceHUD.PlayerAlternatePower = IceHUDPlayerAlternatePower:new()
if ALTERNATE_POWER_INDEX then
IceHUD.PlayerAlternatePower = IceHUDPlayerAlternatePower:new()
end

View File

@ -79,14 +79,16 @@ function PlayerHealth.prototype:Enable(core)
self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckCombat")
self:RegisterEvent("PARTY_LEADER_CHANGED", "CheckLeader")
if IceHUD.WowVer >= 50000 then
if IceHUD.WowVer >= 50000 or IceHUD.WowClassic then
self:RegisterEvent("GROUP_ROSTER_UPDATE", "CheckLeader")
else
self:RegisterEvent("PARTY_MEMBERS_CHANGED", "CheckLeader")
end
self:RegisterEvent("LFG_PROPOSAL_UPDATE", "CheckPartyRole")
self:RegisterEvent("LFG_PROPOSAL_FAILED", "CheckPartyRole")
self:RegisterEvent("LFG_ROLE_UPDATE", "CheckPartyRole")
if GetLFGProposal then
self:RegisterEvent("LFG_PROPOSAL_UPDATE", "CheckPartyRole")
self:RegisterEvent("LFG_PROPOSAL_FAILED", "CheckPartyRole")
self:RegisterEvent("LFG_ROLE_UPDATE", "CheckPartyRole")
end
--self:RegisterEvent("PARTY_MEMBERS_CHANGED", "CheckPartyFrameStatus")
@ -96,8 +98,10 @@ function PlayerHealth.prototype:Enable(core)
self:RegisterEvent("PLAYER_FLAGS_CHANGED", "CheckPvP")
self:RegisterEvent("UNIT_FACTION", "CheckPvP")
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
if UnitHasVehicleUI then
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
end
if IceHUD.WowVer < 40000 then
HealComm = LibStub("LibHealComm-4.0", true)
@ -112,7 +116,9 @@ function PlayerHealth.prototype:Enable(core)
self:RegisterEvent("UNIT_HEAL_PREDICTION", "IncomingHealPrediction")
end
self:RegisterEvent("UNIT_ABSORB_AMOUNT_CHANGED", "UpdateAbsorbAmount")
if UnitGetTotalAbsorbs then
self:RegisterEvent("UNIT_ABSORB_AMOUNT_CHANGED", "UpdateAbsorbAmount")
end
if (self.moduleSettings.hideBlizz) then
self:HideBlizz()
@ -995,10 +1001,12 @@ function PlayerHealth.prototype:EnteringWorld()
end
function PlayerHealth.prototype:CheckVehicle()
if UnitHasVehicleUI("player") then
self:EnteringVehicle(nil, "player", true)
else
self:ExitingVehicle(nil, "player")
if UnitHasVehicleUI then
if UnitHasVehicleUI("player") then
self:EnteringVehicle(nil, "player", true)
else
self:ExitingVehicle(nil, "player")
end
end
end
@ -1161,7 +1169,7 @@ end
function PlayerHealth.prototype:CheckLeader()
local isLeader
if IceHUD.WowVer >= 50000 then
if UnitIsGroupLeader then
isLeader = UnitIsGroupLeader("player")
else
isLeader = IsPartyLeader()

View File

@ -13,7 +13,7 @@ local SPELL_POWER_FURY = SPELL_POWER_FURY
local SPELL_POWER_MAELSTROM = SPELL_POWER_MAELSTROM
local SPELL_POWER_PAIN = SPELL_POWER_PAIN
local SPELL_POWER_LUNAR_POWER = SPELL_POWER_LUNAR_POWER
if IceHUD.WowVer >= 80000 then
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_MANA = Enum.PowerType.Mana
SPELL_POWER_RAGE = Enum.PowerType.Rage
SPELL_POWER_FOCUS = Enum.PowerType.Focus
@ -153,9 +153,9 @@ function PlayerMana.prototype:Enable(core)
self:CreateTickerFrame()
if IceHUD.WowVer >= 40000 then
if IceHUD.WowVer >= 40000 or IceHUD.WowClassic then
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent")
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent")
end
else
@ -170,8 +170,10 @@ function PlayerMana.prototype:Enable(core)
self:RegisterEvent("UNIT_RUNIC_POWER", "UpdateEvent")
end
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
if UnitHasVehicleUI then
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
end
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
if not self.CustomOnUpdate then
@ -191,10 +193,12 @@ function PlayerMana.prototype:EnteringWorld()
end
function PlayerMana.prototype:CheckVehicle()
if UnitHasVehicleUI("player") then
self:EnteringVehicle(nil, "player", true)
else
self:ExitingVehicle(nil, "player")
if UnitHasVehicleUI then
if UnitHasVehicleUI("player") then
self:EnteringVehicle(nil, "player", true)
else
self:ExitingVehicle(nil, "player")
end
end
end

View File

@ -56,7 +56,7 @@ do
return
end
self.current = select(IceHUD.WowVer < 80000 and 15 or 14, UnitAura(self.unit, spellName)) or 0
self.current = select((IceHUD.WowVer < 80000 and not IceHUD.WowClassic) and 15 or 14, UnitAura(self.unit, spellName)) or 0
self:Update()
end

View File

@ -20,7 +20,7 @@ for _, v in ipairs(RtBBuffs) do
end
local SPELL_POWER_COMBO_POINTS = SPELL_POWER_COMBO_POINTS
if IceHUD.WowVer >= 80000 then
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_COMBO_POINTS = Enum.PowerType.ComboPoints
end

View File

@ -4,7 +4,7 @@ local Runes = IceCore_CreateClass(IceElement)
local IceHUD = _G.IceHUD
local CooldownFrame_SetTimer = CooldownFrame_SetTimer
if IceHUD.WowVer >= 70000 then
if CooldownFrame_Set then
CooldownFrame_SetTimer = CooldownFrame_Set
end
@ -44,7 +44,7 @@ Runes.prototype.numRunes = 6
Runes.prototype.lastRuneState = {}
local SPELL_POWER_RUNES = SPELL_POWER_RUNES
if IceHUD.WowVer >= 80000 then
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_RUNES = Enum.PowerType.Runes
end

View File

@ -38,7 +38,7 @@ local DemonologyCoords =
}
local SPELL_POWER_SOUL_SHARDS = SPELL_POWER_SOUL_SHARDS
if IceHUD.WowVer >= 80000 then
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_SOUL_SHARDS = Enum.PowerType.SoulShards
end

View File

@ -28,6 +28,11 @@ if IceHUD.WowVer >= 50000 then
baseTime = 12
gapPerComboPoint = 6
end
if IceHUD.WowClassic then
impSndBonusPerRank = 0.15
impSndTalentPage = 1
impSndTalentIdx = 6
end
local SPELL_POWER_COMBO_POINTS = SPELL_POWER_COMBO_POINTS
if IceHUD.WowVer >= 80000 then
@ -55,7 +60,7 @@ function SliceAndDice.prototype:Enable(core)
SliceAndDice.super.prototype.Enable(self, core)
self:RegisterEvent("UNIT_AURA", "UpdateSliceAndDice")
if IceHUD.WowVer < 70000 then
if IceHUD.WowVer < 70000 and not IceHUD.WowClassic then
self:RegisterEvent("UNIT_COMBO_POINTS", "ComboPointsChanged")
else
self:RegisterEvent(IceHUD.UnitPowerEvent, "ComboPointsChanged")
@ -211,7 +216,7 @@ end
function SliceAndDice.prototype:GetBuffDuration(unitName, buffName)
local i = 1
local buff, _, texture, duration, endTime, remaining
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
buff, _, texture, _, _, duration, endTime = UnitBuff(unitName, i)
else
buff, texture, _, _, duration, endTime = UnitBuff(unitName, i)
@ -227,7 +232,7 @@ function SliceAndDice.prototype:GetBuffDuration(unitName, buffName)
i = i + 1;
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
buff, _, texture, _, _, duration, endTime = UnitBuff(unitName, i)
else
buff, texture, _, _, duration, endTime = UnitBuff(unitName, i)
@ -248,7 +253,7 @@ function SliceAndDice.prototype:MyOnUpdate()
end
local function SNDGetComboPoints(unit)
if IceHUD.WowVer >= 60000 then
if IceHUD.WowVer >= 60000 or IceHUD.WowClassic then
return UnitPower(unit, SPELL_POWER_COMBO_POINTS)
elseif IceHUD.WowVer >= 30000 then
return GetComboPoints(unit, "target")
@ -280,7 +285,7 @@ function SliceAndDice.prototype:UpdateSliceAndDice(event, unit, fromUpdate)
local remaining = nil
if not fromUpdate or IceHUD.WowVer < 30000 then
sndDuration, remaining = self:GetBuffDuration(self.unit, IceHUD.WowVer < 80000 and "Ability_Rogue_SliceDice" or 132306)
sndDuration, remaining = self:GetBuffDuration(self.unit, (IceHUD.WowVer < 80000 and not IceHUD.WowClassic) and "Ability_Rogue_SliceDice" or 132306)
if not remaining then
sndEndTime = 0
@ -404,8 +409,10 @@ function SliceAndDice.prototype:GetMaxBuffTime(numComboPoints)
end
local rank = 0
local _
_, _, _, _, rank = GetTalentInfo(impSndTalentPage, impSndTalentIdx)
if GetTalentInfo then
local _
_, _, _, _, rank = GetTalentInfo(impSndTalentPage, impSndTalentIdx)
end
maxduration = maxduration * (1 + (rank * impSndBonusPerRank))
end
@ -466,6 +473,9 @@ function SliceAndDice.prototype:HasNineTailedBonus()
end
function SliceAndDice.prototype:HasGlyphBonus()
if not GetNumGlyphSockets then
return false
end
for i=1,GetNumGlyphSockets() do
local enabled, _, _, spell = GetGlyphSocketInfo(i)

View File

@ -189,8 +189,8 @@ function StaggerBar.prototype:GetDebuffInfo()
if debuffID == LightID or debuffID == ModerateID or debuffID == HeavyID then
local spellName = UnitDebuff(self.unit, i)
duration = select(IceHUD.WowVer < 80000 and 6 or 5, UnitAura(self.unit, spellName, "", "HARMFUL"))
amount = select(IceHUD.WowVer < 80000 and 15 or 14, UnitAura(self.unit, spellName, "", "HARMFUL"))
duration = select((IceHUD.WowVer < 80000 and not IceHUD.WowClassic) and 6 or 5, UnitAura(self.unit, spellName, "", "HARMFUL"))
amount = select((IceHUD.WowVer < 80000 and not IceHUD.WowClassic) and 15 or 14, UnitAura(self.unit, spellName, "", "HARMFUL"))
staggerLevel = (debuffID == LightID) and 1 or (debuffID == ModerateID) and 2 or 3
break

View File

@ -336,7 +336,7 @@ end
function TargetCC.prototype:GetMaxDebuffDuration(unitName, debuffNames)
local i = 1
local debuff, rank, texture, count, debuffType, duration, endTime, unitCaster, _, _, spellId
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
debuff, rank, texture, count, debuffType, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, "HARMFUL")
else
debuff, texture, count, debuffType, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, "HARMFUL")
@ -360,7 +360,7 @@ function TargetCC.prototype:GetMaxDebuffDuration(unitName, debuffNames)
i = i + 1;
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
debuff, rank, texture, count, debuffType, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, "HARMFUL")
else
debuff, texture, count, debuffType, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, "HARMFUL")

View File

@ -3,6 +3,12 @@ local TargetCast = IceCore_CreateClass(IceCastBar)
TargetCast.prototype.notInterruptible = false
local UnitCastingInfo, UnitChannelInfo = UnitCastingInfo, UnitChannelInfo
if IceHUD.WowClassic then
UnitCastingInfo = CastingInfo
UnitChannelInfo = ChannelInfo
end
-- Constructor --
function TargetCast.prototype:init()
TargetCast.super.prototype.init(self, "TargetCast")
@ -15,8 +21,10 @@ end
function TargetCast.prototype:Enable(core)
TargetCast.super.prototype.Enable(self, core)
self:RegisterEvent("UNIT_SPELLCAST_INTERRUPTIBLE", "SpellCastInterruptible")
self:RegisterEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", "SpellCastNotInterruptible")
if IceHUD.WowVer >= 30200 then
self:RegisterEvent("UNIT_SPELLCAST_INTERRUPTIBLE", "SpellCastInterruptible")
self:RegisterEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", "SpellCastNotInterruptible")
end
end
@ -83,7 +91,7 @@ function TargetCast.prototype:TargetChanged(unit)
end
local spell = UnitCastingInfo(self.unit)
local notInterruptible = select(IceHUD.WowVer < 80000 and 9 or 8, UnitCastingInfo(self.unit))
local notInterruptible = select((IceHUD.WowVer < 80000 and not IceHUD.WowClassic) and 9 or 8, UnitCastingInfo(self.unit))
if spell then
self.notInterruptible = notInterruptibleCast
self:StartBar(IceCastBar.Actions.Cast)
@ -91,7 +99,7 @@ function TargetCast.prototype:TargetChanged(unit)
end
local channel = UnitChannelInfo(self.unit)
notInterruptible = select(IceHUD.WowVer < 80000 and 8 or 7, UnitChannelInfo(self.unit))
notInterruptible = select((IceHUD.WowVer < 80000 and not IceHUD.WowClassic) and 8 or 7, UnitChannelInfo(self.unit))
if channel then
self.notInterruptible = notInterruptibleChannel
self:StartBar(IceCastBar.Actions.Channel)

View File

@ -637,9 +637,11 @@ function IceTargetHealth.prototype:Enable(core)
self:RegisterEvent("UPDATE_FACTION", "CheckPvP")
self:RegisterEvent("PLAYER_FLAGS_CHANGED", "CheckPvP")
self:RegisterEvent("UNIT_FACTION", "CheckPvP")
self:RegisterEvent("LFG_PROPOSAL_UPDATE", "CheckPartyRole")
self:RegisterEvent("LFG_PROPOSAL_FAILED", "CheckPartyRole")
self:RegisterEvent("LFG_ROLE_UPDATE", "CheckPartyRole")
if GetLFGRoles then
self:RegisterEvent("LFG_PROPOSAL_UPDATE", "CheckPartyRole")
self:RegisterEvent("LFG_PROPOSAL_FAILED", "CheckPartyRole")
self:RegisterEvent("LFG_ROLE_UPDATE", "CheckPartyRole")
end
end
if (self.moduleSettings.hideBlizz) then

View File

@ -2,7 +2,7 @@ local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
IceTargetInfo = IceCore_CreateClass(IceElement)
local CooldownFrame_SetTimer = CooldownFrame_SetTimer
if IceHUD.WowVer >= 70000 then
if CooldownFrame_Set then
CooldownFrame_SetTimer = CooldownFrame_Set
end
@ -129,7 +129,7 @@ function IceTargetInfo.prototype:Enable(core)
self:RegisterEvent("UNIT_LEVEL", "TargetLevel")
self:RegisterEvent("UNIT_FLAGS", "TargetFlags")
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
self:RegisterEvent("UNIT_DYNAMIC_FLAGS", "TargetFlags")
end
@ -1410,7 +1410,7 @@ function IceTargetInfo.prototype:UpdateBuffType(aura)
if self.moduleSettings.auras[aura].show then
for i = 1, IceCore.BuffLimit do
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable = UnitAura(self.unit, i, reaction .. (filter and "|PLAYER" or ""))
else
name, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable = UnitAura(self.unit, i, reaction .. (filter and "|PLAYER" or ""))
@ -1584,7 +1584,7 @@ function IceTargetInfo.prototype:TargetName(event, unit)
end
if IceHUD.WowVer < 50000 then
if UnitIsPartyLeader then
self.leader = UnitIsPartyLeader(self.unit) and " |cffcccc11Leader|r" or ""
else
self.leader = UnitIsGroupLeader(self.unit) and " |cffcccc11Leader|r" or ""
@ -1655,7 +1655,7 @@ end
function IceTargetInfo.prototype:TargetFlags(event, unit)
if (unit == self.unit or unit == internal) then
if IceHUD.WowVer < 70000 then
if UnitIsTapped then
self.tapped = UnitIsTapped(self.unit) and (not UnitIsTappedByPlayer(self.unit))
else
self.tapped = UnitIsTapDenied(self.unit)

View File

@ -147,7 +147,7 @@ end
function TargetInvuln.prototype:GetMaxbuffDuration(unitName, buffNames)
local i = 1
local buff, rank, texture, count, buffType, duration, endTime, unitCaster
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
buff, rank, texture, count, buffType, duration, endTime, unitCaster = UnitAura(unitName, i, "HELPFUL")
else
buff, texture, count, buffType, duration, endTime, unitCaster = UnitAura(unitName, i, "HELPFUL")
@ -178,7 +178,7 @@ function TargetInvuln.prototype:GetMaxbuffDuration(unitName, buffNames)
i = i + 1;
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
buff, rank, texture, count, buffType, duration, endTime, unitCaster = UnitAura(unitName, i, "HELPFUL")
else
buff, texture, count, buffType, duration, endTime, unitCaster = UnitAura(unitName, i, "HELPFUL")

View File

@ -14,7 +14,7 @@ local SPELL_POWER_FURY = SPELL_POWER_FURY
local SPELL_POWER_MAELSTROM = SPELL_POWER_MAELSTROM
local SPELL_POWER_PAIN = SPELL_POWER_PAIN
local SPELL_POWER_LUNAR_POWER = SPELL_POWER_LUNAR_POWER
if IceHUD.WowVer >= 80000 then
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_MANA = Enum.PowerType.Mana
SPELL_POWER_RAGE = Enum.PowerType.Rage
SPELL_POWER_FOCUS = Enum.PowerType.Focus
@ -66,9 +66,9 @@ function IceTargetMana.prototype:Enable(core)
IceTargetMana.super.prototype.Enable(self, core)
if self.registerEvents then
if IceHUD.WowVer >= 40000 then
if IceHUD.WowVer >= 40000 or IceHUD.WowClassic then
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent")
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent")
end
else

View File

@ -486,7 +486,7 @@ function TargetOfTarget.prototype:UpdateBuffs()
if (self.moduleSettings.showDebuffs) then
for i = 1, IceCore.BuffLimit do
local buffName, buffRank, buffTexture, buffApplications
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
buffName, buffRank, buffTexture, buffApplications = UnitDebuff(self.unit, i)
else
buffName, buffTexture, buffApplications = UnitDebuff(self.unit, i)

View File

@ -4,6 +4,12 @@ TargetTargetCast.prototype.scheduledEvent = nil
local SelfDisplayModeOptions = {"Hide", "Normal"}
local UnitCastingInfo, UnitChannelInfo = UnitCastingInfo, UnitChannelInfo
if IceHUD.WowClassic then
UnitCastingInfo = CastingInfo
UnitChannelInfo = ChannelInfo
end
-- Constructor --
function TargetTargetCast.prototype:init()
TargetTargetCast.super.prototype.init(self, "TargetTargetCast")

View File

@ -16,7 +16,7 @@ IceThreat.prototype.scheduledEvent = nil
local GetNumPartyMembers, GetNumRaidMembers = GetNumPartyMembers, GetNumRaidMembers
local MAX_NUM_RAID_MEMBERS, MAX_NUM_PARTY_MEMBERS = MAX_NUM_RAID_MEMBERS, MAX_NUM_PARTY_MEMBERS
if IceHUD.WowVer >= 50000 then
if IceHUD.WowVer >= 50000 or IceHUD.WowClassic then
GetNumPartyMembers = GetNumGroupMembers
GetNumRaidMembers = GetNumGroupMembers
MAX_NUM_PARTY_MEMBERS = MAX_PARTY_MEMBERS
@ -468,4 +468,6 @@ function IceThreat.prototype:Show(bShouldShow)
end
-- Load us up
IceHUD.IceThreat = IceThreat:new()
if UnitDetailedThreatSituation then
IceHUD.IceThreat = IceThreat:new()
end

View File

@ -2,7 +2,7 @@ local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
local Totems = IceCore_CreateClass(IceElement)
local CooldownFrame_SetTimer = CooldownFrame_SetTimer
if IceHUD.WowVer >= 70000 then
if CooldownFrame_Set then
CooldownFrame_SetTimer = CooldownFrame_Set
end
@ -247,6 +247,7 @@ function Totems.prototype:UpdateTotem(event, totem, ...)
CooldownFrame_SetTimer(self.frame.graphical[totem].cd, startTime, duration, true)
self.frame.graphical[totem].cd:Show()
self.frame.graphical[totem]:Show()
self.frame.graphical[totem].name = name
else
self.frame.graphical[totem].cd:Hide()
self.frame.graphical[totem]:Hide()
@ -293,14 +294,18 @@ function Totems.prototype:GetAlphaAdd()
end
function Totems.prototype:ShowBlizz()
TotemFrame:Show()
TotemFrame:GetScript("OnLoad")(TotemFrame)
if TotemFrame then
TotemFrame:Show()
TotemFrame:GetScript("OnLoad")(TotemFrame)
end
end
function Totems.prototype:HideBlizz()
TotemFrame:Hide()
TotemFrame:UnregisterAllEvents()
if TotemFrame then
TotemFrame:Hide()
TotemFrame:UnregisterAllEvents()
end
end
function Totems.prototype:TargetChanged()
@ -354,7 +359,14 @@ function Totems.prototype:CreateTotem(i, name)
end
if not self.graphicalOnEnter then
self.graphicalOnEnter = function(button) GameTooltip:SetOwner(button); GameTooltip:SetTotem(button.slot) end
self.graphicalOnEnter = function(button)
GameTooltip:SetOwner(button)
if IceHUD.WowClassic then
GameTooltip:SetText(button.name)
else
GameTooltip:SetTotem(button.slot)
end
end
end
if not self.graphicalOnLeave then
self.graphicalOnLeave = function() GameTooltip:Hide() end
@ -396,6 +408,7 @@ function Totems.prototype:CreateTotem(i, name)
self.frame.graphical[i]:SetScript("OnLeave", nil)
end
self.frame.graphical[i].slot = i
self.frame.graphical[i].name = name
-- it looks like HookScript will continue to add handlers every time instead of replacing them like SetScript
if (bWasNewFrame) then