@@ -32,11 +32,16 @@ local cdset = {}
3232function MPOWA :OnUpdate (elapsed )
3333 LastUpdate = LastUpdate + elapsed
3434 if LastUpdate >= UpdateTime then
35+ local p1 , p2
3536 for cat , val in pairs (self .NeedUpdate ) do
3637 if val then
3738 local path = self .SAVE [cat ]
3839 if path [" enemytarget" ] and not UN (" target" ) and not UnitIsFriend (" player" , " target" ) then return end
39- if not self .active [cat ] and self :TernaryReturn (cat , " alive" , self :Reverse (UnitIsDeadOrGhost (" player" ))) and self :TernaryReturn (cat , " mounted" , self .mounted ) and self :TernaryReturn (cat , " incombat" , UnitAffectingCombat (" player" )) and self :TernaryReturn (cat , " inparty" , self .party ) and self :TernaryReturn (cat , " inraid" , UnitInRaid (" player" )) and self :TernaryReturn (cat , " inbattleground" , self .bg ) and self :TernaryReturn (cat , " inraidinstance" , self .instance ) then
40+ p1 , p2 = self :TernaryReturn (cat , " inparty" , self :InParty ()), self :TernaryReturn (cat , " inraid" , UnitInRaid (" player" ))
41+ if not self .active [cat ] and self :TernaryReturn (cat , " alive" , self :Reverse (UnitIsDeadOrGhost (" player" )))
42+ and self :TernaryReturn (cat , " mounted" , self .mounted ) and self :TernaryReturn (cat , " incombat" , UnitAffectingCombat (" player" ))
43+ and (((p1 or p2 ) and ((path [" inparty" ]== 0 or path [" inparty" ]== true ) and (path [" inraid" ]== 0 or path [" inraid" ]== true ))) or (p1 and p2 ))
44+ and self :TernaryReturn (cat , " inbattleground" , self .bg ) and self :TernaryReturn (cat , " inraidinstance" , self .instance ) then
4045 self .frames [cat ][4 ]:Hide ()
4146 if path [" cooldown" ] then
4247 local duration = self :GetCooldown (path [" buffname" ]) or 0
@@ -253,7 +258,7 @@ function MPOWA:Iterate(unit)
253258 BuffExist = {}
254259 if unit == " player" then
255260 self :IsMounted ()
256- self :InParty ()
261+ -- self:InParty()
257262 self :InBG ()
258263 self :InInstance ()
259264 end
@@ -295,13 +300,6 @@ function MPOWA:Iterate(unit)
295300 self .active [cat ] = false
296301 self .frames [cat ][3 ]:Hide ()
297302 if not p [" inverse" ] and not p [" cooldown" ] then
298- if p [" useendsound" ] then
299- if p .endsound < 16 then
300- PlaySound (self .SOUND [p .endsound ], " master" )
301- else
302- PlaySoundFile (" Interface\\ AddOns\\ zzzModifiedPowerAuras\\ Sounds\\ " .. self .SOUND [p .endsound ], " master" )
303- end
304- end
305303 self .frames [cat ][1 ]:SetAlpha (p [" alpha" ])
306304 self :FHide (cat )
307305 end
@@ -327,7 +325,12 @@ function MPOWA:Push(aura, unit, i, isdebuff, castbyme)
327325 end
328326 BuffExist [val ] = true
329327 if (not path [" castbyme" ] or (path [" castbyme" ] and castbyme )) and path [" isdebuff" ]== isdebuff and ((path [" secondspecifier" ] and (strlower (path [" secondspecifiertext" ])== tex )) or not path [" secondspecifier" ]) then
330- if self :TernaryReturn (val , " alive" , self :Reverse (UnitIsDeadOrGhost (" player" ))) and self :TernaryReturn (val , " mounted" , self .mounted ) and self :TernaryReturn (val , " incombat" , UnitAffectingCombat (" player" )) and self :TernaryReturn (val , " inparty" , self .party ) and self :TernaryReturn (val , " inraid" , UnitInRaid (" player" )) and self :TernaryReturn (val , " inbattleground" , self .bg ) and self :TernaryReturn (val , " inraidinstance" , self .instance ) and not path [" cooldown" ] and self :IsStacks (GetComboPoints (" player" , " target" ), val , " cpstacks" ) then
328+ local p1 , p2 = self :TernaryReturn (val , " inparty" , self :InParty ()), self :TernaryReturn (val , " inraid" , UnitInRaid (" player" ))
329+ if self :TernaryReturn (val , " alive" , self :Reverse (UnitIsDeadOrGhost (" player" ))) and self :TernaryReturn (val , " mounted" , self .mounted )
330+ and self :TernaryReturn (val , " incombat" , UnitAffectingCombat (" player" ))
331+ and (((p1 or p2 ) and ((path [" inparty" ]== 0 or path [" inparty" ]== true ) and (path [" inraid" ]== 0 or path [" inraid" ]== true ))) or (p1 and p2 ))
332+ and self :TernaryReturn (val , " inbattleground" , self .bg ) and self :TernaryReturn (val , " inraidinstance" , self .instance )
333+ and not path [" cooldown" ] and self :IsStacks (GetComboPoints (" player" , " target" ), val , " cpstacks" ) then
331334 if path [" enemytarget" ] and unit == " target" then
332335 self .active [val ] = {unit , i , isdebuff }
333336 elseif path [" friendlytarget" ] and unit == " target" then
@@ -341,13 +344,6 @@ function MPOWA:Push(aura, unit, i, isdebuff, castbyme)
341344 if tnbr (self .frames [val ][1 ]:GetAlpha ())<= 0.1 then
342345 self .frames [val ][1 ]:SetAlpha (tnbr (path [" alpha" ]))
343346 end
344- if path [" usebeginsound" ] then
345- if path .beginsound < 16 then
346- PlaySound (self .SOUND [path .beginsound ], " master" )
347- else
348- PlaySoundFile (" Interface\\ AddOns\\ zzzModifiedPowerAuras\\ Sounds\\ " .. self .SOUND [path .beginsound ], " master" )
349- end
350- end
351347 self :FShow (val )
352348 if path [" timer" ] then
353349 self .frames [val ][3 ]:Show ()
0 commit comments