From 070d66eca38cec9f8943a2cbcde5c53a43c8e6a4 Mon Sep 17 00:00:00 2001 From: Parnic Date: Wed, 28 Aug 2019 20:30:35 -0500 Subject: [PATCH] Disabled target and target-target castbars in classic --- IceHUD_Options/Options.lua | 5 +++- changelog.txt | 1 + modules/FocusCast.lua | 6 ---- modules/TargetCast.lua | 53 ++++++++++++++++++---------------- modules/TargetOfTargetCast.lua | 30 +++++++++---------- readme.md | 3 ++ 6 files changed, 51 insertions(+), 47 deletions(-) diff --git a/IceHUD_Options/Options.lua b/IceHUD_Options/Options.lua index 894b5df..a28b00f 100644 --- a/IceHUD_Options/Options.lua +++ b/IceHUD_Options/Options.lua @@ -83,7 +83,10 @@ If you have |cff42ffffDogTags|r enabled, you can open the Text Settings for the This is a side effect of the animation API that I'm co-opting to force a rotation without having to provide duplicates of every bar texture in the mod. Any bar moving sufficiently quickly and updating rapidly will cause this. |cff9999ffIceHUD|r is intended to be a vertically-oriented mod, so the rotation feature is there for people who are willing to accept the side effects that come with it. My suggestion is to use one of the many horizontally-oriented bar mods out there if you're wanting horizontal bars. |cff42ffffQuartz|r is a good castbar replacement that you can use and disable |cff9999ffIceHUD|r's built-in castbar, for example. |cff9999ff18. How do I get rid of the bars that showed up beneath the player in the 7.0 patch?|r -Blizzard added a "Personal Resource Display" feature in the 7.0 game client. You can disable it in the Game options -> Interface -> Names -> Personal Resource Display.]] +Blizzard added a "Personal Resource Display" feature in the 7.0 game client. You can disable it in the Game options -> Interface -> Names -> Personal Resource Display. + +|cff9999ff19. Why is there no target castbar for Classic?|r +The Classic game client doesn't offer a reliable way to show castbars for anyone except the player. IceHUD doesn't support the type of inaccurate guessing at combat log details that would be required to get a semi-useful target castbar.]] } } }, diff --git a/changelog.txt b/changelog.txt index c47437e..1420272 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,7 @@ v1.12.1: - (Classic) Fixed energy ticker resetting when spending energy. - (Classic) Fixed stack counters throwing errors and generally not functioning. +- (Classic) Disabled target and target-of-target castbars. Added a note to the FAQ as to why. v1.12.0: - Initial WoW Classic compatibility diff --git a/modules/FocusCast.lua b/modules/FocusCast.lua index bafaf68..67d6715 100644 --- a/modules/FocusCast.lua +++ b/modules/FocusCast.lua @@ -1,12 +1,6 @@ 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") diff --git a/modules/TargetCast.lua b/modules/TargetCast.lua index 5dd2431..4dd234a 100644 --- a/modules/TargetCast.lua +++ b/modules/TargetCast.lua @@ -3,12 +3,6 @@ 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") @@ -90,20 +84,24 @@ function TargetCast.prototype:TargetChanged(unit) return end - local spell = 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) - return + if UnitCastingInfo then + local spell = 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) + return + end end - local channel = 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) - return + if UnitChannelInfo then + local channel = 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) + return + end end self:StopBar() @@ -177,15 +175,18 @@ function TargetCast.prototype:GetOptions() end function TargetCast.prototype:StartBar(action, message) - local spell = UnitCastingInfo(self.unit) - local notInterruptible = select(IceHUD.WowVer < 80000 and 9 or 8, UnitCastingInfo(self.unit)) - if not spell then + local spell, notInterruptible + if UnitCastingInfo then + spell = UnitCastingInfo(self.unit) + notInterruptible = select(IceHUD.WowVer < 80000 and 9 or 8, UnitCastingInfo(self.unit)) + end + if UnitChannelInfo and not spell then spell = UnitChannelInfo(self.unit) notInterruptible = select(IceHUD.WowVer < 80000 and 8 or 7, UnitChannelInfo(self.unit)) - end - if not spell then - return + if not spell then + return + end end self.notInterruptible = notInterruptible @@ -197,4 +198,6 @@ end -- Load us up -IceHUD.TargetCast = TargetCast:new() +if not IceHUD.WowClassic then + IceHUD.TargetCast = TargetCast:new() +end diff --git a/modules/TargetOfTargetCast.lua b/modules/TargetOfTargetCast.lua index e0c1dc7..40d1520 100644 --- a/modules/TargetOfTargetCast.lua +++ b/modules/TargetOfTargetCast.lua @@ -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 diff --git a/readme.md b/readme.md index 04db24f..fad8633 100644 --- a/readme.md +++ b/readme.md @@ -77,5 +77,8 @@ IceHUD is a highly configurable and customizable HUD addon in the spirit of DHUD 1. **How do I get rid of the bars that showed up beneath the player in the 7.0 patch?** Blizzard added a "Personal Resource Display" feature in the 7.0 game client. You can disable it in the Game options -> Interface -> Names -> Personal Resource Display. +1. **Why is there no target castbar for Classic?** + The Classic game client doesn't offer a reliable way to show castbars for anyone except the player. IceHUD doesn't support the type of inaccurate guessing at combat log details that would be required to get a semi-useful target castbar. + See [here](https://www.wowace.com/projects/ice-hud/issues/113) for a user-created guide to creating new IceHUD textures.