@@ -14,22 +14,6 @@ local PlexusRoster = _G.Plexus:GetModule("PlexusRoster")
1414local PlexusFrame = _G .Plexus :GetModule (" PlexusFrame" )
1515local PlexusDeDeBuffIcons = _G .Plexus :NewModule (" PlexusDeDeBuffIcons" , " AceBucket-3.0" )
1616
17- local PlexusStatusAuras = _G .Plexus :NewStatusModule (" PlexusStatusDispelByMe" , " AceTimer-3.0" )
18- PlexusStatusAuras .menuName = L [" Dispelable By Me" ]
19-
20- PlexusStatusAuras .defaultDB = {
21- dispelable_by_me = {
22- enable = true ,
23- priority = 70 ,
24- range = false ,
25- color = { r = 0 , g = 0 , b = 1.0 , a = 1.0 },
26- },
27- }
28-
29- function PlexusStatusAuras :PostInitialize ()
30- self :RegisterStatus (" dispelable_by_me" , L [" Dispelable By Me" ], nil , true )
31- end
32-
3317local function WithAllPlexusFrames (func )
3418 for _ , frame in pairs (PlexusFrame .registeredFrames ) do
3519 func (frame )
@@ -355,12 +339,6 @@ function PlexusDeDeBuffIcons:OnEnable()
355339 end
356340 self .enabled = nil
357341 return
358- elseif PlexusStatusAuras .db .profile .dispelable_by_me .enabled then
359- self :RegisterEvent (" UNIT_AURA" )
360- self :RegisterEvent (" UNIT_FLAGS" )
361- self :RegisterEvent (" LOADING_SCREEN_DISABLED" )
362- self :RegisterMessage (" Plexus_ExtraUnitsChanged" , " ExtraUnitsChanged" )
363- self :UpdateAllUnitsBuffs ()
364342 else
365343 self .enabled = true
366344 self :RegisterEvent (" UNIT_AURA" )
407385
408386local UnitAuraInstanceID
409387local function showBuffIcon (v , n , setting , icon , count , unit , instanceid )
410- local settings = PlexusStatusAuras .db .profile .dispelable_by_me
411388 local DEBUFF_DISPLAY_COLOR_INFO = {
412389 [0 ] = DEBUFF_TYPE_NONE_COLOR ,
413390 [1 ] = DEBUFF_TYPE_MAGIC_COLOR ,
@@ -424,30 +401,21 @@ local function showBuffIcon(v, n, setting, icon, count, unit, instanceid)
424401 curve :AddPoint (i , c )
425402 end
426403 end
427- if PlexusDeDeBuffIcons .db .profile .enabled then
428- local dur = C_UnitAuras .GetAuraDuration (unit , instanceid )
429- v .DeBuffIcons [n ]:Show ()
430- v .DeBuffIcons [n ].icon :SetTexture (icon )
431- v .DeBuffIcons [n ].auraid = instanceid
432- -- count = C_StringUtil.TruncateWhenZero(count)
433- count = C_UnitAuras .GetAuraApplicationDisplayCount (unit , instanceid , 2 , 100 )
434-
435- v .DeBuffIcons [n ].stack :SetText (count )
436- v .DeBuffIcons [n ].stack :Show ()
437- if dur then
438- v .DeBuffIcons [n ].cd :SetCooldownFromDurationObject (dur )
439- end
404+
405+ local dur = C_UnitAuras .GetAuraDuration (unit , instanceid )
406+ v .DeBuffIcons [n ]:Show ()
407+ v .DeBuffIcons [n ].icon :SetTexture (icon )
408+ v .DeBuffIcons [n ].auraid = instanceid
409+ -- count = C_StringUtil.TruncateWhenZero(count)
410+ count = C_UnitAuras .GetAuraApplicationDisplayCount (unit , instanceid , 2 , 100 )
411+
412+ v .DeBuffIcons [n ].stack :SetText (count )
413+ v .DeBuffIcons [n ].stack :Show ()
414+ if dur then
415+ v .DeBuffIcons [n ].cd :SetCooldownFromDurationObject (dur )
440416 end
441- local filter = " HARMFUL|RAID_PLAYER_DISPELLABLE "
417+
442418 local alpha = 0
443- local ok , filtered = true , true
444- for instanceID in pairs (UnitAuraInstanceID [v .unitGUID ]) do
445- ok , filtered = xpcall (function () return C_UnitAuras .IsAuraFilteredOutByInstanceID (unit , instanceID , filter ) end , geterrorhandler ())
446- if ok and not filtered then
447- alpha = 1
448- break
449- end
450- end
451419 local dispelTypeColor = C_UnitAuras .GetAuraDispelTypeColor (unit , instanceid , curve )
452420 local R ,G ,B
453421 if dispelTypeColor then
@@ -456,38 +424,6 @@ local function showBuffIcon(v, n, setting, icon, count, unit, instanceid)
456424 if dispelTypeColor and R and G and B then
457425 v .DeBuffIcons [n ]:SetBackdropBorderColor (R ,G ,B ,alpha )
458426 end
459- if settings .enabled then
460- PlexusStatusAuras .core :SendStatusLost (v .unitGUID , " dispelable_by_me" )
461- if dispelTypeColor then
462- if ok and not filtered then
463- PlexusStatusAuras .core :SendStatusGained (v .unitGUID ,
464- " dispelable_by_me" ,
465- settings .priority ,
466- nil ,
467- dispelTypeColor ,
468- nil ,
469- nil ,
470- nil ,
471- nil ,
472- nil ,
473- nil ,
474- nil ,
475- nil )
476- end
477- end
478- end
479- -- if not v.DeBuffIcons[n].hooked then
480- -- v.DeBuffIcons[n]:HookScript("OnUpdate", function(self, elapsed)
481- -- if v.DeBuffIcons[n].auraid then
482- -- local dur = C_UnitAuras.GetAuraDuration(v.unit, v.DeBuffIcons[n].auraid)
483- -- local remains = dur:GetRemainingDuration()
484- -- --local remains = dur:GetRemainingPercent()
485- -- v.DeBuffIcons[n].cdtext:SetText(AbbreviateNumbers(remains))
486- -- --print(v.DeBuffIcons[n].auraid)
487- -- end
488- -- end)
489- -- v.DeBuffIcons[n].hooked = true
490- -- end
491427end
492428
493429local function updateFrame_df (v )
@@ -497,7 +433,6 @@ local function updateFrame_df(v)
497433 for i = n , MAX_BUFFS do -- luacheck: ignore
498434 v .DeBuffIcons [i ]:Hide ()
499435 end
500- PlexusStatusAuras .core :SendStatusLost (v .unitGUID , " dispelable_by_me" )
501436
502437 if v .unit and UnitAuraInstanceID [v .unitGUID ] then
503438 local numAuras = 0
0 commit comments