Compare commits

...

82 Commits

Author SHA1 Message Date
d44e62bee4 Reformat changelogs
This allows for a nicer release formatting, assuming I keep up with it.
2020-10-18 15:17:25 -05:00
8fe1ef75b7 Revert "Revert "Show "development" as addon version for non-packaged builds""
This reverts commit 087c64ee6a. Now that the community packager is being used, this should work fine.
2020-10-18 15:06:12 -05:00
702aa5bff6 Allow nolib versions to be created 2020-10-18 15:05:43 -05:00
d6e1fd707a Remove 9.0 dev note 2020-10-18 15:05:35 -05:00
88d7dd3982 Fix Options TOC to work with Classic 2020-10-18 09:11:38 -05:00
f495bb15be Change tabs to spaces to try and fix the community packager 2020-10-18 09:04:38 -05:00
087c64ee6a Revert "Show "development" as addon version for non-packaged builds"
This reverts commit 5c19d7f89c. The Twitch client is apparently having problems with alpha versions, so I'm taking guesses as to why that might be.
2020-10-14 13:05:26 -05:00
077f381adb Increased valid ranges by request (wowace ticket #280) 2020-10-14 12:57:34 -05:00
a5be2996da Fix RollTheBones for 9.0 2020-10-13 22:28:10 -05:00
22f473b54d Fix SnD for 9.0, add support for Deeper Stratagem talent
There's still some situations where refreshing SnD can give a much longer buff than expected...I'm not sure what those conditions are, though.
2020-10-13 21:59:44 -05:00
e7f95cbcb6 Holy power is usable by all specs in 9.0 2020-10-13 21:28:37 -05:00
5c19d7f89c Show "development" as addon version for non-packaged builds 2020-10-13 20:32:02 -05:00
f01d6495f8 Update readme to match Curse/WoWAce pages 2020-10-13 20:31:44 -05:00
34ecd95e4f Add github workflow for packaging with the community packager 2020-10-13 09:15:46 -05:00
564919e0c6 Configure for compatibility with community addon packager 2020-10-13 09:02:45 -05:00
a18144aec0 9.0 compatibility updates - initial attempt 2020-10-13 08:46:41 -05:00
53bf76c58a Update mailmap 2020-08-31 21:34:50 -05:00
1140d2e8c5 Update changelog 2020-08-31 21:24:43 -05:00
7d562dfb35 Possible fix for reported Classic issue 2020-08-28 21:20:47 -05:00
7c2fe06fa8 Update changelog 2020-07-13 11:21:59 -05:00
819cc64aca Maybe fix pet health visibility on teleport
Untested fix for a similar issue as seen on other modules.
2020-06-25 10:09:52 -05:00
36c8f02fc2 Show focus raw value as top number when DogTags are disabled 2020-06-19 14:07:38 -05:00
db7d797eb2 Fixed various class power indicators using the wrong alpha sometimes 2020-05-30 15:25:02 -05:00
a9cf5d5b2c Updated changelog 2020-05-27 11:26:18 -05:00
81d8ffeae1 Fixed issue of Runes alpha being wrong after a teleport with a target 2020-05-23 15:55:31 -05:00
d9c3de0a5e Drycode attempt to fix reported issue 278
This should only happen on a Classic client with LibClassicCasterino installed and a specific type of spell event fires
2020-05-22 10:17:18 -05:00
efdad59911 Updated changelog 2020-01-14 20:16:08 -06:00
b8e8b41ae7 Updated TOC 2020-01-14 20:14:34 -06:00
261be76d90 Fixed Rage showing on a scale of 0-1000 instead of 0-100 w/o DogTags on
Added a note about why this is happening for the next time I need to mess with it. I am fairly certain there is code in IceHUD that's already dealing with the 0-1000 scale and handling it, so I don't want to disrupt stuff without having enough testing.
2020-01-11 22:31:34 -06:00
55fbfbdf1c Fixed TargetMana value not showing in the proper color w/ DogTags off 2020-01-11 22:18:38 -06:00
e6077ab39f Updated FAQ 2020-01-07 19:46:20 -06:00
abf3c0d514 Updated changelog for release 2019-12-13 16:24:45 -06:00
b1e746bec9 Guard against missing GetTotemInfo API 2019-12-10 16:56:38 -06:00
659de89d0c Fixed player cast error for users without LibCasterCasterino installed 2019-11-30 10:49:37 -06:00
da79bb35c8 Updated changelog 2019-11-29 19:09:47 -06:00
b40829abbb add TargetCast support in Classic (#8)
This change adds support for using LibCasterCasterino to get your
target's casting info to enable the TargetCast module. It's not as
clean as the newer retail native calls but works well enough for
most interrupts.

Note: because LibCasterCasterino is using combat log events to get
casting info if a spell cast starts and is immediately cancelled or
interrupted the log may not get updated and the cast bar will zombie
complete.

LibCasterCasterino can be found at:

https://github.com/rgd87/LibClassicCasterino
2019-09-28 22:58:39 -05:00
7dfc05aa91 Fixed fallout from disabling GCD module
Fixes wowace ticket 253
2019-09-26 15:38:42 -05:00
a0d05ebf94 Updated changelog 2019-09-26 11:19:18 -05:00
b5b5c31791 Only use combo modules in Classic for Rogues and Druids 2019-09-22 14:24:02 -05:00
5c66970d8f GCD doesn't function in Classic 2019-09-19 22:09:16 -05:00
4fbb70ebc0 Updated changelog for release 2019-09-10 23:16:18 -05:00
9cfa00227f Fixed indentation to match the rest of the file (spaces/tabs) 2019-09-10 23:16:08 -05:00
9b90694912 add missing unit parameter on SpellCastFailed (#5) 2019-09-06 18:12:39 -05:00
67f79736d8 Preparing for release 2019-09-05 21:39:10 -05:00
dc98e5b521 Updated changelog 2019-09-04 17:56:29 -05:00
94506cc591 Merge remote-tracking branch 'github/master' 2019-09-04 17:52:07 -05:00
09d9a9c6f7 Add cooldowns support on target buffs/debuffs (#4)
* Add cooldowns support on target buffs/debuffs

Duration and expiration times are not set on target buffs/debuffs
when using UnitAura. This change looks up the spellID in
LibClassicDurations and sets the duration and expiry using that
source.

This change enables the cooldown sweep that allows OmniCC to properly
display the countdown of time remaining on the buff/debuff.

Note that this only adds the cooldown on buff/debuffs applied
to the target by the player.

* set LibStub to silently fail if library is missing

Support for cooldown durations on Classic WoW is provided by
LibClassicDurations, which comes with the ClassicAuraDurations
addon. This change prevents IceHUD throwing an error if the
library is missing.
2019-09-04 17:50:33 -05:00
8b7ce521ff Merge pull request #3 from TwentyOneZ/master
RealMobHealth addon compatibility
2019-09-03 17:34:51 -05:00
26fd86134b RealMobHealth addon compatibility
It will only work with DogTags disabled. Otherwise it will respect the DogTag (which doesn't support the RealMobHealth info).
2019-09-03 16:03:38 -03:00
e4d8bae185 Only allow custom bars to track players in Classic 2019-09-03 10:17:03 -05:00
2d42116f8d Updated changelog 2019-08-30 10:41:14 -05:00
a7d1629ed3 Fixed error in Classic when changing profiles 2019-08-29 11:53:27 -05:00
070d66eca3 Disabled target and target-target castbars in classic 2019-08-28 20:30:35 -05:00
a0c5b97ccb Updated changelog 2019-08-28 20:04:19 -05:00
3e56595709 Fixed energy ticker resetting when spending energy 2019-08-28 19:49:50 -05:00
c016b0ccc0 Fixed PLAYER_PET_CHANGED event on stack counters in Classic 2019-08-28 08:56:31 -05:00
d0187a44e3 Revving to get a new build to pick up the latest LibRangeCheck 2019-08-15 16:36:02 -05:00
b4e1374400 Revving to get a new build to pick up the latest Ace3 2019-08-12 08:07:49 -05:00
ba8748ecca 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
2019-08-11 23:21:06 -05:00
5b71a4f819 Updated TOC to 8.2 2019-06-25 09:53:14 -05:00
77351997b4 Updated changelog 2019-06-03 22:55:26 -05:00
901b49f7b3 Attempt to fix pet health/power not updating when entering instance 2019-06-03 22:46:24 -05:00
53b59b5be2 Attempt to fix pet health not updating (wowace ticket 245) 2019-04-16 17:37:11 -05:00
1bb217c4aa Updated changelog 2019-03-17 12:30:49 -05:00
8469824f53 Fixed player health not updating to max health 2019-03-17 12:28:58 -05:00
118aa0f493 Updated TOC to 8.1 2019-01-12 17:33:29 -06:00
48ee6c0270 Updated changelog 2018-10-03 08:21:58 -05:00
395de299f0 Fixed shard numeric formatting incorrectly in non-Destruction specs 2018-10-03 08:20:30 -05:00
588ba76ef5 Possible fix for reported nil comparison issue. Can't reproduce here. 2018-10-02 09:02:59 -05:00
9fc64bcfe4 Added suggested CC spells 2018-09-19 16:35:13 -05:00
a4945641fb Updated changelog 2018-09-15 14:51:59 -05:00
195b7ab264 Only show placeholder icon when in config mode 2018-09-15 14:50:33 -05:00
410cc2b634 Fixed CD bars not displaying when both IgnoreRange and OnlyShowWithTarget were set 2018-09-12 22:06:33 -05:00
6986131d73 Only show placeholder icon when in config mode
If a CD bar was tracking a spell that was currently unknown to the player (such as the not-currently-active variations of Wildfire Bomb for Survival Hunters after first login/UI reload) then the placeholder frost icon would show up instead. The icon was only meant to be used to aid in configuration mode, so now the icon is set to the placeholder icon when config mode is enabled only. Technically we should clear the icon if it's set to the default whenever config mode is exited, but I figure config mode is pretty rare and should be okay for now.
2018-09-12 21:59:29 -05:00
43aff89b5c Updated changelog 2018-08-30 16:48:33 -05:00
b3a1602d6c Hide lag bar if lag is over half the cast time 2018-08-27 22:57:33 -05:00
c558010b25 Updated changelog 2018-08-27 21:02:05 -05:00
af42f4a4f3 Added option (enabled by default) to hide mod during shell games 2018-08-27 20:48:30 -05:00
ccdabc210c Added HasDebuffs utility method 2018-08-27 20:48:13 -05:00
32e2ce3902 Added Rogue Between the Eyes stun 2018-08-24 00:04:56 -05:00
9764694568 Updated changelog 2018-08-18 14:56:01 -05:00
337bd72545 Fix cast lag indicator updating for others' spells 2018-08-18 14:55:22 -05:00
59 changed files with 1176 additions and 425 deletions

45
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,45 @@
# description of this workflow, can be anything you want
name: Package and release
# we need to let GitHub know _when_ we want to release, typically only when we create a new tag.
# this will target only tags, and not all pushes to the master branch.
# this part can be heavily customized to your liking, like targeting only tags that match a certain word,
# other branches or even pullrequests.
on:
push:
tags:
- '**'
# a workflow is built up as jobs, and within these jobs are steps
jobs:
# "release" is a job, you can name it anything you want
release:
# we can run our steps on pretty much anything, but the "ubuntu-latest" image is a safe bet
runs-on: ubuntu-latest
# specify the environment variables used by the packager, matching the secrets from the project on GitHub
env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} # "GITHUB_TOKEN" is a secret always provided to the workflow
# for your own token, the name cannot start with "GITHUB_"
# "steps" holds a list of all the steps needed to package and release our AddOn
steps:
# we first have to clone the AddOn project, this is a required step
- name: Clone project
uses: actions/checkout@v1
# once cloned, we just run the GitHub Action for the packager project
- name: Package and release
uses: BigWigsMods/packager@master
# another example where we supply additional arguments, this example is specifically to release
# for the Classic version of the game
- name: Package and release for Classic
uses: BigWigsMods/packager@master
with:
args: -g 1.13.5 -w 0

View File

@ -1,2 +1,3 @@
Parnic <parnic@parnic.com> Parnic <chris@parnic.com>
rokiyo <rokiyo@example.com> Rokiyo <Rokiyo@example.com>
Parnic <parnic@parnic.com> Chris Pickett <chris@perniciousgames.com>

View File

@ -24,7 +24,7 @@ externals:
tag: latest
libs/AceGUI-3.0:
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceGUI-3.0
tag: latest
tag: latest
libs/AceGUI-3.0-SharedMediaWidgets:
url: svn://svn.wowace.com/wow/ace-gui-3-0-shared-media-widgets/mainline/trunk/AceGUI-3.0-SharedMediaWidgets
tag: latest
@ -65,4 +65,6 @@ tools-used:
ignore:
- readme.md
manual-changelog: changelog.txt
manual-changelog: this_version.md
enable-nolib-creation: yes

View File

@ -415,7 +415,7 @@ do
type='range',
name = L["Bar vertical offset"],
desc = L["Adjust the vertical placement of this bar"],
min = -400,
min = -600,
max = 600,
step = 1,
get = function()
@ -436,7 +436,7 @@ do
type='range',
name = L["Bar horizontal adjust"],
desc = L["This is a per-pixel horizontal adjustment. You should probably use the 'offset' setting above as it is designed to snap bars together. This may be used in the case of a horizontal bar needing to be positioned outside the normal bar locations."],
min = -400,
min = -600,
max = 600,
step = 1,
get = function()
@ -1040,7 +1040,7 @@ end
-- Creates the actual bar
function IceBarElement.prototype:CreateBar()
self.barFrame = self:BarFactory(self.barFrame, "LOW", "ARTWORK")
self.barFrame = self:BarFactory(self.barFrame, "LOW", "ARTWORK", "Bar")
self:SetBarCoord(self.barFrame)
self.barFrame.bar:SetBlendMode(self.settings.barBlendMode)
@ -1050,9 +1050,9 @@ end
-- Returns a barFrame & barFrame.bar
-- Rokiyo: Currently keeping old behaviour of running through bar creation on every Redraw, but I'm not convinced we need to.
function IceBarElement.prototype:BarFactory(barFrame, frameStrata, textureLayer)
function IceBarElement.prototype:BarFactory(barFrame, frameStrata, textureLayer, nameSuffix)
if not (barFrame) then
barFrame = CreateFrame("Frame", nil, self.frame)
barFrame = CreateFrame("Frame", "IceHUD_"..self.elementName.."_"..(nameSuffix or "Bar"), self.frame)
end
barFrame:SetFrameStrata(frameStrata and frameStrata or "LOW")
@ -1584,7 +1584,7 @@ function IceBarElement.prototype:CreateMarker(idx)
self.Markers[idx] = nil
end
self.Markers[idx] = self:BarFactory(self.Markers[idx], "MEDIUM", "OVERLAY")
self.Markers[idx] = self:BarFactory(self.Markers[idx], "MEDIUM", "OVERLAY", "Marker"..idx)
local color = self.moduleSettings.markers[idx].color
self.Markers[idx].bar:SetVertexColor(color.r, color.g, color.b, self.alpha)

View File

@ -13,10 +13,31 @@ 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
-- Fulzamoth 2019-09-27 : Use LibClassicCasterino if it's there so we can use TargetCast
-- module in Classic WoW
if IceHUD.WowClassic then
LibClassicCasterino = LibStub("LibClassicCasterino", true)
if LibClassicCasterino then
UnitCastingInfo = function(unit)
return LibClassicCasterino:UnitCastingInfo(unit)
end
UnitChannelInfo = function(unit)
return LibClassicCasterino:UnitChannelInfo(unit)
end
end
end
-- end Fulzamoth change
local AuraIconWidth = 20
local AuraIconHeight = 20
@ -40,21 +61,55 @@ end
function IceCastBar.prototype:Enable(core)
IceCastBar.super.prototype.Enable(self, core)
self:RegisterEvent("UNIT_SPELLCAST_SENT", "SpellCastSent") -- "player", spell, rank, target
self:RegisterEvent("CURRENT_SPELL_CAST_CHANGED", "SpellCastChanged")
self:RegisterEvent("UNIT_SPELLCAST_START", "SpellCastStart") -- unit, spell, rank
self:RegisterEvent("UNIT_SPELLCAST_STOP", "SpellCastStop") -- unit, spell, rank
-- Fulzamoth 2019-09-27 : LibClassicCasterino support
-- Setup callback to the library, and route events to
-- IceHUD's handler functions.
if LibClassicCasterino then
local CastbarEventHandler = function(event, ...) -- unitTarget, castGUID, spellID
if (event == "UNIT_SPELLCAST_START") then
return IceCastBar.prototype.SpellCastStart(self, event, ...)
elseif (event == "UNIT_SPELLCAST_DELAYED") then
return IceCastBar.prototype.SpellCastDelayed(self, event, ...)
elseif (event == "UNIT_SPELLCAST_STOP") then
return IceCastBar.prototype.SpellCastStop(self, event, ...)
elseif (event == "UNIT_SPELLCAST_FAILED") then
return IceCastBar.prototype.SpellCastFailed(self, event, ...)
elseif (event == "UNIT_SPELLCAST_INTERRUPTED") then
return IceCastBar.prototype.SpellCastInterrupted(self, event, ...)
elseif (event == "UNIT_SPELLCAST_CHANNEL_START") then
return IceCastBar.prototype.SpellCastChannelStart(self, event, ...)
elseif (event == "UNIT_SPELLCAST_CHANNEL_UPDATE") then
return IceCastBar.prototype.SpellCastChannelUpdate(self, event, ...)
elseif (event == "UNIT_SPELLCAST_CHANNEL_STOP") then
return IceCastBar.prototype.SpellCastChannelStop(self, event, ...)
end
end
LibClassicCasterino.RegisterCallback(self,"UNIT_SPELLCAST_START", CastbarEventHandler)
LibClassicCasterino.RegisterCallback(self,"UNIT_SPELLCAST_DELAYED", CastbarEventHandler) -- only for player
LibClassicCasterino.RegisterCallback(self,"UNIT_SPELLCAST_STOP", CastbarEventHandler)
LibClassicCasterino.RegisterCallback(self,"UNIT_SPELLCAST_FAILED", CastbarEventHandler)
LibClassicCasterino.RegisterCallback(self,"UNIT_SPELLCAST_INTERRUPTED", CastbarEventHandler)
LibClassicCasterino.RegisterCallback(self,"UNIT_SPELLCAST_CHANNEL_START", CastbarEventHandler)
LibClassicCasterino.RegisterCallback(self,"UNIT_SPELLCAST_CHANNEL_UPDATE", CastbarEventHandler) -- only for player
LibClassicCasterino.RegisterCallback(self,"UNIT_SPELLCAST_CHANNEL_STOP", CastbarEventHandler)
else -- No LibClassicCasterino, or we're not on Classic, so use IceHUD's normal event handlers.
self:RegisterEvent("UNIT_SPELLCAST_FAILED", "SpellCastFailed") -- unit, spell, rank
self:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED", "SpellCastInterrupted") -- unit, spell, rank
self:RegisterEvent("UNIT_SPELLCAST_SENT", "SpellCastSent") -- "player", spell, rank, target
self:RegisterEvent("CURRENT_SPELL_CAST_CHANGED", "SpellCastChanged")
self:RegisterEvent("UNIT_SPELLCAST_START", "SpellCastStart") -- unit, spell, rank
self:RegisterEvent("UNIT_SPELLCAST_STOP", "SpellCastStop") -- unit, spell, rank
self:RegisterEvent("UNIT_SPELLCAST_DELAYED", "SpellCastDelayed") -- unit, spell, rank
self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED", "SpellCastSucceeded") -- "player", spell, rank
self:RegisterEvent("UNIT_SPELLCAST_FAILED", "SpellCastFailed") -- unit, spell, rank
self:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED", "SpellCastInterrupted") -- unit, spell, rank
self:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START", "SpellCastChannelStart") -- unit, spell, rank
self:RegisterEvent("UNIT_SPELLCAST_CHANNEL_UPDATE", "SpellCastChannelUpdate") -- unit, spell, rank
self:RegisterEvent("UNIT_SPELLCAST_CHANNEL_STOP", "SpellCastChannelStop") -- unit, spell, rank
self:RegisterEvent("UNIT_SPELLCAST_DELAYED", "SpellCastDelayed") -- unit, spell, rank
self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED", "SpellCastSucceeded") -- "player", spell, rank
self:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START", "SpellCastChannelStart") -- unit, spell, rank
self:RegisterEvent("UNIT_SPELLCAST_CHANNEL_UPDATE", "SpellCastChannelUpdate") -- unit, spell, rank
self:RegisterEvent("UNIT_SPELLCAST_CHANNEL_STOP", "SpellCastChannelStop") -- unit, spell, rank
end
self:Show(false)
end
@ -352,21 +407,24 @@ 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)
end
end
if not spell then
return
-- Fulzamoth 2019-09-27 : LibClassicCasterino won't return spell info on target's failed or interrupted cast
if LibClassicCasterino and not spell then
self:StopBar()
elseif not spell then
return
end
if icon ~= nil then
@ -392,7 +450,7 @@ function IceCastBar.prototype:StartBar(action, message)
self.actionDuration = 1 -- instants/failures
end
if not (message) then
if not (message) and spell then
self.actionMessage = spell .. (self.moduleSettings.showSpellRank and self:GetShortRank(rank) or "")
end
@ -464,7 +522,7 @@ function IceCastBar.prototype:SpellCastStop(event, unit, castGuid, spellId)
end
function IceCastBar.prototype:SpellCastFailed(event, castGuid, spellId)
function IceCastBar.prototype:SpellCastFailed(event, unit, castGuid, spellId)
if (unit ~= self.unit) then return end
IceHUD:Debug("SpellCastFailed", unit, castGuid, spellId)
@ -510,7 +568,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 +629,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

@ -94,6 +94,7 @@ function IceCore.prototype:SetupDefaults()
bHideDuringPetBattles = true,
bHideInBarberShop = true,
bHideDuringShellGame = true,
},
global = {
lastRunVersion = 0,
@ -250,10 +251,15 @@ 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
if IceHUD.IceCore.settings.bHideDuringPetBattles then
@ -271,6 +277,15 @@ function IceCore.prototype:Enable(userToggle)
if IceHUD.IceCore.settings.bHideInBarberShop then
self:Show()
end
elseif (event == "UNIT_AURA") then
local unit = ...
if IceHUD.IceCore.settings.bHideDuringShellGame and unit == "player" and IceHUD:HasDebuffs("player", {271571})[1] and UnitInVehicle("player") then
self:RegisterEvent("UNIT_EXITED_VEHICLE")
self:Hide()
end
elseif (event == "UNIT_EXITED_VEHICLE") then
self:UnregisterEvent("UNIT_EXITED_VEHICLE")
self:Show()
end
end)
@ -505,10 +520,14 @@ function IceCore.prototype:Disable(userToggle)
end
end
self.IceHUDFrame:UnregisterEvent("PET_BATTLE_OPENING_START")
self.IceHUDFrame:UnregisterEvent("PET_BATTLE_OVER")
self.IceHUDFrame:UnregisterEvent("BARBER_SHOP_OPEN")
self.IceHUDFrame:UnregisterEvent("BARBER_SHOP_CLOSE")
if UnitCanPetBattle then
self.IceHUDFrame:UnregisterEvent("PET_BATTLE_OPENING_START")
self.IceHUDFrame:UnregisterEvent("PET_BATTLE_OVER")
end
if GetBarberShopStyleInfo then
self.IceHUDFrame:UnregisterEvent("BARBER_SHOP_OPEN")
self.IceHUDFrame:UnregisterEvent("BARBER_SHOP_CLOSE")
end
self.IceHUDFrame:SetScript("OnEvent", nil)
self.enabled = false

View File

@ -69,7 +69,7 @@ function IceElement.prototype:Create(parent)
self.parent = parent
if not self.masterFrame then
self.masterFrame = CreateFrame("Frame", nil, self.parent)
self.masterFrame = CreateFrame("Frame", "IceHUD_Element_"..self.elementName, self.parent)
self.masterFrame:SetFrameStrata("MEDIUM")
end
self:CreateFrame()

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" }
@ -258,6 +259,10 @@ function IceHUD:NotifyOptionsChange()
end
function IceHUD:OnEnable(isFirst)
-- if isFirst then
self:SetDebugging(self.IceCore:GetDebug())
self.debugFrame = ChatFrame1
-- end
self:Debug("IceHUD:OnEnable()")
if self.db.profile.enable then
@ -273,11 +278,6 @@ function IceHUD:OnEnable(isFirst)
--@debug@
IceHUD_Options:OnLoad()
--@end-debug@
-- if isFirst then
self:SetDebugging(self.IceCore:GetDebug())
self.debugFrame = ChatFrame1
-- end
end
-- add settings changes/updates here so that existing users don't lose their settings
@ -324,7 +324,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)
@ -366,7 +366,11 @@ function IceHUD:Debug(...)
for n=1,select('#', ...) do
msg = msg .. tostring(select(n, ...)) .. " "
end
self.debugFrame:AddMessage(msg)
if self.debugFrame then
self.debugFrame:AddMessage(msg)
else
print(msg)
end
end
end
@ -412,7 +416,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 +428,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 ""))
@ -437,17 +441,17 @@ end
do
local retval = {}
function IceHUD:HasBuffs(unit, spellIDs)
function IceHUD:HasBuffs(unit, spellIDs, filter)
for i=1, #spellIDs do
retval[i] = false
end
local i = 1
local name, _, texture, applications, _, _, _, _, _, _, auraID
if IceHUD.WowVer < 80000 then
name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i)
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)
name, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter)
end
while name do
for i=1, #spellIDs do
@ -458,15 +462,19 @@ do
end
i = i + 1
if IceHUD.WowVer < 80000 then
name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i)
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)
name, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter)
end
end
return retval
end
function IceHUD:HasDebuffs(unit, spellIDs, filter)
return IceHUD:HasBuffs(unit, spellIDs, filter and filter.."|HARMFUL" or "HARMFUL")
end
end
function IceHUD:OnDisable()
@ -601,6 +609,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

@ -1,13 +1,24 @@
## Interface: 80000
#@retail@
## Interface: 90001
#@end-retail@
#@non-retail@
# ## Interface: 11305
#@end-non-retail@
## Author: Parnic, originally created by Iceroth
## Name: IceHUD
## Title: IceHUD |cff7fff7f-Ace3-|r
## Notes: Another HUD addon
## Version: @project-version@
#@debug@
## Version: development
#@end-debug@
#@non-debug@
# ## Version: @project-version@
#@end-non-debug@
## SavedVariables: IceCoreDB
## OptionalDeps: Ace3, LibSharedMedia-3.0, LibDogTag-3.0, LibDogTag-Unit-3.0, LibRangeCheck-2.0, LibDualSpec-1.0, LibDBIcon-1.0, AceGUI-3.0-SharedMediaWidgets
## X-Category: HUDs
## X-Website: https://www.wowace.com/projects/ice-hud
## X-Curse-Project-ID: 5394
## X-WoWI-ID: 8149
#@no-lib-strip@

View File

@ -1,4 +1,9 @@
## Interface: 80000
#@retail@
## Interface: 90001
#@end-retail@
#@non-retail@
# ## Interface: 11305
#@end-non-retail@
## Title: IceHUD |cff7fff7f-Options-|r
## Author: Parnic
## Version: @project-version@

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 = {}
@ -83,7 +83,13 @@ 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. You can install the LibCasterCasterino addon to enable support, but it's a best guess and not at all accurate.
|cff9999ff20. Why do buff/debuff timers not work in Classic?|r
The Classic game client doesn't provide this information to addons because it wasn't a feature when the game first released. You can install the LibClassicDurations addon to enable support, but it's a best guess and not at all accurate.]]
}
}
},
@ -379,6 +385,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,8 +403,27 @@ 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,
},
bHideDuringShellGame = {
type = 'toggle',
name = L["Hide during shell game"],
desc = L["This will hide the entire mod when playing the BfA Tortollan shell game world quest."],
width = 'double',
get = function()
return IceHUD.IceCore.settings.bHideDuringShellGame
end,
set = function(info, value)
IceHUD.IceCore.settings.bHideDuringShellGame = value
if not value then
IceHUD.IceCore.IceHUDFrame:Show()
end
end,
hidden = IceHUD.WowVer < 80000,
order = 36,
},
}
},

View File

@ -128,10 +128,12 @@ end
function IceStackCounter_Enable(frame)
frame:RegisterEvent("UNIT_AURA", "UpdateCustomCount")
frame:RegisterEvent("UNIT_PET", "UpdateCustomCount")
if IceHUD.WowVer < 80000 then
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic 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

@ -19,9 +19,10 @@ IceUnitBar.prototype.hasPet = nil
IceUnitBar.prototype.noFlash = nil
local SPELL_POWER_INSANITY = SPELL_POWER_INSANITY
if IceHUD.WowVer >= 80000 then
local SPELL_POWER_INSANITY, SPELL_POWER_RAGE = SPELL_POWER_INSANITY, SPELL_POWER_RAGE
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
SPELL_POWER_INSANITY = Enum.PowerType.Insanity
SPELL_POWER_RAGE = Enum.PowerType.Rage
end
-- Constructor --
@ -170,7 +171,7 @@ end
-- Creates the low amount warning frame
function IceUnitBar.prototype:CreateFlashFrame()
if not (self.flashFrame) then
self.flashFrame = CreateFrame("Frame", nil, self.frame)
self.flashFrame = CreateFrame("Frame", "IceHUD_"..self.elementName.."_Flash", self.frame)
end
self.flashFrame:SetFrameStrata("BACKGROUND")
@ -220,7 +221,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)
@ -230,8 +231,14 @@ function IceUnitBar.prototype:Update()
self.maxHealth = UnitHealthMax(self.unit)
self.healthPercentage = self.maxHealth ~= 0 and (self.health/self.maxHealth) or 0
-- note that UnitPowerType returns 2 arguments and UnitPower[Max] accepts a third argument to get the values on a different scale
-- so this technically doesn't get us the answer we want most of the time. too risky to change at this point, though.
self.mana = UnitPower(self.unit, UnitPowerType(self.unit))
self.maxMana = UnitPowerMax(self.unit, UnitPowerType(self.unit))
if UnitPowerType(self.unit) == SPELL_POWER_RAGE and self.maxMana == 1000 then
self.mana = IceHUD:MathRound(self.mana / 10)
self.maxMana = IceHUD:MathRound(self.maxMana / 10)
end
if IceHUD.WowVer >= 70300 and UnitPowerType(self.unit) == SPELL_POWER_INSANITY then
self.mana = IceHUD:MathRound(self.mana / 100)
self.maxMana = IceHUD:MathRound(self.maxMana / 100)

File diff suppressed because it is too large Load Diff

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
@ -394,7 +398,7 @@ end
function CastBar.prototype:CreateLagBar()
if self.lagBar == nil then
self.lagBar = self:BarFactory(self.lagBar, "LOW", "OVERLAY")
self.lagBar = self:BarFactory(self.lagBar, "LOW", "OVERLAY", "Lag")
end
local r, g, b = self:GetColor("CastLag")
@ -435,7 +439,9 @@ function CastBar.prototype:SpellCastStart(event, unit, castGuid, spellId)
end
self:UpdateLagBar()
self.nextLagUpdate = GetTime() + (select(2, GetSpellCooldown(IceHUD.GlobalCoolDown:GetSpellId())) / 2)
if IceHUD.GlobalCoolDown then
self.nextLagUpdate = GetTime() + (select(2, GetSpellCooldown(IceHUD.GlobalCoolDown:GetSpellId())) / 2)
end
end
@ -455,12 +461,14 @@ end
function CastBar.prototype:SpellCastSucceeded(event, unit, castGuid, spellId)
CastBar.super.prototype.SpellCastSucceeded(self, event, unit, castGuid, spellId)
if not self.actionDuration then
if not self.actionDuration or unit ~= self.unit then
return
end
self:UpdateLagBar()
self.nextLagUpdate = GetTime() + (select(2, GetSpellCooldown(IceHUD.GlobalCoolDown:GetSpellId())) / 2)
if IceHUD.GlobalCoolDown then
self.nextLagUpdate = GetTime() + (select(2, GetSpellCooldown(IceHUD.GlobalCoolDown:GetSpellId())) / 2)
end
end
@ -477,7 +485,7 @@ function CastBar.prototype:UpdateLagBar(isChannel)
scale = IceHUD:Clamp(self.fixedLatency / self.actionDuration, 0, 1)
else
local lag = now - (self.spellCastSent or now)
if lag >= self.actionDuration then
if lag >= (self.actionDuration / 2) then
scale = 0
else
scale = IceHUD:Clamp(lag / self.actionDuration, 0, 1)

View File

@ -467,7 +467,7 @@ function IceClassPowerCounter.prototype:DisplayCounter()
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateRunePower")
self:RegisterEvent("UNIT_DISPLAYPOWER", "UpdateRunePower")
self:RegisterEvent("PLAYER_ENTERING_WORLD", "UpdateRunePower")
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
if (self.moduleSettings.hideBlizz) then
self:HideBlizz()
@ -484,6 +484,11 @@ function IceClassPowerCounter.prototype:Disable(core)
end
end
function IceClassPowerCounter.prototype:EnteringWorld()
self:TargetChanged()
self:UpdateRunePower()
end
function IceClassPowerCounter.prototype:UpdateRunePower(event, arg1, arg2)
if event and (event == IceHUD.UnitPowerEvent or event == "UNIT_POWER_FREQUENT") and arg1 ~= "player" and arg1 ~= "vehicle" then
return

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
@ -555,4 +553,7 @@ end
-- Load us up
IceHUD.ComboPoints = ComboPoints:new()
local _, class = UnitClass("player")
if not IceHUD.WowClassic or class == "ROGUE" or class == "DRUID" then
IceHUD.ComboPoints = ComboPoints:new()
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")
@ -133,4 +135,7 @@ function ComboPointsBar.prototype:Update()
self:UpdateComboPoints()
end
IceHUD.ComboPointsBar = ComboPointsBar:new()
local _, class = UnitClass("player")
if not IceHUD.WowClassic or class == "ROGUE" or class == "DRUID" then
IceHUD.ComboPointsBar = ComboPointsBar:new()
end

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
@ -79,6 +81,10 @@ function IceCustomBar.prototype:Disable(core)
end
function IceCustomBar.prototype:GetUnitToTrack()
if IceHUD.WowClassic then
return "player"
end
if self.moduleSettings.myUnit == "other" then
if self.moduleSettings.customUnit ~= nil and self.moduleSettings.customUnit ~= "" then
return self.moduleSettings.customUnit
@ -169,8 +175,6 @@ function IceCustomBar.prototype:CreateBar()
if not self.barFrame.icon then
self.barFrame.icon = self.masterFrame:CreateTexture(nil, "LOW")
-- default texture so that 'config mode' can work without activating the bar first
self.barFrame.icon:SetTexture("Interface\\Icons\\Spell_Frost_Frost")
-- this cuts off the border around the buff icon
self.barFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
self.barFrame.icon:SetDrawLayer("OVERLAY")
@ -258,51 +262,53 @@ function IceCustomBar.prototype:GetOptions()
order = 30.3,
}
opts["unitToTrack"] = {
type = 'select',
values = validUnits,
name = L["Unit to track"],
desc = L["Select which unit that this bar should be looking for buffs/debuffs on"],
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.myUnit)
end,
set = function(info, v)
self.moduleSettings.myUnit = info.option.values[v]
self.unit = self:GetUnitToTrack()
self:RegisterFontStrings()
self:ConditionalSubscribe()
self:Redraw()
self:UpdateCustomBar(self.unit)
IceHUD:NotifyOptionsChange()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 30.4,
}
if not IceHUD.WowClassic then
opts["unitToTrack"] = {
type = 'select',
values = validUnits,
name = L["Unit to track"],
desc = L["Select which unit that this bar should be looking for buffs/debuffs on"],
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.myUnit)
end,
set = function(info, v)
self.moduleSettings.myUnit = info.option.values[v]
self.unit = self:GetUnitToTrack()
self:RegisterFontStrings()
self:ConditionalSubscribe()
self:Redraw()
self:UpdateCustomBar(self.unit)
IceHUD:NotifyOptionsChange()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 30.4,
}
opts["customUnitToTrack"] = {
type = 'input',
name = L["Custom unit"],
desc = L["Any valid unit id such as: party1, raid14, targettarget, etc. Not guaranteed to work with all unit ids.\n\nRemember to press ENTER after filling out this box with the name you want or it will not save."],
get = function()
return self.moduleSettings.customUnit
end,
set = function(info, v)
self.moduleSettings.customUnit = v
self.unit = self:GetUnitToTrack()
self:RegisterFontStrings()
self:ConditionalSubscribe()
self:Redraw()
self:UpdateCustomBar(self.unit)
IceHUD:NotifyOptionsChange()
end,
hidden = function()
return self.moduleSettings.myUnit ~= "other"
end,
usage = "<what custom unit to track when unitToTrack is set to 'other'>",
order = 30.45,
}
opts["customUnitToTrack"] = {
type = 'input',
name = L["Custom unit"],
desc = L["Any valid unit id such as: party1, raid14, targettarget, etc. Not guaranteed to work with all unit ids.\n\nRemember to press ENTER after filling out this box with the name you want or it will not save."],
get = function()
return self.moduleSettings.customUnit
end,
set = function(info, v)
self.moduleSettings.customUnit = v
self.unit = self:GetUnitToTrack()
self:RegisterFontStrings()
self:ConditionalSubscribe()
self:Redraw()
self:UpdateCustomBar(self.unit)
IceHUD:NotifyOptionsChange()
end,
hidden = function()
return self.moduleSettings.myUnit ~= "other"
end,
usage = "<what custom unit to track when unitToTrack is set to 'other'>",
order = 30.45,
}
end
opts["buffOrDebuff"] = {
type = 'select',
@ -635,7 +641,7 @@ end
-- 'Protected' methods --------------------------------------------------------
function IceCustomBar.prototype:GetAuraDuration(unitName, buffName)
if not unitName or not buffName then
if not unitName or not buffName or buffName == "" then
return nil
end
@ -667,7 +673,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)
@ -697,7 +703,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)
@ -776,6 +782,10 @@ function IceCustomBar.prototype:UpdateCustomBar(unit, fromUpdate)
end
if IceHUD.IceCore:IsInConfigMode() or self.moduleSettings.displayAuraIcon then
if IceHUD.IceCore:IsInConfigMode() and not self.barFrame.icon:GetTexture() then
self.barFrame.icon:SetTexture("Interface\\Icons\\Spell_Frost_Frost")
end
self.barFrame.icon:Show()
else
self.barFrame.icon:Hide()

View File

@ -132,8 +132,6 @@ function IceCustomCDBar.prototype:CreateBar()
if not self.barFrame.icon then
self.barFrame.icon = self.masterFrame:CreateTexture(nil, "LOW")
-- default texture so that 'config mode' can work without activating the bar first
self.barFrame.icon:SetTexture("Interface\\Icons\\Spell_Frost_Frost")
-- this cuts off the border around the buff icon
self.barFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
self.barFrame.icon:SetDrawLayer("OVERLAY")
@ -675,6 +673,9 @@ function IceCustomCDBar.prototype:UpdateIcon()
end
if IceHUD.IceCore:IsInConfigMode() or self.moduleSettings.displayAuraIcon then
if not self.barFrame.icon:GetTexture() and IceHUD.IceCore:IsInConfigMode() then
self.barFrame.icon:SetTexture("Interface\\Icons\\Spell_Frost_Frost")
end
self.barFrame.icon:Show()
else
self.barFrame.icon:Hide()
@ -694,7 +695,10 @@ function IceCustomCDBar.prototype:UpdateItemUnitInventoryChanged(event, unit)
end
end
function IceCustomCDBar.prototype:UpdateCustomBarEvent()
function IceCustomCDBar.prototype:UpdateCustomBarEvent(event, unit)
if unit ~= self.unit then
return
end
if not self.moduleSettings.cooldownType or self.moduleSettings.cooldownType == COOLDOWN_TYPE_SPELL then
self:UpdateCustomBar()
end
@ -722,6 +726,8 @@ function IceCustomCDBar.prototype:UpdateCustomBar(fromUpdate)
else
self.cooldownEndTime = remaining + now
end
self:UpdateIcon()
end
if self.cooldownEndTime and self.cooldownEndTime >= now then
@ -796,7 +802,9 @@ function IceCustomCDBar.prototype:IsReady()
local checkSpell = self:GetSpellNameOrId(self.moduleSettings.cooldownToTrack)
if (IsUsableSpell(checkSpell)) then
if (not self.moduleSettings.bIgnoreRange and SpellHasRange(checkSpell)) or (self.moduleSettings.bOnlyShowWithTarget) then
if self.moduleSettings.bIgnoreRange and self.moduleSettings.bOnlyShowWithTarget then
is_ready = UnitExists("target") and 1 or nil
elseif (not self.moduleSettings.bIgnoreRange and SpellHasRange(checkSpell)) or (self.moduleSettings.bOnlyShowWithTarget) then
if (UnitExists("target") and (not SpellHasRange(checkSpell) or IsSpellInRange(checkSpell, "target") == 1))
or (not UnitExists("target") and not self.moduleSettings.bOnlyShowWithTarget and IsSpellInRange(checkSpell, "player")) then
is_ready = 1

View File

@ -122,7 +122,7 @@ function IceCustomCount.prototype:GetOptions()
self.moduleSettings.vpos = v
self:Redraw()
end,
min = -400,
min = -700,
max = 700,
step = 1,
disabled = function()

View File

@ -278,7 +278,6 @@ function IceCustomCounterBar.prototype:CreateFrame()
if not self.barFrame.icon then
self.barFrame.icon = self.masterFrame:CreateTexture(nil, "LOW")
self.barFrame.icon:SetTexture(DefaultAuraIcon)
self.barFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
self.barFrame.icon:SetDrawLayer("OVERLAY")
self.barFrame.icon:Hide()
@ -306,10 +305,6 @@ function IceCustomCounterBar.prototype:UpdateAuraIcon()
local auraIcon, _
_, _, auraIcon = GetSpellInfo(self.moduleSettings.auraName)
if auraIcon == nil then
auraIcon = "Interface\\Icons\\Spell_Frost_Frost"
end
self.barFrame.icon:SetTexture(auraIcon)
end
@ -319,6 +314,10 @@ function IceCustomCounterBar.prototype:UpdateCustomCount()
local percent = IceHUD:Clamp(1.0 * points / (max > 0 and max or 1), 0, 1)
if IceHUD.IceCore:IsInConfigMode() then
if not self.barFrame.icon:GetTexture() then
self.barFrame.icon:SetTexture(DefaultAuraIcon)
end
points = IceStackCounter_GetMaxCount(self)
percent = 1
self.barFrame.icon:Show()

View File

@ -107,7 +107,7 @@ function EclipseBar.prototype:CreateFrame()
end
function EclipseBar.prototype:CreateSolarBar()
self.solarBar = self:BarFactory(self.solarBar,"BACKGROUND", "ARTWORK")
self.solarBar = self:BarFactory(self.solarBar,"BACKGROUND", "ARTWORK", "Solar")
self:SetBarCoord(self.solarBar, 0.5, true)
self.solarBar.bar:SetVertexColor(self:GetColor("EclipseSolar", 1))

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

@ -112,4 +112,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

@ -255,7 +255,7 @@ function GlobalCoolDown.prototype:CreateFrame()
end
function GlobalCoolDown.prototype:CreateLagBar()
self.lagBar = self:BarFactory(self.lagBar, "LOW", "OVERLAY")
self.lagBar = self:BarFactory(self.lagBar, "LOW", "OVERLAY", "Lag")
local r, g, b = self:GetColor("CastLag")
if (self.settings.backgroundToggle) then
@ -291,4 +291,6 @@ function GlobalCoolDown.prototype:GetSpellId()
end
-- Load us up
IceHUD.GlobalCoolDown = GlobalCoolDown:new()
if not IceHUD.WowClassic then
IceHUD.GlobalCoolDown = GlobalCoolDown: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
@ -32,7 +32,7 @@ function HolyPower.prototype:init()
self.numericColor = "HolyPowerNumeric"
self.unitPower = SPELL_POWER_HOLY_POWER
self.minLevel = PALADINPOWERBAR_SHOW_LEVEL
if IceHUD.WowVer >= 70000 then
if IceHUD.WowVer >= 70000 and IceHUD.WowVer < 90000 then
self.requiredSpec = SPEC_PALADIN_RETRIBUTION
end
self.bTreatEmptyAsFull = true

View File

@ -280,8 +280,8 @@ function MirrorBarHandler.prototype:GetOptions()
type='range',
name = L["Bar vertical offset"],
desc = L["Adjust the vertical placement of this bar"],
min = -400,
max = 400,
min = -600,
max = 600,
step = 1,
get = function()
return self.moduleSettings.barVerticalOffset

View File

@ -42,18 +42,23 @@ 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")
if IceHUD.WowVer < 90000 then
self:RegisterEvent("UNIT_HEALTH_FREQUENT", "UpdateEvent")
end
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateEvent")
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
self:RegisterEvent("PLAYER_ENTERING_WORLD", "CheckVehicle")
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)
RegisterUnitWatch(self.frame)
@ -219,11 +224,16 @@ function PetHealth.prototype:ExitingVehicle(event, unit)
end
end
function PetHealth.prototype:CheckVehicle()
if UnitHasVehicleUI("player") then
self:EnteringVehicle(nil, "player", true)
else
self:ExitingVehicle(nil, "player")
function PetHealth.prototype:EnteringWorld()
self:TargetChanged()
self:Update(self.unit)
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,9 +86,11 @@ function PetMana.prototype:Enable(core)
self:RegisterEvent("UNIT_DISPLAYPOWER", "ManaType")
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
self:RegisterEvent("PLAYER_ENTERING_WORLD", "CheckVehicle")
if UnitHasVehicleUI then
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "EnteringVehicle")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
end
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
self:CheckPet()
self:ManaType(nil, self.unit)
@ -239,11 +241,16 @@ function PetMana.prototype:ExitingVehicle(event, unit)
end
end
function PetMana.prototype:CheckVehicle()
if UnitHasVehicleUI("player") then
self:EnteringVehicle(nil, "player", true)
else
self:ExitingVehicle(nil, "player")
function PetMana.prototype:EnteringWorld()
self:TargetChanged()
self:Update(self.unit)
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

@ -68,6 +68,9 @@ function PlayerHealth.prototype:Enable(core)
PlayerHealth.super.prototype.Enable(self, core)
self:RegisterEvent("UNIT_HEALTH", "UpdateEvent")
if IceHUD.WowVer < 90000 then
self:RegisterEvent("UNIT_HEALTH_FREQUENT", "UpdateEvent")
end
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateEvent")
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
@ -78,14 +81,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")
@ -95,8 +100,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)
@ -111,7 +118,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()
@ -927,7 +936,7 @@ function PlayerHealth.prototype:CreateBackground(redraw)
end
function PlayerHealth.prototype:CreateHealBar()
self.healFrame = self:BarFactory(self.healFrame, "LOW","BACKGROUND")
self.healFrame = self:BarFactory(self.healFrame, "LOW","BACKGROUND", "Heal")
self.healFrame.bar:SetVertexColor(self:GetColor("PlayerHealthHealAmount", self.alpha * self.moduleSettings.healAlpha))
@ -939,7 +948,7 @@ function PlayerHealth.prototype:CreateHealBar()
end
function PlayerHealth.prototype:CreateAbsorbBar()
self.absorbFrame = self:BarFactory(self.absorbFrame, "LOW","BACKGROUND")
self.absorbFrame = self:BarFactory(self.absorbFrame, "LOW","BACKGROUND", "Absorb")
self.absorbFrame.bar:SetVertexColor(self:GetColor("PlayerHealthAbsorbAmount", self.alpha * self.moduleSettings.absorbAlpha))
@ -994,10 +1003,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
@ -1160,7 +1171,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
@ -383,7 +387,7 @@ function PlayerMana.prototype:Update(unit, powertype)
if not IceHUD.IceCore:ShouldUseDogTags() then
-- extra hack for whiny rogues (are there other kind?)
local displayPercentage = self.manaPercentage
if (self.manaType == SPELL_POWER_ENERGY) then
if self.manaType == SPELL_POWER_ENERGY or self.manaType == SPELL_POWER_FOCUS then
displayPercentage = self.mana
else
displayPercentage = math.floor(displayPercentage * 100)
@ -415,17 +419,17 @@ function PlayerMana.prototype:UpdateEnergy(event, unit)
return
end
self.previousEnergy = UnitPower(self.unit, UnitPowerType(self.unit))
if IceHUD.WowVer < 40000 then
self:Update(unit)
end
if self:ShouldUseTicker() and
((not (self.previousEnergy) or (self.previousEnergy <= UnitPower(self.unit, UnitPowerType(self.unit)))) and
((not (self.previousEnergy) or (self.previousEnergy < UnitPower(self.unit, UnitPowerType(self.unit)))) and
(self.moduleSettings.tickerEnabled) and self.manaType == SPELL_POWER_ENERGY) then
self.tickStart = GetTime()
self.tickerFrame:Show()
end
self.previousEnergy = UnitPower(self.unit, UnitPowerType(self.unit))
if IceHUD.WowVer < 40000 then
self:Update(unit)
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

@ -9,6 +9,8 @@ local maxComboPoints = 5
local rtbEndTime = 0
local rtbDuration = 0
local rtbCount = 0
local sixComboPointsTalentID = 19240
local behaviorDependsOnComboPoints = IceHUD.WowVer < 90000
local CurrMaxRtBDuration = 0
local PotentialRtBDuration = 0
@ -20,7 +22,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
@ -33,12 +35,14 @@ function RollTheBones.prototype:init()
self.moduleSettings.shouldAnimate = false
self:SetDefaultColor("RollTheBones", 1, 0.6, 0.2)
self:SetDefaultColor("RollTheBones2", 0.75, 1, 0.2)
self:SetDefaultColor("RollTheBones3", 0.4, 1, 0.2)
self:SetDefaultColor("RollTheBones4", 0.4, 1, 0.2)
self:SetDefaultColor("RollTheBones5", 0.1, 1, 0.7)
self:SetDefaultColor("RollTheBones6", 0.1, 1, 0.7)
self:SetDefaultColor("RollTheBonesPotential", 1, 1, 1)
if behaviorDependsOnComboPoints then
self:SetDefaultColor("RollTheBones2", 0.75, 1, 0.2)
self:SetDefaultColor("RollTheBones3", 0.4, 1, 0.2)
self:SetDefaultColor("RollTheBones4", 0.4, 1, 0.2)
self:SetDefaultColor("RollTheBones5", 0.1, 1, 0.7)
self:SetDefaultColor("RollTheBones6", 0.1, 1, 0.7)
self:SetDefaultColor("RollTheBonesPotential", 1, 1, 1)
end
self.bTreatEmptyAsFull = true
end
@ -50,7 +54,10 @@ function RollTheBones.prototype:Enable(core)
RollTheBones.super.prototype.Enable(self, core)
self:RegisterEvent("UNIT_AURA", "UpdateRollTheBones")
self:RegisterEvent(IceHUD.UnitPowerEvent, "ComboPointsChanged")
if behaviorDependsOnComboPoints then
self:RegisterEvent(IceHUD.UnitPowerEvent, "ComboPointsChanged")
end
if not self.moduleSettings.alwaysFullAlpha then
self:Show(false)
@ -106,41 +113,60 @@ function RollTheBones.prototype:GetOptions()
opts["textSettings"].args["upperTextString"]["desc"] = "The text to display under this bar. # will be replaced with the number of Roll the Bones seconds remaining."
opts["textSettings"].args["upperTextString"].hidden = false
opts["showAsPercentOfMax"] =
{
type = 'toggle',
name = L["Show bar as % of maximum"],
desc = L["If this is checked, then the RtB buff time shows as a percent of the maximum attainable (taking set bonuses and talents into account). Otherwise, the bar always goes from full to empty when applying RtB no matter the duration."],
get = function()
return self.moduleSettings.showAsPercentOfMax
end,
set = function(info, v)
self.moduleSettings.showAsPercentOfMax = v
end,
disabled = function()
return not self.moduleSettings.enabled
end
}
if behaviorDependsOnComboPoints then
opts["showAsPercentOfMax"] =
{
type = 'toggle',
name = L["Show bar as % of maximum"],
desc = L["If this is checked, then the RtB buff time shows as a percent of the maximum attainable (taking set bonuses and talents into account). Otherwise, the bar always goes from full to empty when applying RtB no matter the duration."],
get = function()
return self.moduleSettings.showAsPercentOfMax
end,
set = function(info, v)
self.moduleSettings.showAsPercentOfMax = v
end,
disabled = function()
return not self.moduleSettings.enabled
end
}
opts["durationAlpha"] =
{
type = "range",
name = L["Potential RtB time bar alpha"],
desc = L["What alpha value to use for the bar that displays how long your RtB will last if you activate it. (This gets multiplied by the bar's current alpha to stay in line with the bar on top of it)"],
min = 0,
max = 100,
step = 5,
get = function()
return self.moduleSettings.durationAlpha * 100
end,
set = function(info, v)
self.moduleSettings.durationAlpha = v / 100.0
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end
}
opts["durationAlpha"] =
{
type = "range",
name = L["Potential RtB time bar alpha"],
desc = L["What alpha value to use for the bar that displays how long your RtB will last if you activate it. (This gets multiplied by the bar's current alpha to stay in line with the bar on top of it)"],
min = 0,
max = 100,
step = 5,
get = function()
return self.moduleSettings.durationAlpha * 100
end,
set = function(info, v)
self.moduleSettings.durationAlpha = v / 100.0
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end
}
opts["bUseMultipleBuffColors"] =
{
type = 'toggle',
name = L["Use multiple buff colors"],
desc = L["If this is checked, then the bar uses different colors depending on how many RtB buffs you have"],
get = function()
return self.moduleSettings.bUseMultipleBuffColors
end,
set = function(info, v)
self.moduleSettings.bUseMultipleBuffColors = v
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
}
end
opts["bShowWithNoTarget"] =
{
@ -159,23 +185,6 @@ function RollTheBones.prototype:GetOptions()
end,
}
opts["bUseMultipleBuffColors"] =
{
type = 'toggle',
name = L["Use multiple buff colors"],
desc = L["If this is checked, then the bar uses different colors depending on how many RtB buffs you have"],
get = function()
return self.moduleSettings.bUseMultipleBuffColors
end,
set = function(info, v)
self.moduleSettings.bUseMultipleBuffColors = v
self:Redraw()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
}
return opts
end
@ -186,7 +195,11 @@ function RollTheBones.prototype:CreateFrame()
end
function RollTheBones.prototype:CreateDurationBar()
self.durationFrame = self:BarFactory(self.durationFrame, "BACKGROUND","ARTWORK")
if not behaviorDependsOnComboPoints then
return
end
self.durationFrame = self:BarFactory(self.durationFrame, "BACKGROUND","ARTWORK", "Duration")
-- Rokiyo: Do we need to call this here?
self.CurrScale = 0
@ -204,7 +217,9 @@ end
function RollTheBones.prototype:RotateHorizontal()
RollTheBones.super.prototype.RotateHorizontal(self)
self:RotateFrame(self.durationFrame)
if self.durationFrame then
self:RotateFrame(self.durationFrame)
end
end
function RollTheBones.prototype:ResetRotation()
@ -308,7 +323,7 @@ function RollTheBones.prototype:UpdateRollTheBones(event, unit, fromUpdate)
if not remaining then
remaining = rtbEndTime - now
end
local denominator = (self.moduleSettings.showAsPercentOfMax and CurrMaxRtBDuration or rtbDuration)
local denominator = ((self.moduleSettings.showAsPercentOfMax and behaviorDependsOnComboPoints) and CurrMaxRtBDuration or rtbDuration)
self:UpdateBar(denominator ~= 0 and remaining / denominator or 0, self:GetColorName(rtbCount))
else
self:UpdateBar(0, "RollTheBones")
@ -326,13 +341,13 @@ function RollTheBones.prototype:UpdateRollTheBones(event, unit, fromUpdate)
-- somewhat redundant, but we also need to check potential remaining time
if (remaining ~= nil) or PotentialRtBDuration > 0 then
local potText = " (" .. PotentialRtBDuration .. ")"
local potText = behaviorDependsOnComboPoints and " (" .. PotentialRtBDuration .. ")" or ""
self:SetBottomText1(self.moduleSettings.upperText .. tostring(floor(remaining or 0)) .. (self.moduleSettings.durationAlpha ~= 0 and potText or ""))
end
end
function RollTheBones.prototype:GetColorName(count)
if self.moduleSettings.bUseMultipleBuffColors and count >= 2 then
if behaviorDependsOnComboPoints and self.moduleSettings.bUseMultipleBuffColors and count >= 2 then
return "RollTheBones"..count
else
return "RollTheBones"
@ -352,13 +367,17 @@ function RollTheBones.prototype:TargetChanged()
end
function RollTheBones.prototype:UpdateDurationBar(event, unit)
if not self.durationFrame then
return
end
if unit and unit ~= self.unit then
return
end
local points = RTBGetComboPoints(self.unit)
-- check for Deeper Stratagem
local _, _, _, DeeperStratagem = GetTalentInfo(3, 1, 1)
local _, _, _, DeeperStratagem = GetTalentInfoByID(sixComboPointsTalentID, GetActiveSpecGroup())
if DeeperStratagem then
-- first, set the cached upper limit of RtB duration

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
@ -282,7 +282,7 @@ function Runes.prototype:Enable(core)
if IceHUD.WowVer >= 70300 then
self:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED", "UpdateRuneColors")
end
self:RegisterEvent("PLAYER_ENTERING_WORLD", "ResetRuneAvailability")
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
self:RegisterEvent("UNIT_MAXPOWER", "CheckMaxNumRunes")
if (self.moduleSettings.hideBlizz) then
@ -290,6 +290,11 @@ function Runes.prototype:Enable(core)
end
end
function Runes.prototype:EnteringWorld()
self:TargetChanged()
self:ResetRuneAvailability()
end
function Runes.prototype:Disable(core)
Runes.super.prototype.Disable(self, core)

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
@ -67,7 +67,7 @@ function ShardCounter.prototype:Enable(core)
if IceHUD.WowVer >= 70000 then
self.numRunes = UnitPowerMax(self.unit, self.unitPower)
if GetSpecialization() == SPEC_WARLOCK_DESTRUCTION then
if IceHUD.WowVer >= 80000 or GetSpecialization() == SPEC_WARLOCK_DESTRUCTION then
self.shouldShowUnmodified = true
self.numericFormat = "%.1f"
self.round = floor
@ -107,6 +107,7 @@ function ShardCounter.prototype:UpdateRunePower(event, arg1, arg2)
end
if event == "PLAYER_ENTERING_WORLD" and IceHUD.WowVer < 70000 then
self:TargetChanged()
self:UpdatePowerType(event)
end

View File

@ -20,6 +20,7 @@ local impSndBonusPerRank = 0.25
local maxComboPoints = 5
local sndEndTime = 0
local sndDuration = 0
local sixComboPointsTalentID = 19240
local CurrMaxSnDDuration = 0
local PotentialSnDDuration = 0
@ -28,6 +29,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,12 +61,17 @@ 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")
end
if IceHUD.WowVer >= 70000 then
self:RegisterEvent("PLAYER_TALENT_UPDATE", "CheckMaxComboPoints")
self:CheckMaxComboPoints()
end
if not self.moduleSettings.alwaysFullAlpha then
self:Show(false)
else
@ -70,6 +81,11 @@ function SliceAndDice.prototype:Enable(core)
self:SetBottomText1("")
end
function SliceAndDice.prototype:CheckMaxComboPoints()
local talentID, name, texture, selected, available, spellID, unknown, row, column, known, grantedByAura = GetTalentInfoByID(sixComboPointsTalentID, GetActiveSpecGroup())
maxComboPoints = selected and 6 or 5
end
function SliceAndDice.prototype:Disable(core)
SliceAndDice.super.prototype.Disable(self, core)
end
@ -177,7 +193,7 @@ function SliceAndDice.prototype:CreateFrame()
end
function SliceAndDice.prototype:CreateDurationBar()
self.durationFrame = self:BarFactory(self.durationFrame, "BACKGROUND","ARTWORK")
self.durationFrame = self:BarFactory(self.durationFrame, "BACKGROUND","ARTWORK", "Duration")
-- Rokiyo: Do we need to call this here?
self.CurrScale = 0
@ -211,7 +227,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 +243,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 +264,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")
@ -265,6 +281,10 @@ local function HasSpell(id)
end
local function ShouldHide()
if IceHUD.WowVer >= 90000 then
return false
end
return --[[(IceHUD.WowVer < 70000 or not IsSpellKnown(193316)) and]] not IsPlayerSpell(5171) -- IsSpellKnown returns incorrect info for SnD in 7.0
-- commented code is here in case we decide we'd like to use this module for Roll the Bones.
-- if we do, though, the "active" check gets way more complicated since it can activate any number of 6 different abilities
@ -280,7 +300,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 +424,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 +488,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

@ -137,7 +137,7 @@ function StaggerBar.prototype:CreateFrame()
end
function StaggerBar.prototype:CreateTimerBar()
self.timerFrame = self:BarFactory(self.timerFrame, "MEDIUM","ARTWORK")
self.timerFrame = self:BarFactory(self.timerFrame, "MEDIUM","ARTWORK", "Timer")
self.CurrScale = 0
@ -157,6 +157,7 @@ function StaggerBar.prototype:UpdateShown()
end
function StaggerBar.prototype:PLAYER_ENTERING_WORLD()
self:TargetChanged()
self:UpdateStaggerBar()
end
@ -166,7 +167,7 @@ end
function StaggerBar.prototype:GetDebuffInfo()
if IceHUD.WowVer >= 70000 then
self.amount = UnitStagger(self.unit)
self.amount = UnitStagger(self.unit) or 0
self.staggerLevel = 1
local healthMax = UnitHealthMax(self.unit)
@ -189,8 +190,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

@ -53,6 +53,8 @@ local StunCCList = {
105593,
-- Remorseless Winter
115001,
-- Between the Eyes
199804,
}
local IncapacitateCCList = {
@ -78,6 +80,14 @@ local IncapacitateCCList = {
28271,
-- Polymorph: Penguin
59634,
-- Polymorph: Monkey
161354,
-- Polymorph: Polar Bear Cub
120137,
-- Polymorph: Porcupine
120140,
-- Polymorph: Direhorn
162625,
-- Hibernate
2637,
-- Freezing Trap Effect
@ -113,6 +123,16 @@ local FearCCList = {
5246,
-- Hex
51514,
-- Hex: Compy
210873,
-- Hex: Wicker Mongrel
277784,
-- Hex: Zandalari Tendonripper
277778,
-- Hex: Spider
211004,
-- Hex: Skeletal Hatchling
269352,
-- Scare Beast
1513,
}
@ -316,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")
@ -340,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

@ -15,8 +15,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
@ -63,7 +65,12 @@ function TargetCast.prototype:GetDefaultSettings()
settings["side"] = IceCore.Side.Right
settings["offset"] = 3
settings["flashInstants"] = "Never"
settings["flashFailures"] = "Never"
-- Fulzamoth 2019-09-27 : let the flash handler work if in Classic and LibClassicCasterino exists
if LibClassicCasterino then
settings["flashFailures"] = ""
else
settings["flashFailures"] = "Never"
end
settings["shouldAnimate"] = false
settings["hideAnimationSettings"] = true
settings["usesDogTagStrings"] = false
@ -82,20 +89,24 @@ function TargetCast.prototype:TargetChanged(unit)
return
end
local spell = UnitCastingInfo(self.unit)
local notInterruptible = select(IceHUD.WowVer < 80000 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 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()
@ -169,15 +180,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
@ -188,5 +202,8 @@ end
-------------------------------------------------------------------------------
-- Fulzamoth 2019-09-27 : load in Classic if LibClassicCasterino exists
-- Load us up
IceHUD.TargetCast = TargetCast:new()
if not IceHUD.WowClassic or LibClassicCasterino then
IceHUD.TargetCast = TargetCast:new()
end

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
@ -840,21 +842,46 @@ function IceTargetHealth.prototype:Update(unit)
self:UpdateBar(self.healthPercentage, self.color)
if not IceHUD.IceCore:ShouldUseDogTags() and self.frame:IsVisible() then
self:SetBottomText1(math.floor(self.healthPercentage * 100))
if IsAddOnLoaded("RealMobHealth") then
if not IceHUD.IceCore:ShouldUseDogTags() and self.frame:IsVisible() then
self:SetBottomText1(math.floor(self.healthPercentage * 100))
if self.moduleSettings.abbreviateHealth then
self.health = self:Round(self.health)
self.maxHealth = self:Round(self.maxHealth)
end
if self.moduleSettings.abbreviateHealth then
if RealMobHealth.UnitHasHealthData(unit) then
self.health, self.maxHealth = RealMobHealth.GetUnitHealth(unit)
end
self.health = self:Round(self.health)
self.maxHealth = self:Round(self.maxHealth)
end
if (self.maxHealth ~= 100) then
self:SetBottomText2(self:GetFormattedText(self.health, self.maxHealth), self.color)
else
self:SetBottomText2()
if RealMobHealth.UnitHasHealthData(unit) or (self.maxHealth ~= 100) then
if RealMobHealth.UnitHasHealthData(unit) then
self.health, self.maxHealth = RealMobHealth.GetUnitHealth(unit)
self:SetBottomText2(self:GetFormattedText(self.health, self.maxHealth), self.color)
else
self:SetBottomText2(self:GetFormattedText(self.health, self.maxHealth), self.color)
end
else
self:SetBottomText2()
end
end
else
if not IceHUD.IceCore:ShouldUseDogTags() and self.frame:IsVisible() then
self:SetBottomText1(math.floor(self.healthPercentage * 100))
if self.moduleSettings.abbreviateHealth then
self.health = self:Round(self.health)
self.maxHealth = self:Round(self.maxHealth)
end
if (self.maxHealth ~= 100) then
self:SetBottomText2(self:GetFormattedText(self.health, self.maxHealth), self.color)
else
self:SetBottomText2()
end
end
end
self:CheckPvP()
self:CheckPartyRole()
self:SetIconAlpha()

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
@ -12,6 +12,10 @@ local internal = "internal"
local ValidAnchors = { "TOPLEFT", "TOPRIGHT", "BOTTOMLEFT", "BOTTOMRIGHT", "CENTER" }
---- Fulzamoth - 2019-09-04 : support for cooldowns on target buffs/debuffs (classic)
local LibClassicDurations = LibStub("LibClassicDurations", 1)
---- end change by Fulzamoth
IceTargetInfo.prototype.unit = "target"
IceTargetInfo.prototype.buffSize = nil
@ -129,7 +133,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,10 +1414,27 @@ 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
---- Fulzamoth - 2019-09-04 : support for cooldowns on target buffs/debuffs (classic)
local spellID
---- end change by Fulzamoth
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 ""))
---- Fulzamoth - 2019-09-04 : support for cooldowns on target buffs/debuffs (classic)
-- 1. in addition to other info, get the spellID for for the (de)buff
name, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, _, spellID = UnitAura(self.unit, i, reaction .. (filter and "|PLAYER" or ""))
if duration == 0 and LibClassicDurations then
-- 2. if no duration defined for the (de)buff, look up the spell in LibClassicDurations
local classicDuration, classicExpirationTime = LibClassicDurations:GetAuraDurationByUnit(self.unit, spellID, caster)
-- 3. set the duration if we found one.
if classicDuration then
duration = classicDuration
expirationTime = classicExpirationTime
end
end
---- end change by Fulzamoth
end
local isFromMe = (unitCaster == "player")
@ -1584,7 +1605,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 +1676,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
@ -156,7 +156,7 @@ function IceTargetMana.prototype:Update(unit)
if not IceHUD.IceCore:ShouldUseDogTags() then
self:SetBottomText1(math.floor(self.manaPercentage * 100))
self:SetBottomText2(self:GetFormattedText(self.mana, self.maxMana), color)
self:SetBottomText2(self:GetFormattedText(self.mana, self.maxMana), self.color)
end
end

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

@ -58,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()
@ -144,4 +148,6 @@ end
-- Load us up
IceHUD.TargetTargetCast = TargetTargetCast:new()
if not IceHUD.WowClassic then
IceHUD.TargetTargetCast = TargetTargetCast:new()
end

View File

@ -16,13 +16,20 @@ 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
MAX_NUM_RAID_MEMBERS = MAX_RAID_MEMBERS
end
local UnitGroupRolesAssigned = UnitGroupRolesAssigned
if not UnitGroupRolesAssigned then
UnitGroupRolesAssigned = function()
return "NONE"
end
end
local MAX_NUM_RAID_MEMBERS = 40
local MAX_NUM_PARTY_MEMBERS = 5
@ -224,7 +231,7 @@ end
-- create the aggro range indicator bar
function IceThreat.prototype:CreateAggroBar()
self.aggroBar = self:BarFactory(self.aggroBar, "BACKGROUND","ARTWORK")
self.aggroBar = self:BarFactory(self.aggroBar, "BACKGROUND","ARTWORK", "Aggro")
local r, g, b = self:GetColor("ThreatPullAggro")
if (self.settings.backgroundToggle) then
@ -236,7 +243,7 @@ function IceThreat.prototype:CreateAggroBar()
end
function IceThreat.prototype:CreateSecondThreatBar()
self.secondThreatBar = self:BarFactory(self.secondThreatBar, "MEDIUM", "OVERLAY")
self.secondThreatBar = self:BarFactory(self.secondThreatBar, "MEDIUM", "OVERLAY", "SecondThreat")
self.secondThreatBar.bar:SetVertexColor(self:GetColor("ThreatSecondPlace", self.alpha * self.moduleSettings.secondPlaceThreatAlpha))
@ -468,4 +475,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
@ -215,7 +215,7 @@ function Totems.prototype:Enable(core)
Totems.super.prototype.Enable(self, core)
self:RegisterEvent("PLAYER_TOTEM_UPDATE", "UpdateTotem");
self:RegisterEvent("PLAYER_ENTERING_WORLD", "ResetTotemAvailability");
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld");
if self.moduleSettings.hideBlizz then
self:HideBlizz()
@ -230,6 +230,11 @@ function Totems.prototype:Disable(core)
end
end
function Totems.prototype:EnteringWorld()
self:TargetChanged()
self:ResetTotemAvailability()
end
function Totems.prototype:ResetTotemAvailability()
for i=1, self.numTotems do
self:UpdateTotem(nil, i)
@ -237,7 +242,7 @@ function Totems.prototype:ResetTotemAvailability()
end
function Totems.prototype:UpdateTotem(event, totem, ...)
if not totem or tonumber(totem) ~= totem or totem < 1 or totem > self.numTotems then
if not totem or tonumber(totem) ~= totem or totem < 1 or totem > self.numTotems or not GetTotemInfo then
return
end
local thisTotemName = self.totemNames[TOTEM_PRIORITIES[totem]]
@ -247,6 +252,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 +299,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()
@ -326,8 +336,7 @@ function Totems.prototype:CheckCombat()
end
function Totems.prototype:CreateTotem(i, name)
-- whiskey tango foxtrot?! apparently arenas can cause this? I can't test out the real cause myself, so putting in a stopgap for now
if not name then
if not name or not GetTotemInfo then
return
end
local haveTotem, name, startTime, duration, icon = GetTotemInfo(i)
@ -354,7 +363,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 +412,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

View File

@ -1,11 +1,13 @@
# IceHUD
IceHUD is a highly configurable and customizable HUD addon in the spirit of DHUD, MetaHUD, and others designed to keep your focus in the center of the screen where your character is.
## **What it is**
### **What it is**
* Player and target health and mana bars, casting and mirror bars, pet health and mana bars, druid mana bar in forms, extensive target info, ToT display, and much more
* Player and target health and mana bars, casting and mirror bars, pet health and mana bars, druid mana bar in forms, extensive target info, ToT display, and much more, in a vertically-oriented heads-up display.
## **Short feature list**
### **Short feature list**
* Lots of different bar shapes and patterns to make the HUD look like you want
* Class-specific modules such as combo point counters, Slice'n'dice timers, druid mana trackers, Eclipse bar, Holy Power monitoring, Warlock shard tracking, and more
* Target-of-target bars, Crowd Control timers, Range Finders, Threat meters, and plenty of other helpful modules
@ -15,13 +17,12 @@ IceHUD is a highly configurable and customizable HUD addon in the spirit of DHUD
* Fully customizable bars and counters capable of tracking buff/debuff applications on any unit, spell/ability cooldowns, and the health/mana of any unit you specify. The custom health/mana bars will even work with crazy unit specifications like "focustargettargetfocustarget" if you want!
* Highly configurable (can totally re-arrange all bars, change text display, etc.)
## **Slash commands**
### **Slash commands**
* /icehud - opens the configuration UI to tweak any setting
* /icehudCL - command-line access to tweak IceHUD settings (for use with macros, etc.)
# **Frequently Asked Questions**
## **Frequently Asked Questions**
1. **How do I hide the default Blizzard player, target unit frames and party unit frames?**
Type /icehud, expand the "Module Settings" section, click "Player Health" or "Target Health," and check "Hide Blizzard Frame" and/or "Hide Blizzard Party Frame". (NOTE: before version 1.3.7, the player/target unitframes were hidden by default. Follow the same steps to enable them if desired)
@ -77,5 +78,10 @@ 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.
1. **Why do buff/debuff timers not work in Classic?**
The Classic game client doesn't provide this information to addons because it wasn't a feature when the game first released. You can install the LibClassicDurations addon to enable support, but it's a best guess and not completely accurate.
See [here](https://www.wowace.com/projects/ice-hud/issues/113) for a user-created guide to creating new IceHUD textures.

7
this_version.md Normal file
View File

@ -0,0 +1,7 @@
# Changelog
v1.13.0:
- Made compatible with 9.0
- Improved frame naming/debuggability
- Updated TOC for 9.0