@@ -253,18 +253,19 @@ function MPOWA:Iterate(unit)
253253
254254 for cat , val in pairs (self .SAVE ) do
255255 if (val [" buffname" ] == " unitpower" ) then
256- local tarid = 44
257- if unit then
258- if (unit == " target" ) then
259- tarid = 45
260- elseif (string.find (unit ," raid" )) then
261- -- local a,b = string.find(unit,"raid")
262- tarid = tonumber (string.sub (unit , 5 ))+ 45
263- elseif (string.find (unit ," party" )) then
264- -- local a,b = string.find(unit,"party")
265- tarid = tonumber (string.sub (unit , 6 ))+ 45
256+ local unit = arg1
257+ if (unit == " target" ) then
258+ self :Push (" unitpower" , unit , 45 , false )
259+ elseif (string.find (unit ," raid" )) then
260+ local st = string.sub (unit , 5 )
261+ if st and tonumber (st ) then
262+ self :Push (" unitpower" , unit , (tonumber (st ) or 0 )+ 45 , false )
263+ end
264+ elseif (string.find (unit ," party" )) then
265+ local st = string.sub (unit , 6 )
266+ if st and tonumber (st ) then
267+ self :Push (" unitpower" , unit , (tonumber (st ) or 0 )+ 45 , false )
266268 end
267- self :Push (" unitpower" , unit , tarid , false )
268269 end
269270 end
270271 end
@@ -317,9 +318,9 @@ function MPOWA:Push(aura, unit, i, isdebuff, castbyme)
317318 end
318319 tex = strlower (strsub (tex , strfind (tex , " Icons" )+ 6 ))
319320 end
321+ BuffExist [val ] = true
320322 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
321323 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
322- BuffExist [val ] = true
323324 if path [" enemytarget" ] and unit == " target" then
324325 self .active [val ] = {unit , i , isdebuff }
325326 elseif path [" friendlytarget" ] and unit == " target" then
0 commit comments