Skip to content

Commit 9ebd01e

Browse files
committed
library update and pull from another branch
1 parent add2ec8 commit 9ebd01e

4 files changed

Lines changed: 37 additions & 34 deletions

File tree

.pkgmeta

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ externals:
2525
commit: default
2626
Libraries/oUF:
2727
url: https://github.com/oUF-wow/oUF.git
28-
branch: master
28+
branch: castbar-taint-fix
2929
Libraries/LibDualSpec-1.0:
3030
url: https://github.com/AdiAddons/LibDualSpec-1.0.git
3131
branch: master

Libraries/oUF/elements/castbar.lua

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,22 @@ local function ForceUpdate(element)
553553
return Update(element.__owner, 'ForceUpdate', element.__owner.unit)
554554
end
555555

556+
local eventMethods = {
557+
UNIT_SPELLCAST_START = CastStart,
558+
UNIT_SPELLCAST_CHANNEL_START = CastStart,
559+
UNIT_SPELLCAST_EMPOWER_START = CastStart,
560+
UNIT_SPELLCAST_STOP = CastStop,
561+
UNIT_SPELLCAST_CHANNEL_STOP = CastStop,
562+
UNIT_SPELLCAST_EMPOWER_STOP = CastStop,
563+
UNIT_SPELLCAST_DELAYED = CastUpdate,
564+
UNIT_SPELLCAST_CHANNEL_UPDATE = CastUpdate,
565+
UNIT_SPELLCAST_EMPOWER_UPDATE = CastUpdate,
566+
UNIT_SPELLCAST_FAILED = CastFail,
567+
UNIT_SPELLCAST_INTERRUPTED = CastFail,
568+
UNIT_SPELLCAST_INTERRUPTIBLE = CastInterruptible,
569+
UNIT_SPELLCAST_NOT_INTERRUPTIBLE = CastInterruptible,
570+
}
571+
556572
local function Enable(self, unit)
557573
local element = self.Castbar
558574
if(element and unit and not unit:match('%wtarget$')) then
@@ -563,29 +579,20 @@ local function Enable(self, unit)
563579
element.smoothing = Enum.StatusBarInterpolation.Immediate
564580
end
565581

566-
self:RegisterEvent('UNIT_SPELLCAST_START', CastStart)
567-
self:RegisterEvent('UNIT_SPELLCAST_CHANNEL_START', CastStart)
568-
self:RegisterEvent('UNIT_SPELLCAST_EMPOWER_START', CastStart)
569-
self:RegisterEvent('UNIT_SPELLCAST_STOP', CastStop)
570-
self:RegisterEvent('UNIT_SPELLCAST_CHANNEL_STOP', CastStop)
571-
self:RegisterEvent('UNIT_SPELLCAST_EMPOWER_STOP', CastStop)
572-
self:RegisterEvent('UNIT_SPELLCAST_DELAYED', CastUpdate)
573-
self:RegisterEvent('UNIT_SPELLCAST_CHANNEL_UPDATE', CastUpdate)
574-
self:RegisterEvent('UNIT_SPELLCAST_EMPOWER_UPDATE', CastUpdate)
575-
self:RegisterEvent('UNIT_SPELLCAST_FAILED', CastFail)
576-
self:RegisterEvent('UNIT_SPELLCAST_INTERRUPTED', CastFail)
577-
self:RegisterEvent('UNIT_SPELLCAST_INTERRUPTIBLE', CastInterruptible)
578-
self:RegisterEvent('UNIT_SPELLCAST_NOT_INTERRUPTIBLE', CastInterruptible)
582+
for event, method in next, eventMethods do
583+
self:RegisterEvent(event, method)
584+
end
579585

580586
element.holdTime = 0
581587
element.Pips = element.Pips or {}
582588

583589
element:SetScript('OnUpdate', element.OnUpdate or onUpdate)
584590

585591
if(self.unit == 'player' and not (self.hasChildren or self.isChild or self.isNamePlate)) then
586-
PlayerCastingBarFrame:SetUnit(nil)
587-
PetCastingBarFrame:SetUnit(nil)
588-
PetCastingBarFrame:UnregisterEvent('UNIT_PET')
592+
PlayerCastingBarFrame:UnregisterAllEvents()
593+
PlayerCastingBarFrame:Hide()
594+
PetCastingBarFrame:UnregisterAllEvents()
595+
PetCastingBarFrame:Hide()
589596
end
590597

591598
if(element:IsObjectType('StatusBar') and not element:GetStatusBarTexture()) then
@@ -618,25 +625,21 @@ local function Disable(self)
618625
if(element) then
619626
element:Hide()
620627

621-
self:UnregisterEvent('UNIT_SPELLCAST_START', CastStart)
622-
self:UnregisterEvent('UNIT_SPELLCAST_CHANNEL_START', CastStart)
623-
self:UnregisterEvent('UNIT_SPELLCAST_EMPOWER_START', CastStart)
624-
self:UnregisterEvent('UNIT_SPELLCAST_STOP', CastStop)
625-
self:UnregisterEvent('UNIT_SPELLCAST_CHANNEL_STOP', CastStop)
626-
self:UnregisterEvent('UNIT_SPELLCAST_EMPOWER_STOP', CastStop)
627-
self:UnregisterEvent('UNIT_SPELLCAST_DELAYED', CastUpdate)
628-
self:UnregisterEvent('UNIT_SPELLCAST_CHANNEL_UPDATE', CastUpdate)
629-
self:UnregisterEvent('UNIT_SPELLCAST_EMPOWER_UPDATE', CastUpdate)
630-
self:UnregisterEvent('UNIT_SPELLCAST_FAILED', CastFail)
631-
self:UnregisterEvent('UNIT_SPELLCAST_INTERRUPTED', CastFail)
632-
self:UnregisterEvent('UNIT_SPELLCAST_INTERRUPTIBLE', CastInterruptible)
633-
self:UnregisterEvent('UNIT_SPELLCAST_NOT_INTERRUPTIBLE', CastInterruptible)
628+
for event, method in next, eventMethods do
629+
self:UnregisterEvent(event, method)
630+
end
634631

635632
element:SetScript('OnUpdate', nil)
636633

637634
if(self.unit == 'player' and not (self.hasChildren or self.isChild or self.isNamePlate)) then
638-
PlayerCastingBarFrame:OnLoad()
639-
PetCastingBarFrame:OnLoad()
635+
for event in next, eventMethods do
636+
PlayerCastingBarFrame:RegisterUnitEvent(event, 'player')
637+
PetCastingBarFrame:RegisterUnitEvent(event, 'pet')
638+
end
639+
640+
PlayerCastingBarFrame:RegisterEvent('PLAYER_ENTERING_WORLD')
641+
PetCastingBarFrame:RegisterEvent('PLAYER_ENTERING_WORLD')
642+
PetCastingBarFrame:RegisterEvent('UNIT_PET')
640643
end
641644
end
642645
end

Libraries/oUF/oUF.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Interface: 120000, 120001
22
## Title: oUF
33
## Author: Haste, lightspark, p3lim, Rainrider
4-
## Version: 13.1.1
4+
## Version: cefbdac
55
## Notes: Unit frame framework. Does nothing by itself.
66
## OptionalDeps: Clique
77
## X-oUF: oUF

Libraries/oUF/ouf.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local parent, ns = ...
22
local global = C_AddOns.GetAddOnMetadata(parent, 'X-oUF')
3-
local _VERSION = '13.1.1'
3+
local _VERSION = 'cefbdac'
44
if(_VERSION:find('project%-version')) then
55
_VERSION = 'devel'
66
end

0 commit comments

Comments
 (0)