Compare commits

...

70 Commits

Author SHA1 Message Date
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
48 changed files with 727 additions and 202 deletions

View File

@ -42,4 +42,9 @@ jobs:
- name: Package and release for Classic - name: Package and release for Classic
uses: BigWigsMods/packager@master uses: BigWigsMods/packager@master
with: with:
args: -g 1.13.5 -w 0 args: -g classic -w 0
- name: Package and release for TBC
uses: BigWigsMods/packager@master
with:
args: -g bcc -w 0

View File

@ -38,7 +38,7 @@ externals:
url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceLocale-3.0 url: svn://svn.wowace.com/wow/ace3/mainline/trunk/AceLocale-3.0
tag: latest tag: latest
libs/LibRangeCheck-2.0: 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: libs/LibSharedMedia-3.0:
url: svn://svn.wowace.com/wow/libsharedmedia-3-0/mainline/trunk url: svn://svn.wowace.com/wow/libsharedmedia-3-0/mainline/trunk
tag: latest tag: latest
@ -58,6 +58,7 @@ optional-dependencies:
move-folders: move-folders:
IceHUD/IceHUD_Options: IceHUD_Options IceHUD/IceHUD_Options: IceHUD_Options
IceHUD/libs/LibRangeCheck-2.0/LibRangeCheck-2.0: IceHUD/libs/LibRangeCheck-2.0
tools-used: tools-used:
- libdatabroker-1-1 - libdatabroker-1-1
@ -65,4 +66,6 @@ tools-used:
ignore: ignore:
- readme.md - readme.md
manual-changelog: changelog.txt manual-changelog: this_version.md
enable-nolib-creation: yes

View File

@ -626,7 +626,7 @@ do
v = DogTag:CleanCode(v) v = DogTag:CleanCode(v)
end end
self.moduleSettings.upperText = v self.moduleSettings.upperText = strtrim(v)
self:RegisterFontStrings() self:RegisterFontStrings()
self:Redraw() self:Redraw()
end, end,
@ -655,7 +655,7 @@ do
v = DogTag:CleanCode(v) v = DogTag:CleanCode(v)
end end
self.moduleSettings.lowerText = v self.moduleSettings.lowerText = strtrim(v)
self:RegisterFontStrings() self:RegisterFontStrings()
self:Redraw() self:Redraw()
end, end,

View File

@ -13,12 +13,12 @@ IceCastBar.prototype.unit = nil
IceCastBar.prototype.current = nil IceCastBar.prototype.current = nil
local SPELL_POWER_MANA = SPELL_POWER_MANA 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 SPELL_POWER_MANA = Enum.PowerType.Mana
end end
local UnitCastingInfo, UnitChannelInfo = UnitCastingInfo, UnitChannelInfo local UnitCastingInfo, UnitChannelInfo = UnitCastingInfo, UnitChannelInfo
if IceHUD.WowClassic then if not UnitCastingInfo then
UnitCastingInfo = CastingInfo UnitCastingInfo = CastingInfo
UnitChannelInfo = ChannelInfo UnitChannelInfo = ChannelInfo
end end
@ -407,13 +407,13 @@ end
function IceCastBar.prototype:StartBar(action, message) function IceCastBar.prototype:StartBar(action, message)
local spell, rank, displayName, icon, startTime, endTime, isTradeSkill 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) spell, rank, displayName, icon, startTime, endTime, isTradeSkill = UnitCastingInfo(self.unit)
else else
spell, displayName, icon, startTime, endTime, isTradeSkill = UnitCastingInfo(self.unit) spell, displayName, icon, startTime, endTime, isTradeSkill = UnitCastingInfo(self.unit)
end end
if not (spell) then 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) spell, rank, displayName, icon, startTime, endTime = UnitChannelInfo(self.unit)
else else
spell, displayName, icon, startTime, endTime = UnitChannelInfo(self.unit) spell, displayName, icon, startTime, endTime = UnitChannelInfo(self.unit)
@ -568,7 +568,7 @@ function IceCastBar.prototype:SpellCastDelayed(event, unit, castGuid, spellId)
if (unit ~= self.unit) then return end if (unit ~= self.unit) then return end
--IceHUD:Debug("SpellCastDelayed", unit, UnitCastingInfo(unit)) --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 if (endTime and self.actionStartTime) then
-- apparently this check is needed, got nils during a horrible lag spike -- apparently this check is needed, got nils during a horrible lag spike
@ -629,7 +629,7 @@ function IceCastBar.prototype:SpellCastChannelUpdate(event, unit)
--IceHUD:Debug("SpellCastChannelUpdate", unit, UnitChannelInfo(unit)) --IceHUD:Debug("SpellCastChannelUpdate", unit, UnitChannelInfo(unit))
local spell, rank, displayName, icon, startTime, endTime 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) spell, rank, displayName, icon, startTime, endTime = UnitChannelInfo(unit)
else else
spell, displayName, icon, startTime, endTime = UnitChannelInfo(unit) spell, displayName, icon, startTime, endTime = UnitChannelInfo(unit)

View File

@ -41,6 +41,26 @@ IceCore.TextDecorationStyle = {
NoDecoration = L["No decoration"], 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 SUNDER_SPELL_ID = 7386
local LACERATE_SPELL_ID = 33745 local LACERATE_SPELL_ID = 33745
local MAELSTROM_SPELL_ID = 53817 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_OPEN")
self.IceHUDFrame:RegisterEvent("BARBER_SHOP_CLOSE") self.IceHUDFrame:RegisterEvent("BARBER_SHOP_CLOSE")
end end
if C_Map then
self.IceHUDFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
self.IceHUDFrame:RegisterEvent("ZONE_CHANGED")
end
self.IceHUDFrame:RegisterEvent("UNIT_AURA") self.IceHUDFrame:RegisterEvent("UNIT_AURA")
self.IceHUDFrame:SetScript("OnEvent", function(self, event, ...) self.IceHUDFrame:SetScript("OnEvent", function(self, event, ...)
if (event == "PET_BATTLE_OPENING_START") then if (event == "PET_BATTLE_OPENING_START") then
@ -279,13 +303,48 @@ function IceCore.prototype:Enable(userToggle)
end end
elseif (event == "UNIT_AURA") then elseif (event == "UNIT_AURA") then
local unit = ... 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", {271571}) and UnitInVehicle("player") then
self:RegisterEvent("UNIT_EXITED_VEHICLE") self:RegisterEvent("UNIT_EXITED_VEHICLE")
self:Hide() 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 end
elseif (event == "UNIT_EXITED_VEHICLE") then elseif (event == "UNIT_EXITED_VEHICLE") then
self:UnregisterEvent("UNIT_EXITED_VEHICLE") self:UnregisterEvent("UNIT_EXITED_VEHICLE")
self:Show() 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
end) end)

View File

@ -17,7 +17,26 @@ IceHUD.CurrTagVersion = 3
IceHUD.debugging = false IceHUD.debugging = false
IceHUD.WowVer = select(4, GetBuildInfo()) IceHUD.WowVer = select(4, GetBuildInfo())
IceHUD.WowMain = not WOW_PROJECT_ID or WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
IceHUD.WowClassic = WOW_PROJECT_ID and WOW_PROJECT_ID == WOW_PROJECT_CLASSIC IceHUD.WowClassic = WOW_PROJECT_ID and WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
IceHUD.WowClassicBC = WOW_PROJECT_ID and WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC
-- compatibility/feature flags
IceHUD.SpellFunctionsReturnRank = IceHUD.WowMain and IceHUD.WowVer < 80000
IceHUD.EventExistsPlayerPetChanged = IceHUD.WowVer < 80000 and not IceHUD.WowClassic and not IceHUD.WowClassicBC
IceHUD.EventExistsPetBarChanged = IceHUD.WowVer < 80000 and not IceHUD.WowClassic and not IceHUD.WowClassicBC
IceHUD.EventExistsPlayerComboPoints = IceHUD.WowMain and IceHUD.WowVer < 30000
IceHUD.EventExistsUnitComboPoints = IceHUD.WowMain and IceHUD.WowVer < 70000
IceHUD.EventExistsUnitMaxPower = IceHUD.WowMain and IceHUD.WowVer < 80000
IceHUD.EventExistsGroupRosterUpdate = IceHUD.WowVer >= 50000 or IceHUD.WowClassic or IceHUD.WowClassicBC
IceHUD.EventExistsUnitDynamicFlags = IceHUD.WowMain and IceHUD.WowVer < 80000
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
IceHUD.ShouldUpdateTargetHealthEveryTick = IceHUD.WowClassicBC and GetCVarBool("predictedHealth")
IceHUD.UnitPowerEvent = "UNIT_POWER_UPDATE" IceHUD.UnitPowerEvent = "UNIT_POWER_UPDATE"
@ -324,7 +343,7 @@ end
-- blizzard interface options -- blizzard interface options
local blizOptionsPanel = CreateFrame("FRAME", "IceHUDConfigPanel", UIParent) local blizOptionsPanel = CreateFrame("FRAME", "IceHUDConfigPanel", UIParent)
blizOptionsPanel.name = "IceHUD" 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.WowVer >= 50000 or IceHUD.WowClassic or IceHUD.WowClassicBC) and "UIPanelButtonTemplate" or "UIPanelButtonTemplate2")
blizOptionsPanel.button:SetText("Open IceHUD configuration") blizOptionsPanel.button:SetText("Open IceHUD configuration")
blizOptionsPanel.button:SetWidth(240) blizOptionsPanel.button:SetWidth(240)
blizOptionsPanel.button:SetHeight(30) blizOptionsPanel.button:SetHeight(30)
@ -416,7 +435,7 @@ function IceHUD:GetAuraCount(auraType, unit, ability, onlyMine, matchByName)
local i = 1 local i = 1
local name, _, texture, applications 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 "")) name, _, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or ""))
else else
name, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or "")) name, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or ""))
@ -428,7 +447,7 @@ function IceHUD:GetAuraCount(auraType, unit, ability, onlyMine, matchByName)
end end
i = i + 1 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 "")) name, _, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or ""))
else else
name, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or "")) name, texture, applications = UnitAura(unit, i, auraType..(onlyMine and "|PLAYER" or ""))
@ -448,7 +467,7 @@ do
local i = 1 local i = 1
local name, _, texture, applications, _, _, _, _, _, _, auraID 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) name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter)
else else
name, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter) name, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter)
@ -462,7 +481,7 @@ do
end end
i = i + 1 i = i + 1
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then if IceHUD.SpellFunctionsReturnRank then
name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter) name, _, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter)
else else
name, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter) name, texture, applications, _, _, _, _, _, _, auraID = UnitAura(unit, i, filter)
@ -475,6 +494,30 @@ do
function IceHUD:HasDebuffs(unit, spellIDs, filter) function IceHUD:HasDebuffs(unit, spellIDs, filter)
return IceHUD:HasBuffs(unit, spellIDs, filter and filter.."|HARMFUL" or "HARMFUL") return IceHUD:HasBuffs(unit, spellIDs, filter and filter.."|HARMFUL" or "HARMFUL")
end 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 end
function IceHUD:OnDisable() function IceHUD:OnDisable()

View File

@ -1,14 +1,17 @@
#@retail@ ## Interface: 90200
## Interface: 90001 ## Interface-Retail: 90200
#@end-retail@ ## Interface-Classic: 11402
#@non-retail@ ## Interface-BCC: 20503
# ## Interface: 11305
#@end-non-retail@
## Author: Parnic, originally created by Iceroth ## Author: Parnic, originally created by Iceroth
## Name: IceHUD ## Name: IceHUD
## Title: IceHUD |cff7fff7f-Ace3-|r ## Title: IceHUD |cff7fff7f-Ace3-|r
## Notes: Another HUD addon ## Notes: Another HUD addon
## Version: @project-version@ #@debug@
## Version: development
#@end-debug@
#@non-debug@
# ## Version: @project-version@
#@end-non-debug@
## SavedVariables: IceCoreDB ## 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 ## 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-Category: HUDs

View File

@ -1,4 +1,7 @@
## Interface: 90001 ## Interface: 90200
## Interface-Retail: 90200
## Interface-Classic: 11402
## Interface-BCC: 20503
## Title: IceHUD |cff7fff7f-Options-|r ## Title: IceHUD |cff7fff7f-Options-|r
## Author: Parnic ## Author: Parnic
## Version: @project-version@ ## Version: @project-version@

View File

@ -128,7 +128,7 @@ end
function IceStackCounter_Enable(frame) function IceStackCounter_Enable(frame)
frame:RegisterEvent("UNIT_AURA", "UpdateCustomCount") frame:RegisterEvent("UNIT_AURA", "UpdateCustomCount")
frame:RegisterEvent("UNIT_PET", "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") frame:RegisterEvent("PLAYER_PET_CHANGED", "UpdateCustomCount")
end end
if FocusUnit then if FocusUnit then

View File

@ -20,7 +20,7 @@ IceUnitBar.prototype.hasPet = nil
IceUnitBar.prototype.noFlash = nil IceUnitBar.prototype.noFlash = nil
local SPELL_POWER_INSANITY, SPELL_POWER_RAGE = SPELL_POWER_INSANITY, SPELL_POWER_RAGE local SPELL_POWER_INSANITY, SPELL_POWER_RAGE = SPELL_POWER_INSANITY, SPELL_POWER_RAGE
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then if Enum and Enum.PowerType then
SPELL_POWER_INSANITY = Enum.PowerType.Insanity SPELL_POWER_INSANITY = Enum.PowerType.Insanity
SPELL_POWER_RAGE = Enum.PowerType.Rage SPELL_POWER_RAGE = Enum.PowerType.Rage
end end
@ -243,7 +243,14 @@ function IceUnitBar.prototype:Update()
self.mana = IceHUD:MathRound(self.mana / 100) self.mana = IceHUD:MathRound(self.mana / 100)
self.maxMana = IceHUD:MathRound(self.maxMana / 100) self.maxMana = IceHUD:MathRound(self.maxMana / 100)
end end
self.manaPercentage = self.maxMana ~= 0 and (self.mana/self.maxMana) or 0
-- 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 local locClass
locClass, self.unitClass = UnitClass(self.unit) locClass, self.unitClass = UnitClass(self.unit)

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 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 ArcaneCharges = IceCore_CreateClass(IceClassPowerCounter)
local SPELL_POWER_ARCANE_CHARGES = SPELL_POWER_ARCANE_CHARGES 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 SPELL_POWER_ARCANE_CHARGES = Enum.PowerType.ArcaneCharges
end end

View File

@ -4,20 +4,31 @@ local ComboPoints = IceCore_CreateClass(IceElement)
local IceHUD = _G.IceHUD local IceHUD = _G.IceHUD
local AnticipationSpellId = 114015 local AnticipationSpellId = 114015
local AnticipationExists = GetSpellInfo(AnticipationSpellId) and IceHUD.WowVer < 70000
ComboPoints.prototype.comboSize = 20 ComboPoints.prototype.comboSize = 20
local SPELL_POWER_COMBO_POINTS = SPELL_POWER_COMBO_POINTS 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 SPELL_POWER_COMBO_POINTS = Enum.PowerType.ComboPoints
end end
local GetUnitChargedPowerPoints = GetUnitChargedPowerPoints
if not GetUnitChargedPowerPoints then
GetUnitChargedPowerPoints = function()
return nil
end
end
-- Constructor -- -- Constructor --
function ComboPoints.prototype:init() function ComboPoints.prototype:init()
ComboPoints.super.prototype.init(self, "ComboPoints") ComboPoints.super.prototype.init(self, "ComboPoints")
self:SetDefaultColor("ComboPoints", 1, 1, 0) self:SetDefaultColor("ComboPoints", 1, 1, 0)
self:SetDefaultColor("AnticipationPoints", 1, 0, 1) if AnticipationExists then
self:SetDefaultColor("AnticipationPoints", 1, 0, 1)
end
self:SetDefaultColor("KyrianAnimaComboPoint", 0.3137254901960784, 0.3725490196078432, 1)
self.scalingEnabled = true self.scalingEnabled = true
end end
@ -163,7 +174,7 @@ function ComboPoints.prototype:GetOptions()
order = 33.2 order = 33.2
} }
if IceHUD.WowVer < 70000 and not IceHUD.WowClassic then if AnticipationExists then
opts["anticipation"] = { opts["anticipation"] = {
type = "toggle", type = "toggle",
name = L["Show Anticipation"], name = L["Show Anticipation"],
@ -215,8 +226,29 @@ function ComboPoints.prototype:GetOptions()
disabled = function() disabled = function()
return not self.moduleSettings.enabled return not self.moduleSettings.enabled
end, end,
order = 35
} }
if IceHUD.WowVer >= 90000 then
opts["bShowAnimaCharged"] = {
type = 'toggle',
width = 'double',
name = L["Show Anima-charged points"],
desc = L["Whether or not to color an anima-charged combo point a separate color. Set the KyrianAnimaComboPoint color to the color you would like it to be."],
get = function()
return self.moduleSettings.bShowAnimaCharged
end,
set = function(info, v)
self.moduleSettings.bShowAnimaCharged = v
self:UpdateChargedComboPoints()
end,
disabled = function()
return not self.moduleSettings.enabled
end,
order = 36
}
end
return opts return opts
end end
@ -235,6 +267,7 @@ function ComboPoints.prototype:GetDefaultSettings()
defaults["comboGap"] = 0 defaults["comboGap"] = 0
defaults["showAnticipation"] = true defaults["showAnticipation"] = true
defaults["bShowWithNoTarget"] = true defaults["bShowWithNoTarget"] = true
defaults["bShowAnimaCharged"] = true
return defaults return defaults
end end
@ -253,8 +286,8 @@ function ComboPoints.prototype:Enable(core)
ComboPoints.super.prototype.Enable(self, core) ComboPoints.super.prototype.Enable(self, core)
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateComboPoints") self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateComboPoints")
if IceHUD.WowVer >= 30000 or IceHUD.WowClassic then if not IceHUD.EventExistsPlayerComboPoints then
if IceHUD.WowVer < 70000 and not IceHUD.WowClassic then if IceHUD.EventExistsUnitComboPoints then
self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateComboPoints") self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateComboPoints")
else else
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateComboPoints") self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateComboPoints")
@ -266,7 +299,7 @@ function ComboPoints.prototype:Enable(core)
self:RegisterEvent("UNIT_ENTERED_VEHICLE", "UpdateComboPoints") self:RegisterEvent("UNIT_ENTERED_VEHICLE", "UpdateComboPoints")
self:RegisterEvent("UNIT_EXITED_VEHICLE", "UpdateComboPoints") self:RegisterEvent("UNIT_EXITED_VEHICLE", "UpdateComboPoints")
end end
if IceHUD.WowVer < 70000 and not IceHUD.WowClassic then if AnticipationExists then
self:RegisterEvent("PLAYER_TALENT_UPDATE", "AddAnticipation") self:RegisterEvent("PLAYER_TALENT_UPDATE", "AddAnticipation")
self:AddAnticipation() self:AddAnticipation()
end end
@ -274,11 +307,16 @@ function ComboPoints.prototype:Enable(core)
self:RegisterEvent("PLAYER_COMBO_POINTS", "UpdateComboPoints") self:RegisterEvent("PLAYER_COMBO_POINTS", "UpdateComboPoints")
end end
if IceHUD.WowVer >= 90000 then
self:RegisterEvent("UNIT_POWER_POINT_CHARGE", "UpdateChargedComboPoints")
end
if self.moduleSettings.comboMode == "Graphical" then if self.moduleSettings.comboMode == "Graphical" then
self.moduleSettings.comboMode = "Graphical Bar" self.moduleSettings.comboMode = "Graphical Bar"
end end
self:CreateComboFrame(true) self:CreateComboFrame(true)
self:UpdateChargedComboPoints()
end end
function ComboPoints.prototype:UpdateMaxComboPoints(event, unit, powerType) function ComboPoints.prototype:UpdateMaxComboPoints(event, unit, powerType)
@ -291,6 +329,12 @@ function ComboPoints.prototype:UpdateMaxComboPoints(event, unit, powerType)
end end
end end
function ComboPoints.prototype:UpdateChargedComboPoints()
self.chargedPowerPoints = GetUnitChargedPowerPoints("player")
self:CreateComboFrame()
self:UpdateComboPoints()
end
-- 'Protected' methods -------------------------------------------------------- -- 'Protected' methods --------------------------------------------------------
-- OVERRIDE -- OVERRIDE
@ -399,13 +443,18 @@ function ComboPoints.prototype:CreateComboFrame(forceTextureUpdate)
if (self.moduleSettings.gradient) then if (self.moduleSettings.gradient) then
g = g - ((1 / maxComboPoints)*i) g = g - ((1 / maxComboPoints)*i)
end end
self.frame.graphical[i].texture:SetVertexColor(r, g, b)
if self.moduleSettings.bShowAnimaCharged and self:IsAnimaChargedPoint(i) then
self.frame.graphical[i].texture:SetVertexColor(self:GetColor("KyrianAnimaComboPoint"))
else
self.frame.graphical[i].texture:SetVertexColor(r, g, b)
end
self.frame.graphical[i]:Hide() self.frame.graphical[i]:Hide()
end end
-- create Anticipation points -- create Anticipation points
if IceHUD.WowVer < 70000 then if AnticipationExists then
for i = 1, 5 do for i = 1, 5 do
if (not self.frame.graphicalAnt[i]) then if (not self.frame.graphicalAnt[i]) then
local frame = CreateFrame("Frame", nil, self.frame) local frame = CreateFrame("Frame", nil, self.frame)
@ -444,6 +493,20 @@ function ComboPoints.prototype:CreateComboFrame(forceTextureUpdate)
end end
end end
function ComboPoints.prototype:IsAnimaChargedPoint(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(...) function ComboPoints.prototype:UpdateComboPoints(...)
if select('#', ...) >= 3 and select(1, ...) == IceHUD.UnitPowerEvent and select(3, ...) ~= "COMBO_POINTS" then if select('#', ...) >= 3 and select(1, ...) == IceHUD.UnitPowerEvent and select(3, ...) ~= "COMBO_POINTS" then
return return
@ -452,17 +515,17 @@ function ComboPoints.prototype:UpdateComboPoints(...)
local points, anticipate, _ local points, anticipate, _
if IceHUD.IceCore:IsInConfigMode() then if IceHUD.IceCore:IsInConfigMode() then
points = self:GetMaxComboPoints() points = self:GetMaxComboPoints()
elseif IceHUD.WowVer >= 30000 or IceHUD.WowClassic then elseif IceHUD.WowVer >= 30000 or IceHUD.WowClassic or IceHUD.WowClassicBC then
-- Parnic: apparently some fights have combo points while the player is in a vehicle? -- Parnic: apparently some fights have combo points while the player is in a vehicle?
local isInVehicle = UnitHasVehicleUI and UnitHasVehicleUI("player") local isInVehicle = UnitHasVehicleUI and UnitHasVehicleUI("player")
local checkUnit = isInVehicle and "vehicle" or "player" local checkUnit = isInVehicle and "vehicle" or "player"
if IceHUD.WowVer >= 60000 or IceHUD.WowClassic then if IceHUD.PerTargetComboPoints then
points = UnitPower(checkUnit, SPELL_POWER_COMBO_POINTS)
else
points = GetComboPoints(checkUnit, "target") points = GetComboPoints(checkUnit, "target")
else
points = UnitPower(checkUnit, SPELL_POWER_COMBO_POINTS)
end end
if IceHUD.WowVer < 70000 and IceHUD.WowVer >= 50000 then if AnticipationExists then
_, _, _, anticipate = UnitAura("player", GetSpellInfo(AnticipationSpellId)) _, _, _, anticipate = UnitAura("player", GetSpellInfo(AnticipationSpellId))
else else
anticipate = 0 anticipate = 0
@ -554,6 +617,6 @@ end
-- Load us up -- Load us up
local _, class = UnitClass("player") local _, class = UnitClass("player")
if not IceHUD.WowClassic or class == "ROGUE" or class == "DRUID" then if (not IceHUD.WowClassic and not IceHUD.WowClassicBC) or class == "ROGUE" or class == "DRUID" then
IceHUD.ComboPoints = ComboPoints:new() IceHUD.ComboPoints = ComboPoints:new()
end end

View File

@ -2,10 +2,17 @@ local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
local ComboPointsBar = IceCore_CreateClass(IceBarElement) local ComboPointsBar = IceCore_CreateClass(IceBarElement)
local SPELL_POWER_COMBO_POINTS = SPELL_POWER_COMBO_POINTS 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 SPELL_POWER_COMBO_POINTS = Enum.PowerType.ComboPoints
end end
local GetUnitChargedPowerPoints = GetUnitChargedPowerPoints
if not GetUnitChargedPowerPoints then
GetUnitChargedPowerPoints = function()
return nil
end
end
function ComboPointsBar.prototype:init() function ComboPointsBar.prototype:init()
ComboPointsBar.super.prototype.init(self, "ComboPointsBar") ComboPointsBar.super.prototype.init(self, "ComboPointsBar")
@ -57,7 +64,6 @@ end
function ComboPointsBar.prototype:GetDefaultSettings() function ComboPointsBar.prototype:GetDefaultSettings()
local defaults = ComboPointsBar.super.prototype.GetDefaultSettings(self) local defaults = ComboPointsBar.super.prototype.GetDefaultSettings(self)
defaults.textVisible['lower'] = false
defaults.offset = 8 defaults.offset = 8
defaults.enabled = false defaults.enabled = false
defaults.alwaysDisplay = false defaults.alwaysDisplay = false
@ -70,8 +76,8 @@ function ComboPointsBar.prototype:Enable(core)
ComboPointsBar.super.prototype.Enable(self, core) ComboPointsBar.super.prototype.Enable(self, core)
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateComboPoints") self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateComboPoints")
if IceHUD.WowVer >= 30000 or IceHUD.WowClassic then if not IceHUD.EventExistsPlayerComboPoints then
if IceHUD.WowVer < 70000 and not IceHUD.WowClassic then if IceHUD.EventExistsUnitComboPoints then
self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateComboPoints") self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateComboPoints")
else else
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateComboPoints") self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateComboPoints")
@ -83,6 +89,18 @@ function ComboPointsBar.prototype:Enable(core)
else else
self:RegisterEvent("PLAYER_COMBO_POINTS", "UpdateComboPoints") self:RegisterEvent("PLAYER_COMBO_POINTS", "UpdateComboPoints")
end end
if IceHUD.WowVer >= 90000 then
self:RegisterEvent("UNIT_POWER_POINT_CHARGE", "UpdateChargedComboPoints")
end
self:UpdateChargedComboPoints()
end
function ComboPointsBar.prototype:UpdateChargedComboPoints()
local chargedPowerPoints = GetUnitChargedPowerPoints("player")
self.chargedPowerPointIndex = chargedPowerPoints and chargedPowerPoints[1]
self:UpdateComboPoints()
end end
function ComboPointsBar.prototype:CreateFrame() function ComboPointsBar.prototype:CreateFrame()
@ -101,14 +119,14 @@ function ComboPointsBar.prototype:UpdateComboPoints(...)
local points local points
if IceHUD.IceCore:IsInConfigMode() then if IceHUD.IceCore:IsInConfigMode() then
points = UnitPowerMax("player", SPELL_POWER_COMBO_POINTS) points = UnitPowerMax("player", SPELL_POWER_COMBO_POINTS)
elseif IceHUD.WowVer >= 30000 or IceHUD.WowClassic then elseif IceHUD.WowVer >= 30000 or IceHUD.WowClassic or IceHUD.WowClassicBC then
-- Parnic: apparently some fights have combo points while the player is in a vehicle? -- Parnic: apparently some fights have combo points while the player is in a vehicle?
local isInVehicle = UnitHasVehicleUI and UnitHasVehicleUI("player") local isInVehicle = UnitHasVehicleUI and UnitHasVehicleUI("player")
local checkUnit = isInVehicle and "vehicle" or "player" local checkUnit = isInVehicle and "vehicle" or "player"
if IceHUD.WowVer >= 60000 or IceHUD.WowClassic then if IceHUD.PerTargetComboPoints then
points = UnitPower(checkUnit, SPELL_POWER_COMBO_POINTS)
else
points = GetComboPoints(checkUnit, "target") points = GetComboPoints(checkUnit, "target")
else
points = UnitPower(checkUnit, SPELL_POWER_COMBO_POINTS)
end end
else else
points = GetComboPoints("target") points = GetComboPoints("target")
@ -129,6 +147,7 @@ function ComboPointsBar.prototype:UpdateComboPoints(...)
end end
self:SetBottomText1(points or "0") self:SetBottomText1(points or "0")
self:SetBottomText2(self.chargedPowerPointIndex)
end end
function ComboPointsBar.prototype:Update() function ComboPointsBar.prototype:Update()
@ -136,6 +155,6 @@ function ComboPointsBar.prototype:Update()
end end
local _, class = UnitClass("player") local _, class = UnitClass("player")
if not IceHUD.WowClassic or class == "ROGUE" or class == "DRUID" then if (not IceHUD.WowClassic and not IceHUD.WowClassicBC) or class == "ROGUE" or class == "DRUID" then
IceHUD.ComboPointsBar = ComboPointsBar:new() IceHUD.ComboPointsBar = ComboPointsBar:new()
end end

View File

@ -19,6 +19,7 @@ IceCustomBar.prototype.bIsAura = false
function IceCustomBar.prototype:init() function IceCustomBar.prototype:init()
IceCustomBar.super.prototype.init(self, "MyCustomBar", "player") IceCustomBar.super.prototype.init(self, "MyCustomBar", "player")
self.textColorOverride = true self.textColorOverride = true
self.CustomBarUpdateFunc = function() self:UpdateCustomBar(self.unit, true) end
end end
-- 'Public' methods ----------------------------------------------------------- -- 'Public' methods -----------------------------------------------------------
@ -36,7 +37,7 @@ function IceCustomBar.prototype:Enable(core)
self:RegisterEvent("UNIT_AURA", "UpdateCustomBarEvent") self:RegisterEvent("UNIT_AURA", "UpdateCustomBarEvent")
self:RegisterEvent("UNIT_PET", "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") self:RegisterEvent("PLAYER_PET_CHANGED", "UpdateCustomBarEvent")
end end
if FocusUnit then if FocusUnit then
@ -81,7 +82,7 @@ function IceCustomBar.prototype:Disable(core)
end end
function IceCustomBar.prototype:GetUnitToTrack() function IceCustomBar.prototype:GetUnitToTrack()
if IceHUD.WowClassic then if not IceHUD.CanTrackOtherUnitBuffs then
return "player" return "player"
end end
@ -107,11 +108,7 @@ end
function IceCustomBar.prototype:ConditionalSubscribe() function IceCustomBar.prototype:ConditionalSubscribe()
if self:ShouldAlwaysSubscribe() then if self:ShouldAlwaysSubscribe() then
if not IceHUD.IceCore:IsUpdateSubscribed(self) then if not IceHUD.IceCore:IsUpdateSubscribed(self, self.CustomBarUpdateFunc) then
if not self.CustomBarUpdateFunc then
self.CustomBarUpdateFunc = function() self:UpdateCustomBar() end
end
self.handlesOwnUpdates = true self.handlesOwnUpdates = true
IceHUD.IceCore:RequestUpdates(self, self.CustomBarUpdateFunc) IceHUD.IceCore:RequestUpdates(self, self.CustomBarUpdateFunc)
end end
@ -122,7 +119,7 @@ function IceCustomBar.prototype:ConditionalSubscribe()
end end
function IceCustomBar.prototype:ShouldAlwaysSubscribe() 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 end
function IceCustomBar.prototype:TargetChanged() function IceCustomBar.prototype:TargetChanged()
@ -262,7 +259,7 @@ function IceCustomBar.prototype:GetOptions()
order = 30.3, order = 30.3,
} }
if not IceHUD.WowClassic then if IceHUD.CanTrackOtherUnitBuffs then
opts["unitToTrack"] = { opts["unitToTrack"] = {
type = 'select', type = 'select',
values = validUnits, values = validUnits,
@ -673,7 +670,7 @@ function IceCustomBar.prototype:GetAuraDuration(unitName, buffName)
local isBuff = self.moduleSettings.buffOrDebuff == "buff" and true or false local isBuff = self.moduleSettings.buffOrDebuff == "buff" and true or false
local buffFilter = (isBuff and "HELPFUL" or "HARMFUL") .. (self.moduleSettings.trackOnlyMine and "|PLAYER" or "") local buffFilter = (isBuff and "HELPFUL" or "HARMFUL") .. (self.moduleSettings.trackOnlyMine and "|PLAYER" or "")
local buff, rank, texture, count, type, duration, endTime, unitCaster, _, _, spellId 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) buff, rank, texture, count, type, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, buffFilter)
else else
buff, texture, count, type, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, buffFilter) buff, texture, count, type, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, buffFilter)
@ -703,7 +700,7 @@ function IceCustomBar.prototype:GetAuraDuration(unitName, buffName)
i = i + 1; 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) buff, rank, texture, count, type, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, buffFilter)
else else
buff, texture, count, type, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, buffFilter) buff, texture, count, type, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, buffFilter)
@ -755,7 +752,7 @@ function IceCustomBar.prototype:UpdateCustomBar(unit, fromUpdate)
local auraIcon = nil local auraIcon = nil
local endTime = 0 local endTime = 0
if not fromUpdate then --if not fromUpdate then
if tonumber(self.moduleSettings.buffToTrack) == nil then if tonumber(self.moduleSettings.buffToTrack) == nil then
self.auraDuration, remaining, self.auraBuffCount, auraIcon, endTime = self.auraDuration, remaining, self.auraBuffCount, auraIcon, endTime =
self:GetAuraDuration(self.unit, self.moduleSettings.buffToTrack) self:GetAuraDuration(self.unit, self.moduleSettings.buffToTrack)
@ -790,18 +787,14 @@ function IceCustomBar.prototype:UpdateCustomBar(unit, fromUpdate)
else else
self.barFrame.icon:Hide() self.barFrame.icon:Hide()
end end
end --end
self.auraBuffCount = self.auraBuffCount or 0 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 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:ShouldAlwaysSubscribe() and not fromUpdate and not IceHUD.IceCore:IsUpdateSubscribed(self, self.CustomBarUpdateFunc) then
if not self.UpdateCustomBarFunc then
self.UpdateCustomBarFunc = function() self:UpdateCustomBar(self.unit, true) end
end
self.handlesOwnUpdates = true self.handlesOwnUpdates = true
IceHUD.IceCore:RequestUpdates(self, self.UpdateCustomBarFunc) IceHUD.IceCore:RequestUpdates(self, self.CustomBarUpdateFunc)
end end
self:Show(true) self:Show(true)

View File

@ -4,7 +4,7 @@ local FocusMana = IceCore_CreateClass(IceUnitBar)
local SPELL_POWER_RAGE = SPELL_POWER_RAGE local SPELL_POWER_RAGE = SPELL_POWER_RAGE
local SPELL_POWER_FOCUS = SPELL_POWER_FOCUS local SPELL_POWER_FOCUS = SPELL_POWER_FOCUS
local SPELL_POWER_ENERGY = SPELL_POWER_ENERGY 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_RAGE = Enum.PowerType.Rage
SPELL_POWER_FOCUS = Enum.PowerType.Focus SPELL_POWER_FOCUS = Enum.PowerType.Focus
SPELL_POWER_ENERGY = Enum.PowerType.Energy SPELL_POWER_ENERGY = Enum.PowerType.Energy
@ -39,9 +39,9 @@ end
function FocusMana.prototype:Enable(core) function FocusMana.prototype:Enable(core)
FocusMana.super.prototype.Enable(self, core) FocusMana.super.prototype.Enable(self, core)
if IceHUD.WowVer >= 40000 then if not IceHUD.PerPowerEventsExist then
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent") self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent")
if IceHUD.WowVer < 80000 then if IceHUD.EventExistsUnitMaxPower then
self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent") self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent")
end end
else else

View File

@ -165,7 +165,7 @@ function GlobalCoolDown.prototype:GetSpellCastTime(spell)
end end
local spellname, castTime, _ local spellname, castTime, _
if IceHUD.WowVer < 60000 then if IceHUD.GetSpellInfoReturnsFunnel then
spellName, _, _, _, _, _, castTime = GetSpellInfo(spell) spellName, _, _, _, _, _, castTime = GetSpellInfo(spell)
else else
spellName, _, _, castTime = GetSpellInfo(spell) spellName, _, _, castTime = GetSpellInfo(spell)
@ -267,30 +267,35 @@ function GlobalCoolDown.prototype:CreateLagBar()
end end
function GlobalCoolDown.prototype:GetSpellId() function GlobalCoolDown.prototype:GetSpellId()
return 61304 if GetSpellInfo(61304) then
--[[ return 61304
local defaultSpells else
local defaultSpells
defaultSpells = { defaultSpells = {
ROGUE=1752, -- sinister strike ROGUE=1752, -- sinister strike
PRIEST=585, -- smite PRIEST=585, -- smite
DRUID=5176, -- wrath DRUID=5176, -- wrath
WARRIOR=34428, -- victory rush (not available until 5, sadly) WARRIOR=34428, -- victory rush (not available until 5, sadly)
MAGE=44614, -- frostfire bolt MAGE=44614, -- frostfire bolt
WARLOCK=686, -- shadow bolt WARLOCK=686, -- shadow bolt
PALADIN=105361, -- seal of command (level 3) PALADIN=105361, -- seal of command (level 3)
SHAMAN=403, -- lightning bolt SHAMAN=403, -- lightning bolt
HUNTER=3044, -- arcane shot HUNTER=3044, -- arcane shot
DEATHKNIGHT=47541, -- death coil DEATHKNIGHT=47541, -- death coil
MONK=100780, -- jab MONK=100780, -- jab
} }
local _, unitClass = UnitClass("player") if IceHUD.WowClassicBC or IceHUD.WowClassic then
return defaultSpells[unitClass] defaultSpells["PALADIN"] = 635
]] end
local _, unitClass = UnitClass("player")
return defaultSpells[unitClass]
end
end end
-- Load us up -- Load us up
if not IceHUD.WowClassic then if IceHUD.CanTrackGCD then
IceHUD.GlobalCoolDown = GlobalCoolDown:new() IceHUD.GlobalCoolDown = GlobalCoolDown:new()
end end

View File

@ -2,7 +2,7 @@ local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
local HarmonyPower = IceCore_CreateClass(IceClassPowerCounter) local HarmonyPower = IceCore_CreateClass(IceClassPowerCounter)
local SPELL_POWER_CHI = SPELL_POWER_CHI local SPELL_POWER_CHI = SPELL_POWER_CHI
if IceHUD.WowVer >= 80000 or IceHUD.WowClassic then if Enum and Enum.PowerType then
SPELL_POWER_CHI = Enum.PowerType.Chi SPELL_POWER_CHI = Enum.PowerType.Chi
end end

View File

@ -2,7 +2,7 @@ local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
local HolyPower = IceCore_CreateClass(IceClassPowerCounter) local HolyPower = IceCore_CreateClass(IceClassPowerCounter)
local SPELL_POWER_HOLY_POWER = SPELL_POWER_HOLY_POWER 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 SPELL_POWER_HOLY_POWER = Enum.PowerType.HolyPower
end end

View File

@ -42,7 +42,7 @@ function PetHealth.prototype:Enable(core)
PetHealth.super.prototype.Enable(self, core) PetHealth.super.prototype.Enable(self, core)
self:RegisterEvent("PET_UI_UPDATE", "CheckPet"); 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"); self:RegisterEvent("PLAYER_PET_CHANGED", "CheckPet");
end end
self:RegisterEvent("PET_BAR_UPDATE_USABLE", "CheckPet"); self:RegisterEvent("PET_BAR_UPDATE_USABLE", "CheckPet");

View File

@ -5,7 +5,7 @@ local SPELL_POWER_RAGE = SPELL_POWER_RAGE
local SPELL_POWER_FOCUS = SPELL_POWER_FOCUS local SPELL_POWER_FOCUS = SPELL_POWER_FOCUS
local SPELL_POWER_ENERGY = SPELL_POWER_ENERGY local SPELL_POWER_ENERGY = SPELL_POWER_ENERGY
local SPELL_POWER_RUNIC_POWER = SPELL_POWER_RUNIC_POWER 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_RAGE = Enum.PowerType.Rage
SPELL_POWER_FOCUS = Enum.PowerType.Focus SPELL_POWER_FOCUS = Enum.PowerType.Focus
SPELL_POWER_ENERGY = Enum.PowerType.Energy SPELL_POWER_ENERGY = Enum.PowerType.Energy
@ -62,15 +62,15 @@ function PetMana.prototype:Enable(core)
PetMana.super.prototype.Enable(self, core) PetMana.super.prototype.Enable(self, core)
self:RegisterEvent("PET_UI_UPDATE", "CheckPet") 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") self:RegisterEvent("PLAYER_PET_CHANGED", "CheckPet")
end 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") self:RegisterEvent("UNIT_PET", "CheckPet")
if IceHUD.WowVer >= 40000 or IceHUD.WowClassic then if not IceHUD.PerPowerEventsExist then
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent") self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent")
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then if IceHUD.EventExistsUnitMaxPower then
self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent") self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent")
end end
else else

View File

@ -8,7 +8,7 @@ local _, unitClass = UnitClass("player")
local SPELL_POWER_MANA = SPELL_POWER_MANA local SPELL_POWER_MANA = SPELL_POWER_MANA
local SPELL_POWER_INSANITY = SPELL_POWER_INSANITY 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_MANA = Enum.PowerType.Mana
SPELL_POWER_INSANITY = Enum.PowerType.Insanity SPELL_POWER_INSANITY = Enum.PowerType.Insanity
end end

View File

@ -81,7 +81,7 @@ function PlayerHealth.prototype:Enable(core)
self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckCombat") self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckCombat")
self:RegisterEvent("PARTY_LEADER_CHANGED", "CheckLeader") self:RegisterEvent("PARTY_LEADER_CHANGED", "CheckLeader")
if IceHUD.WowVer >= 50000 or IceHUD.WowClassic then if IceHUD.EventExistsGroupRosterUpdate then
self:RegisterEvent("GROUP_ROSTER_UPDATE", "CheckLeader") self:RegisterEvent("GROUP_ROSTER_UPDATE", "CheckLeader")
else else
self:RegisterEvent("PARTY_MEMBERS_CHANGED", "CheckLeader") self:RegisterEvent("PARTY_MEMBERS_CHANGED", "CheckLeader")
@ -1407,15 +1407,18 @@ end
function PlayerHealth.prototype:ShowBlizz() function PlayerHealth.prototype:ShowBlizz()
PlayerFrame:Show() PlayerFrame:SetParent(self.OriginalPlayerFrameParent or UIParent)
PlayerFrame:GetScript("OnLoad")(PlayerFrame)
end end
function PlayerHealth.prototype:HideBlizz() 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 end
function PlayerHealth.prototype:HideBlizzardParty() function PlayerHealth.prototype:HideBlizzardParty()

View File

@ -13,7 +13,7 @@ local SPELL_POWER_FURY = SPELL_POWER_FURY
local SPELL_POWER_MAELSTROM = SPELL_POWER_MAELSTROM local SPELL_POWER_MAELSTROM = SPELL_POWER_MAELSTROM
local SPELL_POWER_PAIN = SPELL_POWER_PAIN local SPELL_POWER_PAIN = SPELL_POWER_PAIN
local SPELL_POWER_LUNAR_POWER = SPELL_POWER_LUNAR_POWER 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_MANA = Enum.PowerType.Mana
SPELL_POWER_RAGE = Enum.PowerType.Rage SPELL_POWER_RAGE = Enum.PowerType.Rage
SPELL_POWER_FOCUS = Enum.PowerType.Focus SPELL_POWER_FOCUS = Enum.PowerType.Focus
@ -153,9 +153,9 @@ function PlayerMana.prototype:Enable(core)
self:CreateTickerFrame() self:CreateTickerFrame()
if IceHUD.WowVer >= 40000 or IceHUD.WowClassic then if not IceHUD.PerPowerEventsExist then
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent") self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent")
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then if IceHUD.EventExistsUnitMaxPower then
self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent") self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent")
end end
else else
@ -280,7 +280,7 @@ function PlayerMana.prototype:ManaType(event, unit)
if self:ShouldUseTicker() then if self:ShouldUseTicker() then
-- register ticker for rogue energy -- 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:Show()
self.tickerFrame:SetScript("OnUpdate", function() self:EnergyTick() end) self.tickerFrame:SetScript("OnUpdate", function() self:EnergyTick() end)
else else
@ -387,7 +387,7 @@ function PlayerMana.prototype:Update(unit, powertype)
if not IceHUD.IceCore:ShouldUseDogTags() then if not IceHUD.IceCore:ShouldUseDogTags() then
-- extra hack for whiny rogues (are there other kind?) -- extra hack for whiny rogues (are there other kind?)
local displayPercentage = self.manaPercentage local displayPercentage = self.manaPercentage
if self.manaType == SPELL_POWER_ENERGY or self.manaType == SPELL_POWER_FOCUS then if self.manaType == SPELL_POWER_ENERGY or self.manaType == SPELL_POWER_FOCUS or self.manaType == SPELL_POWER_FURY then
displayPercentage = self.mana displayPercentage = self.mana
else else
displayPercentage = math.floor(displayPercentage * 100) displayPercentage = math.floor(displayPercentage * 100)
@ -438,7 +438,7 @@ function PlayerMana.prototype:EnergyTick()
return return
end end
if not (self.tickStart) then if not self.tickStart or not self.alive then
self.tickerFrame:Hide() self.tickerFrame:Hide()
return return
end end

View File

@ -56,7 +56,7 @@ do
return return
end 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() self:Update()
end end

View File

@ -22,7 +22,7 @@ for _, v in ipairs(RtBBuffs) do
end end
local SPELL_POWER_COMBO_POINTS = SPELL_POWER_COMBO_POINTS 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 SPELL_POWER_COMBO_POINTS = Enum.PowerType.ComboPoints
end end

View File

@ -44,7 +44,7 @@ Runes.prototype.numRunes = 6
Runes.prototype.lastRuneState = {} Runes.prototype.lastRuneState = {}
local SPELL_POWER_RUNES = SPELL_POWER_RUNES 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 SPELL_POWER_RUNES = Enum.PowerType.Runes
end end

View File

@ -38,7 +38,7 @@ local DemonologyCoords =
} }
local SPELL_POWER_SOUL_SHARDS = SPELL_POWER_SOUL_SHARDS 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 SPELL_POWER_SOUL_SHARDS = Enum.PowerType.SoulShards
end end

View File

@ -25,6 +25,11 @@ local sixComboPointsTalentID = 19240
local CurrMaxSnDDuration = 0 local CurrMaxSnDDuration = 0
local PotentialSnDDuration = 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 if IceHUD.WowVer >= 50000 then
baseTime = 12 baseTime = 12
gapPerComboPoint = 6 gapPerComboPoint = 6
@ -33,10 +38,14 @@ if IceHUD.WowClassic then
impSndBonusPerRank = 0.15 impSndBonusPerRank = 0.15
impSndTalentPage = 1 impSndTalentPage = 1
impSndTalentIdx = 6 impSndTalentIdx = 6
elseif IceHUD.WowClassicBC then
impSndBonusPerRank = 0.15
impSndTalentPage = 2
impSndTalentIdx = 4
end end
local SPELL_POWER_COMBO_POINTS = SPELL_POWER_COMBO_POINTS 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 SPELL_POWER_COMBO_POINTS = Enum.PowerType.ComboPoints
end end
@ -61,7 +70,7 @@ function SliceAndDice.prototype:Enable(core)
SliceAndDice.super.prototype.Enable(self, core) SliceAndDice.super.prototype.Enable(self, core)
self:RegisterEvent("UNIT_AURA", "UpdateSliceAndDice") self:RegisterEvent("UNIT_AURA", "UpdateSliceAndDice")
if IceHUD.WowVer < 70000 and not IceHUD.WowClassic then if IceHUD.EventExistsUnitComboPoints then
self:RegisterEvent("UNIT_COMBO_POINTS", "ComboPointsChanged") self:RegisterEvent("UNIT_COMBO_POINTS", "ComboPointsChanged")
else else
self:RegisterEvent(IceHUD.UnitPowerEvent, "ComboPointsChanged") self:RegisterEvent(IceHUD.UnitPowerEvent, "ComboPointsChanged")
@ -227,7 +236,7 @@ end
function SliceAndDice.prototype:GetBuffDuration(unitName, buffName) function SliceAndDice.prototype:GetBuffDuration(unitName, buffName)
local i = 1 local i = 1
local buff, _, texture, duration, endTime, remaining 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) buff, _, texture, _, _, duration, endTime = UnitBuff(unitName, i)
else else
buff, texture, _, _, duration, endTime = UnitBuff(unitName, i) buff, texture, _, _, duration, endTime = UnitBuff(unitName, i)
@ -243,7 +252,7 @@ function SliceAndDice.prototype:GetBuffDuration(unitName, buffName)
i = i + 1; i = i + 1;
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then if IceHUD.SpellFunctionsReturnRank then
buff, _, texture, _, _, duration, endTime = UnitBuff(unitName, i) buff, _, texture, _, _, duration, endTime = UnitBuff(unitName, i)
else else
buff, texture, _, _, duration, endTime = UnitBuff(unitName, i) buff, texture, _, _, duration, endTime = UnitBuff(unitName, i)
@ -264,10 +273,10 @@ function SliceAndDice.prototype:MyOnUpdate()
end end
local function SNDGetComboPoints(unit) local function SNDGetComboPoints(unit)
if IceHUD.WowVer >= 60000 or IceHUD.WowClassic then if IceHUD.PerTargetComboPoints then
return UnitPower(unit, SPELL_POWER_COMBO_POINTS)
elseif IceHUD.WowVer >= 30000 then
return GetComboPoints(unit, "target") return GetComboPoints(unit, "target")
elseif IceHUD.WowVer >= 60000 then
return UnitPower(unit, SPELL_POWER_COMBO_POINTS)
else else
return GetComboPoints() return GetComboPoints()
end end
@ -281,7 +290,7 @@ local function HasSpell(id)
end end
local function ShouldHide() local function ShouldHide()
if IceHUD.WowVer >= 90000 then if IceHUD.WowVer >= 90000 or IceHUD.WowClassicBC then
return false return false
end end
@ -300,7 +309,7 @@ function SliceAndDice.prototype:UpdateSliceAndDice(event, unit, fromUpdate)
local remaining = nil local remaining = nil
if not fromUpdate or IceHUD.WowVer < 30000 then 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 if not remaining then
sndEndTime = 0 sndEndTime = 0

View File

@ -190,8 +190,8 @@ function StaggerBar.prototype:GetDebuffInfo()
if debuffID == LightID or debuffID == ModerateID or debuffID == HeavyID then if debuffID == LightID or debuffID == ModerateID or debuffID == HeavyID then
local spellName = UnitDebuff(self.unit, i) local spellName = UnitDebuff(self.unit, i)
duration = select((IceHUD.WowVer < 80000 and not IceHUD.WowClassic) and 6 or 5, UnitAura(self.unit, spellName, "", "HARMFUL")) duration = select(IceHUD.SpellFunctionsReturnRank 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")) 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 staggerLevel = (debuffID == LightID) and 1 or (debuffID == ModerateID) and 2 or 3
break break

View File

@ -113,6 +113,8 @@ local IncapacitateCCList = {
local FearCCList = { local FearCCList = {
-- Psychic Scream -- Psychic Scream
8122, 8122,
-- Fear (Retail)
118699,
-- Fear -- Fear
5782, 5782,
-- Howl of Terror -- Howl of Terror
@ -336,7 +338,7 @@ end
function TargetCC.prototype:GetMaxDebuffDuration(unitName, debuffNames) function TargetCC.prototype:GetMaxDebuffDuration(unitName, debuffNames)
local i = 1 local i = 1
local debuff, rank, texture, count, debuffType, duration, endTime, unitCaster, _, _, spellId 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") debuff, rank, texture, count, debuffType, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, "HARMFUL")
else else
debuff, texture, count, debuffType, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, "HARMFUL") 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; 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") debuff, rank, texture, count, debuffType, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, "HARMFUL")
else else
debuff, texture, count, debuffType, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, "HARMFUL") debuff, texture, count, debuffType, duration, endTime, unitCaster, _, _, spellId = UnitAura(unitName, i, "HARMFUL")

View File

@ -91,7 +91,7 @@ function TargetCast.prototype:TargetChanged(unit)
if UnitCastingInfo then if UnitCastingInfo then
local spell = UnitCastingInfo(self.unit) 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 if spell then
self.notInterruptible = notInterruptibleCast self.notInterruptible = notInterruptibleCast
self:StartBar(IceCastBar.Actions.Cast) self:StartBar(IceCastBar.Actions.Cast)
@ -101,7 +101,7 @@ function TargetCast.prototype:TargetChanged(unit)
if UnitChannelInfo then if UnitChannelInfo then
local channel = UnitChannelInfo(self.unit) 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 if channel then
self.notInterruptible = notInterruptibleChannel self.notInterruptible = notInterruptibleChannel
self:StartBar(IceCastBar.Actions.Channel) self:StartBar(IceCastBar.Actions.Channel)

View File

@ -642,6 +642,10 @@ function IceTargetHealth.prototype:Enable(core)
self:RegisterEvent("LFG_PROPOSAL_FAILED", "CheckPartyRole") self:RegisterEvent("LFG_PROPOSAL_FAILED", "CheckPartyRole")
self:RegisterEvent("LFG_ROLE_UPDATE", "CheckPartyRole") self:RegisterEvent("LFG_ROLE_UPDATE", "CheckPartyRole")
end end
if IceHUD.ShouldUpdateTargetHealthEveryTick and self.unit == "target" then
self.frame:SetScript("OnUpdate", function() self:Update(self.unit) end)
end
end end
if (self.moduleSettings.hideBlizz) then if (self.moduleSettings.hideBlizz) then
@ -659,6 +663,10 @@ function IceTargetHealth.prototype:Disable(core)
UnregisterUnitWatch(self.frame) 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 if self.moduleSettings.hideBlizz then
self:ShowBlizz() self:ShowBlizz()
end end
@ -1057,20 +1065,25 @@ end
function IceTargetHealth.prototype:ShowBlizz() function IceTargetHealth.prototype:ShowBlizz()
TargetFrame:Show() TargetFrame:SetParent(self.OriginalTargetFrameParent or UIParent)
TargetFrame:GetScript("OnLoad")(TargetFrame) ComboFrame:SetParent(self.OriginalComboFrameParent or UIParent)
ComboFrame:Show()
ComboFrame:GetScript("OnLoad")(ComboFrame)
end end
function IceTargetHealth.prototype:HideBlizz() function IceTargetHealth.prototype:HideBlizz()
TargetFrame:Hide() if not self.TargetFrameParent then
TargetFrame:UnregisterAllEvents() self.TargetFrameParent = CreateFrame("Frame")
self.TargetFrameParent:Hide()
end
if not self.ComboFrameParent then
self.ComboFrameParent = CreateFrame("Frame")
self.ComboFrameParent:Hide()
end
ComboFrame:Hide() self.OriginalTargetFrameParent = TargetFrame:GetParent()
ComboFrame:UnregisterAllEvents() TargetFrame:SetParent(self.TargetFrameParent)
self.OriginalComboFrameParent = ComboFrame:GetParent()
ComboFrame:SetParent(self.ComboFrameParent)
end end
function IceTargetHealth.prototype:UpdateBar(scale, color, alpha) function IceTargetHealth.prototype:UpdateBar(scale, color, alpha)

View File

@ -133,7 +133,7 @@ function IceTargetInfo.prototype:Enable(core)
self:RegisterEvent("UNIT_LEVEL", "TargetLevel") self:RegisterEvent("UNIT_LEVEL", "TargetLevel")
self:RegisterEvent("UNIT_FLAGS", "TargetFlags") self:RegisterEvent("UNIT_FLAGS", "TargetFlags")
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then if IceHUD.EventExistsUnitDynamicFlags then
self:RegisterEvent("UNIT_DYNAMIC_FLAGS", "TargetFlags") self:RegisterEvent("UNIT_DYNAMIC_FLAGS", "TargetFlags")
end end
@ -1419,7 +1419,7 @@ function IceTargetInfo.prototype:UpdateBuffType(aura)
local spellID local spellID
---- end change by Fulzamoth ---- end change by Fulzamoth
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then if IceHUD.SpellFunctionsReturnRank then
name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable = UnitAura(self.unit, i, reaction .. (filter and "|PLAYER" or "")) name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable = UnitAura(self.unit, i, reaction .. (filter and "|PLAYER" or ""))
else else
---- Fulzamoth - 2019-09-04 : support for cooldowns on target buffs/debuffs (classic) ---- Fulzamoth - 2019-09-04 : support for cooldowns on target buffs/debuffs (classic)

View File

@ -147,7 +147,7 @@ end
function TargetInvuln.prototype:GetMaxbuffDuration(unitName, buffNames) function TargetInvuln.prototype:GetMaxbuffDuration(unitName, buffNames)
local i = 1 local i = 1
local buff, rank, texture, count, buffType, duration, endTime, unitCaster 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") buff, rank, texture, count, buffType, duration, endTime, unitCaster = UnitAura(unitName, i, "HELPFUL")
else else
buff, texture, count, buffType, duration, endTime, unitCaster = UnitAura(unitName, i, "HELPFUL") buff, texture, count, buffType, duration, endTime, unitCaster = UnitAura(unitName, i, "HELPFUL")
@ -178,7 +178,7 @@ function TargetInvuln.prototype:GetMaxbuffDuration(unitName, buffNames)
i = i + 1; 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") buff, rank, texture, count, buffType, duration, endTime, unitCaster = UnitAura(unitName, i, "HELPFUL")
else else
buff, texture, count, buffType, duration, endTime, unitCaster = UnitAura(unitName, i, "HELPFUL") buff, texture, count, buffType, duration, endTime, unitCaster = UnitAura(unitName, i, "HELPFUL")
@ -197,7 +197,7 @@ end
function TargetInvuln.prototype:UpdateTargetBuffs(event, unit, isUpdate) function TargetInvuln.prototype:UpdateTargetBuffs(event, unit, isUpdate)
local name, duration, remaining 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) self.buffName, self.buffDuration, self.buffRemaining = self:GetMaxbuffDuration(self.unit, self.buffList)
else else
self.buffRemaining = math.max(0, self.buffRemaining - (GetTime() - self.lastUpdateTime)) 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_MAELSTROM = SPELL_POWER_MAELSTROM
local SPELL_POWER_PAIN = SPELL_POWER_PAIN local SPELL_POWER_PAIN = SPELL_POWER_PAIN
local SPELL_POWER_LUNAR_POWER = SPELL_POWER_LUNAR_POWER 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_MANA = Enum.PowerType.Mana
SPELL_POWER_RAGE = Enum.PowerType.Rage SPELL_POWER_RAGE = Enum.PowerType.Rage
SPELL_POWER_FOCUS = Enum.PowerType.Focus SPELL_POWER_FOCUS = Enum.PowerType.Focus
@ -66,9 +66,9 @@ function IceTargetMana.prototype:Enable(core)
IceTargetMana.super.prototype.Enable(self, core) IceTargetMana.super.prototype.Enable(self, core)
if self.registerEvents then if self.registerEvents then
if IceHUD.WowVer >= 40000 or IceHUD.WowClassic then if not IceHUD.PerPowerEventsExist then
self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent") self:RegisterEvent(IceHUD.UnitPowerEvent, "UpdateEvent")
if IceHUD.WowVer < 80000 and not IceHUD.WowClassic then if IceHUD.EventExistsUnitMaxPower then
self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent") self:RegisterEvent("UNIT_MAXPOWER", "UpdateEvent")
end end
else else

View File

@ -486,7 +486,7 @@ function TargetOfTarget.prototype:UpdateBuffs()
if (self.moduleSettings.showDebuffs) then if (self.moduleSettings.showDebuffs) then
for i = 1, IceCore.BuffLimit do for i = 1, IceCore.BuffLimit do
local buffName, buffRank, buffTexture, buffApplications 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) buffName, buffRank, buffTexture, buffApplications = UnitDebuff(self.unit, i)
else else
buffName, buffTexture, buffApplications = UnitDebuff(self.unit, i) buffName, buffTexture, buffApplications = UnitDebuff(self.unit, i)

View File

@ -16,7 +16,7 @@ IceThreat.prototype.scheduledEvent = nil
local GetNumPartyMembers, GetNumRaidMembers = GetNumPartyMembers, GetNumRaidMembers local GetNumPartyMembers, GetNumRaidMembers = GetNumPartyMembers, GetNumRaidMembers
local MAX_NUM_RAID_MEMBERS, MAX_NUM_PARTY_MEMBERS = MAX_NUM_RAID_MEMBERS, MAX_NUM_PARTY_MEMBERS 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 GetNumPartyMembers = GetNumGroupMembers
GetNumRaidMembers = GetNumGroupMembers GetNumRaidMembers = GetNumGroupMembers
MAX_NUM_PARTY_MEMBERS = MAX_PARTY_MEMBERS MAX_NUM_PARTY_MEMBERS = MAX_PARTY_MEMBERS

View File

@ -245,7 +245,7 @@ function Totems.prototype:UpdateTotem(event, totem, ...)
if not totem or tonumber(totem) ~= totem or totem < 1 or totem > self.numTotems or not GetTotemInfo then if not totem or tonumber(totem) ~= totem or totem < 1 or totem > self.numTotems or not GetTotemInfo then
return return
end end
local thisTotemName = self.totemNames[TOTEM_PRIORITIES[totem]]
local haveTotem, name, startTime, duration, icon = GetTotemInfo(totem); local haveTotem, name, startTime, duration, icon = GetTotemInfo(totem);
if duration > 0 then if duration > 0 then
self.frame.graphical[totem].totem:SetTexture(icon) self.frame.graphical[totem].totem:SetTexture(icon)
@ -287,10 +287,9 @@ function Totems.prototype:CreateTotemFrame()
self.frame.graphical = {} self.frame.graphical = {}
end end
local totemType
for i=1, self.numTotems do for i=1, self.numTotems do
slot = TOTEM_PRIORITIES[i] local slot = TOTEM_PRIORITIES[i]
self:CreateTotem(slot, self.totemNames[slot]) self:CreateTotem(slot, self.totemNames[slot])
end end
end end
@ -340,7 +339,6 @@ function Totems.prototype:CreateTotem(i, name)
return return
end end
local haveTotem, name, startTime, duration, icon = GetTotemInfo(i) local haveTotem, name, startTime, duration, icon = GetTotemInfo(i)
local bWasNewFrame = false
if (not self.frame.graphical[i]) then if (not self.frame.graphical[i]) then
self.frame.graphical[i] = CreateFrame("Frame", nil, self.frame) 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, "LOW")
@ -349,7 +347,6 @@ function Totems.prototype:CreateTotem(i, name)
self.frame.graphical[i].totem:SetTexture(icon) self.frame.graphical[i].totem:SetTexture(icon)
self.frame.graphical[i].totem:SetAllPoints(self.frame.graphical[i]) self.frame.graphical[i].totem:SetAllPoints(self.frame.graphical[i])
bWasNewFrame = true
end end
self.frame.graphical[i]:SetFrameStrata("BACKGROUND") self.frame.graphical[i]:SetFrameStrata("BACKGROUND")
@ -376,9 +373,9 @@ function Totems.prototype:CreateTotem(i, name)
self.graphicalOnLeave = function() GameTooltip:Hide() end self.graphicalOnLeave = function() GameTooltip:Hide() end
end end
if not self.graphicalOnMouseUp then if not self.graphicalOnMouseUp then
self.graphicalOnMouseUp = function (self, mouseButton) self.graphicalOnMouseUp = function (button, mouseButton)
if mouseButton == "RightButton" then if mouseButton == "RightButton" then
DestroyTotem(self.slot) DestroyTotem(button.slot)
end end
end end
end end
@ -406,22 +403,23 @@ function Totems.prototype:CreateTotem(i, name)
self.frame.graphical[i]:EnableMouse(true) self.frame.graphical[i]:EnableMouse(true)
self.frame.graphical[i]:SetScript("OnEnter", self.graphicalOnEnter) self.frame.graphical[i]:SetScript("OnEnter", self.graphicalOnEnter)
self.frame.graphical[i]:SetScript("OnLeave", self.graphicalOnLeave) self.frame.graphical[i]:SetScript("OnLeave", self.graphicalOnLeave)
if IceHUD.CanHookDestroyTotem then
self.frame.graphical[i]:SetScript("OnMouseUp", self.graphicalOnMouseUp)
end
else else
self.frame.graphical[i]:EnableMouse(false) self.frame.graphical[i]:EnableMouse(false)
self.frame.graphical[i]:SetScript("OnEnter", nil) self.frame.graphical[i]:SetScript("OnEnter", nil)
self.frame.graphical[i]:SetScript("OnLeave", nil) self.frame.graphical[i]:SetScript("OnLeave", nil)
if IceHUD.CanHookDestroyTotem then
self.frame.graphical[i]:SetScript("OnMouseUp", nil)
end
end end
self.frame.graphical[i].slot = i self.frame.graphical[i].slot = i
self.frame.graphical[i].name = name 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 end
-- Load us up -- Load us up
local _, unitClass = UnitClass("player") 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() IceHUD.Totems = Totems:new()
end end

View File

@ -1,15 +1,5 @@
# IceHUD # IceHUD
## Shadowlands/9.0 note
Anyone wanting to try out my first attempt at 9.0 compatibility is welcome to download the latest alpha build. I'm going to give this some time to percolate and wait for reports to come in before tagging it as a final build. I don't have a whole lot of time right now to work on the mod, so feedback is helpful.
Additionally, if you find this mod integral to your WoW experience, [a donation is very helpful](https://www.paypal.com/cgi-bin/webscr?return=https://www.github.com/parnic/ice-hud&cn=Add+special+instructions+to+the+addon+author()&business=icehud%40parnic.com&bn=PP-DonationsBF:btn_donateCC_LG.gif:NonHosted&cancel_return=https://www.github.com/parnic/ice-hud&lc=US&item_name=IceHUD+(from+github.com)&cmd=_donations&rm=1&no_shipping=1&currency_code=USD) to allow me to gauge how much time I need to put into this as well as maintain a WoW subscription to be able to develop the mod.
Thanks!
----
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. 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**

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

7
this_version.md Normal file
View File

@ -0,0 +1,7 @@
# Changelog
v1.13.13:
- Slight optimization of Zereth Mortis puzzle detection logic.
- Fixed target health updating infrequently on Classic-BC.
- Fixed reported error in TargetInvuln module.