Compare commits

...

170 Commits

Author SHA1 Message Date
cac0deeb3c Update license with current year 2022-10-28 22:48:37 -05:00
e951d40b12 Don't package file just meant to help packager 2022-10-28 22:48:31 -05:00
46883e355b Fix RollTheBones not showing immediately when cast
I guess UNIT_AURA now provides a third argument that it wasn't before. So instead of relying on a third argument, just override the event name to something we control and key off that for avoiding updates.
2022-10-28 22:44:38 -05:00
004df582ef Update changelog 2022-10-27 20:34:19 -05:00
b8cf6e90b0 Fix error on 10.0
I guess this frame is gone. I don't remember why this was necessary.
2022-10-27 20:32:47 -05:00
d0c06c7b55 Add sponsor file 2022-10-27 09:09:50 -05:00
8858459b10 Disable Runes Hide Blizzard option
This is no longer functional in 10.0 and I can't find an easy replacement, so I'm removing the functionality for 10.0+ for now. The entire player frame can still be hidden, which also hides the runes, so I don't feel like this is super critical to have.

Fixes #26
2022-10-27 08:56:53 -05:00
86e40187a2 Update Party hide feature for 10.0 compatibility 2022-10-25 22:42:46 -05:00
62bcc17ed6 Increase TOC to 10.0 2022-10-25 21:43:46 -05:00
52c9b51e8d Temp fix for error in 10.0
I need to find the new way to disable party frames, but this gets the addon loaded for now.
2022-10-25 21:43:13 -05:00
aa03a0b332 Add support for max power changing
Evokers can spec into an additional Essence, so we need to handle the power counter increasing/decreasing. This was a fundamental change to the class power counter, so I'm sure something else broke somewhere. A casual glance at other classes/specs seems fine, though...
2022-10-25 21:43:05 -05:00
3017b5dd18 Rename Anima Charged to Charged
Charged combo points are still a thing, but they're no longer called "Anima-charged" or relate to Kyrian.
2022-10-25 21:42:32 -05:00
1f54f7d41d Use new player castbar frame name 2022-10-25 21:42:13 -05:00
5b73d3b35f Update to correct LibDogTag url 2022-10-04 22:36:41 -05:00
decb0017f3 Update changelog 2022-10-04 22:33:35 -05:00
a32b75bf44 Update to latest packager example 2022-09-22 11:01:21 -05:00
6c506579be Add Wago packaging support 2022-09-22 10:46:11 -05:00
701fb1373f Fix Runes disappearing for DK on Wrath
MaxPower events fire, but I guess only Legion+ actually returns rune counts from this function. On Wrath it always returns 0, so the CheckMaxNumRunes logic was hiding all runes.
2022-09-20 14:27:31 -05:00
20d26d8f5e Update changelog for release 2022-09-19 10:21:41 -05:00
5a41d9a7f4 Fix ShadowOrbs causing priests to freeze/hang on login
I would still like to find a way to feature-flag this instead of WowVer-flag it, but it's not super important for now.
2022-09-19 10:21:02 -05:00
18d827965c Update changelog 2022-09-18 23:16:04 -05:00
c2183f99a0 Add missing feature flag definition 2022-09-18 23:07:07 -05:00
7ceb70737a Fix combo points display in Classic Era 2022-09-18 22:57:01 -05:00
faa3d326aa Replace WowVer checks in class power counters 2022-09-18 22:43:04 -05:00
9fc90551e2 Fix Charged combo points feature flag 2022-09-18 22:35:19 -05:00
0af47119e3 Continue replacement of WowVer checks 2022-09-18 21:49:53 -05:00
955fa6efdc Continue replacement of WowVer checks 2022-09-18 17:54:35 -05:00
41ae17ba9a Continue replacement of WowVer checks 2022-09-18 17:50:37 -05:00
5bc1f04504 Remove HolyPower reference from most power modules 2022-09-18 15:37:01 -05:00
09e1832fbe Fix more invalid texture layers 2022-09-18 15:36:45 -05:00
7c3fc54d26 Fix invalid texture layer
This is an error in 10.0 and was wrong before that.
2022-09-18 15:36:34 -05:00
8972f7eed5 Fix MaxPower event flag
I'm not sure how this got set the way it was...the event definitely exists in > 8.0...
2022-09-18 15:36:06 -05:00
9e68edbc43 Detect SnD max changing more reliably 2022-09-18 15:34:36 -05:00
a259db6b8a Use UnitPowerMax where available 2022-09-18 15:34:27 -05:00
d10586d477 More culling of WowVer checks 2022-09-18 13:33:51 -05:00
c804ba178b Convert a few more checks into feature flags 2022-09-18 08:30:06 -05:00
f04c5db493 Re-enable dev-only profile export/import
Exporting works pretty well, but importing is rough (mostly because error messaging isn't quite in place, and it's not obvious that you have to close the window to execute the import). I found a generic json serializer, decided to adapt it to WoW, and it seems to work.

But anyway, I saw this code sitting around and figured it wouldn't take too much work to get it in working order. I was mostly right.
2022-09-02 21:44:12 -05:00
1de917223f Use new Classic expansion checks where available 2022-09-02 20:48:10 -05:00
fa064dc866 Update changelogs 2022-09-02 14:35:27 -05:00
ee72cd1f33 Add feature flag for UnitGroupRolesAssigned 2022-09-02 14:31:51 -05:00
777cf01174 Add feature flag for Heal Prediction
And turn it on for Wrath Classic, because apparently it works there.
2022-09-02 14:27:33 -05:00
97e81018c7 Update for Wrath Classic (non-BCC pre-patch)
Apparently in full-blown Wrath classic, post-BCC-pre-patch, there's a new WOW_PROJECT constant that needs to be used.
2022-09-02 14:26:54 -05:00
b65909c570 Wrath updates for Paladin GCD, Rogue SnD 2022-08-30 22:25:16 -05:00
b33a82622f Update changelogs 2022-08-30 22:03:46 -05:00
96a8fb2c3d Bump TOC for retail 2022-08-30 22:01:00 -05:00
6c623d6965 Initial Wrath-Classic compatibility
Briefly fought a training dummy with a Death Knight and a Shaman. I'm sure stuff like Slice-and-dice will need attention for talents moving around and such.
2022-08-30 21:59:58 -05:00
d31872512e Add support for blocked submenu options
Some menus, such as when targeting other players, use mixins which are themselves menus. We have to dive down one more layer to resolve those. The official UI source does this submenu thing (as opposed to recursion) so this should exactly mimic how the base game now works.
2022-06-06 09:02:43 -05:00
d424afdab1 Rework blocked menu options for 9.2.5
Since 9.2.5 completely re-worked UnitPopupMenus, IceHUD's "Set Focus" right-click menu option overrides were broken. This restores the override so that it can still suppress the tainted functionality.

Additionally, it turns out that having Clique installed replaces this entire thing somehow and makes Set Focus et al function (with IceHUD's ClickCastFrames registration). I don't know what that magic is about, but none of this munging happens and the tainted paths work fine. Interesting.

Fixes wowace ticket #319
2022-06-05 23:30:09 -05:00
9500bdf393 Fix error on BCC
Fixes #21
2022-06-01 16:26:12 -05:00
6325ed1ade Fix changelogs
This is why Unreleased is used instead...
2022-06-01 08:31:05 -05:00
a4c44a5809 Update TOC 2022-06-01 08:30:21 -05:00
82db70969a Remove UnitPopupButtons usage
I need to find a way to reintroduce this, but Blizzard's new method of building these frames doesn't look like it's going to be particularly easy. This stops error popups on 9.2.5
2022-06-01 08:29:39 -05:00
47931922bd Fix target health updating infrequently on Classic 2022-05-02 12:22:07 -05:00
af74c9e3fe Update changelog 2022-03-28 10:30:30 -05:00
611f37a1f3 Add reported missing nil check
Fixes #20 (github)
2022-03-25 21:30:54 -05:00
5d8b83e5ef Update changelog 2022-03-24 11:54:20 -05:00
53fdb48b05 Fix reported TBC issue of target health updates
For some reason, on TBC classic target health is not updating frequently. I waded through the official TBC source code, and it looks like if predictedHealth is enabled (which it is by default), then the default UI uses an OnUpdate handler to update the target's health bar. So now I'm doing the same.
2022-03-24 11:51:58 -05:00
b64294ca11 Minor optimization for ZM puzzle detection
COMBAT_LOG_EVENT_UNFILTERED is a spam-fest, so let's only subscribe to it when we absolutely have to. This could arguably by done entirely in UNIT_AURA, but since we don't know for sure that a given UNIT_AURA event was the removal of a buff, there is a potential problem with trying to detect exactly when the puzzle session was finished. This code can potentially mis-detect puzzle starting, or hide the addon again when it's already hidden, but there shouldn't be an issue in practice. If this turns out to be problematic, I will roll back to the previous method.
2022-03-23 23:07:20 -05:00
0785265feb Convenience method for looking for any buff from a list 2022-03-23 23:04:00 -05:00
4007f1258b Fix whitespace 2022-03-23 11:40:12 -05:00
c7c92d468e Update changelog 2022-03-22 22:59:38 -05:00
eee20f17b4 Change method of hiding the target frame
See 51e2debc4d for the PlayerFrame version of this (and reasoning for this)
2022-03-22 22:57:36 -05:00
0aa584d81a Hide IceHUD during Zereth Mortis puzzles 2022-03-22 22:56:57 -05:00
51e2debc4d Change method of hiding the player frame
This existing method worked fine for many years, but seems to have become inadequate in 9.2, likely due to this change that's restoring player frame visibility sometimes: 20f786e45b

Fixes #19 (Github)
2022-03-22 15:58:10 -05:00
d48ae9b12a Update TOCs 2022-03-22 08:25:50 -05:00
83028c159f Prep for release 2022-01-28 11:22:18 -06:00
a8a3da753e Update TOC for BCC, changelog 2022-01-28 11:18:32 -06:00
9e77fa6831 fix totem bar dismissal (#18)
* fix totem bar dismissal

* limit insecure DestroyTotem fix to Classic/TBC

* fix fussy commit

Co-authored-by: Wiktor Ozimek <wiktor.ozimek@gmail.com>
2021-11-24 13:25:10 -06:00
e4919fb1fe Update TOCs 2021-11-11 13:00:39 -06:00
724a3001ed Prep for release 2021-10-14 19:55:56 -05:00
8226679ccd Update TOC for Classic 1.14.0 2021-10-13 22:15:21 -05:00
2c0b3d5f6f Update changelog 2021-10-12 21:22:51 -05:00
a08c2455c6 Support multiple anima-charged combo points
#16
2021-10-12 21:11:39 -05:00
8868b16785 Fix FocusMana event registration on Classic builds
Thanks to Lethay's comments on WowAce.
2021-09-25 09:34:44 -05:00
fc009492cb Update TOC for BC-Classic and Classic
WowAce ticket 317
2021-09-10 14:08:45 -05:00
e2ef8e6cb1 Rename closure variable to avoid shadowing a global/implicit var 2021-09-05 09:35:27 -05:00
da5498d1a2 Fix leaking variable 2021-09-05 09:33:46 -05:00
e8c8172298 Update changelog 2021-09-05 09:32:16 -05:00
345d12263c Add license 2021-09-01 09:53:57 -05:00
843292eda7 Use different GCD spell for Paladins in Classic 2021-08-25 21:41:50 -05:00
58721f4fa6 Update changelog for release 2021-07-19 12:52:30 -05:00
ebbddc0001 Expand vertical reach of Tank textures by request
This enables these bars to better represent the full 0-100 spectrum.
Previously, they would cut off the top and bottom by some amount
(differed per texture).
2021-07-18 23:36:07 -05:00
764a097fe2 Update TargetCC.lua (#13)
Added the working spell ID for FEAR on retail, tested on my max level Lock.
2021-07-16 09:37:05 -05:00
60587b22f8 Fix energy ticker when zoning back into an instance after dying
Instead of unhooking the event when we're dead, just hide the ticker
when dead. This ensures, regardless of the order the events come in
when zoning back into an instance, reviving, etc., the ticker is always
shown when appropriate.

WowAce ticket #316
2021-07-06 11:34:52 -05:00
ec80716991 Remove outdated readme message 2021-06-29 10:18:37 -05:00
bc16ae677b Update for WoW 9.1 2021-06-28 13:02:19 -05:00
dc5a3f3a05 Finalize changelog for v1.13.5 2021-06-26 14:21:36 -05:00
6c3ed55780 Update changelog 2021-06-26 14:20:39 -05:00
dfcef9617f Always update aura durations
If we're coming from a custom update func, it could mean that we're
tracking a unit that doesn't get events, like UNIT_AURA, for them. This
includes anything other than player, target, and focus, essentially.
2021-06-26 14:14:57 -05:00
94b62d56a0 Also subscribe for targettarget units 2021-06-26 14:13:57 -05:00
90f126d7a0 Fix custom bar update errors
I was tracking updates with two separate variables depending on where
the registration happened. The order that updates ran in was not
reliable, so sometimes one would register and sometimes the other would.
Since only one of them was setting itself as "from update", the behavior
internal to the bar was also inconsistent.
2021-06-26 14:13:44 -05:00
209fbe2b4e Trim whitespace off dogtags on upper/lower texts
This fixes an issue with strings getting clipped when newlines were
inadvertently included. wowace ticket #311
2021-06-10 22:29:30 -05:00
9435a9d74f Move LibRangeCheck to the proper location (wowace #306) 2021-05-21 07:40:01 -05:00
1519ac2299 Update changelog 2021-05-20 20:49:45 -05:00
2ba558d73d Package WeakAuras's fork of LibRangeCheck with BC-Classic compatibility 2021-05-20 20:48:24 -05:00
a3d9c7bd3d Update readme.md 2021-05-20 08:43:04 -05:00
d641886a8a Update with latest community packager changes for BC-Classic 2021-05-14 21:37:35 -05:00
87456ca051 Fix feature flag typo 2021-05-09 17:38:58 -05:00
d1eae2437f Temp rollback to earlier community packager
Community packager commit 3cbe4587 contains some incorrect logic that
causes the script to exit code 1 on successful WoWI upload when the new
WoWI changelog feature(s) aren't being used.
2021-05-09 17:10:25 -05:00
470ca2f592 Update changelog 2021-05-09 12:06:01 -05:00
e313e679ae Basic Classic-BC support
This has been tested on Classic PTR and Retail, but only with a Rogue
character. Don't have a ton of time to do more exhaustive tests right now.

Fixes #11
2021-05-09 12:04:23 -05:00
d43555b7c4 Update changelog 2021-04-25 22:54:29 -05:00
90e0dd1597 Update build script, include Classic-TBC detection 2021-04-25 22:50:32 -05:00
6282dfb256 Update changelog 2021-04-13 21:32:40 -05:00
4de8cb0d27 Show fury raw value as top number when DogTags are disabled
Same as commit 36c8f02fc2

WoWAce ticket #301
2021-04-13 21:31:32 -05:00
ea28a05051 Update Classic TOC 2021-03-23 12:15:38 -05:00
ca80ca3f75 Update TOC for 9.0.5, prepare for release 2021-03-22 21:43:38 -05:00
fe22f7e658 Update latest changes 2021-03-21 11:56:20 -05:00
354fb483bb Fix incorrect mana alpha when max mana is 0 2021-03-21 11:18:58 -05:00
f6c737c654 Activate totems for all classes in 9.0+
Some class abilities spawn units that live for a specific amount of time, and the game
handles these as Totems.
2020-12-27 21:28:16 -06:00
9a38c4b3ea Revert file to original 2020-12-05 16:49:07 -06:00
ab6b662ac4 Update all library paths to current 2020-12-04 13:38:54 -06:00
a2addcb627 Update url for DogTag dependencies 2020-12-04 13:20:42 -06:00
7f84c28538 Update for new release version 2020-12-04 08:50:12 -06:00
924bd4a6ef Update TOC to latest 2020-11-29 12:06:51 -06:00
0f753448d7 Add config setting to control showing anima-charged combo points 2020-11-28 23:00:24 -06:00
891ddc230c Update temp short changelog 2020-11-28 22:50:25 -06:00
06353d4974 Add support for Anima-charged combo points
Requested by Curseforge ticket 291
2020-11-28 20:37:12 -06:00
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
65 changed files with 2043 additions and 536 deletions

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

@ -0,0 +1,58 @@
# 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 }}
WAGO_API_TOKEN: ${{ secrets.WAGO_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@v3
with:
fetch-depth: 0 # gets git history for changelogs
# once cloned, we just run the GitHub Action for the packager project
- name: Package and release
uses: BigWigsMods/packager@v2
# 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@v2
with:
args: -g classic -w 0
- name: Package and release for TBC
uses: BigWigsMods/packager@v2
with:
args: -g bcc -w 0
- name: Package and release for Wrath
uses: BigWigsMods/packager@v2
with:
args: -g wrath -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

@ -38,14 +38,14 @@ externals:
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceLocale-3.0
tag: latest
libs/LibRangeCheck-2.0:
url: svn://svn.wowace.com/wow/librangecheck-2-0/mainline/trunk/LibRangeCheck-2.0
url: https://github.com/WeakAuras/LibRangeCheck-2.0/
libs/LibSharedMedia-3.0:
url: svn://svn.wowace.com/wow/libsharedmedia-3-0/mainline/trunk
tag: latest
libs/LibDogTag-3.0:
url: git://git.wowace.com/wow/libdogtag-3-0/mainline.git
url: https://github.com/parnic/LibDogTag-3.0
libs/LibDogTag-Unit-3.0:
url: git://git.wowace.com/wow/libdogtag-unit-3-0/mainline.git
url: https://github.com/parnic/LibDogTag-Unit-3.0
libs/LibDBIcon-1.0:
url: svn://svn.wowace.com/wow/libdbicon-1-0/mainline/trunk/LibDBIcon-1.0
libs/LibDualSpec-1.0:
@ -58,11 +58,16 @@ optional-dependencies:
move-folders:
IceHUD/IceHUD_Options: IceHUD_Options
IceHUD/libs/LibRangeCheck-2.0/LibRangeCheck-2.0: IceHUD/libs/LibRangeCheck-2.0
tools-used:
- libdatabroker-1-1
ignore:
- readme.md
- FUNDING.yml
- this_version.md
manual-changelog: changelog.txt
manual-changelog: this_version.md
enable-nolib-creation: yes

3
FUNDING.yml Normal file
View File

@ -0,0 +1,3 @@
github: parnic
ko_fi: parnic
custom: "https://www.paypal.me/parnic"

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()
@ -626,7 +626,7 @@ do
v = DogTag:CleanCode(v)
end
self.moduleSettings.upperText = v
self.moduleSettings.upperText = strtrim(v)
self:RegisterFontStrings()
self:Redraw()
end,
@ -655,7 +655,7 @@ do
v = DogTag:CleanCode(v)
end
self.moduleSettings.lowerText = v
self.moduleSettings.lowerText = strtrim(v)
self:RegisterFontStrings()
self:Redraw()
end,
@ -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,16 +13,31 @@ IceCastBar.prototype.unit = nil
IceCastBar.prototype.current = nil
local SPELL_POWER_MANA = SPELL_POWER_MANA
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
if Enum and Enum.PowerType then
SPELL_POWER_MANA = Enum.PowerType.Mana
end
local UnitCastingInfo, UnitChannelInfo = UnitCastingInfo, UnitChannelInfo
if IceHUD.WowClassic then
if not UnitCastingInfo 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
@ -46,6 +61,39 @@ end
function IceCastBar.prototype:Enable(core)
IceCastBar.super.prototype.Enable(self, core)
-- 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_SENT", "SpellCastSent") -- "player", spell, rank, target
self:RegisterEvent("CURRENT_SPELL_CAST_CHANGED", "SpellCastChanged")
self:RegisterEvent("UNIT_SPELLCAST_START", "SpellCastStart") -- unit, spell, rank
@ -61,6 +109,7 @@ function IceCastBar.prototype:Enable(core)
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
@ -97,7 +146,7 @@ function IceCastBar.prototype:GetOptions()
end,
order = 39.998
}
if IceHUD.WowVer < 80000 then
if IceHUD.SpellFunctionsReturnRank then
opts["showSpellRank"] =
{
type = 'toggle',
@ -358,20 +407,23 @@ end
function IceCastBar.prototype:StartBar(action, message)
local spell, rank, displayName, icon, startTime, endTime, isTradeSkill
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank 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 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank 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
-- 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
@ -398,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
@ -418,7 +470,7 @@ function IceCastBar.prototype:StopBar()
end
function IceCastBar.prototype:GetShortRank(rank)
if IceHUD.WowVer < 80000 and rank then
if IceHUD.SpellFunctionsReturnRank and rank then
local _, _, sRank = string.find(rank, "(%d+)")
if (sRank) then
return " (" .. sRank .. ")"
@ -470,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)
@ -516,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 not IceHUD.WowClassic) and 6 or 5, UnitCastingInfo(self.unit))
local endTime = select(IceHUD.SpellFunctionsReturnRank 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
@ -577,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 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank then
spell, rank, displayName, icon, startTime, endTime = UnitChannelInfo(unit)
else
spell, displayName, icon, startTime, endTime = UnitChannelInfo(unit)

View File

@ -41,6 +41,26 @@ IceCore.TextDecorationStyle = {
NoDecoration = L["No decoration"],
}
local ZM_MAP_ID = 1970
IceCore.zmPuzzleIds = {
--Fugueal Protolock
366046,
366108,
359488,
--Mezzonic Protolock
366042,
366106,
351405,
--Cantaric Protolock
365840,
366107,
348792,
}
IceCore.zmPuzzleMap = {}
for i=1, #IceCore.zmPuzzleIds do
IceCore.zmPuzzleMap[IceCore.zmPuzzleIds[i]] = true
end
local SUNDER_SPELL_ID = 7386
local LACERATE_SPELL_ID = 33745
local MAELSTROM_SPELL_ID = 53817
@ -259,6 +279,10 @@ function IceCore.prototype:Enable(userToggle)
self.IceHUDFrame:RegisterEvent("BARBER_SHOP_OPEN")
self.IceHUDFrame:RegisterEvent("BARBER_SHOP_CLOSE")
end
if C_Map then
self.IceHUDFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
self.IceHUDFrame:RegisterEvent("ZONE_CHANGED")
end
self.IceHUDFrame:RegisterEvent("UNIT_AURA")
self.IceHUDFrame:SetScript("OnEvent", function(self, event, ...)
if (event == "PET_BATTLE_OPENING_START") then
@ -279,13 +303,48 @@ function IceCore.prototype:Enable(userToggle)
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
if unit ~= "player" then
return
end
if IceHUD.IceCore.settings.bHideDuringShellGame and IceHUD:HasAnyDebuff("player", {IceHUD.ShellGameSpellID}) and UnitInVehicle("player") then
self:RegisterEvent("UNIT_EXITED_VEHICLE")
self:Hide()
elseif C_Map then
local bestMapID = C_Map.GetBestMapForUnit("player")
if bestMapID ~= ZM_MAP_ID then
return
end
if IceHUD:HasAnyBuff("player", IceCore.zmPuzzleIds) then
self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
self:Hide()
end
end
elseif (event == "UNIT_EXITED_VEHICLE") then
self:UnregisterEvent("UNIT_EXITED_VEHICLE")
self:Show()
elseif (event == "PLAYER_ENTERING_WORLD" or event == "ZONE_CHANGED") then
if C_Map then
local bestMapID = C_Map.GetBestMapForUnit("player")
if bestMapID == ZM_MAP_ID then
if IceHUD:HasAnyBuff("player", IceCore.zmPuzzleIds) then
self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
self:Hide()
end
end
end
elseif (event == "COMBAT_LOG_EVENT_UNFILTERED") then
local _,subevent,_,_,_,_,_,_,destName,_,_,spellId = CombatLogGetCurrentEventInfo()
if subevent == "SPELL_AURA_REMOVED" then
if destName == UnitName("player") then
if IceCore.zmPuzzleMap[spellId] then
self:Show()
self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
end
end
end
end
end)
@ -520,10 +579,14 @@ function IceCore.prototype:Disable(userToggle)
end
end
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

@ -7,8 +7,6 @@ local SML = LibStub("LibSharedMedia-3.0")
local ACR = LibStub("AceConfigRegistry-3.0")
local ConfigDialog = LibStub("AceConfigDialog-3.0")
local icon = LibStub("LibDBIcon-1.0", true)
local AceGUI = LibStub("AceGUI-3.0")
local AceSerializer = LibStub("AceSerializer-3.0", 1)
local pendingModuleLoads = {}
local bReadyToRegisterModules = false
@ -17,7 +15,50 @@ IceHUD.CurrTagVersion = 3
IceHUD.debugging = false
IceHUD.WowVer = select(4, GetBuildInfo())
IceHUD.WowClassic = WOW_PROJECT_ID and WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
IceHUD.WowMain = not WOW_PROJECT_ID or WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
if GetClassicExpansionLevel then
IceHUD.WowClassic = GetClassicExpansionLevel() == 0
IceHUD.WowClassicBC = GetClassicExpansionLevel() == 1
IceHUD.WowClassicWrath = GetClassicExpansionLevel() == 2
else
IceHUD.WowClassic = WOW_PROJECT_ID and WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
IceHUD.WowClassicBC = false
IceHUD.WowClassicWrath = false
if WOW_PROJECT_ID and WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then
if not LE_EXPANSION_LEVEL_CURRENT or LE_EXPANSION_LEVEL_CURRENT == LE_EXPANSION_BURNING_CRUSADE then
IceHUD.WowClassicBC = true
elseif LE_EXPANSION_LEVEL_CURRENT == LE_EXPANSION_WRATH_OF_THE_LICH_KING then
IceHUD.WowClassicWrath = true
end
elseif WOW_PROJECT_WRATH_CLASSIC and WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC then
IceHUD.WowClassicWrath = true
end
end
-- compatibility/feature flags
IceHUD.SpellFunctionsReturnRank = IceHUD.WowMain and IceHUD.WowVer < 80000
IceHUD.EventExistsPlayerPetChanged = IceHUD.WowMain and IceHUD.WowVer < 80000
IceHUD.EventExistsPetBarChanged = IceHUD.WowMain and IceHUD.WowVer < 80000
IceHUD.EventExistsPlayerComboPoints = IceHUD.WowMain and IceHUD.WowVer < 30000
IceHUD.EventExistsUnitComboPoints = IceHUD.WowMain and IceHUD.WowVer < 70000
IceHUD.EventExistsUnitMaxPower = IceHUD.WowMain and IceHUD.WowVer >= 40000
IceHUD.EventExistsGroupRosterUpdate = IceHUD.WowVer >= 50000 or not IceHUD.WowMain
IceHUD.EventExistsUnitDynamicFlags = IceHUD.WowMain and IceHUD.WowVer < 80000
IceHUD.EventExistsUnitHealthFrequent = not IceHUD.WowMain or (IceHUD.WowVer >= 40000 and IceHUD.WowVer < 90000)
IceHUD.PerPowerEventsExist = IceHUD.WowMain and IceHUD.WowVer < 40000
IceHUD.PerTargetComboPoints = IceHUD.WowVer < 60000
IceHUD.CanTrackOtherUnitBuffs = not IceHUD.WowClassic
IceHUD.CanTrackGCD = not IceHUD.WowClassic
IceHUD.GetSpellInfoReturnsFunnel = IceHUD.WowMain and IceHUD.WowVer < 60000
IceHUD.CanHookDestroyTotem = IceHUD.WowClassic or IceHUD.WowClassicBC or IceHUD.WowClassicWrath
IceHUD.ShouldUpdateTargetHealthEveryTick = (IceHUD.WowClassic or IceHUD.WowClassicBC) and GetCVarBool("predictedHealth")
IceHUD.UsesUIPanelButtonTemplate = IceHUD.WowVer >= 50000 or not IceHUD.WowMain
IceHUD.EventExistsSpellcastInterruptible = IceHUD.WowVer >= 30200 and not IceHUD.WowClassicWrath
IceHUD.DeathKnightUnholyFrostRunesSwapped = IceHUD.WowVer < 70300 and not IceHUD.WowClassicWrath
IceHUD.SupportsHealPrediction = IceHUD.WowVer >= 40000 or IceHUD.WowClassicWrath
IceHUD.UnitGroupRolesReturnsRoleString = IceHUD.WowVer >= 40000 or IceHUD.WowClassicWrath
IceHUD.ShellGameSpellID = 271571
IceHUD.HasShellGame = GetSpellInfo(IceHUD.ShellGameSpellID)
IceHUD.UnitPowerEvent = "UNIT_POWER_UPDATE"
@ -25,6 +66,8 @@ IceHUD.validBarList = { "Bar", "HiBar", "RoundBar", "ColorBar", "RivetBar", "Riv
"BloodGlaives", "ArcHUD", "FangRune", "DHUD", "CleanCurvesOut", "CleanTank", "PillTank", "GemTank" }
IceHUD.validCustomModules = {Bar="Buff/Debuff watcher", Counter="Buff/Debuff stack counter", CD="Cooldown bar", Health="Health bar", Mana="Mana bar", CounterBar="Stack count bar"}
IceHUD_UnitFrame_DropDown = CreateFrame("Frame", "IceHUD_UnitFrame_DropDown", UIParent, "UIDropDownMenuTemplate")
--@debug@
IceHUD.optionsLoaded = true
--@end-debug@
@ -49,6 +92,43 @@ end
IceHUD.deepcopy = deepcopy
function IceHUD:removeDefaults(db, defaults, blocker)
-- remove all metatables from the db, so we don't accidentally create new sub-tables through them
setmetatable(db, nil)
-- loop through the defaults and remove their content
for k,v in pairs(defaults) do
if type(v) == "table" and type(db[k]) == "table" then
-- if a blocker was set, dive into it, to allow multi-level defaults
self:removeDefaults(db[k], v, blocker and blocker[k])
if next(db[k]) == nil then
db[k] = nil
end
else
-- check if the current value matches the default, and that its not blocked by another defaults table
if db[k] == defaults[k] and (not blocker or blocker[k] == nil) then
db[k] = nil
end
end
end
end
function IceHUD:populateDefaults(db, defaults, blocker)
-- remove all metatables from the db, so we don't accidentally create new sub-tables through them
setmetatable(db, nil)
-- loop through the defaults and add their content
for k,v in pairs(defaults) do
if type(v) == "table" and type(db[k]) == "table" then
-- if a blocker was set, dive into it, to allow multi-level defaults
self:populateDefaults(db[k], v, blocker and blocker[k])
else
-- check if the current value matches the default, and that its not blocked by another defaults table
if db[k] == nil then
db[k] = defaults[k]
end
end
end
end
IceHUD.Location = "Interface\\AddOns\\IceHUD"
StaticPopupDialogs["ICEHUD_CUSTOM_BAR_CREATED"] =
@ -259,6 +339,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
@ -274,11 +358,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
@ -325,7 +404,7 @@ end
-- blizzard interface options
local blizOptionsPanel = CreateFrame("FRAME", "IceHUDConfigPanel", UIParent)
blizOptionsPanel.name = "IceHUD"
blizOptionsPanel.button = CreateFrame("BUTTON", "IceHUDOpenConfigButton", blizOptionsPanel, (IceHUD.WowVer >= 50000 or IceHUD.WowClassic) and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
blizOptionsPanel.button = CreateFrame("BUTTON", "IceHUDOpenConfigButton", blizOptionsPanel, IceHUD.UsesUIPanelButtonTemplate and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
blizOptionsPanel.button:SetText("Open IceHUD configuration")
blizOptionsPanel.button:SetWidth(240)
blizOptionsPanel.button:SetHeight(30)
@ -367,7 +446,11 @@ function IceHUD:Debug(...)
for n=1,select('#', ...) do
msg = msg .. tostring(select(n, ...)) .. " "
end
if self.debugFrame then
self.debugFrame:AddMessage(msg)
else
print(msg)
end
end
end
@ -413,7 +496,7 @@ function IceHUD:GetAuraCount(auraType, unit, ability, onlyMine, matchByName)
local i = 1
local name, _, texture, applications
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank then
name, _, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or ""))
else
name, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or ""))
@ -425,7 +508,7 @@ function IceHUD:GetAuraCount(auraType, unit, ability, onlyMine, matchByName)
end
i = i + 1
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank then
name, _, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or ""))
else
name, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or ""))
@ -445,7 +528,7 @@ do
local i = 1
local name, _, texture, applications, _, _, _, _, _, _, auraID
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank then
name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter)
else
name, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter)
@ -459,7 +542,7 @@ do
end
i = i + 1
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank then
name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter)
else
name, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter)
@ -472,6 +555,30 @@ do
function IceHUD:HasDebuffs(unit, spellIDs, filter)
return IceHUD:HasBuffs(unit, spellIDs, filter and filter.."|HARMFUL" or "HARMFUL")
end
function IceHUD:HasAnyBuff(unit, spellIDs, filter)
local buffs = IceHUD:HasBuffs(unit, spellIDs, filter)
for i=1, #buffs do
if buffs[i] then
return true
end
end
return false
end
function IceHUD:HasAnyDebuff(unit, spellIDs, filter)
local debuffs = IceHUD:HasDebuffs(unit, spellIDs, filter)
for i=1, #debuffs do
if debuffs[i] then
return true
end
end
return false
end
end
function IceHUD:OnDisable()
@ -611,14 +718,14 @@ function IceHUD:GetIsInLFGGroup()
end
local mode, submode
if IceHUD.WowVer >= 50000 then
if LE_LFG_CATEGORY_LFD then
mode, submode = GetLFGMode(LE_LFG_CATEGORY_LFD)
else
mode, submode = GetLFGMode()
end
local IsInLFGGroup = CheckLFGMode(mode)
if IceHUD.WowVer < 50000 then
if not LE_LFG_CATEGORY_LFD then
return IsInLFGGroup
end
@ -638,31 +745,69 @@ function IceHUD:GetIsInLFGGroup()
return IsInLFGGroup
end
local BLACKLISTED_UNIT_MENU_OPTIONS = {
local BLACKLISTED_UNIT_MENU_OPTIONS = {}
if UnitPopupButtons then
BLACKLISTED_UNIT_MENU_OPTIONS = {
SET_FOCUS = "ICEHUD_SET_FOCUS",
CLEAR_FOCUS = "ICEHUD_CLEAR_FOCUS",
PET_DISMISS = "ICEHUD_PET_DISMISS",
LOCK_FOCUS_FRAME = true,
UNLOCK_FOCUS_FRAME = true,
}
}
if select(2, UnitClass("player")) ~= "WARLOCK" then
BLACKLISTED_UNIT_MENU_OPTIONS[PET_DISMISS] = "ICEHUD_PET_DISMISS"
end
UnitPopupButtons["ICEHUD_SET_FOCUS"] = {
UnitPopupButtons["ICEHUD_SET_FOCUS"] = {
text = L["Type %s to set focus"]:format(SLASH_FOCUS1),
tooltipText = L["Blizzard currently does not provide a proper way to right-click focus with custom unit frames."],
dist = 0,
}
}
UnitPopupButtons["ICEHUD_CLEAR_FOCUS"] = {
UnitPopupButtons["ICEHUD_CLEAR_FOCUS"] = {
text = L["Type %s to clear focus"]:format(SLASH_CLEARFOCUS1),
tooltipText = L["Blizzard currently does not provide a proper way to right-click focus with custom unit frames."],
dist = 0,
}
}
UnitPopupButtons["ICEHUD_PET_DISMISS"] = {
UnitPopupButtons["ICEHUD_PET_DISMISS"] = {
text = L["Use your Dismiss Pet spell to dismiss a pet"],
tooltipText = L["Blizzard currently does not provide a proper way to right-click dismiss a pet with custom unit frames."],
dist = 0,
}
}
elseif UnitPopupSetFocusButtonMixin then
IceHUDUnitPopupSetFocusButtonMixin = CreateFromMixins(UnitPopupButtonBaseMixin)
function IceHUDUnitPopupSetFocusButtonMixin:GetText()
return L["Type %s to set focus"]:format(SLASH_FOCUS1)
end
function IceHUDUnitPopupSetFocusButtonMixin:OnClick()
end
IceHUDUnitPopupClearFocusButtonMixin = CreateFromMixins(UnitPopupButtonBaseMixin)
function IceHUDUnitPopupClearFocusButtonMixin:GetText()
return L["Type %s to clear focus"]:format(SLASH_CLEARFOCUS1)
end
function IceHUDUnitPopupClearFocusButtonMixin:OnClick()
end
IceHUDUnitPopupPetDismissButtonMixin = CreateFromMixins(UnitPopupButtonBaseMixin)
function IceHUDUnitPopupPetDismissButtonMixin:GetText()
return L["Use your Dismiss Pet spell to dismiss a pet"]
end
function IceHUDUnitPopupPetDismissButtonMixin:CanShow()
return UnitPopupPetDismissButtonMixin:CanShow()
end
function IceHUDUnitPopupPetDismissButtonMixin:OnClick()
end
BLACKLISTED_UNIT_MENU_OPTIONS[SET_FOCUS] = IceHUDUnitPopupSetFocusButtonMixin
BLACKLISTED_UNIT_MENU_OPTIONS[CLEAR_FOCUS] = IceHUDUnitPopupClearFocusButtonMixin
BLACKLISTED_UNIT_MENU_OPTIONS[LOCK_FOCUS_FRAME] = true
BLACKLISTED_UNIT_MENU_OPTIONS[UNLOCK_FOCUS_FRAME] = true
if select(2, UnitClass("player")) ~= "WARLOCK" then
BLACKLISTED_UNIT_MENU_OPTIONS[PET_DISMISS] = IceHUDUnitPopupPetDismissButtonMixin
end
end
local munged_unit_menus = {}
local function munge_unit_menu(menu)
@ -683,13 +828,36 @@ local function munge_unit_menu(menu)
end
local found = false
local _, v
if data.GetMenuButtons then
local btns = data.GetMenuButtons()
for i=1, #btns do
if btns[i].IsMenu() then
local subbtns = btns[i].GetMenuButtons()
for j=1, #subbtns do
if BLACKLISTED_UNIT_MENU_OPTIONS[subbtns[j]:GetText()] then
found = true
break
end
end
else
if BLACKLISTED_UNIT_MENU_OPTIONS[btns[i]:GetText()] then
found = true
break
end
end
if found then
break
end
end
else
for _, v in ipairs(data) do
if BLACKLISTED_UNIT_MENU_OPTIONS[v] then
found = true
break
end
end
end
if not found then
-- nothing to remove or add, we're all fine here.
@ -698,17 +866,44 @@ local function munge_unit_menu(menu)
end
local new_data = {}
if data.GetMenuButtons then
local new_buttons_list = {}
local btns = data.GetMenuButtons()
for i=1, #btns do
if btns[i].IsMenu() then
local subbtns = btns[i].GetMenuButtons()
for j=1, #subbtns do
local blacklisted = BLACKLISTED_UNIT_MENU_OPTIONS[subbtns[j]:GetText()]
if not blacklisted then
new_buttons_list[#new_buttons_list+1] = subbtns[j]
elseif blacklisted ~= true then
new_buttons_list[#new_buttons_list+1] = blacklisted
end
end
else
local blacklisted = BLACKLISTED_UNIT_MENU_OPTIONS[btns[i]:GetText()]
if not blacklisted then
new_buttons_list[#new_buttons_list+1] = btns[i]
elseif blacklisted ~= true then
new_buttons_list[#new_buttons_list+1] = blacklisted
end
end
end
new_data = data
function new_data:GetMenuButtons()
return new_buttons_list
end
else
for _, v in ipairs(data) do
local blacklisted = BLACKLISTED_UNIT_MENU_OPTIONS[v]
if v == "PET_DISMISS" and select(2, UnitClass("player")) == "WARLOCK" then
blacklisted = false
end
if not blacklisted then
new_data[#new_data+1] = v
elseif blacklisted ~= true then
new_data[#new_data+1] = blacklisted
end
end
end
local new_menu_name = "ICEHUD_" .. menu
UnitPopupMenus[new_menu_name] = new_data
@ -752,7 +947,6 @@ local function figure_unit_menu(unit)
return "PLAYER"
end
IceHUD_UnitFrame_DropDown = CreateFrame("Frame", "IceHUD_UnitFrame_DropDown", UIParent, "UIDropDownMenuTemplate")
if UnitPopupFrames then
UnitPopupFrames[#UnitPopupFrames+1] = "IceHUD_UnitFrame_DropDown"
end

View File

@ -1,15 +1,25 @@
## Interface: 80200
## Interface: 100000
## Interface-Retail: 100000
## Interface-Classic: 11403
## Interface-BCC: 20504
## Interface-Wrath: 30400
## 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
## X-Compatible-With: 11302
## X-Wago-ID: 5bGolJN0
#@no-lib-strip@
# Libraries
@ -91,5 +101,8 @@ modules\ArcaneCharges.lua
modules\RollTheBones.lua
#@do-not-package@
IceHUD_Options\Json.lua
IceHUD_Options\JsonDecode.lua
IceHUD_Options\JsonEncode.lua
IceHUD_Options\Options.lua
#@end-do-not-package@

View File

@ -1,4 +1,8 @@
## Interface: 80200
## Interface: 100000
## Interface-Retail: 100000
## Interface-Classic: 11403
## Interface-BCC: 20504
## Interface-Wrath: 30400
## Title: IceHUD |cff7fff7f-Options-|r
## Author: Parnic
## Version: @project-version@
@ -7,4 +11,7 @@
## Dependencies: IceHUD
## LoadOnDemand: 1
Json.lua
JsonDecode.lua
JsonEncode.lua
Options.lua

1
IceHUD_Options/Json.lua Normal file
View File

@ -0,0 +1 @@
IceHUD.json = {}

View File

@ -0,0 +1,241 @@
local parse
local function create_set(...)
local res = {}
for i = 1, select("#", ...) do
res[select(i, ...)] = true
end
return res
end
local space_chars = create_set(" ", "\t", "\r", "\n")
local delim_chars = create_set(" ", "\t", "\r", "\n", "]", "}", ",")
local escape_chars = create_set("\\", "/", '"', "b", "f", "n", "r", "t", "u")
local literals = create_set("true", "false", "null")
local literal_map = {
["true"] = true,
["false"] = false,
["null"] = nil,
}
local function next_char(str, idx, set, negate)
for i = idx, #str do
if set[str:sub(i, i)] ~= negate then
return i
end
end
return #str + 1
end
local function decode_error(str, idx, msg)
local line_count = 1
local col_count = 1
for i = 1, idx - 1 do
col_count = col_count + 1
if str:sub(i, i) == "\n" then
line_count = line_count + 1
col_count = 1
end
end
return string.format("%s at line %d col %d", msg, line_count, col_count)
end
local function codepoint_to_utf8(n)
-- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa
local f = math.floor
if n <= 0x7f then
return string.char(n)
elseif n <= 0x7ff then
return string.char(f(n / 64) + 192, n % 64 + 128)
elseif n <= 0xffff then
return string.char(f(n / 4096) + 224, f(n % 4096 / 64) + 128, n % 64 + 128)
elseif n <= 0x10ffff then
return string.char(f(n / 262144) + 240, f(n % 262144 / 4096) + 128,
f(n % 4096 / 64) + 128, n % 64 + 128)
end
return "", string.format("invalid unicode codepoint '%x'", n)
end
local function parse_unicode_escape(s)
local n1 = tonumber(s:sub(1, 4), 16)
local n2 = tonumber(s:sub(7, 10), 16)
-- Surrogate pair?
if n2 then
return codepoint_to_utf8((n1 - 0xd800) * 0x400 + (n2 - 0xdc00) + 0x10000)
else
return codepoint_to_utf8(n1)
end
end
local function parse_string(str, i)
local res = ""
local j = i + 1
local k = j
while j <= #str do
local x = str:byte(j)
if x < 32 then
return str, j, decode_error(str, j, "control character in string")
elseif x == 92 then -- `\`: Escape
res = res .. str:sub(k, j - 1)
j = j + 1
local c = str:sub(j, j)
if c == "u" then
local hex = str:match("^[dD][89aAbB]%x%x\\u%x%x%x%x", j + 1)
or str:match("^%x%x%x%x", j + 1)
or false
if hex == false then
return str, j-1, decode_error(str, j - 1, "invalid unicode escape in string")
end
res = res .. parse_unicode_escape(hex)
j = j + #hex
else
if not escape_chars[c] then
return str, j-1, decode_error(str, j - 1, "invalid escape char '" .. c .. "' in string")
end
res = res .. escape_char_map_inv[c]
end
k = j + 1
elseif x == 34 then -- `"`: End of string
res = res .. str:sub(k, j - 1)
return res, j + 1
end
j = j + 1
end
return str, i, decode_error(str, i, "expected closing quote for string")
end
local function parse_number(str, i)
local x = next_char(str, i, delim_chars)
local s = str:sub(i, x - 1)
local n = tonumber(s)
if not n then
return -1, -1, decode_error(str, i, "invalid number '" .. s .. "'")
end
return n, x
end
local function parse_literal(str, i)
local x = next_char(str, i, delim_chars)
local word = str:sub(i, x - 1)
if not literals[word] then
return false, -1, decode_error(str, i, "invalid literal '" .. word .. "'")
end
return literal_map[word], x
end
local function parse_array(str, i)
local res = {}
local n = 1
i = i + 1
while 1 do
local x
i = next_char(str, i, space_chars, true)
-- Empty / end of array?
if str:sub(i, i) == "]" then
i = i + 1
break
end
-- Read token
x, i = parse(str, i)
res[n] = x
n = n + 1
-- Next token
i = next_char(str, i, space_chars, true)
local chr = str:sub(i, i)
i = i + 1
if chr == "]" then break end
if chr ~= "," then return nil, -1, decode_error(str, i, "expected ']' or ','") end
end
return res, i
end
local function parse_object(str, i)
local res = {}
i = i + 1
while 1 do
local key, val
i = next_char(str, i, space_chars, true)
-- Empty / end of object?
if str:sub(i, i) == "}" then
i = i + 1
break
end
-- Read key
if str:sub(i, i) ~= '"' then
return nil, -1, decode_error(str, i, "expected string for key")
end
key, i = parse(str, i)
-- Read ':' delimiter
i = next_char(str, i, space_chars, true)
if str:sub(i, i) ~= ":" then
return nil, -1, decode_error(str, i, "expected ':' after key")
end
i = next_char(str, i + 1, space_chars, true)
-- Read value
val, i = parse(str, i)
-- Set
res[key] = val
-- Next token
i = next_char(str, i, space_chars, true)
local chr = str:sub(i, i)
i = i + 1
if chr == "}" then break end
if chr ~= "," then return nil, -1, decode_error(str, i, "expected '}' or ','") end
end
return res, i
end
local char_func_map = {
['"'] = parse_string,
["0"] = parse_number,
["1"] = parse_number,
["2"] = parse_number,
["3"] = parse_number,
["4"] = parse_number,
["5"] = parse_number,
["6"] = parse_number,
["7"] = parse_number,
["8"] = parse_number,
["9"] = parse_number,
["-"] = parse_number,
["t"] = parse_literal,
["f"] = parse_literal,
["n"] = parse_literal,
["["] = parse_array,
["{"] = parse_object,
}
parse = function(str, idx)
local chr = str:sub(idx, idx)
local f = char_func_map[chr]
if f then
return f(str, idx)
end
return false, -1, decode_error(str, idx, "unexpected character '" .. chr .. "'")
end
function IceHUD.json.decode(str)
if type(str) ~= "string" then
return nil, "expected argument of type string, got " .. type(str)
end
local res, idx, err = parse(str, next_char(str, 1, space_chars, true))
if err ~= nil then
return nil, err
end
idx = next_char(str, idx, space_chars, true)
if idx <= #str then
return nil, decode_error(str, idx, "trailing garbage")
end
return res, nil
end

View File

@ -0,0 +1,100 @@
local encode
local escape_char_map = {
["\\"] = "\\",
["\""] = "\"",
["\b"] = "b",
["\f"] = "f",
["\n"] = "n",
["\r"] = "r",
["\t"] = "t",
}
local escape_char_map_inv = { ["/"] = "/" }
for k, v in pairs(escape_char_map) do
escape_char_map_inv[v] = k
end
local function escape_char(c)
return "\\" .. (escape_char_map[c] or string.format("u%04x", c:byte()))
end
local function encode_nil(val)
return "null"
end
local function encode_table(val, stack)
local res = {}
stack = stack or {}
-- Circular reference?
if stack[val] then error("circular reference") end
stack[val] = true
if rawget(val, 1) ~= nil or next(val) == nil then
-- Treat as array -- check keys are valid and it is not sparse
local n = 0
for k in pairs(val) do
if type(k) ~= "number" then
error("invalid table: mixed or invalid key types")
end
n = n + 1
end
if n ~= #val then
error("invalid table: sparse array")
end
-- Encode
for i, v in ipairs(val) do
table.insert(res, encode(v, stack))
end
stack[val] = nil
return "[" .. table.concat(res, ",") .. "]"
else
-- Treat as an object
for k, v in pairs(val) do
if type(k) ~= "string" then
error("invalid table: mixed or invalid key types")
end
table.insert(res, encode(k, stack) .. ":" .. encode(v, stack))
end
stack[val] = nil
return "{" .. table.concat(res, ",") .. "}"
end
end
local function encode_string(val)
return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"'
end
local function encode_number(val)
-- Check for NaN, -inf and inf
if val ~= val or val <= -math.huge or val >= math.huge then
error("unexpected number value '" .. tostring(val) .. "'")
end
return string.format("%.14g", val)
end
local type_func_map = {
["nil"] = encode_nil,
["table"] = encode_table,
["string"] = encode_string,
["number"] = encode_number,
["boolean"] = tostring,
}
encode = function(val, stack)
local t = type(val)
local f = type_func_map[t]
if f then
return f(val, stack)
end
error("unexpected type '" .. t .. "'")
end
function IceHUD.json.encode(val)
return (encode(val))
end

View File

@ -1,6 +1,8 @@
local LibDualSpec = LibStub('LibDualSpec-1.0', true)
local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
local icon = LibStub("LibDBIcon-1.0", true)
local AceGUI = LibStub("AceGUI-3.0")
local AceSerializer = LibStub("AceSerializer-3.0", 1)
local lastCustomModule = "Bar"
IceHUD_Options = {}
@ -86,7 +88,10 @@ This is a side effect of the animation API that I'm co-opting to force a rotatio
Blizzard added a "Personal Resource Display" feature in the 7.0 game client. You can disable it in the Game options -> Interface -> Names -> Personal Resource Display.
|cff9999ff19. Why is there no target castbar for Classic?|r
The Classic game client doesn't offer a reliable way to show castbars for anyone except the player. IceHUD doesn't support the type of inaccurate guessing at combat log details that would be required to get a semi-useful target castbar.]]
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.]]
}
}
},
@ -418,7 +423,7 @@ The Classic game client doesn't offer a reliable way to show castbars for anyone
IceHUD.IceCore.IceHUDFrame:Show()
end
end,
hidden = IceHUD.WowVer < 80000,
hidden = not IceHUD.HasShellGame,
order = 36,
},
}
@ -754,6 +759,9 @@ function IceHUD_Options:OnLoad()
self:GenerateModuleOptions(true)
self.options.args.colors.args = IceHUD.IceCore:GetColorOptions()
self.options.args.profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(IceHUD.db)
--@debug@
IceHUD_Options:SetupProfileImportButtons()
--@end-debug@
-- Add dual-spec support
if IceHUD.db ~= nil and LibDualSpec then
@ -784,14 +792,14 @@ function IceHUD_Options:SetupProfileImportButtons()
editbox:SetLabel("Profile")
editbox:SetFullWidth(true)
editbox:SetFullHeight(true)
local profileTable = deepcopy(IceHUD.db.profile)
local profileTable = IceHUD.deepcopy(IceHUD.db.profile)
IceHUD:removeDefaults(profileTable, IceHUD.IceCore.defaults.profile)
editbox:SetText(IceHUD:Serialize(profileTable))
editbox:SetText(IceHUD.json.encode(profileTable))
editbox:DisableButton(true)
frame:AddChild(editbox)
end,
hidden =
-- hello, snooper! this feature doesn't actually work yet, so enabling it won't help you much :)
-- hello, snooper! exporting works well enough, but importing is very rough, so enable this at your own peril
--[===[@non-debug@
true
--@end-non-debug@]===]
@ -800,7 +808,7 @@ function IceHUD_Options:SetupProfileImportButtons()
--@end-debug@
,
disabled =
-- hello, snooper! this feature doesn't actually work yet, so enabling it won't help you much :)
-- hello, snooper! exporting works well enough, but importing is very rough, so enable this at your own peril
--[===[@non-debug@
true
--@end-non-debug@]===]
@ -821,11 +829,14 @@ function IceHUD_Options:SetupProfileImportButtons()
frame:SetStatusText("Exported profile details")
frame:SetLayout("Flow")
frame:SetCallback("OnClose", function(widget)
local success, newTable = IceHUD:Deserialize(widget.children[1]:GetText())
if success then
local newTable, err = IceHUD.json.decode(widget.children[1]:GetText())
if err ~= nil then
print("failed to import profile: "..err)
else
print("importing profile")
IceHUD:PreProfileChanged()
IceHUD:populateDefaults(newTable, IceHUD.IceCore.defaults.profile)
IceHUD.db.profile = deepcopy(newTable)
IceHUD.db.profile = IceHUD.deepcopy(newTable)
IceHUD:PostProfileChanged()
end
AceGUI:Release(widget)
@ -838,7 +849,7 @@ function IceHUD_Options:SetupProfileImportButtons()
frame:AddChild(editbox)
end,
hidden =
-- hello, snooper! this feature doesn't actually work yet, so enabling it won't help you much :)
-- hello, snooper! this feature is really rough, so enable it at your own peril
--[===[@non-debug@
true
--@end-non-debug@]===]
@ -847,7 +858,7 @@ function IceHUD_Options:SetupProfileImportButtons()
--@end-debug@
,
disabled =
-- hello, snooper! this feature doesn't actually work yet, so enabling it won't help you much :)
-- hello, snooper! this feature is really rough, so enable it at your own peril
--[===[@non-debug@
true
--@end-non-debug@]===]
@ -859,7 +870,3 @@ function IceHUD_Options:SetupProfileImportButtons()
}
end
end
--@debug@
IceHUD_Options:SetupProfileImportButtons()
--@end-debug@

View File

@ -0,0 +1,37 @@
local function table_print(tt, indent, done)
done = done or {}
indent = indent or 0
if type(tt) == "table" then
local sb = {}
for key, value in pairs(tt) do
table.insert(sb, string.rep(" ", indent)) -- indent it
if type(value) == "table" and not done[value] then
done[value] = true
table.insert(sb, key .. " = {\n");
table.insert(sb, table_print(value, indent + 2, done))
table.insert(sb, string.rep(" ", indent)) -- indent it
table.insert(sb, "}\n");
elseif "number" == type(key) then
table.insert(sb, string.format("\"%s\"\n", tostring(value)))
else
table.insert(sb, string.format(
"%s = \"%s\"\n", tostring(key), tostring(value)))
end
end
return table.concat(sb)
else
return tt .. "\n"
end
end
local function to_string(tbl)
if "nil" == type(tbl) then
return tostring(nil)
elseif "table" == type(tbl) then
return table_print(tbl)
elseif "string" == type(tbl) then
return tbl
else
return tostring(tbl)
end
end

View File

@ -128,7 +128,7 @@ end
function IceStackCounter_Enable(frame)
frame:RegisterEvent("UNIT_AURA", "UpdateCustomCount")
frame:RegisterEvent("UNIT_PET", "UpdateCustomCount")
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
if IceHUD.EventExistsPlayerPetChanged then
frame:RegisterEvent("PLAYER_PET_CHANGED", "UpdateCustomCount")
end
if FocusUnit then

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 or IceHUD.WowClassic then
local SPELL_POWER_INSANITY, SPELL_POWER_RAGE = SPELL_POWER_INSANITY, SPELL_POWER_RAGE
if Enum and Enum.PowerType 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")
@ -230,13 +231,26 @@ 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)
end
-- account for cases where maxMana is 0, perhaps briefly (during certain spells, for example)
-- and properly handle it as full. this allows for proper alpha handling during these times.
if self.maxMana == self.mana then
self.manaPercentage = 1
else
self.manaPercentage = self.maxMana ~= 0 and (self.mana/self.maxMana) or 0
end
local locClass
locClass, self.unitClass = UnitClass(self.unit)

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021-2022 parnic
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

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 or IceHUD.WowClassic then
if Enum and Enum.PowerType then
SPELL_POWER_ARCANE_CHARGES = Enum.PowerType.ArcaneCharges
end
@ -61,6 +61,6 @@ end
-- Load us up
local _, unitClass = UnitClass("player")
if (unitClass == "MAGE" and IceHUD.WowVer >= 70000) then
if (unitClass == "MAGE" and MageArcaneChargesFrame) then
IceHUD.ArcaneCharges = ArcaneCharges:new()
end

View File

@ -3,6 +3,11 @@ local CastBar = IceCore_CreateClass(IceCastBar)
local IceHUD = _G.IceHUD
local CastingBarFrame = CastingBarFrame
if not CastingBarFrame then
CastingBarFrame = PlayerCastingBarFrame
end
CastBar.prototype.spellCastSent = nil
-- Constructor --
@ -398,7 +403,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")
@ -439,7 +444,9 @@ function CastBar.prototype:SpellCastStart(event, unit, castGuid, spellId)
end
self:UpdateLagBar()
if IceHUD.GlobalCoolDown then
self.nextLagUpdate = GetTime() + (select(2, GetSpellCooldown(IceHUD.GlobalCoolDown:GetSpellId())) / 2)
end
end
@ -464,7 +471,9 @@ function CastBar.prototype:SpellCastSucceeded(event, unit, castGuid, spellId)
end
self:UpdateLagBar()
if IceHUD.GlobalCoolDown then
self.nextLagUpdate = GetTime() + (select(2, GetSpellCooldown(IceHUD.GlobalCoolDown:GetSpellId())) / 2)
end
end

View File

@ -101,7 +101,7 @@ function IceClassPowerCounter.prototype:GetOptions()
opts["displayMode"] = {
type = 'select',
name = L["Display mode"],
desc = L["Choose whether you'd like a graphical or numeric representation of the runes.\n\nNOTE: The color of 'Numeric' mode can be controlled by the HolyPowerNumeric color."],
desc = L["Choose whether you'd like a graphical or numeric representation of the runes."],
get = function(info)
return IceHUD:GetSelectValue(info, self.moduleSettings.runeMode)
end,
@ -467,7 +467,10 @@ 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 IceHUD.EventExistsUnitMaxPower then
self:RegisterEvent("UNIT_MAXPOWER", "UpdateRunePower")
end
if (self.moduleSettings.hideBlizz) then
self:HideBlizz()
@ -484,6 +487,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
@ -492,8 +500,22 @@ function IceClassPowerCounter.prototype:UpdateRunePower(event, arg1, arg2)
if IceHUD.WowVer >= 70000 then
local numMax = UnitPowerMax(self.unit, self.unitPower)
if numMax ~= self.numRunes then
local oldMax = self.numRunes
self.numRunes = numMax
self:CreateFrame()
self:SetDisplayMode()
for i=self.numRunes+1, oldMax do
if self.frame.graphical[i] then
self.frame.graphical[i]:Hide()
end
end
for i=oldMax+1, self.numRunes do
if self:GetRuneMode() ~= "Numeric" then
self.frame.graphical[i]:Show()
end
self:HideRune(i)
end
end
end
@ -562,11 +584,7 @@ function IceClassPowerCounter.prototype:UpdateRunePower(event, arg1, arg2)
end
end
else
if self.moduleSettings.inactiveDisplayMode == "Darkened" then
self.frame.graphical[i].rune:SetVertexColor(0, 0, 0)
elseif self.moduleSettings.inactiveDisplayMode == "Hidden" then
self.frame.graphical[i]:Hide()
end
self:HideRune(i)
end
end
end
@ -587,6 +605,19 @@ function IceClassPowerCounter.prototype:UpdateRunePower(event, arg1, arg2)
end
end
function IceClassPowerCounter.prototype:HideRune(i)
if self:GetRuneMode() == "Numeric" then
self.frame.graphical[i].Hide()
return
end
if self.moduleSettings.inactiveDisplayMode == "Darkened" then
self.frame.graphical[i].rune:SetVertexColor(0, 0, 0)
elseif self.moduleSettings.inactiveDisplayMode == "Hidden" then
self.frame.graphical[i]:Hide()
end
end
function IceClassPowerCounter.prototype:StartRunesFullAnimation()
if not self.AnimUpdate then
self.AnimUpdate = function() self:UpdateRuneAnimation() end
@ -712,6 +743,9 @@ function IceClassPowerCounter.prototype:CreateRuneFrame()
for i=1, self.numRunes do
self:CreateRune(i)
end
for i=self.numRunes+1, #self.frame.graphical do
self.frame.graphical[i]:Hide()
end
end
function IceClassPowerCounter.prototype:CreateRune(i)
@ -753,7 +787,13 @@ function IceClassPowerCounter.prototype:CreateRune(i)
end
end
function IceClassPowerCounter.prototype:SetupNewRune(rune)
end
function IceClassPowerCounter.prototype:SetupRuneTexture(rune)
if rune > #self.runeCoords then
self:SetupNewRune(rune)
end
if not rune or rune < 1 or rune > #self.runeCoords then
return
end

View File

@ -4,11 +4,12 @@ local ComboPoints = IceCore_CreateClass(IceElement)
local IceHUD = _G.IceHUD
local AnticipationSpellId = 114015
local AnticipationExists = GetSpellInfo(AnticipationSpellId) and IceHUD.WowVer < 70000
ComboPoints.prototype.comboSize = 20
local SPELL_POWER_COMBO_POINTS = SPELL_POWER_COMBO_POINTS
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
if Enum and Enum.PowerType then
SPELL_POWER_COMBO_POINTS = Enum.PowerType.ComboPoints
end
@ -17,7 +18,10 @@ function ComboPoints.prototype:init()
ComboPoints.super.prototype.init(self, "ComboPoints")
self:SetDefaultColor("ComboPoints", 1, 1, 0)
if AnticipationExists then
self:SetDefaultColor("AnticipationPoints", 1, 0, 1)
end
self:SetDefaultColor("ChargedComboPoint", 0.3137254901960784, 0.3725490196078432, 1)
self.scalingEnabled = true
end
@ -163,7 +167,7 @@ function ComboPoints.prototype:GetOptions()
order = 33.2
}
if IceHUD.WowVer < 70000 and not IceHUD.WowClassic then
if AnticipationExists then
opts["anticipation"] = {
type = "toggle",
name = L["Show Anticipation"],
@ -215,6 +219,28 @@ function ComboPoints.prototype:GetOptions()
disabled = function()
return not self.moduleSettings.enabled
end,
order = 35
}
opts["bShowCharged"] = {
type = 'toggle',
width = 'double',
name = L["Show Charged points"],
desc = L["Whether or not to color a charged combo point a separate color. Set the ChargedComboPoint color to the color you would like it to be."],
get = function()
return self.moduleSettings.bShowCharged
end,
set = function(info, v)
self.moduleSettings.bShowCharged = v
self:UpdateChargedComboPoints()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
hidden = function()
return not GetUnitChargedPowerPoints
end,
order = 36
}
return opts
@ -235,6 +261,7 @@ function ComboPoints.prototype:GetDefaultSettings()
defaults["comboGap"] = 0
defaults["showAnticipation"] = true
defaults["bShowWithNoTarget"] = true
defaults["bShowCharged"] = true
return defaults
end
@ -253,12 +280,12 @@ function ComboPoints.prototype:Enable(core)
ComboPoints.super.prototype.Enable(self, core)
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateComboPoints")
if IceHUD.WowVer >= 30000 or IceHUD.WowClassic then
if IceHUD.WowVer < 70000 and not IceHUD.WowClassic then
if not IceHUD.EventExistsPlayerComboPoints then
if IceHUD.EventExistsUnitComboPoints then
self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateComboPoints")
else
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateComboPoints")
if IceHUD.WowVer < 80000 then
if IceHUD.EventExistsUnitMaxPower then
self:RegisterEvent("UNIT_MAXPOWER", "UpdateMaxComboPoints")
end
end
@ -266,7 +293,7 @@ function ComboPoints.prototype:Enable(core)
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "UpdateComboPoints")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "UpdateComboPoints")
end
if IceHUD.WowVer < 70000 and not IceHUD.WowClassic then
if AnticipationExists then
self:RegisterEvent("PLAYER_TALENT_UPDATE", "AddAnticipation")
self:AddAnticipation()
end
@ -274,11 +301,16 @@ function ComboPoints.prototype:Enable(core)
self:RegisterEvent("PLAYER_COMBO_POINTS", "UpdateComboPoints")
end
if GetUnitChargedPowerPoints then
self:RegisterEvent("UNIT_POWER_POINT_CHARGE", "UpdateChargedComboPoints")
end
if self.moduleSettings.comboMode == "Graphical" then
self.moduleSettings.comboMode = "Graphical Bar"
end
self:CreateComboFrame(true)
self:UpdateChargedComboPoints()
end
function ComboPoints.prototype:UpdateMaxComboPoints(event, unit, powerType)
@ -291,6 +323,14 @@ function ComboPoints.prototype:UpdateMaxComboPoints(event, unit, powerType)
end
end
function ComboPoints.prototype:UpdateChargedComboPoints()
if GetUnitChargedPowerPoints then
self.chargedPowerPoints = GetUnitChargedPowerPoints("player")
self:CreateComboFrame()
self:UpdateComboPoints()
end
end
-- 'Protected' methods --------------------------------------------------------
-- OVERRIDE
@ -399,13 +439,18 @@ function ComboPoints.prototype:CreateComboFrame(forceTextureUpdate)
if (self.moduleSettings.gradient) then
g = g - ((1 / maxComboPoints)*i)
end
if self.moduleSettings.bShowCharged and self:IsChargedPoint(i) then
self.frame.graphical[i].texture:SetVertexColor(self:GetColor("ChargedComboPoint"))
else
self.frame.graphical[i].texture:SetVertexColor(r, g, b)
end
self.frame.graphical[i]:Hide()
end
-- create Anticipation points
if IceHUD.WowVer < 70000 then
if AnticipationExists then
for i = 1, 5 do
if (not self.frame.graphicalAnt[i]) then
local frame = CreateFrame("Frame", nil, self.frame)
@ -444,6 +489,20 @@ function ComboPoints.prototype:CreateComboFrame(forceTextureUpdate)
end
end
function ComboPoints.prototype:IsChargedPoint(point)
if not self.chargedPowerPoints then
return false
end
for i=1, #self.chargedPowerPoints do
if self.chargedPowerPoints[i] == point then
return true
end
end
return false
end
function ComboPoints.prototype:UpdateComboPoints(...)
if select('#', ...) >= 3 and select(1, ...) == IceHUD.UnitPowerEvent and select(3, ...) ~= "COMBO_POINTS" then
return
@ -452,23 +511,23 @@ function ComboPoints.prototype:UpdateComboPoints(...)
local points, anticipate, _
if IceHUD.IceCore:IsInConfigMode() then
points = self:GetMaxComboPoints()
elseif IceHUD.WowVer >= 30000 or IceHUD.WowClassic then
elseif UnitHasVehicleUI then
-- Parnic: apparently some fights have combo points while the player is in a vehicle?
local isInVehicle = UnitHasVehicleUI and UnitHasVehicleUI("player")
local checkUnit = isInVehicle and "vehicle" or "player"
if IceHUD.WowVer >= 60000 or IceHUD.WowClassic then
points = UnitPower(checkUnit, SPELL_POWER_COMBO_POINTS)
else
if IceHUD.PerTargetComboPoints then
points = GetComboPoints(checkUnit, "target")
else
points = UnitPower(checkUnit, SPELL_POWER_COMBO_POINTS)
end
if IceHUD.WowVer < 70000 and IceHUD.WowVer >= 50000 then
if AnticipationExists then
_, _, _, anticipate = UnitAura("player", GetSpellInfo(AnticipationSpellId))
else
anticipate = 0
end
else
points = GetComboPoints("target")
points = GetComboPoints("player", "target")
end
points = points or 0
@ -530,7 +589,7 @@ do
function ComboPoints.prototype:CheckAnticipation(e, unit) -- UNIT_AURA handler
if UnitIsUnit(unit, "player") then
local _, _, _, newAntStacks
if IceHUD.WowVer < 80000 then
if IceHUD.SpellFunctionsReturnRank then
_, _, _, newAntStacks = UnitAura("player", GetSpellInfo(AnticipationSpellId))
else
_, _, newAntStacks = UnitAura("player", GetSpellInfo(AnticipationSpellId))
@ -553,4 +612,7 @@ end
-- Load us up
IceHUD.ComboPoints = ComboPoints:new()
local _, class = UnitClass("player")
if (not IceHUD.WowClassic and not IceHUD.WowClassicBC) 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 or IceHUD.WowClassic then
if Enum and Enum.PowerType then
SPELL_POWER_COMBO_POINTS = Enum.PowerType.ComboPoints
end
@ -57,7 +57,6 @@ end
function ComboPointsBar.prototype:GetDefaultSettings()
local defaults = ComboPointsBar.super.prototype.GetDefaultSettings(self)
defaults.textVisible['lower'] = false
defaults.offset = 8
defaults.enabled = false
defaults.alwaysDisplay = false
@ -70,8 +69,8 @@ function ComboPointsBar.prototype:Enable(core)
ComboPointsBar.super.prototype.Enable(self, core)
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateComboPoints")
if IceHUD.WowVer >= 30000 or IceHUD.WowClassic then
if IceHUD.WowVer < 70000 and not IceHUD.WowClassic then
if not IceHUD.EventExistsPlayerComboPoints then
if IceHUD.EventExistsUnitComboPoints then
self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateComboPoints")
else
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateComboPoints")
@ -83,6 +82,20 @@ function ComboPointsBar.prototype:Enable(core)
else
self:RegisterEvent("PLAYER_COMBO_POINTS", "UpdateComboPoints")
end
if GetUnitChargedPowerPoints then
self:RegisterEvent("UNIT_POWER_POINT_CHARGE", "UpdateChargedComboPoints")
end
self:UpdateChargedComboPoints()
end
function ComboPointsBar.prototype:UpdateChargedComboPoints()
if GetUnitChargedPowerPoints then
local chargedPowerPoints = GetUnitChargedPowerPoints("player")
self.chargedPowerPointIndex = chargedPowerPoints and chargedPowerPoints[1]
self:UpdateComboPoints()
end
end
function ComboPointsBar.prototype:CreateFrame()
@ -101,17 +114,17 @@ function ComboPointsBar.prototype:UpdateComboPoints(...)
local points
if IceHUD.IceCore:IsInConfigMode() then
points = UnitPowerMax("player", SPELL_POWER_COMBO_POINTS)
elseif IceHUD.WowVer >= 30000 or IceHUD.WowClassic then
elseif UnitHasVehicleUI then
-- Parnic: apparently some fights have combo points while the player is in a vehicle?
local isInVehicle = UnitHasVehicleUI and UnitHasVehicleUI("player")
local checkUnit = isInVehicle and "vehicle" or "player"
if IceHUD.WowVer >= 60000 or IceHUD.WowClassic then
points = UnitPower(checkUnit, SPELL_POWER_COMBO_POINTS)
else
if IceHUD.PerTargetComboPoints then
points = GetComboPoints(checkUnit, "target")
else
points = UnitPower(checkUnit, SPELL_POWER_COMBO_POINTS)
end
else
points = GetComboPoints("target")
points = GetComboPoints("player", "target")
end
if (points == 0) then
@ -129,10 +142,16 @@ function ComboPointsBar.prototype:UpdateComboPoints(...)
end
self:SetBottomText1(points or "0")
if self.chargedPowerPointIndex then
self:SetBottomText2(self.chargedPowerPointIndex)
end
end
function ComboPointsBar.prototype:Update()
self:UpdateComboPoints()
end
IceHUD.ComboPointsBar = ComboPointsBar:new()
local _, class = UnitClass("player")
if (not IceHUD.WowClassic and not IceHUD.WowClassicBC) or class == "ROGUE" or class == "DRUID" then
IceHUD.ComboPointsBar = ComboPointsBar:new()
end

View File

@ -19,6 +19,7 @@ IceCustomBar.prototype.bIsAura = false
function IceCustomBar.prototype:init()
IceCustomBar.super.prototype.init(self, "MyCustomBar", "player")
self.textColorOverride = true
self.CustomBarUpdateFunc = function() self:UpdateCustomBar(self.unit, true) end
end
-- 'Public' methods -----------------------------------------------------------
@ -36,7 +37,7 @@ function IceCustomBar.prototype:Enable(core)
self:RegisterEvent("UNIT_AURA", "UpdateCustomBarEvent")
self:RegisterEvent("UNIT_PET", "UpdateCustomBarEvent")
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
if IceHUD.EventExistsPlayerPetChanged then
self:RegisterEvent("PLAYER_PET_CHANGED", "UpdateCustomBarEvent")
end
if FocusUnit then
@ -81,6 +82,10 @@ function IceCustomBar.prototype:Disable(core)
end
function IceCustomBar.prototype:GetUnitToTrack()
if not IceHUD.CanTrackOtherUnitBuffs then
return "player"
end
if self.moduleSettings.myUnit == "other" then
if self.moduleSettings.customUnit ~= nil and self.moduleSettings.customUnit ~= "" then
return self.moduleSettings.customUnit
@ -103,11 +108,7 @@ end
function IceCustomBar.prototype:ConditionalSubscribe()
if self:ShouldAlwaysSubscribe() then
if not IceHUD.IceCore:IsUpdateSubscribed(self) then
if not self.CustomBarUpdateFunc then
self.CustomBarUpdateFunc = function() self:UpdateCustomBar() end
end
if not IceHUD.IceCore:IsUpdateSubscribed(self, self.CustomBarUpdateFunc) then
self.handlesOwnUpdates = true
IceHUD.IceCore:RequestUpdates(self, self.CustomBarUpdateFunc)
end
@ -118,7 +119,7 @@ function IceCustomBar.prototype:ConditionalSubscribe()
end
function IceCustomBar.prototype:ShouldAlwaysSubscribe()
return self.unit == "focustarget" or self.unit == "pettarget"
return self.unit == "focustarget" or self.unit == "pettarget" or self.unit == "targettarget"
end
function IceCustomBar.prototype:TargetChanged()
@ -170,7 +171,7 @@ function IceCustomBar.prototype:CreateBar()
IceCustomBar.super.prototype.CreateBar(self)
if not self.barFrame.icon then
self.barFrame.icon = self.masterFrame:CreateTexture(nil, "LOW")
self.barFrame.icon = self.masterFrame:CreateTexture(nil, "BACKGROUND")
-- 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,6 +259,7 @@ function IceCustomBar.prototype:GetOptions()
order = 30.3,
}
if IceHUD.CanTrackOtherUnitBuffs then
opts["unitToTrack"] = {
type = 'select',
values = validUnits,
@ -303,6 +305,7 @@ function IceCustomBar.prototype:GetOptions()
usage = "<what custom unit to track when unitToTrack is set to 'other'>",
order = 30.45,
}
end
opts["buffOrDebuff"] = {
type = 'select',
@ -667,7 +670,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 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank 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 +700,7 @@ function IceCustomBar.prototype:GetAuraDuration(unitName, buffName)
i = i + 1;
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank 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)
@ -749,7 +752,7 @@ function IceCustomBar.prototype:UpdateCustomBar(unit, fromUpdate)
local auraIcon = nil
local endTime = 0
if not fromUpdate then
--if not fromUpdate then
if tonumber(self.moduleSettings.buffToTrack) == nil then
self.auraDuration, remaining, self.auraBuffCount, auraIcon, endTime =
self:GetAuraDuration(self.unit, self.moduleSettings.buffToTrack)
@ -784,18 +787,14 @@ function IceCustomBar.prototype:UpdateCustomBar(unit, fromUpdate)
else
self.barFrame.icon:Hide()
end
end
--end
self.auraBuffCount = self.auraBuffCount or 0
if self.auraEndTime ~= nil and (self.auraEndTime == 0 or self.auraEndTime >= now) and (not self.moduleSettings.minCount or self.auraBuffCount >= self.moduleSettings.minCount) then
if not self:ShouldAlwaysSubscribe() and not fromUpdate and not IceHUD.IceCore:IsUpdateSubscribed(self) then
if not self.UpdateCustomBarFunc then
self.UpdateCustomBarFunc = function() self:UpdateCustomBar(self.unit, true) end
end
if not self:ShouldAlwaysSubscribe() and not fromUpdate and not IceHUD.IceCore:IsUpdateSubscribed(self, self.CustomBarUpdateFunc) then
self.handlesOwnUpdates = true
IceHUD.IceCore:RequestUpdates(self, self.UpdateCustomBarFunc)
IceHUD.IceCore:RequestUpdates(self, self.CustomBarUpdateFunc)
end
self:Show(true)

View File

@ -131,7 +131,7 @@ function IceCustomCDBar.prototype:CreateBar()
IceCustomCDBar.super.prototype.CreateBar(self)
if not self.barFrame.icon then
self.barFrame.icon = self.masterFrame:CreateTexture(nil, "LOW")
self.barFrame.icon = self.masterFrame:CreateTexture(nil, "BACKGROUND")
-- 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")

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

@ -277,7 +277,7 @@ function IceCustomCounterBar.prototype:CreateFrame()
IceCustomCounterBar.super.prototype.CreateFrame(self)
if not self.barFrame.icon then
self.barFrame.icon = self.masterFrame:CreateTexture(nil, "LOW")
self.barFrame.icon = self.masterFrame:CreateTexture(nil, "BACKGROUND")
self.barFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
self.barFrame.icon:SetDrawLayer("OVERLAY")
self.barFrame.icon:Hide()

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))
@ -119,7 +119,7 @@ function EclipseBar.prototype:UpdateShown()
if form == MOONKIN_FORM or not form then
local PrimaryTalentTree = 0
if IceHUD.WowVer >= 50000 then
if GetSpecialization then
PrimaryTalentTree = GetSpecialization()
else
PrimaryTalentTree = GetPrimaryTalentTree()
@ -190,6 +190,6 @@ function EclipseBar.prototype:MyOnUpdate()
end
local _, unitClass = UnitClass("player")
if (unitClass == "DRUID" and IceHUD.WowVer >= 40000 and IceHUD.WowVer < 70000) then
if (unitClass == "DRUID" and GetEclipseDirection) then
IceHUD.EclipseBar = EclipseBar: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 or IceHUD.WowClassic then
if Enum and Enum.PowerType then
SPELL_POWER_RAGE = Enum.PowerType.Rage
SPELL_POWER_FOCUS = Enum.PowerType.Focus
SPELL_POWER_ENERGY = Enum.PowerType.Energy
@ -39,9 +39,9 @@ end
function FocusMana.prototype:Enable(core)
FocusMana.super.prototype.Enable(self, core)
if IceHUD.WowVer >= 40000 then
if not IceHUD.PerPowerEventsExist then
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent")
if IceHUD.WowVer < 80000 then
if IceHUD.EventExistsUnitMaxPower then
self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent")
end
else

View File

@ -165,7 +165,7 @@ function GlobalCoolDown.prototype:GetSpellCastTime(spell)
end
local spellname, castTime, _
if IceHUD.WowVer < 60000 then
if IceHUD.GetSpellInfoReturnsFunnel then
spellName, _, _, _, _, _, castTime = GetSpellInfo(spell)
else
spellName, _, _, castTime = GetSpellInfo(spell)
@ -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
@ -267,8 +267,9 @@ function GlobalCoolDown.prototype:CreateLagBar()
end
function GlobalCoolDown.prototype:GetSpellId()
if GetSpellInfo(61304) then
return 61304
--[[
else
local defaultSpells
defaultSpells = {
@ -285,10 +286,16 @@ function GlobalCoolDown.prototype:GetSpellId()
MONK=100780, -- jab
}
if not GetSpellInfo(defaultSpells["PALADIN"]) then
defaultSpells["PALADIN"] = 635
end
local _, unitClass = UnitClass("player")
return defaultSpells[unitClass]
]]
end
end
-- Load us up
IceHUD.GlobalCoolDown = GlobalCoolDown:new()
if IceHUD.CanTrackGCD then
IceHUD.GlobalCoolDown = GlobalCoolDown:new()
end

View File

@ -2,7 +2,10 @@ 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 or IceHUD.WowClassic then
if not SPELL_POWER_CHI then
SPELL_POWER_CHI = SPELL_POWER_LIGHT_FORCE
end
if Enum and Enum.PowerType then
SPELL_POWER_CHI = Enum.PowerType.Chi
end
@ -23,11 +26,7 @@ function HarmonyPower.prototype:init()
}
self.numRunes = 4
self.numericColor = "ChiNumeric"
if IceHUD.WowVer >= 50100 then
self.unitPower = SPELL_POWER_CHI
else
self.unitPower = SPELL_POWER_LIGHT_FORCE
end
if IceHUD.WowVer >= 70000 then
self.requiredSpec = SPEC_MONK_WINDWALKER
end
@ -117,6 +116,6 @@ end
-- Load us up
local _, unitClass = UnitClass("player")
if (unitClass == "MONK" and IceHUD.WowVer >= 50000) then
if unitClass == "MONK" then
IceHUD.HarmonyPower = HarmonyPower:new()
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 or IceHUD.WowClassic then
if Enum and Enum.PowerType then
SPELL_POWER_HOLY_POWER = Enum.PowerType.HolyPower
end
@ -32,13 +32,13 @@ 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
self.unit = "player"
self.numRunes = 5
if IceHUD.WowVer >= 50000 then
if HOLY_POWER_FULL then
self.numConsideredFull = HOLY_POWER_FULL
else
self.numConsideredFull = 3
@ -134,7 +134,7 @@ end
-- Load us up
local _, unitClass = UnitClass("player")
if (unitClass == "PALADIN" and IceHUD.WowVer >= 40000) then
if (unitClass == "PALADIN" and (PaladinPowerBar or PaladinPowerBarFrame)) then
IceHUD.HolyPower = HolyPower:new()
end

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,14 +42,16 @@ function PetHealth.prototype:Enable(core)
PetHealth.super.prototype.Enable(self, core)
self:RegisterEvent("PET_UI_UPDATE", "CheckPet");
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
if IceHUD.EventExistsPlayerPetChanged then
self:RegisterEvent("PLAYER_PET_CHANGED", "CheckPet");
end
self:RegisterEvent("PET_BAR_UPDATE_USABLE", "CheckPet");
self:RegisterEvent("UNIT_PET", "CheckPet");
self:RegisterEvent("UNIT_HEALTH", "UpdateEvent")
if IceHUD.EventExistsUnitHealthFrequent then
self:RegisterEvent("UNIT_HEALTH_FREQUENT", "UpdateEvent")
end
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateEvent")
if UnitHasVehicleUI then
@ -223,6 +225,7 @@ function PetHealth.prototype:ExitingVehicle(event, unit)
end
function PetHealth.prototype:EnteringWorld()
self:TargetChanged()
self:Update(self.unit)
if UnitHasVehicleUI then

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 or IceHUD.WowClassic then
if Enum and Enum.PowerType 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 and not IceHUD.WowClassic then
if IceHUD.EventExistsPlayerPetChanged then
self:RegisterEvent("PLAYER_PET_CHANGED", "CheckPet")
end
self:RegisterEvent(IceHUD.WowVer < 80000 and not IceHUD.WowClassic and "PET_BAR_CHANGED" or "PET_BAR_UPDATE_USABLE", "CheckPet")
self:RegisterEvent(IceHUD.EventExistsPetBarChanged and "PET_BAR_CHANGED" or "PET_BAR_UPDATE_USABLE", "CheckPet")
self:RegisterEvent("UNIT_PET", "CheckPet")
if IceHUD.WowVer >= 40000 or IceHUD.WowClassic then
if not IceHUD.PerPowerEventsExist then
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent")
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
if IceHUD.EventExistsUnitMaxPower then
self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent")
end
else
@ -242,6 +242,7 @@ function PetMana.prototype:ExitingVehicle(event, unit)
end
function PetMana.prototype:EnteringWorld()
self:TargetChanged()
self:Update(self.unit)
if UnitHasVehicleUI then

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 or IceHUD.WowClassic then
if Enum and Enum.PowerType then
SPELL_POWER_MANA = Enum.PowerType.Mana
SPELL_POWER_INSANITY = Enum.PowerType.Insanity
end

View File

@ -29,7 +29,7 @@ function IceHUDPlayerAlternatePower.prototype:Enable(core)
IceHUDPlayerAlternatePower.super.prototype.Enable(self, core)
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent")
if IceHUD.WowVer < 80000 then
if IceHUD.EventExistsUnitMaxPower then
self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent")
end
self:RegisterEvent("UNIT_POWER_BAR_SHOW", "PowerBarShow")

View File

@ -10,6 +10,7 @@ PlayerHealth.prototype.absorbAmount = 0
local configMode = false
local HealComm
local incomingHealAmt = 0
local groupEvent = IceHUD.EventExistsGroupRosterUpdate and "GROUP_ROSTER_UPDATE" or "PARTY_MEMBERS_CHANGED"
-- Constructor --
function PlayerHealth.prototype:init()
@ -68,7 +69,9 @@ function PlayerHealth.prototype:Enable(core)
PlayerHealth.super.prototype.Enable(self, core)
self:RegisterEvent("UNIT_HEALTH", "UpdateEvent")
if IceHUD.EventExistsUnitHealthFrequent then
self:RegisterEvent("UNIT_HEALTH_FREQUENT", "UpdateEvent")
end
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateEvent")
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
@ -79,11 +82,7 @@ function PlayerHealth.prototype:Enable(core)
self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckCombat")
self:RegisterEvent("PARTY_LEADER_CHANGED", "CheckLeader")
if IceHUD.WowVer >= 50000 or IceHUD.WowClassic then
self:RegisterEvent("GROUP_ROSTER_UPDATE", "CheckLeader")
else
self:RegisterEvent("PARTY_MEMBERS_CHANGED", "CheckLeader")
end
self:RegisterEvent(groupEvent, "CheckLeader")
if GetLFGProposal then
self:RegisterEvent("LFG_PROPOSAL_UPDATE", "CheckPartyRole")
self:RegisterEvent("LFG_PROPOSAL_FAILED", "CheckPartyRole")
@ -103,7 +102,7 @@ function PlayerHealth.prototype:Enable(core)
self:RegisterEvent("UNIT_EXITED_VEHICLE", "ExitingVehicle")
end
if IceHUD.WowVer < 40000 then
if not IceHUD.SupportsHealPrediction then
HealComm = LibStub("LibHealComm-4.0", true)
if HealComm then
HealComm.RegisterCallback(self, "HealComm_HealStarted", function(event, casterGUID, spellID, spellType, endTime, ...) self:HealComm_HealEvent(event, casterGUID, spellID, spellType, endTime, ...) end)
@ -167,7 +166,7 @@ function PlayerHealth.prototype:HealComm_ModifierChanged(event, guid)
end
function PlayerHealth.prototype:IncomingHealPrediction(event, unit)
if IceHUD.WowVer >= 40000 then
if IceHUD.SupportsHealPrediction then
if unit and unit ~= self.unit then
return
end
@ -319,7 +318,7 @@ function PlayerHealth.prototype:GetOptions()
self:Update()
end,
disabled = function()
return not (self.moduleSettings.enabled and (IceHUD.WowVer >= 40000 or HealComm))
return not (self.moduleSettings.enabled and (IceHUD.SupportsHealPrediction or HealComm))
end,
order = 43.6
}
@ -365,7 +364,7 @@ function PlayerHealth.prototype:GetOptions()
self:Update()
end,
disabled = function()
return not (self.moduleSettings.enabled and IceHUD.WowVer >= 70000)
return not (self.moduleSettings.enabled and UnitGetTotalAbsorbs)
end,
order = 43.8
}
@ -934,25 +933,25 @@ 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))
self:UpdateBar(1, "undef")
if not self.moduleSettings.showIncomingHeals or (IceHUD.WowVer < 40000 and not HealComm) then
if not self.moduleSettings.showIncomingHeals or (not IceHUD.SupportsHealPrediction and not HealComm) then
self.healFrame.bar:Hide()
end
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))
self:UpdateBar(1, "undef")
if not self.moduleSettings.showAbsorbs or UnitGetTotalAbsorbs == nil then
if not self.moduleSettings.showAbsorbs or not UnitGetTotalAbsorbs then
self.absorbFrame.bar:Hide()
end
end
@ -1092,7 +1091,7 @@ function PlayerHealth.prototype:CheckPartyRole()
proposalExists, id, typeID, subtypeID, name, texture, role, hasResponded, totalEncounters, completedEncounters, numMembers, isleader = GetLFGProposal()
local p = self.unit
if IceHUD.WowVer < 40000 then
if not IceHUD.UnitGroupRolesReturnsRoleString then
isTank, isHeal, isDPS = UnitGroupRolesAssigned(p)
else
local grpRole = UnitGroupRolesAssigned(p)
@ -1405,15 +1404,18 @@ end
function PlayerHealth.prototype:ShowBlizz()
PlayerFrame:Show()
PlayerFrame:GetScript("OnLoad")(PlayerFrame)
PlayerFrame:SetParent(self.OriginalPlayerFrameParent or UIParent)
end
function PlayerHealth.prototype:HideBlizz()
PlayerFrame:Hide()
if not self.PlayerFrameParent then
self.PlayerFrameParent = CreateFrame("Frame")
self.PlayerFrameParent:Hide()
end
PlayerFrame:UnregisterAllEvents()
self.OriginalPlayerFrameParent = PlayerFrame:GetParent()
PlayerFrame:SetParent(self.PlayerFrameParent)
end
function PlayerHealth.prototype:HideBlizzardParty()
@ -1422,37 +1424,34 @@ function PlayerHealth.prototype:HideBlizzardParty()
return
end
-- Both Pitbull 4 and Xperl use these exact code, so we use it too.
if PartyFrame then
PartyFrame:Hide()
PartyFrame:UnregisterEvent(groupEvent)
else
for i = 1, MAX_PARTY_MEMBERS do
local party = _G['PartyMemberFrame'..i]
party:UnregisterAllEvents()
party:Hide()
party.Show = function() end
local frame = _G["PartyMemberFrame" .. i]
frame:SetAttribute("statehidden", true)
hook_frames(frame)
end
UIParent:UnregisterEvent(groupEvent)
end
UIParent:UnregisterEvent('RAID_ROSTER_UPDATE')
end
function PlayerHealth.prototype:ShowBlizzardParty()
-- Both Pitbull 4 and Xperl use these exact code, so we use it too.
for i = 1, MAX_PARTY_MEMBERS do
local frame = _G["PartyMemberFrame"..i]
if frame then
frame.Show = nil
frame:GetScript("OnLoad")(frame)
if IceHUD.WowVer >= 50000 then
frame:GetScript("OnEvent")(frame, "GROUP_ROSTER_UPDATE")
if PartyFrame then
PartyFrame:Show()
PartyFrame:Layout()
PartyFrame:RegisterEvent(groupEvent)
else
frame:GetScript("OnEvent")(frame, "PARTY_MEMBERS_CHANGED")
for i = 1, MAX_PARTY_MEMBERS do
local frame = _G["PartyMemberFrame" .. i]
frame:SetAttribute("statehidden", nil)
unhook_frames(frame)
frame:GetScript("OnEvent")(frame, groupEvent)
end
PartyMemberFrame_UpdateMember(frame)
UIParent:RegisterEvent(groupEvent)
end
end
UIParent:RegisterEvent("RAID_ROSTER_UPDATE")
end
--function PlayerHealth.prototype:ShowBlizzParty()

View File

@ -115,7 +115,9 @@ end
function PlayerInfo.prototype:ShowBlizz()
BuffFrame:Show()
if TemporaryEnchantFrame then
TemporaryEnchantFrame:Show()
end
BuffFrame:GetScript("OnLoad")(BuffFrame)
end
@ -123,7 +125,9 @@ end
function PlayerInfo.prototype:HideBlizz()
BuffFrame:Hide()
if TemporaryEnchantFrame then
TemporaryEnchantFrame:Hide()
end
BuffFrame:UnregisterAllEvents()
end

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 or IceHUD.WowClassic then
if Enum and Enum.PowerType 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 or IceHUD.WowClassic then
if not IceHUD.PerPowerEventsExist then
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent")
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
if IceHUD.EventExistsUnitMaxPower then
self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent")
end
else
@ -203,7 +203,7 @@ function PlayerMana.prototype:CheckVehicle()
end
function PlayerMana.prototype:ShouldUseTicker()
return IceHUD.WowVer < 30000 or (IceHUD.WowVer < 70100 and not GetCVarBool("predictedPower"))
return IceHUD.WowVer < 30000 or (IceHUD.WowVer < 70100 and not GetCVarBool("predictedPower") and not IceHUD.WowClassicWrath)
end
function PlayerMana.prototype:SetupOnUpdate(enable)
@ -280,7 +280,7 @@ function PlayerMana.prototype:ManaType(event, unit)
if self:ShouldUseTicker() then
-- register ticker for rogue energy
if (self.moduleSettings.tickerEnabled and (self.manaType == SPELL_POWER_ENERGY) and self.alive) then
if self.moduleSettings.tickerEnabled and self.manaType == SPELL_POWER_ENERGY then
self.tickerFrame:Show()
self.tickerFrame:SetScript("OnUpdate", function() self:EnergyTick() end)
else
@ -353,13 +353,13 @@ function PlayerMana.prototype:Update(unit, powertype)
color = "PlayerRunicPower"
elseif (self.manaType == SPELL_POWER_FOCUS) then
color = "PlayerFocus"
elseif (IceHUD.WowVer >= 70000 and self.manaType == SPELL_POWER_INSANITY) then
elseif (self.manaType == SPELL_POWER_INSANITY) then
color = "PlayerInsanity"
elseif (IceHUD.WowVer >= 70000 and self.manaType == SPELL_POWER_FURY) then
elseif (self.manaType == SPELL_POWER_FURY) then
color = "PlayerFury"
elseif (IceHUD.WowVer >= 70000 and self.manaType == SPELL_POWER_MAELSTROM) then
elseif (self.manaType == SPELL_POWER_MAELSTROM) then
color = "PlayerMaelstrom"
elseif (IceHUD.WowVer >= 70000 and self.manaType == SPELL_POWER_PAIN) then
elseif (self.manaType == SPELL_POWER_PAIN) then
color = "PlayerPain"
end
end
@ -387,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 or self.manaType == SPELL_POWER_FURY then
displayPercentage = self.mana
else
displayPercentage = math.floor(displayPercentage * 100)
@ -438,7 +438,7 @@ function PlayerMana.prototype:EnergyTick()
return
end
if not (self.tickStart) then
if not self.tickStart or not self.alive then
self.tickerFrame:Hide()
return
end

View File

@ -56,7 +56,7 @@ do
return
end
self.current = select((IceHUD.WowVer < 80000 and not IceHUD.WowClassic) and 15 or 14, UnitAura(self.unit, spellName)) or 0
self.current = select(IceHUD.SpellFunctionsReturnRank and 15 or 14, UnitAura(self.unit, spellName)) or 0
self:Update()
end
@ -79,7 +79,7 @@ end
-- Load for tanks only
local _, unitClass = UnitClass("player")
if ((unitClass == "DEATHKNIGHT" or unitClass == "DRUID" or unitClass == "PALADIN" or unitClass == "WARRIOR" or unitClass == "MONK")
and IceHUD.WowVer >= 60000 and IceHUD.WowVer < 70000) then
if (unitClass == "DEATHKNIGHT" or unitClass == "DRUID" or unitClass == "PALADIN" or unitClass == "WARRIOR" or unitClass == "MONK")
and GetSpellInfo(RESOLVE_SPELL_ID) then
IceHUD.Resolve = Resolve:new()
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 or IceHUD.WowClassic then
if Enum and Enum.PowerType 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)
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")
if behaviorDependsOnComboPoints then
self:RegisterEvent(IceHUD.UnitPowerEvent, "ComboPointsChanged")
end
if not self.moduleSettings.alwaysFullAlpha then
self:Show(false)
@ -106,6 +113,7 @@ 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
if behaviorDependsOnComboPoints then
opts["showAsPercentOfMax"] =
{
type = 'toggle',
@ -142,6 +150,24 @@ 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,
}
end
opts["bShowWithNoTarget"] =
{
type = 'toggle',
@ -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)
if self.durationFrame then
self:RotateFrame(self.durationFrame)
end
end
function RollTheBones.prototype:ResetRotation()
@ -220,7 +235,7 @@ end
function RollTheBones.prototype:GetBuffDuration(unitName, ids)
local i = 1
local buff, _, type, duration, endTime, spellId
if IceHUD.WowVer < 80000 then
if IceHUD.SpellFunctionsReturnRank then
buff, _, _, _, type, duration, endTime, _, _, _, spellId = UnitBuff(unitName, i)
else
buff, _, _, type, duration, endTime, _, _, _, spellId = UnitBuff(unitName, i)
@ -241,7 +256,7 @@ function RollTheBones.prototype:GetBuffDuration(unitName, ids)
i = i + 1;
if IceHUD.WowVer < 80000 then
if IceHUD.SpellFunctionsReturnRank then
buff, _, _, _, type, duration, endTime, _, _, _, spellId = UnitBuff(unitName, i)
else
buff, _, _, type, duration, endTime, _, _, _, spellId = UnitBuff(unitName, i)
@ -259,7 +274,7 @@ end
function RollTheBones.prototype:MyOnUpdate()
RollTheBones.super.prototype.MyOnUpdate(self)
if self.bUpdateRtb then
self:UpdateRollTheBones(nil, self.unit, true)
self:UpdateRollTheBones("internal", self.unit)
end
if self.target or self.moduleSettings.bShowWithNoTarget then
self:UpdateDurationBar()
@ -281,13 +296,14 @@ local function ShouldHide()
return not HasSpell(193316)
end
function RollTheBones.prototype:UpdateRollTheBones(event, unit, fromUpdate)
function RollTheBones.prototype:UpdateRollTheBones(event, unit)
if unit and unit ~= self.unit then
return
end
local now = GetTime()
local remaining = nil
local fromUpdate = event == "internal"
if not fromUpdate then
rtbDuration, remaining, rtbCount = self:GetBuffDuration(self.unit, RtBSet)
@ -308,7 +324,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 +342,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 +368,20 @@ 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)
if UnitPowerMax then
CurrMaxRtBDuration = self:GetMaxBuffTime(UnitPowerMax(self.unit, SPELL_POWER_COMBO_POINTS))
else
-- 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
@ -366,6 +389,7 @@ function RollTheBones.prototype:UpdateDurationBar(event, unit)
else
CurrMaxRtBDuration = self:GetMaxBuffTime(maxComboPoints)
end
end
if event then
self:UpdateRollTheBones()

View File

@ -3,21 +3,23 @@ local Runes = IceCore_CreateClass(IceElement)
local IceHUD = _G.IceHUD
local RunesReturnedByMaxPower = IceHUD.WowVer >= 70000
local CooldownFrame_SetTimer = CooldownFrame_SetTimer
if CooldownFrame_Set then
CooldownFrame_SetTimer = CooldownFrame_Set
end
local RUNETYPE_BLOOD = 1;
local RUNETYPE_DEATH = IceHUD.WowVer < 70300 and 2 or 3;
local RUNETYPE_FROST = IceHUD.WowVer < 70300 and 3 or 2;
local RUNETYPE_DEATH = IceHUD.DeathKnightUnholyFrostRunesSwapped and 2 or 3;
local RUNETYPE_FROST = IceHUD.DeathKnightUnholyFrostRunesSwapped and 3 or 2;
local RUNETYPE_CHROMATIC = 4;
local RUNETYPE_LEGION = 5; -- not real, but makes for an easy update
local GetRuneType = GetRuneType
if IceHUD.WowVer >= 70000 and IceHUD.WowVer < 70300 then
GetRuneType = function() return RUNETYPE_LEGION end
elseif IceHUD.WowVer >= 70300 then
elseif IceHUD.WowVer >= 70300 and GetSpecialization then
GetRuneType = function() return GetSpecialization() end
end
@ -44,7 +46,7 @@ Runes.prototype.numRunes = 6
Runes.prototype.lastRuneState = {}
local SPELL_POWER_RUNES = SPELL_POWER_RUNES
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
if Enum and Enum.PowerType then
SPELL_POWER_RUNES = Enum.PowerType.Runes
end
@ -132,6 +134,9 @@ function Runes.prototype:GetOptions()
disabled = function()
return not self.moduleSettings.enabled
end,
hidden = function()
return not PlayerFrame_HideVehicleTexture
end,
order = 32
}
@ -265,7 +270,7 @@ end
-- OVERRIDE
function Runes.prototype:Enable(core)
if IceHUD.WowVer >= 70000 then
if RunesReturnedByMaxPower then
self.numRunes = UnitPowerMax("player", SPELL_POWER_RUNES)
end
@ -282,14 +287,21 @@ 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")
if RunesReturnedByMaxPower then
self:RegisterEvent("UNIT_MAXPOWER", "CheckMaxNumRunes")
end
if (self.moduleSettings.hideBlizz) then
self:HideBlizz()
end
end
function Runes.prototype:EnteringWorld()
self:TargetChanged()
self:ResetRuneAvailability()
end
function Runes.prototype:Disable(core)
Runes.super.prototype.Disable(self, core)
@ -498,7 +510,7 @@ function Runes.prototype:CreateRune(i, type, name)
-- create runes
if (not self.frame.graphical[i]) then
self.frame.graphical[i] = CreateFrame("Frame", nil, self.frame)
self.frame.graphical[i].rune = self.frame.graphical[i]:CreateTexture(nil, "LOW")
self.frame.graphical[i].rune = self.frame.graphical[i]:CreateTexture(nil, "BACKGROUND")
self.frame.graphical[i].rune:SetAllPoints(self.frame.graphical[i])
self.frame.graphical[i].cd = CreateFrame("Cooldown", nil, self.frame.graphical[i], "CooldownFrameTemplate")
self.frame.graphical[i].shine = self.frame.graphical[i]:CreateTexture(nil, "OVERLAY")
@ -572,6 +584,10 @@ local function hook_playerframe()
end
function Runes.prototype:HideBlizz()
if not PlayerFrame_HideVehicleTexture then
return
end
RuneFrame:Hide()
RuneFrame:UnregisterAllEvents()

View File

@ -38,7 +38,7 @@ local DemonologyCoords =
}
local SPELL_POWER_SOUL_SHARDS = SPELL_POWER_SOUL_SHARDS
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then
if Enum and Enum.PowerType then
SPELL_POWER_SOUL_SHARDS = Enum.PowerType.SoulShards
end
@ -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
@ -275,6 +276,6 @@ end
-- Load us up
local _, unitClass = UnitClass("player")
if (unitClass == "WARLOCK" and IceHUD.WowVer >= 40000) then
if (unitClass == "WARLOCK" and WarlockPowerFrame) then
IceHUD.ShardCounter = ShardCounter:new()
end

View File

@ -20,10 +20,16 @@ local impSndBonusPerRank = 0.25
local maxComboPoints = 5
local sndEndTime = 0
local sndDuration = 0
local sixComboPointsTalentID = 19240
local CurrMaxSnDDuration = 0
local PotentialSnDDuration = 0
local sndBuffName = 132306
if IceHUD.WowMain and IceHUD.WowVer < 80000 then
sndBuffName = "Ability_Rogue_SliceDice"
end
if IceHUD.WowVer >= 50000 then
baseTime = 12
gapPerComboPoint = 6
@ -32,10 +38,18 @@ if IceHUD.WowClassic then
impSndBonusPerRank = 0.15
impSndTalentPage = 1
impSndTalentIdx = 6
elseif IceHUD.WowClassicBC then
impSndBonusPerRank = 0.15
impSndTalentPage = 2
impSndTalentIdx = 4
elseif IceHUD.WowClassicWrath then
impSndBonusPerRank = 0.25
impSndTalentPage = 2
impSndTalentIdx = 23
end
local SPELL_POWER_COMBO_POINTS = SPELL_POWER_COMBO_POINTS
if IceHUD.WowVer >= 80000 then
if Enum and Enum.PowerType then
SPELL_POWER_COMBO_POINTS = Enum.PowerType.ComboPoints
end
@ -60,12 +74,21 @@ function SliceAndDice.prototype:Enable(core)
SliceAndDice.super.prototype.Enable(self, core)
self:RegisterEvent("UNIT_AURA", "UpdateSliceAndDice")
if IceHUD.WowVer < 70000 and not IceHUD.WowClassic then
if IceHUD.EventExistsUnitComboPoints 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 IceHUD.EventExistsUnitMaxPower then
self:RegisterEvent("UNIT_MAXPOWER", "CheckMaxComboPoints")
end
if not self.moduleSettings.alwaysFullAlpha then
self:Show(false)
else
@ -75,6 +98,15 @@ function SliceAndDice.prototype:Enable(core)
self:SetBottomText1("")
end
function SliceAndDice.prototype:CheckMaxComboPoints()
if UnitPowerMax then
maxComboPoints = UnitPowerMax(self.unit, SPELL_POWER_COMBO_POINTS)
else
local talentID, name, texture, selected, available, spellID, unknown, row, column, known, grantedByAura = GetTalentInfoByID(sixComboPointsTalentID, GetActiveSpecGroup())
maxComboPoints = selected and 6 or 5
end
end
function SliceAndDice.prototype:Disable(core)
SliceAndDice.super.prototype.Disable(self, core)
end
@ -182,7 +214,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
@ -216,7 +248,7 @@ end
function SliceAndDice.prototype:GetBuffDuration(unitName, buffName)
local i = 1
local buff, _, texture, duration, endTime, remaining
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank then
buff, _, texture, _, _, duration, endTime = UnitBuff(unitName, i)
else
buff, texture, _, _, duration, endTime = UnitBuff(unitName, i)
@ -232,7 +264,7 @@ function SliceAndDice.prototype:GetBuffDuration(unitName, buffName)
i = i + 1;
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank then
buff, _, texture, _, _, duration, endTime = UnitBuff(unitName, i)
else
buff, texture, _, _, duration, endTime = UnitBuff(unitName, i)
@ -245,7 +277,7 @@ end
function SliceAndDice.prototype:MyOnUpdate()
SliceAndDice.super.prototype.MyOnUpdate(self)
if self.bUpdateSnd then
self:UpdateSliceAndDice(nil, self.unit, true)
self:UpdateSliceAndDice("internal", self.unit)
end
if self.target or self.moduleSettings.bShowWithNoTarget then
self:UpdateDurationBar()
@ -253,10 +285,10 @@ function SliceAndDice.prototype:MyOnUpdate()
end
local function SNDGetComboPoints(unit)
if IceHUD.WowVer >= 60000 or IceHUD.WowClassic then
return UnitPower(unit, SPELL_POWER_COMBO_POINTS)
elseif IceHUD.WowVer >= 30000 then
if IceHUD.PerTargetComboPoints then
return GetComboPoints(unit, "target")
elseif IceHUD.WowVer >= 60000 then
return UnitPower(unit, SPELL_POWER_COMBO_POINTS)
else
return GetComboPoints()
end
@ -270,22 +302,27 @@ local function HasSpell(id)
end
local function ShouldHide()
if IceHUD.WowVer >= 90000 or IceHUD.WowClassicBC or IceHUD.WowClassicWrath 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
-- with different durations
end
function SliceAndDice.prototype:UpdateSliceAndDice(event, unit, fromUpdate)
function SliceAndDice.prototype:UpdateSliceAndDice(event, unit)
if unit and unit ~= self.unit then
return
end
local now = GetTime()
local remaining = nil
local fromUpdate = event == "internal"
if not fromUpdate or IceHUD.WowVer < 30000 then
sndDuration, remaining = self:GetBuffDuration(self.unit, (IceHUD.WowVer < 80000 and not IceHUD.WowClassic) and "Ability_Rogue_SliceDice" or 132306)
sndDuration, remaining = self:GetBuffDuration(self.unit, sndBuffName)
if not remaining then
sndEndTime = 0
@ -387,13 +424,11 @@ function SliceAndDice.prototype:UpdateDurationBar(event, unit)
end
function SliceAndDice.prototype:GetMaxBuffTime(numComboPoints)
local maxduration
if numComboPoints == 0 then
return 0
end
maxduration = baseTime + ((numComboPoints - 1) * gapPerComboPoint)
local maxduration = baseTime + ((numComboPoints - 1) * gapPerComboPoint)
if self:HasNetherbladeBonus() then
maxduration = maxduration + netherbladeBonus

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
@ -184,13 +185,13 @@ function StaggerBar.prototype:GetDebuffInfo()
local staggerLevel = 1
for i = 1, IceCore.BuffLimit do
local debuffID = select(IceHUD.WowVer < 80000 and 11 or 10, UnitDebuff(self.unit, i))
local debuffID = select(IceHUD.SpellFunctionsReturnRank and 11 or 10, UnitDebuff(self.unit, i))
if debuffID == LightID or debuffID == ModerateID or debuffID == HeavyID then
local spellName = UnitDebuff(self.unit, i)
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"))
duration = select(IceHUD.SpellFunctionsReturnRank and 6 or 5, UnitAura(self.unit, spellName, "", "HARMFUL"))
amount = select(IceHUD.SpellFunctionsReturnRank and 15 or 14, UnitAura(self.unit, spellName, "", "HARMFUL"))
staggerLevel = (debuffID == LightID) and 1 or (debuffID == ModerateID) and 2 or 3
break
@ -235,7 +236,7 @@ end
function StaggerBar.prototype:GetDebuffDuration(unitName, buffId)
local name, _, duration, endTime
if IceHUD.WowVer < 80000 then
if IceHUD.SpellFunctionsReturnRank then
name, _, _, _, _, duration, endTime = UnitDebuff(unitName, buffName)
else
for i = 1, IceCore.BuffLimit do

View File

@ -7,7 +7,7 @@ TargetCC.prototype.debuffRemaining = 0
TargetCC.prototype.debuffDuration = 0
local GetNumPartyMembers, GetNumRaidMembers = GetNumPartyMembers, GetNumRaidMembers
if IceHUD.WowVer >= 50000 then
if GetNumGroupMembers then
GetNumPartyMembers = GetNumGroupMembers
GetNumRaidMembers = GetNumGroupMembers
end
@ -113,6 +113,8 @@ local IncapacitateCCList = {
local FearCCList = {
-- Psychic Scream
8122,
-- Fear (Retail)
118699,
-- Fear
5782,
-- Howl of Terror
@ -336,7 +338,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 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank then
debuff, rank, texture, count, debuffType, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, "HARMFUL")
else
debuff, texture, count, debuffType, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, "HARMFUL")
@ -360,7 +362,7 @@ function TargetCC.prototype:GetMaxDebuffDuration(unitName, debuffNames)
i = i + 1;
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank 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,7 +15,7 @@ end
function TargetCast.prototype:Enable(core)
TargetCast.super.prototype.Enable(self, core)
if IceHUD.WowVer >= 30200 then
if IceHUD.EventExistsSpellcastInterruptible then
self:RegisterEvent("UNIT_SPELLCAST_INTERRUPTIBLE", "SpellCastInterruptible")
self:RegisterEvent("UNIT_SPELLCAST_NOT_INTERRUPTIBLE", "SpellCastNotInterruptible")
end
@ -65,7 +65,12 @@ function TargetCast.prototype:GetDefaultSettings()
settings["side"] = IceCore.Side.Right
settings["offset"] = 3
settings["flashInstants"] = "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
@ -86,7 +91,7 @@ function TargetCast.prototype:TargetChanged(unit)
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))
local notInterruptible = select(IceHUD.SpellFunctionsReturnRank and 9 or 8, UnitCastingInfo(self.unit))
if spell then
self.notInterruptible = notInterruptibleCast
self:StartBar(IceCastBar.Actions.Cast)
@ -96,7 +101,7 @@ function TargetCast.prototype:TargetChanged(unit)
if UnitChannelInfo then
local channel = UnitChannelInfo(self.unit)
notInterruptible = select((IceHUD.WowVer < 80000 and not IceHUD.WowClassic) and 8 or 7, UnitChannelInfo(self.unit))
notInterruptible = select(IceHUD.SpellFunctionsReturnRank and 8 or 7, UnitChannelInfo(self.unit))
if channel then
self.notInterruptible = notInterruptibleChannel
self:StartBar(IceCastBar.Actions.Channel)
@ -178,11 +183,11 @@ function TargetCast.prototype:StartBar(action, message)
local spell, notInterruptible
if UnitCastingInfo then
spell = UnitCastingInfo(self.unit)
notInterruptible = select(IceHUD.WowVer < 80000 and 9 or 8, UnitCastingInfo(self.unit))
notInterruptible = select(IceHUD.SpellFunctionsReturnRank 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))
notInterruptible = select(IceHUD.SpellFunctionsReturnRank and 8 or 7, UnitChannelInfo(self.unit))
if not spell then
return
@ -197,7 +202,8 @@ end
-------------------------------------------------------------------------------
-- Fulzamoth 2019-09-27 : load in Classic if LibClassicCasterino exists
-- Load us up
if not IceHUD.WowClassic then
if not IceHUD.WowClassic or LibClassicCasterino then
IceHUD.TargetCast = TargetCast:new()
end

View File

@ -642,6 +642,10 @@ function IceTargetHealth.prototype:Enable(core)
self:RegisterEvent("LFG_PROPOSAL_FAILED", "CheckPartyRole")
self:RegisterEvent("LFG_ROLE_UPDATE", "CheckPartyRole")
end
if IceHUD.ShouldUpdateTargetHealthEveryTick and self.unit == "target" then
self.frame:SetScript("OnUpdate", function() self:Update(self.unit) end)
end
end
if (self.moduleSettings.hideBlizz) then
@ -659,6 +663,10 @@ function IceTargetHealth.prototype:Disable(core)
UnregisterUnitWatch(self.frame)
if self.registerEvents and IceHUD.ShouldUpdateTargetHealthEveryTick and self.unit == "target" then
self.frame:SetScript("OnUpdate", nil)
end
if self.moduleSettings.hideBlizz then
self:ShowBlizz()
end
@ -842,6 +850,30 @@ function IceTargetHealth.prototype:Update(unit)
self:UpdateBar(self.healthPercentage, self.color)
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
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 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))
@ -856,6 +888,7 @@ function IceTargetHealth.prototype:Update(unit)
self:SetBottomText2()
end
end
end
self:CheckPvP()
self:CheckPartyRole()
@ -1032,20 +1065,25 @@ end
function IceTargetHealth.prototype:ShowBlizz()
TargetFrame:Show()
TargetFrame:GetScript("OnLoad")(TargetFrame)
ComboFrame:Show()
ComboFrame:GetScript("OnLoad")(ComboFrame)
TargetFrame:SetParent(self.OriginalTargetFrameParent or UIParent)
ComboFrame:SetParent(self.OriginalComboFrameParent or UIParent)
end
function IceTargetHealth.prototype:HideBlizz()
TargetFrame:Hide()
TargetFrame:UnregisterAllEvents()
if not self.TargetFrameParent then
self.TargetFrameParent = CreateFrame("Frame")
self.TargetFrameParent:Hide()
end
if not self.ComboFrameParent then
self.ComboFrameParent = CreateFrame("Frame")
self.ComboFrameParent:Hide()
end
ComboFrame:Hide()
ComboFrame:UnregisterAllEvents()
self.OriginalTargetFrameParent = TargetFrame:GetParent()
TargetFrame:SetParent(self.TargetFrameParent)
self.OriginalComboFrameParent = ComboFrame:GetParent()
ComboFrame:SetParent(self.ComboFrameParent)
end
function IceTargetHealth.prototype:UpdateBar(scale, color, alpha)
@ -1070,7 +1108,7 @@ function IceTargetHealth.prototype:CheckPartyRole()
proposalExists, id, typeID, subtypeID, name, texture, role, hasResponded, totalEncounters, completedEncounters, numMembers, isleader = GetLFGProposal()
local p = self.unit
if IceHUD.WowVer < 40000 then
if not IceHUD.UnitGroupRolesReturnsRoleString then
isTank, isHeal, isDPS = UnitGroupRolesAssigned(p)
else
local grpRole = UnitGroupRolesAssigned(p)

View File

@ -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 and not IceHUD.WowClassic then
if IceHUD.EventExistsUnitDynamicFlags 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 and not IceHUD.WowClassic then
---- Fulzamoth - 2019-09-04 : support for cooldowns on target buffs/debuffs (classic)
local spellID
---- end change by Fulzamoth
if IceHUD.SpellFunctionsReturnRank 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")

View File

@ -7,7 +7,7 @@ TargetInvuln.prototype.buffRemaining = 0
TargetInvuln.prototype.buffDuration = 0
local GetNumPartyMembers, GetNumRaidMembers = GetNumPartyMembers, GetNumRaidMembers
if IceHUD.WowVer >= 50000 then
if GetNumGroupMembers then
GetNumPartyMembers = GetNumGroupMembers
GetNumRaidMembers = GetNumGroupMembers
end
@ -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 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank 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 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank 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")
@ -197,7 +197,7 @@ end
function TargetInvuln.prototype:UpdateTargetBuffs(event, unit, isUpdate)
local name, duration, remaining
if not isUpdate then
if not isUpdate or not self.lastUpdateTime then
self.buffName, self.buffDuration, self.buffRemaining = self:GetMaxbuffDuration(self.unit, self.buffList)
else
self.buffRemaining = math.max(0, self.buffRemaining - (GetTime() - self.lastUpdateTime))

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 or IceHUD.WowClassic then
if Enum and Enum.PowerType 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 or IceHUD.WowClassic then
if not IceHUD.PerPowerEventsExist then
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent")
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then
if IceHUD.EventExistsUnitMaxPower then
self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent")
end
else
@ -83,7 +83,7 @@ function IceTargetMana.prototype:Enable(core)
self:RegisterEvent("UNIT_FOCUS", "UpdateEvent")
-- DK rune stuff
if IceHUD.WowVer >= 30000 then
if SPELL_POWER_RUNIC_POWER then
self:RegisterEvent("UNIT_RUNIC_POWER", "UpdateEvent")
self:RegisterEvent("UNIT_MAXRUNIC_POWER", "UpdateEvent")
end
@ -135,13 +135,13 @@ function IceTargetMana.prototype:Update(unit)
self.color = "TargetEnergy"
elseif (manaType == SPELL_POWER_RUNIC_POWER) then
self.color = "TargetRunicPower"
elseif (IceHUD.WowVer >= 70000 and manaType == SPELL_POWER_INSANITY) then
elseif (manaType == SPELL_POWER_INSANITY) then
self.color = "TargetInsanity"
elseif (IceHUD.WowVer >= 70000 and manaType == SPELL_POWER_FURY) then
elseif (manaType == SPELL_POWER_FURY) then
self.color = "TargetFury"
elseif (IceHUD.WowVer >= 70000 and manaType == SPELL_POWER_MAELSTROM) then
elseif (manaType == SPELL_POWER_MAELSTROM) then
self.color = "TargetMaelstrom"
elseif (IceHUD.WowVer >= 70000 and manaType == SPELL_POWER_PAIN) then
elseif (manaType == SPELL_POWER_PAIN) then
self.color = "TargetPain"
end
@ -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 and not IceHUD.WowClassic then
if IceHUD.SpellFunctionsReturnRank then
buffName, buffRank, buffTexture, buffApplications = UnitDebuff(self.unit, i)
else
buffName, buffTexture, buffApplications = UnitDebuff(self.unit, i)

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 or IceHUD.WowClassic then
if not GetNumPartyMembers 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))

View File

@ -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,10 +242,10 @@ 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]]
local haveTotem, name, startTime, duration, icon = GetTotemInfo(totem);
if duration > 0 then
self.frame.graphical[totem].totem:SetTexture(icon)
@ -282,9 +287,8 @@ function Totems.prototype:CreateTotemFrame()
self.frame.graphical = {}
end
local totemType
for i=1, self.numTotems do
slot = TOTEM_PRIORITIES[i]
local slot = TOTEM_PRIORITIES[i]
self:CreateTotem(slot, self.totemNames[slot])
end
end
@ -331,21 +335,18 @@ 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)
local bWasNewFrame = false
if (not self.frame.graphical[i]) then
self.frame.graphical[i] = CreateFrame("Frame", nil, self.frame)
self.frame.graphical[i].totem = self.frame.graphical[i]:CreateTexture(nil, "LOW")
self.frame.graphical[i].totem = self.frame.graphical[i]:CreateTexture(nil, "BACKGROUND")
self.frame.graphical[i].cd = CreateFrame("Cooldown", nil, self.frame.graphical[i], "CooldownFrameTemplate")
self.frame.graphical[i].shine = self.frame.graphical[i]:CreateTexture(nil, "OVERLAY")
self.frame.graphical[i].totem:SetTexture(icon)
self.frame.graphical[i].totem:SetAllPoints(self.frame.graphical[i])
bWasNewFrame = true
end
self.frame.graphical[i]:SetFrameStrata("BACKGROUND")
@ -372,9 +373,9 @@ function Totems.prototype:CreateTotem(i, name)
self.graphicalOnLeave = function() GameTooltip:Hide() end
end
if not self.graphicalOnMouseUp then
self.graphicalOnMouseUp = function (self, mouseButton)
self.graphicalOnMouseUp = function (button, mouseButton)
if mouseButton == "RightButton" then
DestroyTotem(self.slot)
DestroyTotem(button.slot)
end
end
end
@ -402,22 +403,23 @@ function Totems.prototype:CreateTotem(i, name)
self.frame.graphical[i]:EnableMouse(true)
self.frame.graphical[i]:SetScript("OnEnter", self.graphicalOnEnter)
self.frame.graphical[i]:SetScript("OnLeave", self.graphicalOnLeave)
if IceHUD.CanHookDestroyTotem then
self.frame.graphical[i]:SetScript("OnMouseUp", self.graphicalOnMouseUp)
end
else
self.frame.graphical[i]:EnableMouse(false)
self.frame.graphical[i]:SetScript("OnEnter", nil)
self.frame.graphical[i]:SetScript("OnLeave", nil)
if IceHUD.CanHookDestroyTotem then
self.frame.graphical[i]:SetScript("OnMouseUp", nil)
end
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
--self.frame.graphical[i]:HookScript("OnMouseUp", self.graphicalOnMouseUp)
end
end
-- Load us up
local _, unitClass = UnitClass("player")
if (unitClass == "SHAMAN") or (unitClass == "DRUID") then
if IceHUD.WowVer >= 90000 or (unitClass == "SHAMAN") or (unitClass == "DRUID") then
IceHUD.Totems = Totems:new()
end

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)
@ -80,5 +81,7 @@ IceHUD is a highly configurable and customizable HUD addon in the spirit of DHUD
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.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 KiB

After

Width:  |  Height:  |  Size: 37 KiB

6
this_version.md Normal file
View File

@ -0,0 +1,6 @@
# Changelog
v1.14.0:
- 10.0 compatibility
- Renamed Anima Charged combo points to Charged, and removed specific references to Kyrian.