Код:
/run V={B="ArenaEnemyFrame"} for i=1,5 do _G[V.B..i]:SetScale(1.0); _G[V.B..i.."CastingBar"]:SetPoint("RIGHT",-250,0); end;
--[[
DR Tracker
drx = x position
drs = icon size
DRt={{DRLIST1},{DRLIST2},{DRLIST3}...}
DEFAULT :DRt={{fear},{polymorph}}
-- show frame in left of arena enemyframe
drx :set minus value(ex drx :-120)
dp :"LEFT"
and insert in macro 5
drx+(r-1)-> drx-(r-1)
]]--
/run DRt={{5782,8122,5484,20511,2094},{118,6770,1776,49203,28272,28271,61305,61721,61780,82691,51514}}
/run drx=110;drs=40;dp="RIGHT";dre="COMBAT_LOG_EVENT_UNFILTERED"drp="PLAYER_ENTERING_WORLD"dra="ARENA_OPPONENT_UPDATE"LoadAddOn("Blizzard_ArenaUI")function gaef(f,n)return _G["ArenaEnemyFrame"..n.."HealthBar"]end
/run function rDR(f)f.e=1;f.t:SetTexture(nil)f.c:Hide()endfunction sDR(f)f.e=f.e+1;f.c:Show()endfunction gDRt(i,j)return _G["drc"..i..":"..j]endfunction runDR(f,n)CooldownFrame_SetTimer(f.c,GetTime(),18,1)eDR(f,n)sDR(f)oDR(n)end
/run function eDR(f,n)local t=1;f:SetScript("OnUpdate",function(s,e)t=t+e;if(t>=18)then f:SetScript("OnUpdate",nil)rDR(f)oDR(n)endend)endfunction cDR(f,n,s)if f.e<4thenlocal _,_,t=GetSpellInfo(s)f.t:SetTexture(t)runDR(f,n)endend
/run function oDR(n)local r=1;for j in ipairs(DRt)dolocal f=gDRt(n,j)f:SetPoint(dp,gaef(f,n),dp,drx+(r-1)*50,0)r=r+1;endendfunction uDR(n,s)for i,t in ipairs(DRt)dofor _,j in ipairs(t)doif s==j then cDR(gDRt(n,i),n,s)endendendend
/run functionDRc(i,j)local f=CreateFrame("Frame",nil,UIParent)f:SetSize(drs,drs)f.t=f:CreateTexture(nil,"BORDER")f.t:SetAllPoints(true)f.c=CreateFrame("Cooldown",nil,f)f.c:SetAllPoints(f)f.e=1return f end
/run function clDR(_,e,_,_,_,_,_,d,_,_,_,s)if(e=="SPELL_AURA_REMOVED"or e=="SPELL_AURA_REFRESH")thenfor i=1,5dolocal ag=UnitGUID("arena"..i)if(ag ~=niland d==ag)then uDR(i,s)endendendend
/run function iDRt(o,m)for i=1,m dofor j in ipairs(DRt)dolocal f=gDRt(i,j)rDR(f)if o then f:Show()endendendendfor i=1,5dofor j in ipairs(DRt)do _G["drc"..i..":"..j]=DRc(i,j)endend
/run dt=CreateFrame("Frame")dt:SetScript("OnEvent",function(_,e,...)if e==dre then clDR(...)elseif e==dra then iDRt(1,GetNumArenaOpponents())else iDRt(nil,5)endend)dt:RegisterEvent(dra)dt:RegisterEvent(drp)dt:RegisterEvent(dre)