-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7b61cbd
Showing
6 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Libs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package-as: oUF_ClassicAuraDurations | ||
|
||
enable-nolib-creation: no | ||
|
||
manual-changelog: | ||
filename: CHANGELOG | ||
markup-type: markdown | ||
|
||
externals: | ||
Libs/LibStub: svn://svn.wowace.com/wow/libstub/mainline/tags/1.0 | ||
Libs/CallbackHandler-1.0: https://repos.wowace.com/wow/ace3/trunk/CallbackHandler-1.0 | ||
Libs/LibClassicDurations: | ||
url: https://github.com/rgd87/LibClassicDurations.git | ||
tag: master | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
language: minimal | ||
|
||
script: curl -s https://raw.githubusercontent.com/BigWigsMods/packager/master/release.sh | bash | ||
|
||
branches: | ||
only: | ||
- /^\d+\.\d+(\.\d+)?(-\S*)?$/ | ||
|
||
notifications: | ||
email: | ||
on_success: never | ||
on_failure: always |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
local addonName, ns = ... | ||
local oUF = ns.oUF or oUF | ||
|
||
local LibClassicDurations = LibStub("LibClassicDurations") | ||
LibClassicDurations:RegisterFrame(addonName) | ||
|
||
local LCDWrapper = function(element, unit, button, index, position, duration, expiration, debuffType, isStealable) | ||
if duration == 0 then | ||
-- PostUpdateIcon doesn't pass spellID, so have to call UnitAura again for it | ||
local name, _, _, _, _, _, caster, _, _, spellID = UnitAura(unit, index, button.filter) | ||
local durationNew, expirationTimeNew = LibClassicDurations:GetAuraDurationByUnit(unit, spellID, caster) | ||
if durationNew and durationNew > 0 then | ||
duration = durationNew | ||
expiration = expirationTimeNew | ||
|
||
if(button.cd and not element.disableCooldown) then | ||
button.cd:SetCooldown(expiration - duration, duration) | ||
button.cd:Show() | ||
end | ||
end | ||
end | ||
|
||
local originalPostUpdateIcon = element.PostUpdateIcon_cHcTXm3 | ||
if originalPostUpdateIcon then | ||
originalPostUpdateIcon(element, unit, button, index, position, duration, expiration, debuffType, isStealable) | ||
end | ||
end | ||
|
||
local function prehook_PostUpdateIcon(element) | ||
element.PostUpdateIcon_cHcTXm3 = element.PostUpdateIcon | ||
element.PostUpdateIcon = LCDWrapper | ||
end | ||
|
||
local function hook(frame) | ||
frame.SmoothBar = SmoothBar | ||
if frame.Buffs then | ||
if frame.Buffs.PostUpdateIcon then | ||
prehook_PostUpdateIcon(frame.Buffs) | ||
end | ||
end | ||
if frame.Debuffs then | ||
if frame.Debuffs.PostUpdateIcon then | ||
prehook_PostUpdateIcon(frame.Debuffs) | ||
end | ||
end | ||
end | ||
|
||
|
||
for i, frame in ipairs(oUF.objects) do hook(frame) end | ||
oUF:RegisterInitCallback(hook) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## Interface: 11302 | ||
## Title: oUF_ClassicAuraDurations | ||
## Notes: LibClassicDurations hook for oUF | ||
## X-Category: UnitFrame | ||
## Dependencies: oUF | ||
## DefaultState: enabled | ||
## X-oUF: oUF | ||
|
||
Libs\LibStub\LibStub.lua | ||
Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua | ||
Libs\LibClassicDurations\LibClassicDurations.xml | ||
|
||
oUF_ClassicAuraDurations.lua |