Compare commits
90 Commits
Author | SHA1 | Date | |
---|---|---|---|
6325ed1ade
|
|||
a4c44a5809
|
|||
82db70969a
|
|||
47931922bd
|
|||
af74c9e3fe
|
|||
611f37a1f3
|
|||
5d8b83e5ef
|
|||
53fdb48b05
|
|||
b64294ca11
|
|||
0785265feb
|
|||
4007f1258b
|
|||
c7c92d468e
|
|||
eee20f17b4
|
|||
0aa584d81a
|
|||
51e2debc4d
|
|||
d48ae9b12a
|
|||
83028c159f
|
|||
a8a3da753e
|
|||
9e77fa6831 | |||
e4919fb1fe
|
|||
724a3001ed
|
|||
8226679ccd
|
|||
2c0b3d5f6f
|
|||
a08c2455c6
|
|||
8868b16785
|
|||
fc009492cb
|
|||
e2ef8e6cb1
|
|||
da5498d1a2
|
|||
e8c8172298
|
|||
345d12263c
|
|||
843292eda7
|
|||
58721f4fa6
|
|||
ebbddc0001
|
|||
764a097fe2 | |||
60587b22f8
|
|||
ec80716991
|
|||
bc16ae677b
|
|||
dc5a3f3a05
|
|||
6c3ed55780
|
|||
dfcef9617f
|
|||
94b62d56a0
|
|||
90f126d7a0
|
|||
209fbe2b4e
|
|||
9435a9d74f
|
|||
1519ac2299
|
|||
2ba558d73d
|
|||
a3d9c7bd3d | |||
d641886a8a
|
|||
87456ca051
|
|||
d1eae2437f
|
|||
470ca2f592
|
|||
e313e679ae
|
|||
d43555b7c4
|
|||
90e0dd1597
|
|||
6282dfb256
|
|||
4de8cb0d27
|
|||
ea28a05051
|
|||
ca80ca3f75
|
|||
fe22f7e658
|
|||
354fb483bb
|
|||
f6c737c654
|
|||
9a38c4b3ea
|
|||
ab6b662ac4
|
|||
a2addcb627
|
|||
7f84c28538
|
|||
924bd4a6ef
|
|||
0f753448d7
|
|||
891ddc230c
|
|||
06353d4974
|
|||
d44e62bee4
|
|||
8fe1ef75b7
|
|||
702aa5bff6
|
|||
d6e1fd707a
|
|||
88d7dd3982
|
|||
f495bb15be
|
|||
087c64ee6a
|
|||
077f381adb
|
|||
a5be2996da
|
|||
22f473b54d
|
|||
e7f95cbcb6
|
|||
5c19d7f89c
|
|||
f01d6495f8
|
|||
34ecd95e4f
|
|||
564919e0c6
|
|||
a18144aec0
|
|||
53bf76c58a
|
|||
1140d2e8c5
|
|||
7d562dfb35
|
|||
7c2fe06fa8
|
|||
819cc64aca
|
50
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# description of this workflow, can be anything you want
|
||||||
|
name: Package and release
|
||||||
|
|
||||||
|
# we need to let GitHub know _when_ we want to release, typically only when we create a new tag.
|
||||||
|
# this will target only tags, and not all pushes to the master branch.
|
||||||
|
# this part can be heavily customized to your liking, like targeting only tags that match a certain word,
|
||||||
|
# other branches or even pullrequests.
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
# a workflow is built up as jobs, and within these jobs are steps
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
# "release" is a job, you can name it anything you want
|
||||||
|
release:
|
||||||
|
|
||||||
|
# we can run our steps on pretty much anything, but the "ubuntu-latest" image is a safe bet
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# specify the environment variables used by the packager, matching the secrets from the project on GitHub
|
||||||
|
env:
|
||||||
|
CF_API_KEY: ${{ secrets.CF_API_KEY }}
|
||||||
|
WOWI_API_TOKEN: ${{ secrets.WOWI_API_TOKEN }}
|
||||||
|
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} # "GITHUB_TOKEN" is a secret always provided to the workflow
|
||||||
|
# for your own token, the name cannot start with "GITHUB_"
|
||||||
|
|
||||||
|
# "steps" holds a list of all the steps needed to package and release our AddOn
|
||||||
|
steps:
|
||||||
|
|
||||||
|
# we first have to clone the AddOn project, this is a required step
|
||||||
|
- name: Clone project
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
|
# once cloned, we just run the GitHub Action for the packager project
|
||||||
|
- name: Package and release
|
||||||
|
uses: BigWigsMods/packager@master
|
||||||
|
|
||||||
|
# another example where we supply additional arguments, this example is specifically to release
|
||||||
|
# for the Classic version of the game
|
||||||
|
- name: Package and release for Classic
|
||||||
|
uses: BigWigsMods/packager@master
|
||||||
|
with:
|
||||||
|
args: -g classic -w 0
|
||||||
|
|
||||||
|
- name: Package and release for TBC
|
||||||
|
uses: BigWigsMods/packager@master
|
||||||
|
with:
|
||||||
|
args: -g bcc -w 0
|
1
.mailmap
@ -1,2 +1,3 @@
|
|||||||
Parnic <parnic@parnic.com> Parnic <chris@parnic.com>
|
Parnic <parnic@parnic.com> Parnic <chris@parnic.com>
|
||||||
rokiyo <rokiyo@example.com> Rokiyo <Rokiyo@example.com>
|
rokiyo <rokiyo@example.com> Rokiyo <Rokiyo@example.com>
|
||||||
|
Parnic <parnic@parnic.com> Chris Pickett <chris@perniciousgames.com>
|
||||||
|
7
.pkgmeta
@ -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
|
||||||
|
@ -415,7 +415,7 @@ do
|
|||||||
type='range',
|
type='range',
|
||||||
name = L["Bar vertical offset"],
|
name = L["Bar vertical offset"],
|
||||||
desc = L["Adjust the vertical placement of this bar"],
|
desc = L["Adjust the vertical placement of this bar"],
|
||||||
min = -400,
|
min = -600,
|
||||||
max = 600,
|
max = 600,
|
||||||
step = 1,
|
step = 1,
|
||||||
get = function()
|
get = function()
|
||||||
@ -436,7 +436,7 @@ do
|
|||||||
type='range',
|
type='range',
|
||||||
name = L["Bar horizontal adjust"],
|
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."],
|
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,
|
max = 600,
|
||||||
step = 1,
|
step = 1,
|
||||||
get = function()
|
get = function()
|
||||||
@ -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,
|
||||||
@ -1040,7 +1040,7 @@ end
|
|||||||
|
|
||||||
-- Creates the actual bar
|
-- Creates the actual bar
|
||||||
function IceBarElement.prototype:CreateBar()
|
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:SetBarCoord(self.barFrame)
|
||||||
|
|
||||||
self.barFrame.bar:SetBlendMode(self.settings.barBlendMode)
|
self.barFrame.bar:SetBlendMode(self.settings.barBlendMode)
|
||||||
@ -1050,9 +1050,9 @@ end
|
|||||||
|
|
||||||
-- Returns a barFrame & barFrame.bar
|
-- 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.
|
-- 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
|
if not (barFrame) then
|
||||||
barFrame = CreateFrame("Frame", nil, self.frame)
|
barFrame = CreateFrame("Frame", "IceHUD_"..self.elementName.."_"..(nameSuffix or "Bar"), self.frame)
|
||||||
end
|
end
|
||||||
|
|
||||||
barFrame:SetFrameStrata(frameStrata and frameStrata or "LOW")
|
barFrame:SetFrameStrata(frameStrata and frameStrata or "LOW")
|
||||||
@ -1584,7 +1584,7 @@ function IceBarElement.prototype:CreateMarker(idx)
|
|||||||
self.Markers[idx] = nil
|
self.Markers[idx] = nil
|
||||||
end
|
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
|
local color = self.moduleSettings.markers[idx].color
|
||||||
self.Markers[idx].bar:SetVertexColor(color.r, color.g, color.b, self.alpha)
|
self.Markers[idx].bar:SetVertexColor(color.r, color.g, color.b, self.alpha)
|
||||||
|
@ -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)
|
||||||
|
61
IceCore.lua
@ -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)
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ function IceElement.prototype:Create(parent)
|
|||||||
|
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
if not self.masterFrame then
|
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")
|
self.masterFrame:SetFrameStrata("MEDIUM")
|
||||||
end
|
end
|
||||||
self:CreateFrame()
|
self:CreateFrame()
|
||||||
|
70
IceHUD.lua
@ -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.WowClassic or IceHUD.WowClassicBC) and GetCVarBool("predictedHealth")
|
||||||
|
|
||||||
IceHUD.UnitPowerEvent = "UNIT_POWER_UPDATE"
|
IceHUD.UnitPowerEvent = "UNIT_POWER_UPDATE"
|
||||||
|
|
||||||
@ -259,6 +278,10 @@ function IceHUD:NotifyOptionsChange()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function IceHUD:OnEnable(isFirst)
|
function IceHUD:OnEnable(isFirst)
|
||||||
|
-- if isFirst then
|
||||||
|
self:SetDebugging(self.IceCore:GetDebug())
|
||||||
|
self.debugFrame = ChatFrame1
|
||||||
|
-- end
|
||||||
self:Debug("IceHUD:OnEnable()")
|
self:Debug("IceHUD:OnEnable()")
|
||||||
|
|
||||||
if self.db.profile.enable then
|
if self.db.profile.enable then
|
||||||
@ -274,11 +297,6 @@ function IceHUD:OnEnable(isFirst)
|
|||||||
--@debug@
|
--@debug@
|
||||||
IceHUD_Options:OnLoad()
|
IceHUD_Options:OnLoad()
|
||||||
--@end-debug@
|
--@end-debug@
|
||||||
|
|
||||||
-- if isFirst then
|
|
||||||
self:SetDebugging(self.IceCore:GetDebug())
|
|
||||||
self.debugFrame = ChatFrame1
|
|
||||||
-- end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- add settings changes/updates here so that existing users don't lose their settings
|
-- add settings changes/updates here so that existing users don't lose their settings
|
||||||
@ -325,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)
|
||||||
@ -367,7 +385,11 @@ function IceHUD:Debug(...)
|
|||||||
for n=1,select('#', ...) do
|
for n=1,select('#', ...) do
|
||||||
msg = msg .. tostring(select(n, ...)) .. " "
|
msg = msg .. tostring(select(n, ...)) .. " "
|
||||||
end
|
end
|
||||||
|
if self.debugFrame then
|
||||||
self.debugFrame:AddMessage(msg)
|
self.debugFrame:AddMessage(msg)
|
||||||
|
else
|
||||||
|
print(msg)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -413,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 ""))
|
||||||
@ -425,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 ""))
|
||||||
@ -445,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)
|
||||||
@ -459,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)
|
||||||
@ -472,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()
|
||||||
@ -638,6 +684,7 @@ function IceHUD:GetIsInLFGGroup()
|
|||||||
return IsInLFGGroup
|
return IsInLFGGroup
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if UnitPopupButtons then
|
||||||
local BLACKLISTED_UNIT_MENU_OPTIONS = {
|
local BLACKLISTED_UNIT_MENU_OPTIONS = {
|
||||||
SET_FOCUS = "ICEHUD_SET_FOCUS",
|
SET_FOCUS = "ICEHUD_SET_FOCUS",
|
||||||
CLEAR_FOCUS = "ICEHUD_CLEAR_FOCUS",
|
CLEAR_FOCUS = "ICEHUD_CLEAR_FOCUS",
|
||||||
@ -753,9 +800,7 @@ local function figure_unit_menu(unit)
|
|||||||
end
|
end
|
||||||
|
|
||||||
IceHUD_UnitFrame_DropDown = CreateFrame("Frame", "IceHUD_UnitFrame_DropDown", UIParent, "UIDropDownMenuTemplate")
|
IceHUD_UnitFrame_DropDown = CreateFrame("Frame", "IceHUD_UnitFrame_DropDown", UIParent, "UIDropDownMenuTemplate")
|
||||||
if UnitPopupFrames then
|
|
||||||
UnitPopupFrames[#UnitPopupFrames+1] = "IceHUD_UnitFrame_DropDown"
|
UnitPopupFrames[#UnitPopupFrames+1] = "IceHUD_UnitFrame_DropDown"
|
||||||
end
|
|
||||||
|
|
||||||
IceHUD.DropdownUnit = nil
|
IceHUD.DropdownUnit = nil
|
||||||
UIDropDownMenu_Initialize(IceHUD_UnitFrame_DropDown, function()
|
UIDropDownMenu_Initialize(IceHUD_UnitFrame_DropDown, function()
|
||||||
@ -769,3 +814,4 @@ UIDropDownMenu_Initialize(IceHUD_UnitFrame_DropDown, function()
|
|||||||
UnitPopup_ShowMenu(IceHUD_UnitFrame_DropDown, menu, IceHUD.DropdownUnit, nil, id)
|
UnitPopup_ShowMenu(IceHUD_UnitFrame_DropDown, menu, IceHUD.DropdownUnit, nil, id)
|
||||||
end
|
end
|
||||||
end, "MENU", nil)
|
end, "MENU", nil)
|
||||||
|
end
|
14
IceHUD.toc
@ -1,15 +1,23 @@
|
|||||||
## Interface: 80300
|
## Interface: 90205
|
||||||
|
## Interface-Retail: 90205
|
||||||
|
## Interface-Classic: 11403
|
||||||
|
## Interface-BCC: 20504
|
||||||
## 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
|
||||||
## X-Website: https://www.wowace.com/projects/ice-hud
|
## X-Website: https://www.wowace.com/projects/ice-hud
|
||||||
|
## X-Curse-Project-ID: 5394
|
||||||
## X-WoWI-ID: 8149
|
## X-WoWI-ID: 8149
|
||||||
## X-Compatible-With: 11302
|
|
||||||
|
|
||||||
#@no-lib-strip@
|
#@no-lib-strip@
|
||||||
# Libraries
|
# Libraries
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
## Interface: 80300
|
## Interface: 90205
|
||||||
|
## Interface-Retail: 90205
|
||||||
|
## Interface-Classic: 11403
|
||||||
|
## Interface-BCC: 20504
|
||||||
## Title: IceHUD |cff7fff7f-Options-|r
|
## Title: IceHUD |cff7fff7f-Options-|r
|
||||||
## Author: Parnic
|
## Author: Parnic
|
||||||
## Version: @project-version@
|
## Version: @project-version@
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
@ -171,7 +171,7 @@ end
|
|||||||
-- Creates the low amount warning frame
|
-- Creates the low amount warning frame
|
||||||
function IceUnitBar.prototype:CreateFlashFrame()
|
function IceUnitBar.prototype:CreateFlashFrame()
|
||||||
if not (self.flashFrame) then
|
if not (self.flashFrame) then
|
||||||
self.flashFrame = CreateFrame("Frame", nil, self.frame)
|
self.flashFrame = CreateFrame("Frame", "IceHUD_"..self.elementName.."_Flash", self.frame)
|
||||||
end
|
end
|
||||||
|
|
||||||
self.flashFrame:SetFrameStrata("BACKGROUND")
|
self.flashFrame:SetFrameStrata("BACKGROUND")
|
||||||
@ -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
|
||||||
|
|
||||||
|
-- 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
|
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
@ -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.
|
@ -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
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ end
|
|||||||
|
|
||||||
function CastBar.prototype:CreateLagBar()
|
function CastBar.prototype:CreateLagBar()
|
||||||
if self.lagBar == nil then
|
if self.lagBar == nil then
|
||||||
self.lagBar = self:BarFactory(self.lagBar, "LOW", "OVERLAY")
|
self.lagBar = self:BarFactory(self.lagBar, "LOW", "OVERLAY", "Lag")
|
||||||
end
|
end
|
||||||
|
|
||||||
local r, g, b = self:GetColor("CastLag")
|
local r, g, b = self:GetColor("CastLag")
|
||||||
|
@ -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)
|
||||||
|
if AnticipationExists then
|
||||||
self:SetDefaultColor("AnticipationPoints", 1, 0, 1)
|
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
|
||||||
|
|
||||||
|
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)
|
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
|
||||||
|
@ -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
|
||||||
|
@ -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)
|
||||||
|
@ -122,7 +122,7 @@ function IceCustomCount.prototype:GetOptions()
|
|||||||
self.moduleSettings.vpos = v
|
self.moduleSettings.vpos = v
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
end,
|
end,
|
||||||
min = -400,
|
min = -700,
|
||||||
max = 700,
|
max = 700,
|
||||||
step = 1,
|
step = 1,
|
||||||
disabled = function()
|
disabled = function()
|
||||||
|
@ -107,7 +107,7 @@ function EclipseBar.prototype:CreateFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function EclipseBar.prototype:CreateSolarBar()
|
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:SetBarCoord(self.solarBar, 0.5, true)
|
||||||
|
|
||||||
self.solarBar.bar:SetVertexColor(self:GetColor("EclipseSolar", 1))
|
self.solarBar.bar:SetVertexColor(self:GetColor("EclipseSolar", 1))
|
||||||
|
@ -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
|
||||||
|
@ -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)
|
||||||
@ -255,7 +255,7 @@ function GlobalCoolDown.prototype:CreateFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function GlobalCoolDown.prototype:CreateLagBar()
|
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")
|
local r, g, b = self:GetColor("CastLag")
|
||||||
if (self.settings.backgroundToggle) then
|
if (self.settings.backgroundToggle) then
|
||||||
@ -267,8 +267,9 @@ function GlobalCoolDown.prototype:CreateLagBar()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function GlobalCoolDown.prototype:GetSpellId()
|
function GlobalCoolDown.prototype:GetSpellId()
|
||||||
|
if GetSpellInfo(61304) then
|
||||||
return 61304
|
return 61304
|
||||||
--[[
|
else
|
||||||
local defaultSpells
|
local defaultSpells
|
||||||
|
|
||||||
defaultSpells = {
|
defaultSpells = {
|
||||||
@ -285,12 +286,16 @@ function GlobalCoolDown.prototype:GetSpellId()
|
|||||||
MONK=100780, -- jab
|
MONK=100780, -- jab
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if IceHUD.WowClassicBC or IceHUD.WowClassic then
|
||||||
|
defaultSpells["PALADIN"] = 635
|
||||||
|
end
|
||||||
|
|
||||||
local _, unitClass = UnitClass("player")
|
local _, unitClass = UnitClass("player")
|
||||||
return defaultSpells[unitClass]
|
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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ function HolyPower.prototype:init()
|
|||||||
self.numericColor = "HolyPowerNumeric"
|
self.numericColor = "HolyPowerNumeric"
|
||||||
self.unitPower = SPELL_POWER_HOLY_POWER
|
self.unitPower = SPELL_POWER_HOLY_POWER
|
||||||
self.minLevel = PALADINPOWERBAR_SHOW_LEVEL
|
self.minLevel = PALADINPOWERBAR_SHOW_LEVEL
|
||||||
if IceHUD.WowVer >= 70000 then
|
if IceHUD.WowVer >= 70000 and IceHUD.WowVer < 90000 then
|
||||||
self.requiredSpec = SPEC_PALADIN_RETRIBUTION
|
self.requiredSpec = SPEC_PALADIN_RETRIBUTION
|
||||||
end
|
end
|
||||||
self.bTreatEmptyAsFull = true
|
self.bTreatEmptyAsFull = true
|
||||||
|
@ -280,8 +280,8 @@ function MirrorBarHandler.prototype:GetOptions()
|
|||||||
type='range',
|
type='range',
|
||||||
name = L["Bar vertical offset"],
|
name = L["Bar vertical offset"],
|
||||||
desc = L["Adjust the vertical placement of this bar"],
|
desc = L["Adjust the vertical placement of this bar"],
|
||||||
min = -400,
|
min = -600,
|
||||||
max = 400,
|
max = 600,
|
||||||
step = 1,
|
step = 1,
|
||||||
get = function()
|
get = function()
|
||||||
return self.moduleSettings.barVerticalOffset
|
return self.moduleSettings.barVerticalOffset
|
||||||
|
@ -42,14 +42,16 @@ 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");
|
||||||
self:RegisterEvent("UNIT_PET", "CheckPet");
|
self:RegisterEvent("UNIT_PET", "CheckPet");
|
||||||
|
|
||||||
self:RegisterEvent("UNIT_HEALTH", "UpdateEvent")
|
self:RegisterEvent("UNIT_HEALTH", "UpdateEvent")
|
||||||
|
if IceHUD.WowVer < 90000 then
|
||||||
self:RegisterEvent("UNIT_HEALTH_FREQUENT", "UpdateEvent")
|
self:RegisterEvent("UNIT_HEALTH_FREQUENT", "UpdateEvent")
|
||||||
|
end
|
||||||
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateEvent")
|
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateEvent")
|
||||||
|
|
||||||
if UnitHasVehicleUI then
|
if UnitHasVehicleUI then
|
||||||
@ -223,6 +225,7 @@ function PetHealth.prototype:ExitingVehicle(event, unit)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function PetHealth.prototype:EnteringWorld()
|
function PetHealth.prototype:EnteringWorld()
|
||||||
|
self:TargetChanged()
|
||||||
self:Update(self.unit)
|
self:Update(self.unit)
|
||||||
|
|
||||||
if UnitHasVehicleUI then
|
if UnitHasVehicleUI then
|
||||||
|
@ -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
|
||||||
@ -242,6 +242,7 @@ function PetMana.prototype:ExitingVehicle(event, unit)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function PetMana.prototype:EnteringWorld()
|
function PetMana.prototype:EnteringWorld()
|
||||||
|
self:TargetChanged()
|
||||||
self:Update(self.unit)
|
self:Update(self.unit)
|
||||||
|
|
||||||
if UnitHasVehicleUI then
|
if UnitHasVehicleUI then
|
||||||
|
@ -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
|
||||||
|
@ -68,7 +68,9 @@ function PlayerHealth.prototype:Enable(core)
|
|||||||
PlayerHealth.super.prototype.Enable(self, core)
|
PlayerHealth.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
self:RegisterEvent("UNIT_HEALTH", "UpdateEvent")
|
self:RegisterEvent("UNIT_HEALTH", "UpdateEvent")
|
||||||
|
if IceHUD.WowVer < 90000 then
|
||||||
self:RegisterEvent("UNIT_HEALTH_FREQUENT", "UpdateEvent")
|
self:RegisterEvent("UNIT_HEALTH_FREQUENT", "UpdateEvent")
|
||||||
|
end
|
||||||
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateEvent")
|
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateEvent")
|
||||||
|
|
||||||
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
|
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
|
||||||
@ -79,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")
|
||||||
@ -934,7 +936,7 @@ function PlayerHealth.prototype:CreateBackground(redraw)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function PlayerHealth.prototype:CreateHealBar()
|
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.healFrame.bar:SetVertexColor(self:GetColor("PlayerHealthHealAmount", self.alpha * self.moduleSettings.healAlpha))
|
||||||
|
|
||||||
@ -946,7 +948,7 @@ function PlayerHealth.prototype:CreateHealBar()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function PlayerHealth.prototype:CreateAbsorbBar()
|
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.absorbFrame.bar:SetVertexColor(self:GetColor("PlayerHealthAbsorbAmount", self.alpha * self.moduleSettings.absorbAlpha))
|
||||||
|
|
||||||
@ -1405,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()
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -9,6 +9,8 @@ local maxComboPoints = 5
|
|||||||
local rtbEndTime = 0
|
local rtbEndTime = 0
|
||||||
local rtbDuration = 0
|
local rtbDuration = 0
|
||||||
local rtbCount = 0
|
local rtbCount = 0
|
||||||
|
local sixComboPointsTalentID = 19240
|
||||||
|
local behaviorDependsOnComboPoints = IceHUD.WowVer < 90000
|
||||||
|
|
||||||
local CurrMaxRtBDuration = 0
|
local CurrMaxRtBDuration = 0
|
||||||
local PotentialRtBDuration = 0
|
local PotentialRtBDuration = 0
|
||||||
@ -20,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
|
||||||
|
|
||||||
@ -33,12 +35,14 @@ function RollTheBones.prototype:init()
|
|||||||
self.moduleSettings.shouldAnimate = false
|
self.moduleSettings.shouldAnimate = false
|
||||||
|
|
||||||
self:SetDefaultColor("RollTheBones", 1, 0.6, 0.2)
|
self:SetDefaultColor("RollTheBones", 1, 0.6, 0.2)
|
||||||
|
if behaviorDependsOnComboPoints then
|
||||||
self:SetDefaultColor("RollTheBones2", 0.75, 1, 0.2)
|
self:SetDefaultColor("RollTheBones2", 0.75, 1, 0.2)
|
||||||
self:SetDefaultColor("RollTheBones3", 0.4, 1, 0.2)
|
self:SetDefaultColor("RollTheBones3", 0.4, 1, 0.2)
|
||||||
self:SetDefaultColor("RollTheBones4", 0.4, 1, 0.2)
|
self:SetDefaultColor("RollTheBones4", 0.4, 1, 0.2)
|
||||||
self:SetDefaultColor("RollTheBones5", 0.1, 1, 0.7)
|
self:SetDefaultColor("RollTheBones5", 0.1, 1, 0.7)
|
||||||
self:SetDefaultColor("RollTheBones6", 0.1, 1, 0.7)
|
self:SetDefaultColor("RollTheBones6", 0.1, 1, 0.7)
|
||||||
self:SetDefaultColor("RollTheBonesPotential", 1, 1, 1)
|
self:SetDefaultColor("RollTheBonesPotential", 1, 1, 1)
|
||||||
|
end
|
||||||
|
|
||||||
self.bTreatEmptyAsFull = true
|
self.bTreatEmptyAsFull = true
|
||||||
end
|
end
|
||||||
@ -50,7 +54,10 @@ function RollTheBones.prototype:Enable(core)
|
|||||||
RollTheBones.super.prototype.Enable(self, core)
|
RollTheBones.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
self:RegisterEvent("UNIT_AURA", "UpdateRollTheBones")
|
self:RegisterEvent("UNIT_AURA", "UpdateRollTheBones")
|
||||||
|
|
||||||
|
if behaviorDependsOnComboPoints then
|
||||||
self:RegisterEvent(IceHUD.UnitPowerEvent, "ComboPointsChanged")
|
self:RegisterEvent(IceHUD.UnitPowerEvent, "ComboPointsChanged")
|
||||||
|
end
|
||||||
|
|
||||||
if not self.moduleSettings.alwaysFullAlpha then
|
if not self.moduleSettings.alwaysFullAlpha then
|
||||||
self:Show(false)
|
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"]["desc"] = "The text to display under this bar. # will be replaced with the number of Roll the Bones seconds remaining."
|
||||||
opts["textSettings"].args["upperTextString"].hidden = false
|
opts["textSettings"].args["upperTextString"].hidden = false
|
||||||
|
|
||||||
|
if behaviorDependsOnComboPoints then
|
||||||
opts["showAsPercentOfMax"] =
|
opts["showAsPercentOfMax"] =
|
||||||
{
|
{
|
||||||
type = 'toggle',
|
type = 'toggle',
|
||||||
@ -142,6 +150,24 @@ function RollTheBones.prototype:GetOptions()
|
|||||||
end
|
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"] =
|
opts["bShowWithNoTarget"] =
|
||||||
{
|
{
|
||||||
type = 'toggle',
|
type = 'toggle',
|
||||||
@ -159,23 +185,6 @@ function RollTheBones.prototype:GetOptions()
|
|||||||
end,
|
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
|
return opts
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -186,7 +195,11 @@ function RollTheBones.prototype:CreateFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function RollTheBones.prototype:CreateDurationBar()
|
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?
|
-- Rokiyo: Do we need to call this here?
|
||||||
self.CurrScale = 0
|
self.CurrScale = 0
|
||||||
@ -204,8 +217,10 @@ end
|
|||||||
function RollTheBones.prototype:RotateHorizontal()
|
function RollTheBones.prototype:RotateHorizontal()
|
||||||
RollTheBones.super.prototype.RotateHorizontal(self)
|
RollTheBones.super.prototype.RotateHorizontal(self)
|
||||||
|
|
||||||
|
if self.durationFrame then
|
||||||
self:RotateFrame(self.durationFrame)
|
self:RotateFrame(self.durationFrame)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function RollTheBones.prototype:ResetRotation()
|
function RollTheBones.prototype:ResetRotation()
|
||||||
RollTheBones.super.prototype.ResetRotation(self)
|
RollTheBones.super.prototype.ResetRotation(self)
|
||||||
@ -308,7 +323,7 @@ function RollTheBones.prototype:UpdateRollTheBones(event, unit, fromUpdate)
|
|||||||
if not remaining then
|
if not remaining then
|
||||||
remaining = rtbEndTime - now
|
remaining = rtbEndTime - now
|
||||||
end
|
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))
|
self:UpdateBar(denominator ~= 0 and remaining / denominator or 0, self:GetColorName(rtbCount))
|
||||||
else
|
else
|
||||||
self:UpdateBar(0, "RollTheBones")
|
self:UpdateBar(0, "RollTheBones")
|
||||||
@ -326,13 +341,13 @@ function RollTheBones.prototype:UpdateRollTheBones(event, unit, fromUpdate)
|
|||||||
|
|
||||||
-- somewhat redundant, but we also need to check potential remaining time
|
-- somewhat redundant, but we also need to check potential remaining time
|
||||||
if (remaining ~= nil) or PotentialRtBDuration > 0 then
|
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 ""))
|
self:SetBottomText1(self.moduleSettings.upperText .. tostring(floor(remaining or 0)) .. (self.moduleSettings.durationAlpha ~= 0 and potText or ""))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function RollTheBones.prototype:GetColorName(count)
|
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
|
return "RollTheBones"..count
|
||||||
else
|
else
|
||||||
return "RollTheBones"
|
return "RollTheBones"
|
||||||
@ -352,13 +367,17 @@ function RollTheBones.prototype:TargetChanged()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function RollTheBones.prototype:UpdateDurationBar(event, unit)
|
function RollTheBones.prototype:UpdateDurationBar(event, unit)
|
||||||
|
if not self.durationFrame then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if unit and unit ~= self.unit then
|
if unit and unit ~= self.unit then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local points = RTBGetComboPoints(self.unit)
|
local points = RTBGetComboPoints(self.unit)
|
||||||
-- check for Deeper Stratagem
|
-- check for Deeper Stratagem
|
||||||
local _, _, _, DeeperStratagem = GetTalentInfo(3, 1, 1)
|
local _, _, _, DeeperStratagem = GetTalentInfoByID(sixComboPointsTalentID, GetActiveSpecGroup())
|
||||||
|
|
||||||
if DeeperStratagem then
|
if DeeperStratagem then
|
||||||
-- first, set the cached upper limit of RtB duration
|
-- first, set the cached upper limit of RtB duration
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -20,10 +20,16 @@ local impSndBonusPerRank = 0.25
|
|||||||
local maxComboPoints = 5
|
local maxComboPoints = 5
|
||||||
local sndEndTime = 0
|
local sndEndTime = 0
|
||||||
local sndDuration = 0
|
local sndDuration = 0
|
||||||
|
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
|
||||||
@ -32,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
|
||||||
|
|
||||||
@ -60,12 +70,17 @@ 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")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if IceHUD.WowVer >= 70000 then
|
||||||
|
self:RegisterEvent("PLAYER_TALENT_UPDATE", "CheckMaxComboPoints")
|
||||||
|
self:CheckMaxComboPoints()
|
||||||
|
end
|
||||||
|
|
||||||
if not self.moduleSettings.alwaysFullAlpha then
|
if not self.moduleSettings.alwaysFullAlpha then
|
||||||
self:Show(false)
|
self:Show(false)
|
||||||
else
|
else
|
||||||
@ -75,6 +90,11 @@ function SliceAndDice.prototype:Enable(core)
|
|||||||
self:SetBottomText1("")
|
self:SetBottomText1("")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function SliceAndDice.prototype:CheckMaxComboPoints()
|
||||||
|
local talentID, name, texture, selected, available, spellID, unknown, row, column, known, grantedByAura = GetTalentInfoByID(sixComboPointsTalentID, GetActiveSpecGroup())
|
||||||
|
maxComboPoints = selected and 6 or 5
|
||||||
|
end
|
||||||
|
|
||||||
function SliceAndDice.prototype:Disable(core)
|
function SliceAndDice.prototype:Disable(core)
|
||||||
SliceAndDice.super.prototype.Disable(self, core)
|
SliceAndDice.super.prototype.Disable(self, core)
|
||||||
end
|
end
|
||||||
@ -182,7 +202,7 @@ function SliceAndDice.prototype:CreateFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function SliceAndDice.prototype:CreateDurationBar()
|
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?
|
-- Rokiyo: Do we need to call this here?
|
||||||
self.CurrScale = 0
|
self.CurrScale = 0
|
||||||
@ -216,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)
|
||||||
@ -232,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)
|
||||||
@ -253,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
|
||||||
@ -270,6 +290,10 @@ local function HasSpell(id)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function ShouldHide()
|
local function ShouldHide()
|
||||||
|
if IceHUD.WowVer >= 90000 or IceHUD.WowClassicBC 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
|
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.
|
-- 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
|
-- if we do, though, the "active" check gets way more complicated since it can activate any number of 6 different abilities
|
||||||
@ -285,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
|
||||||
|
@ -137,7 +137,7 @@ function StaggerBar.prototype:CreateFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function StaggerBar.prototype:CreateTimerBar()
|
function StaggerBar.prototype:CreateTimerBar()
|
||||||
self.timerFrame = self:BarFactory(self.timerFrame, "MEDIUM","ARTWORK")
|
self.timerFrame = self:BarFactory(self.timerFrame, "MEDIUM","ARTWORK", "Timer")
|
||||||
|
|
||||||
self.CurrScale = 0
|
self.CurrScale = 0
|
||||||
|
|
||||||
@ -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
|
||||||
|
@ -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")
|
||||||
|
@ -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)
|
||||||
|
@ -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)
|
||||||
|
@ -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)
|
||||||
|
@ -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))
|
||||||
|
@ -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
|
||||||
|
@ -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)
|
||||||
|
@ -16,13 +16,20 @@ 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
|
||||||
MAX_NUM_RAID_MEMBERS = MAX_RAID_MEMBERS
|
MAX_NUM_RAID_MEMBERS = MAX_RAID_MEMBERS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local UnitGroupRolesAssigned = UnitGroupRolesAssigned
|
||||||
|
if not UnitGroupRolesAssigned then
|
||||||
|
UnitGroupRolesAssigned = function()
|
||||||
|
return "NONE"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local MAX_NUM_RAID_MEMBERS = 40
|
local MAX_NUM_RAID_MEMBERS = 40
|
||||||
local MAX_NUM_PARTY_MEMBERS = 5
|
local MAX_NUM_PARTY_MEMBERS = 5
|
||||||
|
|
||||||
@ -224,7 +231,7 @@ end
|
|||||||
|
|
||||||
-- create the aggro range indicator bar
|
-- create the aggro range indicator bar
|
||||||
function IceThreat.prototype:CreateAggroBar()
|
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")
|
local r, g, b = self:GetColor("ThreatPullAggro")
|
||||||
if (self.settings.backgroundToggle) then
|
if (self.settings.backgroundToggle) then
|
||||||
@ -236,7 +243,7 @@ function IceThreat.prototype:CreateAggroBar()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function IceThreat.prototype:CreateSecondThreatBar()
|
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))
|
self.secondThreatBar.bar:SetVertexColor(self:GetColor("ThreatSecondPlace", self.alpha * self.moduleSettings.secondPlaceThreatAlpha))
|
||||||
|
|
||||||
|
@ -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,9 +287,8 @@ 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
|
||||||
|
15
readme.md
@ -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.
|
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, in a vertically-oriented heads-up display.
|
||||||
* 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
|
|
||||||
|
|
||||||
|
## **Short feature list**
|
||||||
|
|
||||||
### **Short feature list**
|
|
||||||
* Lots of different bar shapes and patterns to make the HUD look like you want
|
* 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
|
* 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
|
* 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!
|
* 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.)
|
* 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
|
* /icehud - opens the configuration UI to tweak any setting
|
||||||
* /icehudCL - command-line access to tweak IceHUD settings (for use with macros, etc.)
|
* /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?**
|
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)
|
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?**
|
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.
|
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.
|
See [here](https://www.wowace.com/projects/ice-hud/issues/113) for a user-created guide to creating new IceHUD textures.
|
||||||
|
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 37 KiB |
7
this_version.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
v1.13.14:
|
||||||
|
|
||||||
|
- Fixed target health updating infrequently on Classic.
|
||||||
|
- Fixed compatibility with WoW 9.2.5.
|
||||||
|
- Updated TOC for all game flavors.
|