Disabled target and target-target castbars in classic

This commit is contained in:
Parnic
2019-08-28 20:30:35 -05:00
parent a0c5b97ccb
commit 070d66eca3
6 changed files with 51 additions and 47 deletions

View File

@ -4,12 +4,6 @@ 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")
@ -64,16 +58,20 @@ function TargetTargetCast.prototype:UpdateTargetTarget()
return
end
local spell = UnitCastingInfo(self.unit)
if (spell) then
self:StartBar(IceCastBar.Actions.Cast)
return
if UnitCastingInfo then
local spell = UnitCastingInfo(self.unit)
if spell then
self:StartBar(IceCastBar.Actions.Cast)
return
end
end
local channel = UnitChannelInfo(self.unit)
if (channel) then
self:StartBar(IceCastBar.Actions.Channel)
return
if UnitChannelInfo then
local channel = UnitChannelInfo(self.unit)
if channel then
self:StartBar(IceCastBar.Actions.Channel)
return
end
end
self:StopBar()
@ -150,4 +148,6 @@ end
-- Load us up
IceHUD.TargetTargetCast = TargetTargetCast:new()
if not IceHUD.WowClassic then
IceHUD.TargetTargetCast = TargetTargetCast:new()
end