mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user