Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Autoscript v6.0.3 loaded!\n")
- print("Autoscript v6.0.3 loaded!\n")
- print("Autoscript v6.0.3 loaded!\n")
- --config//
- local EnemyCooldowns = 1
- local FCTtweaks = 1
- local Macro = 1
- local LoCRemover = 1
- local ArenaTrinkets = 1
- local ArenaDR = 0
- local RogueDR = 1
- local Combat = 1
- local UnitFrames = 1
- local ShadowDanceBar = 0
- local InterruptA = 1
- local Flash = 1
- local cArenas = 1
- local DRTrackerWoD = 1
- --//config
- --enemy cooldowns
- if (EnemyCooldowns == 1) then
- USS="UNIT_SPELLCAST_SUCCEEDED";OE="OnEvent";F="Frame";CF=CreateFrame;BO="Border";xb=630;yb=320;sb=24;ib=1;ii=1
- function TrS(f,x,y,cd,T,s,h)f:SetPoint("BOTTOMLEFT",x,y)f:SetSize(s,s)f.c=CF("Cooldown",cd,nil,"CooldownFrameTemplate")f.c:SetAllPoints(f)f.t=f:CreateTexture(nil,BO)f.t:SetAllPoints()f.t:SetTexture(T);if not h then f:Hide();end f:RegisterEvent(USS)end
- function Ts(f,cd,U,N,S,TI)if CPz(N,S,U) then f:Show();CooldownFrame_SetTimer(cd,GetTime(),TI,1)f.elapsed = 0 f:SetScript('OnUpdate', function(self, elapsed)if self.elapsed > TI+1 then self:SetScript('OnUpdate', nil) self:Hide();else self.elapsed = self.elapsed + elapsed end end)end end
- function CPz(N,S,U)if(N==S and (U=="arena1" or U=="arena2" or U=="arena3" or U=="arenapet1" or U=="arenapet2" or U=="arenapet3" or U=="target" or U=="focus"))then return true else return false end end
- --rogue
- t1p="Interface\\Icons\\ability_rogue_preparation";t1=CF(F);TrS(t1,xb,yb,"cd1",t1p,sb,false);t1:SetScript(OE,function(self,event,...) Ts(t1,cd1,select(1,...),select(5,...),14185,300) end);
- t2p="Interface\\Icons\\ability_rogue_kidneyshot";t2=CF(F);TrS(t2,xb+sb+ii,yb,"cd2",t2p,sb,false);t2:SetScript(OE,function(self,event,...) Ts(t2,cd2,select(1,...),select(5,...),408,20) end);
- t3p="Interface\\Icons\\spell_shadow_nethercloak";t3=CF(F);TrS(t3,xb+sb*2+ii*2,yb,"cd3",t3p,sb,false);t3:SetScript(OE,function(self,event,...) Ts(t3,cd3,select(1,...),select(5,...),31224,60) end);
- t4p="Interface\\Icons\\ability_rogue_combatreadiness";t4=CF(F);TrS(t4,xb+sb*3+ii*3,yb,"cd4",t4p,sb,false);t4:SetScript(OE,function(self,event,...) Ts(t4,cd4,select(1,...),select(5,...),74001,120) end);
- t5p="Interface\\Icons\\ability_vanish";t5=CF(F);TrS(t5,xb+sb*4+ii*4,yb,"cd5",t5p,sb,false);t5:SetScript(OE,function(self,event,...) Ts(t5,cd5,select(1,...),select(5,...),1856,120) end);
- t6p="Interface\\Icons\\ability_rogue_shadowstep";t6=CF(F);TrS(t6,xb+sb*5+ii*5,yb,"cd6",t6p,sb,false);t6:SetScript(OE,function(self,event,...) Ts(t6,cd6,select(1,...),select(5,...),36554,20) end);
- t7p="Interface\\Icons\\spell_shadow_mindsteal";t7=CF(F);TrS(t7,xb+sb*6+ii*6,yb,"cd7",t7p,sb,false);t7:SetScript(OE,function(self,event,...) Ts(t7,cd7,select(1,...),select(5,...),2094,120) end);
- t8p="Interface\\Icons\\ability_rogue_smoke";t8=CF(F);TrS(t8,xb+sb*7+ii*7,yb,"cd8",t8p,sb,false);t8:SetScript(OE,function(self,event,...) Ts(t8,cd8,select(1,...),select(5,...),76577,180) end);
- t9p="Interface\\Icons\\ability_rogue_shadowdance";t9=CF(F);TrS(t9,xb+sb*8+ii*8,yb,"cd9",t9p,sb,false);t9:SetScript(OE,function(self,event,...) Ts(t9,cd9,select(1,...),select(5,...),51713,60) end);
- t10p="Interface\\Icons\\achievement_bg_killingblow_berserker";t10=CF(F);TrS(t10,xb+sb*9+ii*9,yb,"cd10",t10p,sb,false);t10:SetScript(OE,function(self,event,...) Ts(t10,cd10,select(1,...),select(5,...),137619,60) end);
- --warlock
- t11p="Interface\\Icons\\ability_warlock_howlofterror";t11=CF(F);TrS(t11,xb,yb-(sb+ib),"cd11",t11p,sb,false);t11:SetScript(OE,function(self,event,...) Ts(t11,cd11,select(1,...),select(5,...),5484,40) end);
- t12p="Interface\\Icons\\ability_warlock_mortalcoil";t12=CF(F);TrS(t12,xb+sb+ii,yb-(sb+ib),"cd12",t12p,sb,false);t12:SetScript(OE,function(self,event,...) Ts(t12,cd12,select(1,...),select(5,...),6789,45) end);
- t13p="Interface\\Icons\\ability_warlock_shadowfurytga";t13=CF(F);TrS(t13,xb+sb*2+ii*2,yb-(sb+ib),"cd13",t13p,sb,false);t13:SetScript(OE,function(self,event,...) Ts(t13,cd13,select(1,...),select(5,...),30283,30) end);
- t14p="Interface\\Icons\\spell_shadow_demoniccircleteleport";t14=CF(F);TrS(t14,xb+sb*3+ii*3,yb-(sb+ib),"cd14",t14p,sb,false);t14:SetScript(OE,function(self,event,...) Ts(t14,cd14,select(1,...),select(5,...),48020,26) end);
- t15p="Interface\\Icons\\spell_shadow_demonictactics";t15=CF(F);TrS(t15,xb+sb*4+ii*4,yb-(sb+ib),"cd15",t15p,sb,false);t15:SetScript(OE,function(self,event,...) Ts(t15,cd15,select(1,...),select(5,...),104773,180) end);
- t16p="Interface\\Icons\\spell_warlock_darkregeneration";t16=CF(F);TrS(t16,xb+sb*5+ii*5,yb-(sb+ib),"cd16",t16p,sb,false);t16:SetScript(OE,function(self,event,...) Ts(t16,cd16,select(1,...),select(5,...),108359,120) end);
- t17p="Interface\\Icons\\ability_deathwing_bloodcorruption_death";t17=CF(F);TrS(t17,xb+sb*6+ii*6,yb-(sb+ib),"cd17",t17p,sb,false);t17:SetScript(OE,function(self,event,...) Ts(t17,cd17,select(1,...),select(5,...),110913,180) end);
- t18p="Interface\\Icons\\warlock_sacrificial_pact";t18=CF(F);TrS(t18,xb+sb*7+ii*7,yb-(sb+ib),"cd18",t18p,sb,false);t18:SetScript(OE,function(self,event,...) Ts(t18,cd18,select(1,...),select(5,...),108416,60) end);
- t19p="Interface\\Icons\\warlock_spelldrain";t19=CF(F);TrS(t19,xb+sb*8+ii*8,yb-(sb+ib),"cd19",t19p,sb,false);t19:SetScript(OE,function(self,event,...) Ts(t19,cd19,select(1,...),select(5,...),108482,120) end);
- --mage
- t20p="Interface\\Icons\\spell_arcane_blink";t20=CF(F);TrS(t20,xb,yb-2*(sb+ib),"cd20",t20p,sb,false);t20:SetScript(OE,function(self,event,...) Ts(t20,cd20,select(1,...),select(5,...),1953,15) end);
- t21p="Interface\\Icons\\ability_mage_deepfreeze";t21=CF(F);TrS(t21,xb+sb+ii,yb-2*(sb+ib),"cd21",t21p,sb,false);t21:SetScript(OE,function(self,event,...) Ts(t21,cd21,select(1,...),select(5,...),44572,30) end);
- t22p="Interface\\Icons\\spell_frost_iceshard";t22=CF(F);TrS(t22,xb+sb*2+ii*2,yb-2*(sb+ib),"cd22",t22p,sb,false);t22:SetScript(OE,function(self,event,...) Ts(t22,cd22,select(1,...),select(5,...),113724,45) end);
- t23p="Interface\\Icons\\spell_frost_frost";t23=CF(F);TrS(t23,xb+sb*3+ii*3,yb-2*(sb+ib),"cd23",t23p,sb,false);t23:SetScript(OE,function(self,event,...) Ts(t23,cd23,select(1,...),select(5,...),45438,300) end);
- t24p="Interface\\Icons\\spell_frost_wizardmark";t24=CF(F);TrS(t24,xb+sb*4+ii*4,yb-2*(sb+ib),"cd24",t24p,sb,false);t24:SetScript(OE,function(self,event,...) Ts(t24,cd24,select(1,...),select(5,...),11958,180) end);
- t25p="Interface\\Icons\\spell_mage_altertime";t25=CF(F);TrS(t25,xb+sb*5+ii*5,yb-2*(sb+ib),"cd25",t25p,sb,false);t25:SetScript(OE,function(self,event,...) Ts(t25,cd25,select(1,...),select(5,...),108978,90) end);
- --dk
- t26p="Interface\\Icons\\spell_deathknight_strangulate";t26=CF(F);TrS(t26,xb,yb-3*(sb+ib),"cd26",t26p,sb,false);t26:SetScript(OE,function(self,event,...) Ts(t26,cd26,select(1,...),select(5,...),49576,25) end);
- t27p="Interface\\Icons\\spell_deathknight_gnaw_ghoul";t27=CF(F);TrS(t27,xb+sb+ii,yb-3*(sb+ib),"cd27",t27p,sb,false);t27:SetScript(OE,function(self,event,...) Ts(t27,cd27,select(1,...),select(5,...),91800,60) end);
- t28p="Interface\\Icons\\ability_deathknight_asphixiate";t28=CF(F);TrS(t28,xb+sb*2+ii*2,yb-3*(sb+ib),"cd28",t28p,sb,false);t28:SetScript(OE,function(self,event,...) Ts(t28,cd28,select(1,...),select(5,...),108194,30) end);
- t29p="Interface\\Icons\\spell_shadow_antimagicshell";t29=CF(F);TrS(t29,xb+sb*3+ii*3,yb-3*(sb+ib),"cd29",t29p,sb,false);t29:SetScript(OE,function(self,event,...) Ts(t29,cd29,select(1,...),select(5,...),48707,45) end);
- t30p="Interface\\Icons\\spell_deathknight_antimagiczone";t30=CF(F);TrS(t30,xb+sb*4+ii*4,yb-3*(sb+ib),"cd30",t30p,sb,false);t30:SetScript(OE,function(self,event,...) Ts(t30,cd30,select(1,...),select(5,...),51052,120) end);
- t31p="Interface\\Icons\\spell_deathknight_iceboundfortitude";t31=CF(F);TrS(t31,xb+sb*5+ii*5,yb-3*(sb+ib),"cd31",t31p,sb,false);t31:SetScript(OE,function(self,event,...) Ts(t31,cd31,select(1,...),select(5,...),48792,180) end);
- t32p="Interface\\Icons\\spell_shadow_demonicempathy";t32=CF(F);TrS(t32,xb+sb*6+ii*6,yb-3*(sb+ib),"cd32",t32p,sb,false);t32:SetScript(OE,function(self,event,...) Ts(t32,cd32,select(1,...),select(5,...),96268,30) end);
- t33p="Interface\\Icons\\ability_deathknight_pillaroffrost";t33=CF(F);TrS(t33,xb+sb*7+ii*7,yb-3*(sb+ib),"cd33",t33p,sb,false);t33:SetScript(OE,function(self,event,...) Ts(t33,cd33,select(1,...),select(5,...),51271,60) end);
- t34p="Interface\\Icons\\spell_holy_consumemagic";t34=CF(F);TrS(t34,xb+sb*8+ii*8,yb-3*(sb+ib),"cd34",t34p,sb,false);t34:SetScript(OE,function(self,event,...) Ts(t34,cd34,select(1,...),select(5,...),77606,60) end);
- t35p="Interface\\Icons\\spell_shadow_raisedead";t35=CF(F);TrS(t35,xb+sb*9+ii*9,yb-3*(sb+ib),"cd35",t35p,sb,false);t35:SetScript(OE,function(self,event,...) Ts(t35,cd35,select(1,...),select(5,...),49039,120) end);
- --priest
- t36p="Interface\\Icons\\spell_shadow_psychichorrors";t36=CF(F);TrS(t36,xb,yb-4*(sb+ib),"cd36",t36p,sb,false);t36:SetScript(OE,function(self,event,...) Ts(t36,cd36,select(1,...),select(5,...),64044,35) end);
- t37p="Interface\\Icons\\spell_priest_voidtendrils";t37=CF(F);TrS(t37,xb+sb+ii,yb-4*(sb+ib),"cd37",t37p,sb,false);t37:SetScript(OE,function(self,event,...) Ts(t37,cd37,select(1,...),select(5,...),108920,30) end);
- t38p="Interface\\Icons\\spell_shadow_psychicscream";t38=CF(F);TrS(t38,xb+sb*2+ii*2,yb-4*(sb+ib),"cd38",t38p,sb,false);t38:SetScript(OE,function(self,event,...) Ts(t38,cd38,select(1,...),select(5,...),8122,45) end);
- t39p="Interface\\Icons\\spell_shadow_dispersion";t39=CF(F);TrS(t39,xb+sb*3+ii*3,yb-4*(sb+ib),"cd39",t39p,sb,false);t39:SetScript(OE,function(self,event,...) Ts(t39,cd39,select(1,...),select(5,...),47585,105) end);
- t40p="Interface\\Icons\\spell_priest_spectralguise";t40=CF(F);TrS(t40,xb+sb*4+ii*4,yb-4*(sb+ib),"cd40",t40p,sb,false);t40:SetScript(OE,function(self,event,...) Ts(t40,cd40,select(1,...),select(5,...),112833,30) end);
- t41p="Interface\\Icons\\spell_holy_painsupression";t41=CF(F);TrS(t41,xb+sb*5+ii*5,yb-4*(sb+ib),"cd41",t41p,sb,false);t41:SetScript(OE,function(self,event,...) Ts(t41,cd41,select(1,...),select(5,...),33206,180) end);
- --paladin
- t42p="Interface\\Icons\\spell_holy_prayerofhealing";t42=CF(F);TrS(t42,xb,yb-5*(sb+ib),"cd42",t42p,sb,false);t42:SetScript(OE,function(self,event,...) Ts(t42,cd42,select(1,...),select(5,...),20066,15) end);
- t43p="Interface\\Icons\\spell_holy_sealofmight";t43=CF(F);TrS(t43,xb+sb+ii,yb-5*(sb+ib),"cd43",t43p,sb,false);t43:SetScript(OE,function(self,event,...) Ts(t43,cd43,select(1,...),select(5,...),853,60) end);
- t44p="Interface\\Icons\\spell_holy_fistofjustice";t44=CF(F);TrS(t44,xb+sb*2+ii*2,yb-5*(sb+ib),"cd44",t44p,sb,false);t44:SetScript(OE,function(self,event,...) Ts(t44,cd44,select(1,...),select(5,...),105593,30) end);
- t45p="Interface\\Icons\\ability_paladin_blindinglight";t45=CF(F);TrS(t45,xb+sb*3+ii*3,yb-5*(sb+ib),"cd45",t45p,sb,false);t45:SetScript(OE,function(self,event,...) Ts(t45,cd45,select(1,...),select(5,...),115750,120) end);
- t46p="Interface\\Icons\\spell_holy_divineshield";t46=CF(F);TrS(t46,xb+sb*4+ii*4,yb-5*(sb+ib),"cd46",t46p,sb,false);t46:SetScript(OE,function(self,event,...) Ts(t46,cd46,select(1,...),select(5,...),642,300) end);
- t47p="Interface\\Icons\\spell_holy_avenginewrath";t47=CF(F);TrS(t47,xb+sb*5+ii*5,yb-5*(sb+ib),"cd47",t47p,sb,false);t47:SetScript(OE,function(self,event,...) Ts(t47,cd47,select(1,...),select(5,...),31884,120) end);
- t48p="Interface\\Icons\\ability_paladin_holyavenger";t48=CF(F);TrS(t48,xb+sb*6+ii*6,yb-5*(sb+ib),"cd48",t48p,sb,false);t48:SetScript(OE,function(self,event,...) Ts(t48,cd48,select(1,...),select(5,...),105809,120) end);
- t49p="Interface\\Icons\\ability_paladin_speedoflight";t49=CF(F);TrS(t49,xb+sb*7+ii*7,yb-5*(sb+ib),"cd49",t49p,sb,false);t49:SetScript(OE,function(self,event,...) Ts(t49,cd49,select(1,...),select(5,...),85499,45) end);
- --warrior
- t50p="Interface\\Icons\\ability_warrior_charge";t50=CF(F);TrS(t50,xb,yb-6*(sb+ib),"cd50",t50p,sb,false);t50:SetScript(OE,function(self,event,...) Ts(t50,cd50,select(1,...),select(5,...),100,20) end);
- t51p="Interface\\Icons\\ability_golemthunderclap";t51=CF(F);TrS(t51,xb+sb+ii,yb-6*(sb+ib),"cd51",t51p,sb,false);t51:SetScript(OE,function(self,event,...) Ts(t51,cd51,select(1,...),select(5,...),5246,90) end);
- t52p="Interface\\Icons\\ability_warrior_shockwave";t52=CF(F);TrS(t52,xb+sb*2+ii*2,yb-6*(sb+ib),"cd52",t52p,sb,false);t52:SetScript(OE,function(self,event,...) Ts(t52,cd52,select(1,...),select(5,...),46968,40) end);
- t53p="Interface\\Icons\\ability_warrior_dragonroar";t53=CF(F);TrS(t53,xb+sb*3+ii*3,yb-6*(sb+ib),"cd53",t53p,sb,false);t53:SetScript(OE,function(self,event,...) Ts(t53,cd53,select(1,...),select(5,...),118000,60) end);
- t54p="Interface\\Icons\\ability_warrior_challange";t54=CF(F);TrS(t54,xb+sb*4+ii*4,yb-6*(sb+ib),"cd54",t54p,sb,false);t54:SetScript(OE,function(self,event,...) Ts(t54,cd54,select(1,...),select(5,...),118038,120) end);
- t55p="Interface\\Icons\\ability_warrior_shieldwall";t55=CF(F);TrS(t55,xb+sb*5+ii*5,yb-6*(sb+ib),"cd55",t55p,sb,false);t55:SetScript(OE,function(self,event,...) Ts(t55,cd55,select(1,...),select(5,...),871,180) end);
- t56p="Interface\\Icons\\ability_warrior_bladestorm";t56=CF(F);TrS(t56,xb+sb*6+ii*6,yb-6*(sb+ib),"cd56",t56p,sb,false);t56:SetScript(OE,function(self,event,...) Ts(t56,cd56,select(1,...),select(5,...),46924,60) end);
- t57p="Interface\\Icons\\warrior_skullbanner";t57=CF(F);TrS(t57,xb+sb*7+ii*7,yb-6*(sb+ib),"cd57",t57p,sb,false);t57:SetScript(OE,function(self,event,...) Ts(t57,cd57,select(1,...),select(5,...),1719,180) end);
- t58p="Interface\\Icons\\ability_warrior_bloodbath";t58=CF(F);TrS(t58,xb+sb*8+ii*8,yb-6*(sb+ib),"cd58",t58p,sb,false);t58:SetScript(OE,function(self,event,...) Ts(t58,cd58,select(1,...),select(5,...),12292,60) end);
- t59p="Interface\\Icons\\warrior_talent_icon_avatar";t59=CF(F);TrS(t59,xb+sb*9+ii*9,yb-6*(sb+ib),"cd59",t59p,sb,false);t59:SetScript(OE,function(self,event,...) Ts(t59,cd59,select(1,...),select(5,...),107574,180) end);
- t60p="Interface\\Icons\\spell_nature_ancestralguardian";t60=CF(F);TrS(t60,xb+sb*10+ii*10,yb-6*(sb+ib),"cd60",t60p,sb,false);t60:SetScript(OE,function(self,event,...) Ts(t60,cd60,select(1,...),select(5,...),18499,30) end);
- --druid
- t61p="Interface\\Icons\\spell_druid_massentanglement";t61=CF(F);TrS(t61,xb,yb-7*(sb+ib),"cd61",t61p,sb,false);t61:SetScript(OE,function(self,event,...) Ts(t61,cd61,select(1,...),select(5,...),102359,30) end);
- t62p="Interface\\Icons\\ability_druid_bash";t62=CF(F);TrS(t62,xb+sb+ii,yb-7*(sb+ib),"cd62",t62p,sb,false);t62:SetScript(OE,function(self,event,...) Ts(t62,cd62,select(1,...),select(5,...),5211,50) end);
- t63p="Interface\\Icons\\ability_druid_demoralizingroar";t63=CF(F);TrS(t63,xb+sb*2+ii*2,yb-7*(sb+ib),"cd63",t63p,sb,false);t63:SetScript(OE,function(self,event,...) Ts(t63,cd63,select(1,...),select(5,...),99,30) end);
- t64p="Interface\\Icons\\spell_druid_ursolsvortex";t64=CF(F);TrS(t64,xb+sb*3+ii*3,yb-7*(sb+ib),"cd64",t64p,sb,false);t64:SetScript(OE,function(self,event,...) Ts(t64,cd64,select(1,...),select(5,...),102793,60) end);
- t65p="Interface\\Icons\\spell_nature_stoneclawtotem";t65=CF(F);TrS(t65,xb+sb*4+ii*4,yb-7*(sb+ib),"cd65",t65p,sb,false);t65:SetScript(OE,function(self,event,...) Ts(t65,cd65,select(1,...),select(5,...),22812,60) end);
- t66p="Interface\\Icons\\ability_druid_tigersroar";t66=CF(F);TrS(t66,xb+sb*5+ii*5,yb-7*(sb+ib),"cd66",t66p,sb,false);t66:SetScript(OE,function(self,event,...) Ts(t66,cd66,select(1,...),select(5,...),61336,180) end);
- t67p="Interface\\Icons\\spell_nature_natureblessing";t67=CF(F);TrS(t67,xb+sb*6+ii*6,yb-7*(sb+ib),"cd67",t67p,sb,false);t67:SetScript(OE,function(self,event,...) Ts(t67,cd67,select(1,...),select(5,...),108238,120) end);
- t68p="Interface\\Icons\\achievement_zone_feralas";t68=CF(F);TrS(t68,xb+sb*7+ii*7,yb-7*(sb+ib),"cd68",t68p,sb,false);t68:SetScript(OE,function(self,event,...) Ts(t68,cd68,select(1,...),select(5,...),124974,90) end);
- t69p="Interface\\Icons\\ability_druid_berserk";t69=CF(F);TrS(t69,xb+sb*8+ii*8,yb-7*(sb+ib),"cd69",t69p,sb,false);t69:SetScript(OE,function(self,event,...) Ts(t69,cd69,select(1,...),select(5,...),106952,180) end);
- t70p="Interface\\Icons\\spell_druid_displacement";t70=CF(F);TrS(t70,xb+sb*9+ii*9,yb-7*(sb+ib),"cd70",t70p,sb,false);t70:SetScript(OE,function(self,event,...) Ts(t70,cd70,select(1,...),select(5,...),102280,30) end);
- t71p="Interface\\Icons\\spell_druid_incarnation";t71=CF(F);TrS(t71,xb+sb*10+ii*10,yb-7*(sb+ib),"cd71",t71p,sb,false);t71:SetScript(OE,function(self,event,...) Ts(t71,cd71,select(1,...),select(5,...),102543,180) end);
- --shaman
- t72p="Interface\\Icons\\spell_shaman_hex";t72=CF(F);TrS(t72,xb,yb-8*(sb+ib),"cd72",t72p,sb,false);t72:SetScript(OE,function(self,event,...) Ts(t72,cd72,select(1,...),select(5,...),51514,35) end);
- t73p="Interface\\Icons\\spell_nature_stranglevines";t73=CF(F);TrS(t73,xb+sb+ii,yb-8*(sb+ib),"cd73",t73p,sb,false);t73:SetScript(OE,function(self,event,...) Ts(t73,cd73,select(1,...),select(5,...),51485,30) end);
- t74p="Interface\\Icons\\spell_shaman_spiritlink";t74=CF(F);TrS(t74,xb+sb*2+ii*2,yb-8*(sb+ib),"cd74",t74p,sb,false);t74:SetScript(OE,function(self,event,...) Ts(t74,cd74,select(1,...),select(5,...),98008,180) end);
- t75p="Interface\\Icons\\ability_shaman_astralshift";t75=CF(F);TrS(t75,xb+sb*3+ii*3,yb-8*(sb+ib),"cd75",t75p,sb,false);t75:SetScript(OE,function(self,event,...) Ts(t75,cd75,select(1,...),select(5,...),108271,90) end);
- t76p="Interface\\Icons\\ability_shaman_healingtide";t76=CF(F);TrS(t76,xb+sb*4+ii*4,yb-8*(sb+ib),"cd76",t76p,sb,false);t76:SetScript(OE,function(self,event,...) Ts(t76,cd76,select(1,...),select(5,...),108280,180) end);
- t77p="Interface\\Icons\\ability_shaman_windwalktotem";t77=CF(F);TrS(t77,xb+sb*5+ii*5,yb-8*(sb+ib),"cd77",t77p,sb,false);t77:SetScript(OE,function(self,event,...) Ts(t77,cd77,select(1,...),select(5,...),108273,60) end);
- t78p="Interface\\Icons\\spell_fire_elementaldevastation";t78=CF(F);TrS(t78,xb+sb*6+ii*6,yb-8*(sb+ib),"cd78",t78p,sb,false);t78:SetScript(OE,function(self,event,...) Ts(t78,cd78,select(1,...),select(5,...),114049,180) end);
- t79p="Interface\\Icons\\spell_nature_wispheal";t79=CF(F);TrS(t79,xb+sb*7+ii*7,yb-8*(sb+ib),"cd79",t79p,sb,false);t79:SetScript(OE,function(self,event,...) Ts(t79,cd79,select(1,...),select(5,...),16166,120) end);
- t80p="Interface\\Icons\\ability_shaman_multitotemactivation";t80=CF(F);TrS(t80,xb+sb*8+ii*8,yb-8*(sb+ib),"cd80",t80p,sb,false);t80:SetScript(OE,function(self,event,...) Ts(t80,cd80,select(1,...),select(5,...),108285,180) end);
- t81p="Interface\\Icons\\spell_nature_tremortotem";t81=CF(F);TrS(t81,xb+sb*9+ii*9,yb-8*(sb+ib),"cd81",t81p,sb,false);t81:SetScript(OE,function(self,event,...) Ts(t81,cd81,select(1,...),select(5,...),8143,60) end);
- t82p="Interface\\Icons\\spell_nature_groundingtotem";t82=CF(F);TrS(t82,xb+sb*10+ii*10,yb-8*(sb+ib),"cd82",t82p,sb,false);t82:SetScript(OE,function(self,event,...) Ts(t82,cd82,select(1,...),select(5,...),8177,25) end);
- --hunter
- t83p="Interface\\Icons\\ability_whirlwind";t83=CF(F);TrS(t83,xb,yb-9*(sb+ib),"cd83",t83p,sb,false);t83:SetScript(OE,function(self,event,...) Ts(t83,cd83,select(1,...),select(5,...),19263,180) end);
- t84p="Interface\\Icons\\ability_hunter_onewithnature";t84=CF(F);TrS(t84,xb+sb+ii,yb-9*(sb+ib),"cd84",t84p,sb,false);t84:SetScript(OE,function(self,event,...) Ts(t84,cd84,select(1,...),select(5,...),109304,120) end);
- t85p="Interface\\Icons\\ability_hunter_bestialdiscipline";t85=CF(F);TrS(t85,xb+sb*2+ii*2,yb-9*(sb+ib),"cd85",t85p,sb,false);t85:SetScript(OE,function(self,event,...) Ts(t85,cd85,select(1,...),select(5,...),121818,300) end);
- t86p="Interface\\Icons\\ability_druid_ferociousbite";t86=CF(F);TrS(t86,xb+sb*3+ii*3,yb-9*(sb+ib),"cd86",t86p,sb,false);t86:SetScript(OE,function(self,event,...) Ts(t86,cd86,select(1,...),select(5,...),19574,60) end);
- t87p="Interface\\Icons\\ability_hunter_resistanceisfutile";t87=CF(F);TrS(t87,xb+sb*4+ii*4,yb-9*(sb+ib),"cd87",t87p,sb,false);t87:SetScript(OE,function(self,event,...) Ts(t87,cd87,select(1,...),select(5,...),109259,45) end);
- --monk
- t88p="Interface\\Icons\\ability_monk_paralysis";t88=CF(F);TrS(t88,xb+sb*5+ii*5,yb-9*(sb+ib),"cd88",t88p,sb,false);t88:SetScript(OE,function(self,event,...) Ts(t88,cd88,select(1,...),select(5,...),115078,15) end);
- t89p="Interface\\Icons\\ability_monk_fortifyingale_new";t89=CF(F);TrS(t89,xb+sb*6+ii*6,yb-9*(sb+ib),"cd89",t89p,sb,false);t89:SetScript(OE,function(self,event,...) Ts(t89,cd89,select(1,...),select(5,...),115203,180) end);
- t90p="Interface\\Icons\\ability_monk_zenmeditation";t90=CF(F);TrS(t90,xb+sb*7+ii*7,yb-9*(sb+ib),"cd90",t90p,sb,false);t90:SetScript(OE,function(self,event,...) Ts(t90,cd90,select(1,...),select(5,...),115176,180) end);
- end
- --FCTtweaks
- if (FCTtweaks == 1) then
- CompactRaidFrameContainer:SetScale(0.85)
- ObjectiveTrackerFrame:SetScale(0.75)
- ObjectiveTrackerBlocksFrame.QuestHeader:SetAlpha(0)
- hooksecurefunc("PlayerFrame_ResetPosition", function(self)
- self:ClearAllPoints()
- self:SetPoint("CENTER", -370, 70)
- TargetFrame:ClearAllPoints()
- TargetFrame:SetPoint("BOTTOMRIGHT",PlayerFrame,100,-45)
- FocusFrame:ClearAllPoints()
- FocusFrame:SetPoint("BOTTOMRIGHT",PlayerFrame,750,0)
- end)
- StanceButton1:ClearAllPoints()
- StanceButton1:SetPoint("BOTTOMLEFT",MultiBarBottomLeftButton2,-500,0)
- StanceButton1.SetPoint = function() end
- local frame = CreateFrame("FRAME", "DefaultUIScrips")
- frame:RegisterEvent("PLAYER_ENTERING_WORLD")
- local function eventHandler(self, event, ...)
- LARGE_NUMBER_SEPERATOR = ""
- COMBAT_TEXT_HEIGHT = 20;
- COMBAT_TEXT_SCROLLSPEED = 3.0
- --UIErrorsFrame:UnregisterEvent("UI_ERROR_MESSAGE")
- UIErrorsFrame:SetScale(0.7)
- COMBAT_TEXT_TYPE_INFO.PERIODIC_HEAL_ABSORB.show = nil
- COMBAT_TEXT_TYPE_INFO.PERIODIC_HEAL.show = nil
- COMBAT_TEXT_TYPE_INFO.PERIODIC_HEAL_CRIT.show = nil
- --COMBAT_TEXT_TYPE_INFO.HEAL_CRIT.show = nil
- --COMBAT_TEXT_TYPE_INFO.HEAL.show = nil
- COMBAT_TEXT_TYPE_INFO.HEAL_CRIT_ABSORB.show = nil
- COMBAT_TEXT_TYPE_INFO.HEAL_ABSORB.show = nil
- COMBAT_TEXT_TYPE_INFO.ABSORB.show = nil
- COMBAT_TEXT_TYPE_INFO.SPELL_ABSORB.show = nil
- COMBAT_TEXT_TYPE_INFO["ENTERING_COMBAT"].r = 1
- COMBAT_TEXT_TYPE_INFO["ENTERING_COMBAT"].g = 0.82
- COMBAT_TEXT_TYPE_INFO["ENTERING_COMBAT"].b = 0
- COMBAT_TEXT_TYPE_INFO["LEAVING_COMBAT"].r = 1
- COMBAT_TEXT_TYPE_INFO["LEAVING_COMBAT"].g = 0.82
- COMBAT_TEXT_TYPE_INFO["LEAVING_COMBAT"].b = 0
- PlayerHitIndicator:SetFont("Fonts\\font.ttf",30)
- ENTERING_COMBAT = "+Combat"
- LEAVING_COMBAT = "-Combat"
- end
- frame:SetScript("OnEvent", eventHandler)
- --[[combat text font ]]
- local fontName = "Fonts\\font.ttf"
- local fontHeight = 40
- local fFlags = ""
- local function FS_SetFont()
- DAMAGE_TEXT_FONT = fontName
- COMBAT_TEXT_HEIGHT = fontHeight
- COMBAT_TEXT_CRIT_MAXHEIGHT = fontHeight + 2
- COMBAT_TEXT_CRIT_MINHEIGHT = fontHeight - 2
- local fName, fHeight, fFlags = CombatTextFont:GetFont()
- CombatTextFont:SetFont(fontName, fontHeight, fFlags)
- end
- FS_SetFont()
- --combat text location
- local f = CreateFrame("FRAME");
- f:SetScript("OnEvent", function(self,event,...)
- local arg1 =...;
- if (arg1=="Blizzard_CombatText") then
- f:UnregisterEvent("ADDON_LOADED");
- hooksecurefunc("CombatText_UpdateDisplayedMessages",
- function ()
- COMBAT_TEXT_LOCATIONS =
- {startX = 0,
- --startY = 384 * COMBAT_TEXT_Y_SCALE, endX =0,endY = 159 * COMBAT_TEXT_Y_SCALE};
- startY = 164 * COMBAT_TEXT_Y_SCALE, endX =0,endY = 80 * COMBAT_TEXT_Y_SCALE};
- end)end end)
- f:RegisterEvent("ADDON_LOADED");
- end
- --macro/binds
- if (Macro == 1) then
- --[[hooksecurefunc('ActionButton_UpdateHotkeys', function(self)
- local macro, hotkey = _G[self:GetName()..'Name'], _G[self:GetName()..'HotKey']
- if macro and hotkey then macro:Hide() hotkey:Hide() end
- end) ]]--
- hooksecurefunc('ActionButton_UpdateHotkeys', function(self)
- local macro = _G[self:GetName()..'Name']
- if macro then macro:Hide() end
- end)
- end
- if (UnitFrames == 1) then
- --player frame tweaks
- hooksecurefunc("PlayerFrame_UpdateStatus", function()
- if IsResting("player") then PlayerStatusTexture:Hide()PlayerRestIcon:Hide()PlayerRestGlow:Hide()PlayerStatusGlow:Hide()
- elseif PlayerFrame.inCombat then PlayerStatusTexture:Hide()PlayerAttackIcon:Show()PlayerRestIcon:Hide()PlayerAttackGlow:Hide()
- PlayerRestGlow:Hide()PlayerStatusGlow:Hide()PlayerAttackBackground:Hide() end end)
- --background tweaks
- hooksecurefunc('TargetFrame_CheckFaction', function(self)
- if ( not UnitPlayerControlled(self.unit)
- and UnitIsTapped(self.unit)
- and not UnitIsTappedByPlayer(self.unit)
- and not UnitIsTappedByAllThreatList(self.unit) ) then
- self.nameBackground:SetVertexColor(0.0, 0.0, 0.0, 0.5);
- if ( self.portrait ) then
- self.portrait:SetVertexColor(0.5, 0.5, 0.5);
- end
- else
- self.nameBackground:SetVertexColor(0.0, 0.0, 0.0, 0.5);
- if ( self.portrait ) then
- self.portrait:SetVertexColor(1.0, 1.0, 1.0);
- end
- end
- end)
- --[[ hp ]]
- local f=function(v)if(v>=1e4) then return ('%.1fk'):format(v/1e3):gsub('%.?0+([km])$','%1') else return v end end
- hooksecurefunc("TextStatusBar_UpdateTextString",function(s)
- if not GetCVarBool("statusTextPercentage") then
- if s.TextString and s.currValue then
- s.TextString:SetText(f(s.currValue))
- end
- end
- end)
- --[[class colored hp bars ]]
- local UnitIsPlayer,UnitIsConnected, UnitClass, RAID_CLASS_COLORS = UnitIsPlayer,UnitIsConnected,UnitClass, RAID_CLASS_COLORS
- local _, class, c
- local function colour(statusbar, unit, name)
- if UnitIsPlayer(unit) and UnitIsConnected(unit) and unit == statusbar.unit and UnitClass(unit) then
- _, class = UnitClass(unit) c = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
- statusbar:SetStatusBarColor(c.r, c.g, c.b)
- statusbar = _G["PlayerFrame".."HealthBar"]:SetStatusBarColor(0.1, 1.0, 0.1)--playerframe fix
- end
- end
- hooksecurefunc("UnitFrameHealthBar_Update", colour)
- hooksecurefunc("HealthBar_OnValueChanged", function(self)colour(self, self.unit)end)
- --[[class colored names]]--
- hooksecurefunc("UnitFrame_Update", function(self)
- if UnitClass(self.unit) then
- local c = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[select(2,UnitClass(self.unit))]
- self.name:SetTextColor(c.r,c.g,c.b,1) self.name:SetFont("Fonts\\font.ttf", 13)end end)
- end
- --[[Loss-Of-Control Remover ]]
- if (LoCRemover == 1) then
- select(1,LossOfControlFrame:GetRegions()):SetAlpha(0)
- select(2,LossOfControlFrame:GetRegions()):SetAlpha(0)
- select(3,LossOfControlFrame:GetRegions()):SetAlpha(0)
- select(5,LossOfControlFrame:GetRegions()):SetAlpha(0)
- --[[hooksecurefunc("CooldownFrame_SetTimer", function(self)
- if self.currentCooldownType == COOLDOWN_TYPE_LOSS_OF_CONTROL then
- self:SetCooldown(0, 0)
- end
- end)]]--
- hooksecurefunc('CooldownFrame_SetTimer',function(self)
- if self.currentCooldownType == COOLDOWN_TYPE_LOSS_OF_CONTROL then
- self:SetEdgeTexture("Interface\\Cooldown\\cooldown2");
- self:SetCooldown(4500,4500);
- self:SetSwipeColor(0.35,0.25,0.25,0);
- end
- end)
- end
- --[[arena/bg trinkets]]
- if (ArenaTrinkets == 1) then
- -- // ArenaTrinkets
- -- // Lorti - 2013
- ArenaTrinkets = CreateFrame("Frame", nil, UIParent)
- function ArenaTrinkets:Initialize()
- for i = 1, MAX_ARENA_ENEMIES do
- local ArenaFrame = _G["ArenaEnemyFrame"..i]
- self:CreateIcon(ArenaFrame)
- end
- end
- function ArenaTrinkets:CreateIcon(frame)
- local trinket = CreateFrame("Cooldown", nil, frame, "CooldownFrameTemplate")
- trinket:SetFrameLevel(frame:GetFrameLevel() + 3)
- trinket:SetDrawEdge(false)
- trinket:ClearAllPoints()
- trinket:SetPoint("LEFT", frame, "RIGHT", 0, -1)
- trinket:SetSize(22, 22)
- trinket.Icon = CreateFrame("Frame", nil, trinket)
- trinket.Icon:SetFrameLevel(trinket:GetFrameLevel() - 1)
- trinket.Icon:SetAllPoints()
- trinket.Icon.Texture = trinket.Icon:CreateTexture(nil, "BORDER")
- trinket.Icon.Texture:SetPoint("TOPLEFT", -3, 2)
- trinket.Icon.Texture:SetSize(24, 24)
- SetPortraitToTexture(trinket.Icon.Texture, UnitFactionGroup('player') == "Horde" and "Interface\\Icons\\inv_jewelry_trinketpvp_02" or "Interface\\Icons\\inv_jewelry_trinketpvp_01")
- trinket.Icon.Border = CreateFrame("Frame", nil, trinket.Icon)
- trinket.Icon.Border:SetFrameLevel(trinket:GetFrameLevel() + 1)
- trinket.Icon.Border:SetAllPoints()
- trinket.Icon.Border.Texture = trinket.Icon.Border:CreateTexture(nil, "ARTWORK")
- trinket.Icon.Border.Texture:SetTexture("Interface\\Minimap\\MiniMap-TrackingBorder")
- if IsAddOnLoaded("Lorti UI") then
- trinket.Icon.Border.Texture:SetVertexColor(.005,.005,.005)
- end
- trinket.Icon.Border.Texture:SetPoint("TOPLEFT", -9, 7)
- trinket.Icon.Border.Texture:SetSize(63, 63)
- local id = frame:GetID()
- self["arena"..id] = trinket
- if ( trinket ) then
- trinket.Icon:SetParent(trinket:GetParent())
- trinket.Icon:SetScale(1)
- trinket.Icon:SetFrameLevel(trinket:GetFrameLevel() - 1)
- else
- for i = 1, MAX_ARENA_ENEMIES do
- trinket.Icon:SetParent(trinket:GetParent())
- trinket.Icon:SetScale(1)
- trinket.Icon:SetFrameLevel(trinket:GetFrameLevel() - 1)
- end
- end
- end
- function ArenaTrinkets:ShowTrinkets()
- for i = 1, MAX_ARENA_ENEMIES do
- self["arena"..i].Icon:Show()
- self["arena"..i]:Show()
- self["arena"..i]:SetCooldown(0, 0)
- end
- end
- function ArenaTrinkets:HideTrinkets()
- for i = 1, MAX_ARENA_ENEMIES do
- self["arena"..i].Icon:Hide()
- self["arena"..i]:Hide()
- self["arena"..i]:SetCooldown(0, 0)
- end
- end
- ArenaTrinkets:SetScript("OnEvent", function(self, event, ...) return self[event](self, ...) end)
- function ArenaTrinkets:UNIT_SPELLCAST_SUCCEEDED(unitID, spell)
- if not ArenaTrinkets[unitID] then return end
- if spell == GetSpellInfo(42292) or spell == GetSpellInfo(59752) then -- Trinket and EMFH
- CooldownFrame_SetTimer(self[unitID], GetTime(), 120, 1)
- elseif spell == GetSpellInfo(7744) then -- WOTF
- CooldownFrame_SetTimer(self[unitID], GetTime(), 30, 1)
- end
- end
- function ArenaTrinkets:PLAYER_ENTERING_WORLD()
- local _, instanceType = IsInInstance()
- if instanceType == "arena" then
- ArenaEnemyFrame1:ClearAllPoints()
- ArenaEnemyFrame1:SetPoint("BOTTOMLEFT", FocusFrame, "BOTTOMLEFT", 0, -30)
- ArenaEnemyFrame1.SetPoint = function() end
- ArenaEnemyFrame2:ClearAllPoints()
- ArenaEnemyFrame2:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -50)
- ArenaEnemyFrame2.SetPoint = function() end
- ArenaEnemyFrame3:ClearAllPoints()
- ArenaEnemyFrame3:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -100)
- ArenaEnemyFrame3.SetPoint = function() end
- ArenaEnemyFrame4:ClearAllPoints()
- ArenaEnemyFrame4:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -150)
- ArenaEnemyFrame4.SetPoint = function() end
- ArenaEnemyFrame5:ClearAllPoints()
- ArenaEnemyFrame5:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -200)
- ArenaEnemyFrame5.SetPoint = function() end
- ArenaPrepFrame1:ClearAllPoints()
- ArenaPrepFrame1:SetPoint("BOTTOMLEFT", FocusFrame, "BOTTOMLEFT", 0, -30)
- ArenaPrepFrame1.SetPoint = function() end
- ArenaPrepFrame2:ClearAllPoints()
- ArenaPrepFrame2:SetPoint("TOPRIGHT", ArenaPrepFrame1, "TOPRIGHT", 0, -50)
- ArenaPrepFrame2.SetPoint = function() end
- ArenaPrepFrame3:ClearAllPoints()
- ArenaPrepFrame3:SetPoint("TOPRIGHT", ArenaPrepFrame1, "TOPRIGHT", 0, -100)
- ArenaPrepFrame3.SetPoint = function() end
- ArenaPrepFrame4:ClearAllPoints()
- ArenaPrepFrame4:SetPoint("TOPRIGHT", ArenaPrepFrame1, "TOPRIGHT", 0, -150)
- ArenaPrepFrame4.SetPoint = function() end
- ArenaPrepFrame5:ClearAllPoints()
- ArenaPrepFrame5:SetPoint("TOPRIGHT", ArenaPrepFrame1, "TOPRIGHT", 0, -200)
- ArenaPrepFrame5.SetPoint = function() end
- self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
- ArenaTrinkets:ShowTrinkets()
- SetBinding("TAB", "TARGETNEARESTENEMYPLAYER")
- else
- ArenaTrinkets:HideTrinkets()
- SetBinding("TAB", "TARGETNEARESTENEMY")
- if ( self:IsEventRegistered("UNIT_SPELLCAST_SUCCEEDED") ) then
- self:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED")
- end
- end
- end
- ArenaTrinkets:RegisterEvent("PLAYER_ENTERING_WORLD")
- function ArenaTrinkets:PLAYER_LOGIN()
- if not IsAddOnLoaded("Blizzard_ArenaUI") then
- LoadAddOn("Blizzard_ArenaUI")
- end
- self:Initialize()
- end
- ArenaTrinkets:RegisterEvent("PLAYER_LOGIN")
- end
- --diminishing returns
- --rogue drtracker
- if (RogueDR == 1) then
- USD="UNIT_SPELLCAST_SUCCEEDED";OT="OnEvent";FR="Frame";RF=CreateFrame;RD="Border";UE=UnitName
- CS=RF(FR) CS.c=RF("Cooldown","CST",CS.t,"CooldownFrameTemplate") CS.c:SetDrawEdge(false)CS:RegisterEvent(USD)
- CS.c:SetAllPoints(CS) CS:SetPoint("TOPRIGHT",PlayerFrame,-3,6)CS:SetSize(26,26)CS:Show()CS.t=CS:CreateTexture(nil,RD)CS.t:SetAllPoints()CS.t:SetTexture("Interface\\Icons\\ability_rogue_kidneyshot")
- CS:SetScript(OT,function(self,event,...)if UE(select(1,...))==UE("player")and select(5,...)==1833 then CST:SetCooldown(GetTime(),23)end if UE(select(1,...))==UE("player")and select(5,...)==408 then CST:SetCooldown(GetTime(),24)end end)
- SP=RF(FR) SP.c=RF("Cooldown","SAP",SP.t,"CooldownFrameTemplate") SP.c:SetDrawEdge(false) SP:RegisterEvent(USD)
- SP.c:SetAllPoints(SP) SP:SetPoint("TOPRIGHT",PlayerFrame,-29,6)SP:Show()SP:SetSize(26,26)SP.t=SP:CreateTexture(nil,RD)SP.t:SetAllPoints()SP.t:SetTexture("Interface\\Icons\\ability_sap")
- SP:SetScript(OT,function(self,event,...)if UE(select(1,...))==UE("player")and select(5,...)==6770 then SAP:SetCooldown(GetTime(),26)end if UE(select(1,...))==UE("player")and select(5,...)==1776 then SAP:SetCooldown(GetTime(),22)end end)
- --[[GR=RF(FR) GR.c=RF("Cooldown","GAR",GR.t,"CooldownFrameTemplate") GR.c:SetDrawEdge(false) GR:RegisterEvent(USD)
- GR.c:SetAllPoints(GR) GR:SetPoint("TOPRIGHT",PlayerFrame,-55,6)GR:Show()GR:SetSize(26,26)GR.t=GR:CreateTexture(nil,RD)GR.t:SetAllPoints()GR.t:SetTexture("Interface\\Icons\\spell_frost_iceshock")
- GR:SetScript(OT,function(self,event,...)if UE(select(1,...))==UE("player")and select(5,...)==703 then GAR:SetCooldown(GetTime(),23)end end) ]]--
- -- snd tracker
- local snd = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
- snd:SetDrawEdge(false)
- snd:ClearAllPoints()
- snd:SetPoint("BOTTOMRIGHT",PlayerFrame,115,6)
- snd:SetSize(34,34)
- snd.Icon = CreateFrame("Frame", nil, snd)
- snd.Icon:SetFrameLevel(snd:GetFrameLevel() - 1)
- snd:SetFrameStrata("HIGH")
- snd.Icon:SetAllPoints()
- snd.Icon.Texture = snd.Icon:CreateTexture(nil, "ARTWORK")
- snd.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,115,6)
- snd.Icon.Texture:SetSize(34,34)
- snd.Icon.Texture:SetTexture("Interface\\Icons\\ability_rogue_slicedice")
- snd.Icon.Border = CreateFrame("Frame", nil, snd.Icon)
- snd.Icon.Border:SetAllPoints()
- snd.Icon.Border.Texture = snd.Icon.Border:CreateTexture(nil, Border)
- snd:RegisterEvent("UNIT_AURA")
- snd:SetScript("OnEvent", function(self, event, unit)
- snd.CheckAura(unit)
- end)
- function snd.CheckAura(unit)
- local spellname = GetSpellInfo(5171)
- local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitBuff("player", spellname)
- if id and unitCaster == "player" then
- snd:Show()
- snd:SetCooldown(expirationTime - duration - 0.5, duration)
- return
- end
- snd:Hide()
- end
- -- recuperate tracker
- local recup = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
- recup:SetDrawEdge(false)
- recup:ClearAllPoints()
- recup:SetPoint("BOTTOMRIGHT",PlayerFrame,115,40)
- recup:SetSize(34,34)
- recup.Icon = CreateFrame("Frame", nil, recup)
- recup.Icon:SetFrameLevel(recup:GetFrameLevel() - 1)
- recup:SetFrameStrata("HIGH")
- recup.Icon:SetAllPoints()
- recup.Icon.Texture = recup.Icon:CreateTexture(nil, "ARTWORK")
- recup.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,115,40)
- recup.Icon.Texture:SetSize(34,34)
- recup.Icon.Texture:SetTexture("Interface\\Icons\\ability_rogue_recuperate")
- recup.Icon.Border = CreateFrame("Frame", nil, recup.Icon)
- recup.Icon.Border:SetAllPoints()
- recup.Icon.Border.Texture = recup.Icon.Border:CreateTexture(nil, Border)
- recup:RegisterEvent("UNIT_AURA")
- recup:SetScript("OnEvent", function(self, event, unit)
- recup.CheckAura(unit)
- end)
- function recup.CheckAura(unit)
- local spellname = GetSpellInfo(73651)
- local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitBuff("player", spellname)
- if id and unitCaster == "player" then
- recup:Show()
- recup:SetCooldown(expirationTime - duration - 0.5, duration)
- return
- end
- recup:Hide()
- end
- --vendetta tracker
- local vend = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
- vend:SetDrawEdge(false)
- vend:ClearAllPoints()
- vend:SetPoint("BOTTOMRIGHT",PlayerFrame,149,6)
- vend:SetSize(34,34)
- vend.Icon = CreateFrame("Frame", nil, vend)
- vend.Icon:SetFrameLevel(vend:GetFrameLevel() - 1)
- vend:SetFrameStrata("HIGH")
- vend.Icon:SetAllPoints()
- vend.Icon.Texture = vend.Icon:CreateTexture(nil, "ARTWORK")
- vend.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,149,6)
- vend.Icon.Texture:SetSize(34,34)
- vend.Icon.Texture:SetTexture("Interface\\Icons\\ability_rogue_deadliness")
- vend.Icon.Border = CreateFrame("Frame", nil, vend.Icon)
- vend.Icon.Border:SetAllPoints()
- vend.Icon.Border.Texture = vend.Icon.Border:CreateTexture(nil, Border)
- vend:RegisterEvent("UNIT_AURA")
- vend:SetScript("OnEvent", function(self, event, unit)
- vend.CheckAura(unit)
- end)
- function vend.CheckAura(unit)
- local spellname = GetSpellInfo(79140)
- local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitDebuff("target", spellname)
- if id and unitCaster == "player" then
- vend:Show()
- vend:SetCooldown(expirationTime - duration - 0.5, duration)
- return
- end
- vend:Hide()
- end
- --rupture tracker
- local rupt = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
- rupt:SetDrawEdge(false)
- rupt:ClearAllPoints()
- rupt:SetPoint("BOTTOMRIGHT",PlayerFrame,149,40)
- rupt:SetSize(34,34)
- rupt.Icon = CreateFrame("Frame", nil, rupt)
- rupt.Icon:SetFrameLevel(rupt:GetFrameLevel() - 1)
- rupt:SetFrameStrata("HIGH")
- rupt.Icon:SetAllPoints()
- rupt.Icon.Texture = rupt.Icon:CreateTexture(nil, "ARTWORK")
- rupt.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,149,40)
- rupt.Icon.Texture:SetSize(34,34)
- rupt.Icon.Texture:SetTexture("Interface\\Icons\\ability_rogue_rupture")
- rupt.Icon.Border = CreateFrame("Frame", nil, rupt.Icon)
- rupt.Icon.Border:SetAllPoints()
- rupt.Icon.Border.Texture = rupt.Icon.Border:CreateTexture(nil, Border)
- rupt:RegisterEvent("UNIT_AURA")
- rupt:SetScript("OnEvent", function(self, event, unit)
- rupt.CheckAura(unit)
- end)
- function rupt.CheckAura(unit)
- local spellname = GetSpellInfo(1943)
- local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitDebuff("target", spellname)
- if id and unitCaster == "player" then
- rupt:Show()
- rupt:SetCooldown(expirationTime - duration - 0.5, duration)
- return
- end
- rupt:Hide()
- end
- end
- --CreateFrame("Cooldown", nil, DR, "CooldownFrameTemplate")
- --combat script
- if (Combat == 1) then
- CTT=CreateFrame("Frame")CTT:SetParent(TargetFrame)CTT:SetPoint("Left",TargetFrame,-30,5)CTT:SetSize(25,25)CTT.t=CTT:CreateTexture(nil,BORDER)CTT.t:SetAllPoints()CTT.t:SetTexture("Interface\\Icons\\ABILITY_DUALWIELD")CTT:Hide()
- local function FrameOnUpdate(self) if UnitAffectingCombat("target") then self:Show() else self:Hide() end end local g = CreateFrame("Frame") g:SetScript("OnUpdate", function(self) FrameOnUpdate(CTT) end)
- CFT=CreateFrame("Frame")CFT:SetParent(FocusFrame)CFT:SetPoint("Left",FocusFrame,-30,5)CFT:SetSize(25,25)CFT.t=CFT:CreateTexture(nil,BORDER)CFT.t:SetAllPoints()CFT.t:SetTexture("Interface\\Icons\\ABILITY_DUALWIELD")CFT:Hide()
- local function FrameOnUpdate(self) if UnitAffectingCombat("focus") then self:Show() else self:Hide() end end local g = CreateFrame("Frame") g:SetScript("OnUpdate", function(self) FrameOnUpdate(CFT) end)
- --CPT=CreateFrame("Frame")--[[CPT:SetParent(PlayerFrame)]]CPT:SetPoint("BOTTOMRIGHT",PlayerFrame,-55,6)CPT:SetSize(26,26)CPT.t=CPT:CreateTexture(nil,BORDER)CPT.t:SetAllPoints()CPT.t:SetTexture("Interface\\Icons\\ABILITY_DUALWIELD")CPT:Hide()
- --local function FrameOnUpdate(self) if UnitAffectingCombat("player") then self:Show() else self:Hide() end end local g = CreateFrame("Frame") g:SetScript("OnUpdate", function(self) FrameOnUpdate(CPT) end)
- end
- --SDB fix
- if (ShadowDanceBar == 1) then
- local shadowdancebar = 2 -- внимание! это номер панели для шд
- local f = CreateFrame('frame', 'myownstatedriver', UIParent, 'SecureHandlerStateTemplate')
- for i=1,12 do f:SetFrameRef('ActionButton'..i, _G['ActionButton'..i]) end
- f:Execute([[ buttons = table.new() for i = 1, 12 do table.insert(buttons, self:GetFrameRef('ActionButton'..i)) end ]])
- f:SetAttribute('_onstate-page', [[ for i, button in ipairs(buttons) do button:SetAttribute('actionpage', tonumber(newstate)) end ]])
- local getBar = function()
- local class, spec = select(2, UnitClass('player')), GetSpecialization()
- local pages = {
- ['DRUID'] = '[bonusbar:1,nostealth] 7; [bonusbar:1,stealth] 8; [bonusbar:2] 8; [bonusbar:3] 9; [bonusbar:4] 10;',
- ['WARRIOR'] = '[bonusbar:1] 7; [bonusbar:2] 8; [bonusbar:3] 9;',
- ['PRIEST'] = '[bonusbar:1] 7;',
- ['ROGUE'] = '[form:1][form:'..(spec==3 and 3 or 2)..',stealth] 7; [form:'..(spec==3 and 3 or 2)..',nostealth]'..shadowdancebar..';',
- ['WARLOCK'] = '[form:2] 10;',
- ['MONK'] = '[form:1] '..(spec == 1 and 8 or spec == 2 and 9 or spec == 3 and 7 or 9)..'; [form:2] 7;',
- ['DEFAULT'] = '[vehicleui] 12; [bar:2] 2; [bar:3] 3; [bar:4] 4; [bar:5] 5; [bar:6] 6;',
- }
- local condition, page = pages['DEFAULT'], pages[class]
- if page then condition = condition..' '..page end
- condition = condition..' 1'
- return condition
- end
- RegisterStateDriver(f, 'page', getBar())
- end
- --interrupt announcer
- if (InterruptA == 1) then
- local f = CreateFrame("Frame")
- local function Update(self, event, ...)
- if event == "COMBAT_LOG_EVENT_UNFILTERED" then
- local timestamp, eventType, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, _, spellID, spellName, _, extraskillID, extraSkillName = ...
- if eventType == "SPELL_INTERRUPT" and sourceName == UnitName("player") then
- SendChatMessage("Interrupted >> "..GetSpellLink(extraskillID).."!", "SAY")
- end
- end
- end
- f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
- f:SetScript("OnEvent", Update)
- end
- --snowfallkeypress animation
- if (Flash == 1) then
- local animationsCount, animations = 5, {}
- local animationNum = 1
- local frame, texture, alpha1, scale1, scale2, rotation2
- for i = 1, animationsCount do
- frame = CreateFrame("Frame")
- texture = frame:CreateTexture() texture:SetTexture('Interface\\Cooldown\\star4') texture:SetAlpha(0) texture:SetAllPoints() texture:SetBlendMode("ADD")
- animationGroup = texture:CreateAnimationGroup()
- alpha1 = animationGroup:CreateAnimation("Alpha") alpha1:SetChange(1) alpha1:SetDuration(0) alpha1:SetOrder(1)
- scale1 = animationGroup:CreateAnimation("Scale") scale1:SetScale(1.5, 1.5) scale1:SetDuration(0) scale1:SetOrder(1)
- scale2 = animationGroup:CreateAnimation("Scale") scale2:SetScale(0, 0) scale2:SetDuration(0.3) scale2:SetOrder(2)
- rotation2 = animationGroup:CreateAnimation("Rotation") rotation2:SetDegrees(90) rotation2:SetDuration(0.3) rotation2:SetOrder(2)
- animations[i] = {frame = frame, animationGroup = animationGroup}
- end
- local AnimateButton = function(self)
- if not self:IsVisible() then return true end
- local animation = animations[animationNum]
- local frame = animation.frame
- local animationGroup = animation.animationGroup
- frame:SetFrameStrata(self:GetFrameStrata())
- frame:SetFrameLevel(self:GetFrameLevel() + 10)
- frame:SetAllPoints(self)
- animationGroup:Stop()
- animationGroup:Play()
- animationNum = (animationNum % animationsCount) + 1
- return true
- end
- hooksecurefunc('MultiActionButtonDown', function(bname, id) AnimateButton(_G[bname..'Button'..id]) end)
- hooksecurefunc('ActionButtonDown', function(id)
- local button
- if C_PetBattles.IsInBattle() then
- if PetBattleFrame then
- if id > NUM_BATTLE_PET_HOTKEYS then return end
- button = PetBattleFrame.BottomFrame.abilityButtons[id]
- if id == BATTLE_PET_ABILITY_SWITCH then
- button = PetBattleFrame.BottomFrame.SwitchPetButton;
- elseif id == BATTLE_PET_ABILITY_CATCH then
- button = PetBattleFrame.BottomFrame.CatchButton;
- end
- if not button then return end
- end
- return
- end
- if OverrideActionBar and OverrideActionBar:IsShown() then
- if id > NUM_OVERRIDE_BUTTONS then return end
- button = _G["OverrideActionBarButton"..id]
- else
- button = _G["ActionButton"..id]
- end
- if not button then return end
- AnimateButton(button)
- end)
- end
- -- Class colors in arena frames
- if (cArenas == 1) then
- local frame = CreateFrame("FRAME")
- frame:RegisterEvent("PLAYER_ENTERING_WORLD")
- frame:RegisterEvent("PARTY_MEMBERS_CHANGED")
- frame:RegisterEvent("PLAYER_TARGET_CHANGED")
- frame:RegisterEvent("PLAYER_FOCUS_CHANGED")
- frame:RegisterEvent("ARENA_OPPONENT_UPDATE")
- frame:RegisterEvent("PLAYER_CONTROL_GAINED")
- frame:RegisterEvent("PLAYER_CONTROL_LOST")
- frame:RegisterEvent("ADDON_LOADED");
- local function DoArenaColorHook()
- hooksecurefunc("ArenaEnemyFrame_Unlock",
- function(self)
- local color=RAID_CLASS_COLORS[select(2,UnitClass(self.unit)) or ""]
- if color then
- self.healthbar:SetStatusBarColor(color.r,color.g,color.b)
- self.healthbar.lockColor=true
- end
- end
- )
- end
- local function eventHandler(self, event, arg, ...)
- if event == "ADDON_LOADED" then
- if arg == "Blizzard_ArenaUI" then
- self:UnregisterEvent(event);
- DoArenaColorHook();
- end
- end
- end
- if IsAddOnLoaded("Blizzard_ArenaUI") then
- DoArenaColorHook();
- end
- frame:SetScript("OnEvent", eventHandler)
- end
- --DRTracker Warlords of Draenor
- if (DRTrackerWoD == 1) then
- local DRTracker = CreateFrame("Cooldown", "DRTracker", UIParent)
- local DRs = {}
- local lastChangedFrame = nil
- DRTracker:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
- DRTracker:RegisterEvent("ADDON_LOADED")
- local spellIds = { -- DR Categories listed here http://eu.battle.net/wow/en/forum/topic/11267997531
- -- Many thanks to those that assisted the creation of the original list from LoseControl.
- -- Categories: Stun (1), Silence (2), Disorient/Fear (3), Incapacitate/Polymorph (4), Roots (5)
- -- Death Knight
- [108194] = "Stun", -- Asphyxiate
- [115001] = "Stun", -- Remorseless Winter
- [47476] = "Silence", -- Strangulate
- [96294] = "Root", -- Chains of Ice (Chilblains)
- -- Death Knight Ghoul
- [91800] = "Stun", -- Gnaw
- [91797] = "Stun", -- Monstrous Blow (Dark Transformation)
- [91807] = "Root", -- Shambling Rush (Dark Transformation)
- -- Druid
- [113801] = "Stun", -- Bash (Force of Nature - Feral Treants)
- [102795] = "Stun", -- Bear Hug
- [33786] = "Disorient", -- Cyclone
- [99] = "Incap", -- Disorienting (Incapacitating) Roar
- [22570] = "Stun", -- Maim
- [5211] = "Stun", -- Mighty Bash
- [163505] = "Stun", -- Rake
- [114238] = "Silence", -- Fae Silence (Glyph of Fae Silence)
- [81261] = "Silence", -- Solar Beam
- [339] = "Root", -- Entangling Roots
- [113770] = "Root", -- Entangling Roots (Force of Nature - Balance Treants)
- [19975] = "Root", -- Entangling Roots (Nature's Grasp)
- [45334] = "Root", -- Immobilized (Wild Charge - Bear)
- [102359] = "Root", -- Mass Entanglement
- -- Hunter
- [117526] = "Stun", -- Binding Shot
- [3355] = "Incap", -- Freezing Trap
- [1513] = "Disorient", -- Scare Beast
- [19386] = "Incap", -- Wyvern Sting
- [34490] = "Silence", -- Silencing Shot
- [19185] = "Root", -- Entrapment
- [64803] = "Root", -- Entrapment
- [128405] = "Root", -- Narrow Escape
- -- Mage
- [118271] = "Stun", -- Combustion Impact
- [44572] = "Stun", -- Deep Freeze
- [31661] = "Disorient", -- Dragon's Breath
- [118] = "Incap", -- Polymorph
- [61305] = "Incap", -- Polymorph: Black Cat
- [28272] = "Incap", -- Polymorph: Pig
- [61721] = "Incap", -- Polymorph: Rabbit
- [61780] = "Incap", -- Polymorph: Turkey
- [28271] = "Incap", -- Polymorph: Turtle
- [82691] = "Incap", -- Ring of Frost
- [102051] = "Silence", -- Frostjaw (also a root)
- [122] = "Root", -- Frost Nova
- [111340] = "Root", -- Ice Ward
- -- Mage Water Elemental
- [33395] = "Root", -- Freeze
- -- Monk
- [123393] = "Incap", -- Breath of Fire (Glyph of Breath of Fire)
- [119392] = "Stun", -- Charging Ox Wave
- [120086] = "Stun", -- Fists of Fury
- [119381] = "Stun", -- Leg Sweep
- [115078] = "Incap", -- Paralysis
- [137460] = "Incap", -- Silenced (Ring of Peace)
- [116706] = "Root", -- Disable
- [123407] = "Root", -- Spinning Fire Blossom
- -- Paladin
- [105421] = "Disorient", -- Blinding Light
- [115752] = "Stun", -- Blinding Light (Glyph of Blinding Light)
- [105593] = "Stun", -- Fist of Justice
- [853] = "Stun", -- Hammer of Justice
- [119072] = "Stun", -- Holy Wrath
- [20066] = "Incap", -- Repentance
- [10326] = "Disorient", -- Turn Evil
- [145067] = "Disorient", -- Turn Evil (Evil is a Point of View)
- [31935] = "Silence", -- Avenger's Shield
- -- Priest
- [605] = "Incap", -- Dominate Mind
- [88625] = "Incap", -- Holy Word: Chastise
- [64044] = "Incap", -- Psychic Horror
- [8122] = "Disorient", -- Psychic Scream
- [113792] = "Disorient", -- Psychic Terror (Psyfiend)
- [9484] = "Disorient", -- Shackle Undead
- [15487] = "Silence", -- Silence
- [87194] = "Root", -- Glyph of Mind Blast
- [114404] = "Root", -- Void Tendril's Grasp
- -- Rogue
- [2094] = "Disorient", -- Blind
- [1833] = "Stun", -- Cheap Shot
- [1776] = "Incap", -- Gouge
- [408] = "Stun", -- Kidney Shot
- [6770] = "Incap", -- Sap
- [1330] = "Silence", -- Garrote - Silence
- -- Shaman
- [51514] = "Incap", -- Hex
- [118905] = "Stun", -- Static Charge (Capacitor Totem)
- [64695] = "Root", -- Earthgrab (Earthgrab Totem)
- [63685] = "Root", -- Freeze (Frozen Power)
- -- Shaman Primal Earth Elemental
- [118345] = "Stun", -- Pulverize
- -- Warlock
- [710] = "Incap", -- Banish
- [137143] = "Incap", -- Blood Horror
- [5782] = "Disorient", -- Fear
- [118699] = "Disorient", -- Fear
- [130616] = "Disorient", -- Fear (Glyph of Fear)
- [5484] = "Disorient", -- Howl of Terror
- [22703] = "Stun", -- Infernal Awakening
- [6789] = "Incap", -- Mortal Coil
- [132412] = "Disorient", -- Seduction (Grimoire of Sacrifice)
- [30283] = "Stun", -- Shadowfury
- [132409] = "Silence", -- Spell Lock (Grimoire of Sacrifice)
- [31117] = "Silence", -- Unstable Affliction
- -- Warlock Pets
- [89766] = "Stun", -- Axe Toss (Felguard/Wrathguard)
- [115268] = "Disorient", -- Mesmerize (Shivarra)
- [6358] = "Disorient", -- Seduction (Succubus)
- [115782] = "Silence", -- Optical Blast (Observer)
- [24259] = "Silence", -- Spell Lock (Felhunter)
- -- Warrior
- --[7922] = "Root", -- Charge Stun
- [5246] = "Disorient", -- Intimidating Shout (aoe)
- [20511] = "Disorient", -- Intimidating Shout (targeted)
- [132168] = "Stun", -- Shockwave
- [107570] = "Stun", -- Storm Bolt
- [132169] = "Stun", -- Storm Bolt
- [18498] = "Silence", -- Silenced - Gag Order (PvE only)
- [107566] = "Root", -- Staggering Shout
- [105771] = "Root", -- Warbringer
- -- Other
- [107079] = "Incap", -- Quaking Palm
- [13327] = "Stun", -- Reckless Charge
- [20549] = "Stun", -- War Stomp
- [25046] = "Silence", -- Arcane Torrent (Energy)
- [28730] = "Silence", -- Arcane Torrent (Mana)
- [50613] = "Silence", -- Arcane Torrent (Runic Power)
- [69179] = "Silence", -- Arcane Torrent (Rage)
- [80483] = "Silence", -- Arcane Torrent (Focus)
- [129597] = "Silence", -- Arcane Torrent (Chi)
- [39965] = "Root", -- Frost Grenade
- [55536] = "Root", -- Frostweave Net
- [13099] = "Root", -- Net-o-Matic
- }
- function DRTracker:GetSpellCategory(spellID) -- Returns CC category of the spellIDs listed above
- return spellID and spellIds[spellID] or nil
- end
- function DRTracker:OnEvent(event, ...) -- Runs things, and stuff.
- self[event](self, ...)
- end
- DRTracker:SetScript("OnEvent", DRTracker.OnEvent)
- function DRTracker:ADDON_LOADED(addonName) -- Anchor DR trackers
- if addonName == "Blizzard_ArenaUI" then
- local arenaFrame
- for i = 1, 5 do
- arenaFrame = "ArenaEnemyFrame"..i
- --local loc = -30 -- (Depreciated) Distance between the left edge of each frame. Should match the width of the frame.
- for j = 1, 5 do
- local DR = CreateFrame("Frame", arenaFrame.."DR"..j, ArenaEnemyFrames)
- DR:ClearAllPoints()
- DR:SetPoint("BOTTOMRIGHT", arenaFrame, "TOPLEFT", 0, -10)
- DR:SetSize(24, 24) -- (Width, Height) of each frame. A perfect square is preferable, otherwise the spell icon will look stretched.
- DR.border = DR:CreateTexture(nil, "LOW")
- DR.border:SetAllPoints()
- DR.border:SetTexture("Interface\\BUTTONS\\UI-Quickslot-Depress.png")
- DR.icon = DR:CreateTexture(nil, "BACKGROUND")
- DR.shown = false
- DR.severity = 1
- DR.unit = i
- DR.cate = j
- DR.applied = 0
- DR.sweep = CreateFrame("Cooldown", nil, DR, "CooldownFrameTemplate")
- DR.sweep:ClearAllPoints()
- DR.sweep:SetAllPoints(DR)
- local function OnShow(self)
- local curX = 0
- for b=1,5 do
- local curFrame = DRs["arena"..DR.unit..b]
- if curFrame.shown == true and b ~= self.cate then
- curX = curX - 30
- end
- end
- self:ClearAllPoints()
- self:SetPoint("BOTTOMRIGHT", "ArenaEnemyFrame"..self.unit, "TOPLEFT", curX, -10)
- self.shown = true
- self.applied = GetTime()
- end
- DR:HookScript("OnShow", OnShow)
- local function OnHide(self)
- for b = 1,5 do
- local curFrame = DRs["arena"..self.unit..b]
- if curFrame and curFrame.shown == true and curFrame.applied > self.applied then
- local _, _, _, x = curFrame:GetPoint(1)
- curFrame:ClearAllPoints()
- curFrame:SetPoint("BOTTOMRIGHT", "ArenaEnemyFrame"..curFrame.unit, "TOPLEFT", x+30, -10)
- end
- end
- self:ClearAllPoints()
- self:SetPoint("BOTTOMRIGHT", "ArenaEnemyFrame"..self.unit, "TOPLEFT", 0, -10)
- end
- DR:HookScript("OnHide", OnHide)
- local function DREnd(self, elapsed)
- if self.sweep:GetCooldownDuration() == 0 and self.shown == true then
- self:Hide()
- self.shown = false
- self.severity = 1
- end
- end
- DR:HookScript("OnUpdate", DREnd)
- DR:Hide()
- DRs["arena"..i..j] = DR
- end
- end
- end
- end
- function DRTracker:SetTexture(Frame, spellID) -- Sets displayed icon to last spell.
- if Frame.shown == true then
- Frame.dur = Frame.sweep:GetCooldownDuration()
- Frame:Hide()
- end
- lastChangedFrame = Frame
- local _, _, icon, _, _, _, _, _, _ = GetSpellInfo(spellID)
- Frame.icon:ClearAllPoints()
- Frame.icon:SetAllPoints()
- Frame.icon:SetTexture(icon)
- Frame:Show()
- if Frame.severity == 1 then
- Frame.border:SetVertexColor(1, 1, 0, 1)
- Frame.severity = 2
- elseif Frame.severity == 2 then
- Frame.border:SetVertexColor(1, .4, 0, 1)
- Frame.severity = 3
- elseif Frame.severity == 3 then
- Frame.border:SetVertexColor(1, 0, 0, 1)
- end
- end
- function DRTracker:TimerStart(GUID, spellID, spellName) -- Primary function; begins CD sweep and icon updates. Not a good idea to edit any of this.
- local _, instanceType = IsInInstance()
- if instanceType ~= "arena" then
- return
- end
- local cat = DRTracker:GetSpellCategory(spellID)
- if(UnitGUID("arena1") == GUID) then
- local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff("arena1", spellName)
- if(cat=="Stun") then
- DRTracker:SetTexture(DRs["arena1"..1], spellID)
- CooldownFrame_SetTimer(DRs["arena1"..1].sweep, GetTime(), 17+duration, 1)
- elseif(cat=="Silence") then
- DRTracker:SetTexture(DRs["arena1"..2], spellID)
- CooldownFrame_SetTimer(DRs["arena1"..2].sweep, GetTime(), 17+duration, 1)
- elseif(cat=="Disorient") then
- DRTracker:SetTexture(DRs["arena1"..3], spellID)
- CooldownFrame_SetTimer(DRs["arena1"..3].sweep, GetTime(), 17+duration, 1)
- elseif(cat=="Incap") then
- DRTracker:SetTexture(DRs["arena1"..4], spellID)
- CooldownFrame_SetTimer(DRs["arena1"..4].sweep, GetTime(), 17+duration, 1)
- else
- DRTracker:SetTexture(DRs["arena1"..5], spellID)
- CooldownFrame_SetTimer(DRs["arena1"..5].sweep, GetTime(), 17+duration, 1)
- end
- elseif(UnitGUID("arena2") == GUID) then
- local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff("arena2", spellName)
- if(cat=="Stun") then
- DRTracker:SetTexture(DRs["arena2"..1], spellID)
- CooldownFrame_SetTimer(DRs["arena2"..1].sweep, GetTime(), 17+duration, 1)
- elseif(cat=="Silence") then
- DRTracker:SetTexture(DRs["arena2"..2], spellID)
- CooldownFrame_SetTimer(DRs["arena2"..2].sweep, GetTime(), 17+duration, 1)
- elseif(cat=="Disorient") then
- DRTracker:SetTexture(DRs["arena2"..3], spellID)
- CooldownFrame_SetTimer(DRs["arena2"..3].sweep, GetTime(), 17+duration, 1)
- elseif(cat=="Incap") then
- DRTracker:SetTexture(DRs["arena2"..4], spellID)
- CooldownFrame_SetTimer(DRs["arena2"..4].sweep, GetTime(), 17+duration, 1)
- else
- DRTracker:SetTexture(DRs["arena2"..5], spellID)
- CooldownFrame_SetTimer(DRs["arena2"..5].sweep, GetTime(), 17+duration, 1)
- end
- elseif(UnitGUID("arena3") == GUID) then
- local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff("arena3", spellName)
- if(cat=="Stun") then
- DRTracker:SetTexture(DRs["arena3"..1], spellID)
- CooldownFrame_SetTimer(DRs["arena3"..1].sweep, GetTime(), 17+duration, 1)
- elseif(cat=="Silence") then
- DRTracker:SetTexture(DRs["arena3"..2], spellID)
- CooldownFrame_SetTimer(DRs["arena3"..2].sweep, GetTime(), 17+duration, 1)
- elseif(cat=="Disorient") then
- DRTracker:SetTexture(DRs["arena3"..3], spellID)
- CooldownFrame_SetTimer(DRs["arena3"..3].sweep, GetTime(), 17+duration, 1)
- elseif(cat=="Incap") then
- DRTracker:SetTexture(DRs["arena3"..4], spellID)
- CooldownFrame_SetTimer(DRs["arena3"..4].sweep, GetTime(), 17+duration, 1)
- else
- DRTracker:SetTexture(DRs["arena3"..5], spellID)
- CooldownFrame_SetTimer(DRs["arena3"..5].sweep, GetTime(), 17+duration, 1)
- end
- elseif(UnitGUID("arena4") == GUID) then
- local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff("arena4", spellName)
- if(cat=="Stun") then
- DRTracker:SetTexture(DRs["arena4"..1], spellID)
- CooldownFrame_SetTimer(DRs["arena4"..1].sweep, GetTime(), 17+duration, 1)
- elseif(cat=="Silence") then
- DRTracker:SetTexture(DRs["arena4"..2], spellID)
- CooldownFrame_SetTimer(DRs["arena4"..2].sweep, GetTime(), 17+duration, 1)
- elseif(cat=="Disorient") then
- DRTracker:SetTexture(DRs["arena4"..3], spellID)
- CooldownFrame_SetTimer(DRs["arena4"..3].sweep, GetTime(), 17+duration, 1)
- elseif(cat=="Incap") then
- DRTracker:SetTexture(DRs["arena4"..4], spellID)
- CooldownFrame_SetTimer(DRs["arena4"..4].sweep, GetTime(), 17+duration, 1)
- else
- DRTracker:SetTexture(DRs["arena4"..5], spellID)
- CooldownFrame_SetTimer(DRs["arena4"..5].sweep, GetTime(), 17+duration, 1)
- end
- elseif(UnitGUID("arena5") == GUID) then
- local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff("arena5", spellName)
- if(cat=="Stun") then
- DRTracker:SetTexture(DRs["arena5"..1], spellID)
- CooldownFrame_SetTimer(DRs["arena5"..1].sweep, GetTime(), 17+duration, 1)
- elseif(cat=="Silence") then
- DRTracker:SetTexture(DRs["arena5"..2], spellID)
- CooldownFrame_SetTimer(DRs["arena5"..2].sweep, GetTime(), 17+duration, 1)
- elseif(cat=="Disorient") then
- DRTracker:SetTexture(DRs["arena5"..3], spellID)
- CooldownFrame_SetTimer(DRs["arena5"..3].sweep, GetTime(), 17+duration, 1)
- elseif(cat=="Incap") then
- DRTracker:SetTexture(DRs["arena5"..4], spellID)
- CooldownFrame_SetTimer(DRs["arena5"..4].sweep, GetTime(), 17+duration, 1)
- else
- DRTracker:SetTexture(DRs["arena5"..5], spellID)
- CooldownFrame_SetTimer(DRs["arena5"..5].sweep, GetTime(), 17+duration, 1)
- end
- end
- return
- end
- function DRTracker:GetDRs()
- return DRTracker and DRs
- end
- function DRTracker:COMBAT_LOG_EVENT_UNFILTERED(timeStamp, eventType, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, spellID, spellName, spellSchool, auraType)
- if eventType == "SPELL_AURA_APPLIED" or eventType == "SPELL_AURA_REFRESH" then -- Crowd control landed, time to do stuff.
- if auraType == "DEBUFF" and DRTracker:GetSpellCategory(spellID) then
- DRTracker:TimerStart(destGUID, spellID, spellName)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement