Advertisement
wit4er

6.0.3 wa edition

Jan 18th, 2015
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 125.91 KB | None | 0 0
  1. print("Autoscript v6.0.3 loaded!\n\n\n")
  2. --config//
  3. local EnemyCooldowns = 1
  4. local FCTtweaks = 1
  5. local Macro = 1
  6. local LoCRemover = 1
  7. local ArenaTrinkets = 1
  8. local RogueDR = 1
  9. local Combat = 1
  10. local UnitFrames = 1
  11. local ShadowDanceBar = 0
  12. local InterruptA = 1
  13. local cArenas = 1
  14. local DRTrackerWoD = 1
  15. --//config
  16.  
  17.  
  18.  
  19.  
  20.  
  21. --enemy cooldowns
  22. if (EnemyCooldowns == 1) then
  23. local frame = CreateFrame("FRAME", "EnemyCooldowns")
  24. frame:RegisterEvent("PLAYER_ENTERING_WORLD")
  25. local function eventHandler(self, event, ...)
  26. USS="UNIT_SPELLCAST_SUCCEEDED";OE="OnEvent";F="Frame";CF=CreateFrame;BO="Border";xb=630;yb=320;sb=24;ib=1;ii=1  
  27. 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
  28. 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
  29. 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
  30. --rogue
  31. 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);
  32. 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);
  33. 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);
  34. 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);
  35. 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);
  36. 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);
  37. 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);
  38. 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);
  39. 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);
  40. 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);
  41. --warlock
  42. 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);
  43. 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);
  44. 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);
  45. 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);
  46. 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);
  47. 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);
  48. 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);
  49. 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);
  50. 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);
  51. --mage
  52. 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);
  53. 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);
  54. 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);
  55. 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);
  56. 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);
  57. 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);
  58. --dk
  59. 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);
  60. 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);
  61. 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);
  62. 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);
  63. 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);
  64. 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);
  65. 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);
  66. 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);
  67. 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);
  68. 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);
  69. --priest
  70. 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);
  71. 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);
  72. 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);
  73. 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);
  74. 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);
  75. 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);
  76. --paladin
  77. 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);
  78. 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);
  79. 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);
  80. 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);
  81. 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);
  82. 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);
  83. 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);
  84. 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);
  85. --warrior
  86. 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);
  87. 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);
  88. 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);
  89. 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);
  90. 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);
  91. 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);
  92. 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);
  93. 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);
  94. 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);
  95. 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);
  96. 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);
  97. --druid
  98. 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);
  99. 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);
  100. 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);
  101. 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);
  102. 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);
  103. 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);
  104. 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);
  105. 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);
  106. 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);
  107. 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);
  108. 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);
  109. --shaman
  110. 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);
  111. 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);
  112. 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);
  113. 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);
  114. 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);
  115. 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);
  116. 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);
  117. 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);
  118. 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);
  119. 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);
  120. 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);
  121. --hunter
  122. 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);
  123. 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);
  124. 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);
  125. 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);
  126. 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);
  127. --monk
  128. 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);
  129. 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);
  130. 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);
  131. end
  132. frame:SetScript("OnEvent", eventHandler)
  133. end
  134.  
  135. --FCTtweaks
  136. if (FCTtweaks == 1) then
  137. local frame = CreateFrame("FRAME", "DefaultUIScrips")
  138. frame:RegisterEvent("PLAYER_ENTERING_WORLD")
  139.      local function eventHandler(self, event, ...)
  140.        -- LARGE_NUMBER_SEPERATOR = ""
  141.        SetCVar('BreakUpLargeNumbers', 0)
  142.         COMBAT_TEXT_HEIGHT = 20;
  143.         COMBAT_TEXT_SCROLLSPEED = 3.0
  144.         --UIErrorsFrame:UnregisterEvent("UI_ERROR_MESSAGE")
  145.         UIErrorsFrame:SetScale(0.7)
  146.         COMBAT_TEXT_TYPE_INFO.PERIODIC_HEAL_ABSORB.show = nil
  147.         --COMBAT_TEXT_TYPE_INFO.PERIODIC_HEAL.show = nil
  148.         --COMBAT_TEXT_TYPE_INFO.PERIODIC_HEAL_CRIT.show = nil
  149.         --COMBAT_TEXT_TYPE_INFO.HEAL_CRIT.show = nil
  150.         --COMBAT_TEXT_TYPE_INFO.HEAL.show = nil
  151.         COMBAT_TEXT_TYPE_INFO.HEAL_CRIT_ABSORB.show = nil
  152.         COMBAT_TEXT_TYPE_INFO.HEAL_ABSORB.show = nil
  153.         COMBAT_TEXT_TYPE_INFO.ABSORB.show = nil
  154.         COMBAT_TEXT_TYPE_INFO.SPELL_ABSORB.show = nil
  155.         COMBAT_TEXT_TYPE_INFO["ENTERING_COMBAT"].r = 1
  156.         COMBAT_TEXT_TYPE_INFO["ENTERING_COMBAT"].g = 0.82
  157.         COMBAT_TEXT_TYPE_INFO["ENTERING_COMBAT"].b = 0
  158.         COMBAT_TEXT_TYPE_INFO["LEAVING_COMBAT"].r = 1
  159.         COMBAT_TEXT_TYPE_INFO["LEAVING_COMBAT"].g = 0.82
  160.         COMBAT_TEXT_TYPE_INFO["LEAVING_COMBAT"].b = 0
  161.         PlayerHitIndicator:SetFont("Fonts\\font.ttf",30)  
  162.         ENTERING_COMBAT = "+Combat"
  163.         LEAVING_COMBAT = "-Combat"     
  164. end
  165. frame:SetScript("OnEvent", eventHandler)
  166. --combat text font
  167. local fontName = "Fonts\\font1.ttf"
  168. local fontHeight = 25
  169. local fFlags = ""
  170. local function FS_SetFont()
  171.     DAMAGE_TEXT_FONT = fontName
  172.     COMBAT_TEXT_HEIGHT = fontHeight
  173.     COMBAT_TEXT_CRIT_MAXHEIGHT = fontHeight + 1
  174.     COMBAT_TEXT_CRIT_MINHEIGHT = fontHeight - 1
  175.     local fName, fHeight, fFlags = CombatTextFont:GetFont()
  176.     CombatTextFont:SetFont(fontName, fontHeight, fFlags)
  177. end
  178. FS_SetFont()
  179. --combat text location
  180. local f = CreateFrame("FRAME");
  181. f:SetScript("OnEvent", function(self,event,...)
  182. local arg1 =...;        
  183.      if (arg1=="Blizzard_CombatText") then
  184.         f:UnregisterEvent("ADDON_LOADED");
  185.         hooksecurefunc("CombatText_UpdateDisplayedMessages",
  186.         function ()
  187.         COMBAT_TEXT_LOCATIONS =
  188.         {startX  = 0,
  189.         --startY = 384 * COMBAT_TEXT_Y_SCALE, endX =0,endY = 159 * COMBAT_TEXT_Y_SCALE};
  190.         startY = 164 * COMBAT_TEXT_Y_SCALE, endX =0,endY = 80 * COMBAT_TEXT_Y_SCALE};
  191.         end)end end)
  192. f:RegisterEvent("ADDON_LOADED");
  193. end
  194.  
  195. --macro/binds
  196. if (Macro == 1) then
  197. --[[hooksecurefunc('ActionButton_UpdateHotkeys', function(self)
  198.     local macro, hotkey = _G[self:GetName()..'Name'], _G[self:GetName()..'HotKey']
  199.     if macro and hotkey then macro:Hide() hotkey:Hide() end
  200. end) ]]--
  201. hooksecurefunc('ActionButton_UpdateHotkeys', function(self)
  202.     local macro = _G[self:GetName()..'Name']
  203.     if macro then macro:Hide() end
  204. end)
  205. end
  206.  
  207. --unit farmes tweaks
  208. if (UnitFrames == 1) then
  209. MainMenuBarLeftEndCap:SetAlpha(0)
  210. MainMenuBarRightEndCap:SetAlpha(0)
  211. for i=0,3 do _G["MainMenuBarTexture"..i]:SetAlpha(0)end
  212. for i=0,3 do _G["MainMenuMaxLevelBar"..i]:SetAlpha(0)end
  213. CompactRaidFrameContainer:SetScale(0.85)
  214. ObjectiveTrackerFrame:SetScale(0.75)
  215. ObjectiveTrackerBlocksFrame.QuestHeader:SetAlpha(0)
  216. hooksecurefunc("PlayerFrame_ResetPosition", function(self)
  217.  self:ClearAllPoints()
  218.  self:SetPoint("CENTER", -370, 70)
  219.  TargetFrame:ClearAllPoints()
  220.  TargetFrame:SetPoint("BOTTOMRIGHT",PlayerFrame,100,-45)
  221.  FocusFrame:ClearAllPoints()
  222.  FocusFrame:SetPoint("BOTTOMRIGHT",PlayerFrame,750,0)
  223. end)
  224.  StanceButton1:ClearAllPoints()
  225.  StanceButton1:SetPoint("BOTTOMLEFT",MultiBarBottomLeftButton2,-500,0)
  226.  StanceButton1.SetPoint = function() end
  227. --player frame tweaks
  228. hooksecurefunc("PlayerFrame_UpdateStatus", function()
  229. if IsResting("player") then PlayerStatusTexture:Hide()PlayerRestIcon:Hide()PlayerRestGlow:Hide()PlayerStatusGlow:Hide()
  230. elseif PlayerFrame.inCombat then PlayerStatusTexture:Hide()PlayerAttackIcon:Show()PlayerRestIcon:Hide()PlayerAttackGlow:Hide()
  231. PlayerRestGlow:Hide()PlayerStatusGlow:Hide()PlayerAttackBackground:Hide() end end)
  232. -- background tweaks
  233. hooksecurefunc('TargetFrame_CheckFaction', function(self)
  234.   if ( not UnitPlayerControlled(self.unit)
  235.   and UnitIsTapped(self.unit)
  236.   and not UnitIsTappedByPlayer(self.unit)
  237.   and not UnitIsTappedByAllThreatList(self.unit) ) then
  238.     self.nameBackground:SetVertexColor(0.0, 0.0, 0.0, 0.5);
  239.     if ( self.portrait ) then
  240.       self.portrait:SetVertexColor(0.5, 0.5, 0.5);
  241.     end
  242.   else
  243.     self.nameBackground:SetVertexColor(0.0, 0.0, 0.0, 0.5);
  244.     if ( self.portrait ) then
  245.       self.portrait:SetVertexColor(1.0, 1.0, 1.0);
  246.     end
  247.   end  
  248. end)
  249. -- hp
  250. local f=function(v)if(v>=1e4) then return ('%.1fk'):format(v/1e3):gsub('%.?0+([km])$','%1')  else return v end end
  251.         hooksecurefunc("TextStatusBar_UpdateTextString",function(s)
  252.         if not GetCVarBool("statusTextPercentage") then
  253.             if s.TextString and s.currValue then
  254.             s.TextString:SetText(f(s.currValue))           
  255.           end
  256.      end
  257. end)
  258. local hptext = TargetFrameHealthBar:CreateFontString("TargetHealthPercentageFontString", "OVERLAY")
  259. hptext:SetPoint("RIGHT", TargetFrameHealthBar, "RIGHT", 28, 0)
  260. hptext:SetFont("Fonts\\font.ttf", 12, "OUTLINE")
  261. hptext:SetShadowColor(0,0,0)
  262. hptext:SetShadowOffset(1,-1)
  263. hptext:SetTextColor(0.1,1.0,0.1)
  264. hptext:SetJustifyH("RIGHT")
  265.  
  266. TargetFrameHealthBar:RegisterEvent("PLAYER_TARGET_CHANGED")
  267. TargetFrameHealthBar:RegisterEvent("UNIT_HEALTH")
  268.  
  269. TargetFrameHealthBar:SetScript("OnEvent", function (self, event, ...)
  270.     if ((event == "UNIT_HEALTH") and ((...) ~= "target")) then
  271.         return
  272.     end
  273.     if (UnitIsDeadOrGhost("target")) then
  274.         hptext:SetText("")
  275.     else
  276.         local perc = UnitHealth("target") / UnitHealthMax("target") * 100
  277.         hptext:SetText(string.format("%u", perc))
  278.     end
  279. end)
  280.  
  281.  
  282. --class colored hp bars
  283. local UnitIsPlayer,UnitIsConnected, UnitClass, RAID_CLASS_COLORS = UnitIsPlayer,UnitIsConnected,UnitClass, RAID_CLASS_COLORS
  284. local _, class, c
  285. local function colour(statusbar, unit, name)
  286.       if UnitIsPlayer(unit) and UnitIsConnected(unit) and unit == statusbar.unit and UnitClass(unit) then
  287.           _, class = UnitClass(unit) c = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
  288.           statusbar:SetStatusBarColor(c.r, c.g, c.b)         
  289.           statusbar = _G["PlayerFrame".."HealthBar"]:SetStatusBarColor(0.1, 1.0, 0.1)--playerframe fix   
  290.       end    
  291. end
  292. hooksecurefunc("UnitFrameHealthBar_Update", colour)
  293. hooksecurefunc("HealthBar_OnValueChanged", function(self)colour(self, self.unit)end)
  294. --class colored names
  295. hooksecurefunc("UnitFrame_Update", function(self)
  296. if UnitClass(self.unit) then
  297. local c = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[select(2,UnitClass(self.unit))]
  298. self.name:SetTextColor(c.r,c.g,c.b,1) self.name:SetFont("Fonts\\font.ttf", 12)end end)
  299. end
  300.  
  301. --Loss-Of-Control Remover
  302. if (LoCRemover == 1) then
  303. select(1,LossOfControlFrame:GetRegions()):SetAlpha(0)
  304. select(2,LossOfControlFrame:GetRegions()):SetAlpha(0)
  305. select(3,LossOfControlFrame:GetRegions()):SetAlpha(0)
  306. select(5,LossOfControlFrame:GetRegions()):SetAlpha(0)
  307. --[[hooksecurefunc("CooldownFrame_SetTimer", function(self)
  308.     if self.currentCooldownType == COOLDOWN_TYPE_LOSS_OF_CONTROL then
  309.         self:SetCooldown(0, 0)
  310.     end
  311. end)]]--
  312. hooksecurefunc('CooldownFrame_SetTimer',function(self)
  313. if self.currentCooldownType == COOLDOWN_TYPE_LOSS_OF_CONTROL then
  314. self:SetEdgeTexture("Interface\\Cooldown\\cooldown2");
  315. self:SetCooldown(4500,4500);
  316. self:SetSwipeColor(0.35,0.25,0.25,0);
  317. end
  318. end)
  319. end
  320.  
  321. --arena/bg trinkets
  322. if (ArenaTrinkets == 1) then
  323. -- // ArenaTrinkets
  324. -- // Lorti - 2013
  325. ArenaTrinkets = CreateFrame("Frame", nil, UIParent)
  326. function ArenaTrinkets:Initialize()
  327. for i = 1, MAX_ARENA_ENEMIES do
  328. local ArenaFrame = _G["ArenaEnemyFrame"..i]
  329. self:CreateIcon(ArenaFrame)
  330. end
  331. end
  332. function ArenaTrinkets:CreateIcon(frame)
  333. local trinket = CreateFrame("Cooldown", nil, frame, "CooldownFrameTemplate")
  334. trinket:SetFrameLevel(frame:GetFrameLevel() + 3)
  335. trinket:SetDrawEdge(false)
  336. trinket:ClearAllPoints()
  337. trinket:SetPoint("LEFT", frame, "RIGHT", 0, -1)
  338. trinket:SetSize(22, 22)
  339.  
  340. trinket.Icon = CreateFrame("Frame", nil, trinket)
  341. trinket.Icon:SetFrameLevel(trinket:GetFrameLevel() - 1)
  342. trinket.Icon:SetAllPoints()
  343. trinket.Icon.Texture = trinket.Icon:CreateTexture(nil, "BORDER")
  344. trinket.Icon.Texture:SetPoint("TOPLEFT", -3, 2)
  345. trinket.Icon.Texture:SetSize(24, 24)
  346. SetPortraitToTexture(trinket.Icon.Texture, UnitFactionGroup('player') == "Horde" and "Interface\\Icons\\inv_jewelry_trinketpvp_02" or "Interface\\Icons\\inv_jewelry_trinketpvp_01")
  347.  
  348. trinket.Icon.Border = CreateFrame("Frame", nil, trinket.Icon)
  349. trinket.Icon.Border:SetFrameLevel(trinket:GetFrameLevel() + 1)
  350. trinket.Icon.Border:SetAllPoints()
  351. trinket.Icon.Border.Texture = trinket.Icon.Border:CreateTexture(nil, "ARTWORK")
  352. trinket.Icon.Border.Texture:SetTexture("Interface\\Minimap\\MiniMap-TrackingBorder")
  353. if IsAddOnLoaded("Lorti UI") then
  354. trinket.Icon.Border.Texture:SetVertexColor(.005,.005,.005)
  355. end
  356. trinket.Icon.Border.Texture:SetPoint("TOPLEFT", -9, 7)
  357. trinket.Icon.Border.Texture:SetSize(63, 63)
  358. local id = frame:GetID()
  359. self["arena"..id] = trinket
  360.  
  361. if ( trinket ) then
  362. trinket.Icon:SetParent(trinket:GetParent())
  363. trinket.Icon:SetScale(1)
  364. trinket.Icon:SetFrameLevel(trinket:GetFrameLevel() - 1)
  365. else
  366. for i = 1, MAX_ARENA_ENEMIES do
  367. trinket.Icon:SetParent(trinket:GetParent())
  368. trinket.Icon:SetScale(1)
  369. trinket.Icon:SetFrameLevel(trinket:GetFrameLevel() - 1)
  370. end
  371. end
  372. end
  373. function ArenaTrinkets:ShowTrinkets()
  374. for i = 1, MAX_ARENA_ENEMIES do
  375. self["arena"..i].Icon:Show()
  376. self["arena"..i]:Show()
  377. self["arena"..i]:SetCooldown(0, 0)
  378. end
  379. end
  380. function ArenaTrinkets:HideTrinkets()
  381. for i = 1, MAX_ARENA_ENEMIES do
  382. self["arena"..i].Icon:Hide()
  383. self["arena"..i]:Hide()
  384. self["arena"..i]:SetCooldown(0, 0)
  385. end
  386. end
  387. ArenaTrinkets:SetScript("OnEvent", function(self, event, ...) return self[event](self, ...) end)
  388. function ArenaTrinkets:UNIT_SPELLCAST_SUCCEEDED(unitID, spell)
  389. if not ArenaTrinkets[unitID] then return end
  390.  
  391. if spell == GetSpellInfo(42292) or spell == GetSpellInfo(59752) then -- Trinket and EMFH
  392. CooldownFrame_SetTimer(self[unitID], GetTime(), 120, 1)
  393. elseif spell == GetSpellInfo(7744) then -- WOTF
  394. CooldownFrame_SetTimer(self[unitID], GetTime(), 30, 1)
  395. end
  396. end
  397. function ArenaTrinkets:PLAYER_ENTERING_WORLD()
  398. local _, instanceType = IsInInstance()
  399. if instanceType == "arena" then
  400. ArenaEnemyFrame1:ClearAllPoints()
  401. ArenaEnemyFrame1:SetPoint("BOTTOMLEFT", FocusFrame, "BOTTOMLEFT", 0, -30)
  402. ArenaEnemyFrame1.SetPoint = function() end
  403. ArenaEnemyFrame2:ClearAllPoints()
  404. ArenaEnemyFrame2:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -50)
  405. ArenaEnemyFrame2.SetPoint = function() end
  406. ArenaEnemyFrame3:ClearAllPoints()
  407. ArenaEnemyFrame3:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -100)
  408. ArenaEnemyFrame3.SetPoint = function() end
  409. ArenaEnemyFrame4:ClearAllPoints()
  410. ArenaEnemyFrame4:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -150)
  411. ArenaEnemyFrame4.SetPoint = function() end
  412. ArenaEnemyFrame5:ClearAllPoints()
  413. ArenaEnemyFrame5:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -200)
  414. ArenaEnemyFrame5.SetPoint = function() end
  415. ArenaPrepFrame1:ClearAllPoints()
  416. ArenaPrepFrame1:SetPoint("BOTTOMLEFT", FocusFrame, "BOTTOMLEFT", 0, -30)
  417. ArenaPrepFrame1.SetPoint = function() end
  418. ArenaPrepFrame2:ClearAllPoints()
  419. ArenaPrepFrame2:SetPoint("TOPRIGHT", ArenaPrepFrame1, "TOPRIGHT", 0, -50)
  420. ArenaPrepFrame2.SetPoint = function() end
  421. ArenaPrepFrame3:ClearAllPoints()
  422. ArenaPrepFrame3:SetPoint("TOPRIGHT", ArenaPrepFrame1, "TOPRIGHT", 0, -100)
  423. ArenaPrepFrame3.SetPoint = function() end
  424. ArenaPrepFrame4:ClearAllPoints()
  425. ArenaPrepFrame4:SetPoint("TOPRIGHT", ArenaPrepFrame1, "TOPRIGHT", 0, -150)
  426. ArenaPrepFrame4.SetPoint = function() end
  427. ArenaPrepFrame5:ClearAllPoints()
  428. ArenaPrepFrame5:SetPoint("TOPRIGHT", ArenaPrepFrame1, "TOPRIGHT", 0, -200)
  429. ArenaPrepFrame5.SetPoint = function() end
  430. self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
  431. ArenaTrinkets:ShowTrinkets()
  432. SetBinding("TAB", "TARGETNEARESTENEMYPLAYER")
  433. else
  434. ArenaTrinkets:HideTrinkets()
  435. SetBinding("TAB", "TARGETNEARESTENEMY")
  436. if ( self:IsEventRegistered("UNIT_SPELLCAST_SUCCEEDED") ) then
  437. self:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED")
  438. end
  439. end
  440. end
  441. ArenaTrinkets:RegisterEvent("PLAYER_ENTERING_WORLD")
  442. function ArenaTrinkets:PLAYER_LOGIN()
  443. if not IsAddOnLoaded("Blizzard_ArenaUI") then
  444. LoadAddOn("Blizzard_ArenaUI")
  445. end
  446. self:Initialize()
  447. end
  448. ArenaTrinkets:RegisterEvent("PLAYER_LOGIN")
  449. end
  450. --diminishing returns
  451.  
  452. --rogue drtracker
  453. if (RogueDR == 1) then
  454.     --[[USD="UNIT_SPELLCAST_SUCCEEDED";OT="OnEvent";FR="Frame";RF=CreateFrame;RD="Border";UE=UnitName
  455. CS=RF(FR) CS.c=RF("Cooldown","CST",CS.t,"CooldownFrameTemplate") CS.c:SetDrawEdge(false)CS:RegisterEvent(USD)
  456. 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")
  457. 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)
  458. SP=RF(FR) SP.c=RF("Cooldown","SAP",SP.t,"CooldownFrameTemplate") SP.c:SetDrawEdge(false) SP:RegisterEvent(USD)
  459. 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")
  460. 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)]]--
  461. -- snd tracker
  462.  
  463. local snd = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
  464. snd:SetDrawEdge(false)
  465. snd:ClearAllPoints()
  466. snd:SetPoint("BOTTOMRIGHT",PlayerFrame,120,0)
  467. snd:SetSize(40,40)
  468. snd.Icon = CreateFrame("Frame", nil, snd)
  469. snd.Icon:SetFrameLevel(snd:GetFrameLevel() - 1)
  470. snd:SetFrameStrata("HIGH")
  471. snd.Icon:SetAllPoints()
  472. snd.Icon.Texture = snd.Icon:CreateTexture(nil, "ARTWORK")
  473. snd.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,120,0)
  474. snd.Icon.Texture:SetSize(40,40)
  475. snd.Icon.Texture:SetTexture("Interface\\Icons\\ability_rogue_slicedice")
  476. snd.Icon.Border = CreateFrame("Frame", nil, snd.Icon)
  477. snd.Icon.Border:SetAllPoints()
  478. snd.Icon.Border.Texture = snd.Icon.Border:CreateTexture(nil, Border)
  479. snd:RegisterEvent("UNIT_AURA")
  480. snd:SetScript("OnEvent", function(self, event, unit)
  481. snd.CheckAura(unit)
  482. end)
  483. function snd.CheckAura(unit)
  484. local spellname = GetSpellInfo(5171)
  485. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitBuff("player", spellname)
  486. if id and unitCaster == "player" then
  487. snd:Show()
  488. snd:SetCooldown(expirationTime - duration - 0.5, duration)
  489. return
  490. end
  491. snd:Hide()
  492. end
  493.  
  494. --TRINKET PROC
  495. local trink = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
  496. trink:SetDrawEdge(false)
  497. trink:ClearAllPoints()
  498. --trink:SetPoint("BOTTOMRIGHT",PlayerFrame,149,6)
  499. trink:SetPoint("BOTTOMRIGHT",PlayerFrame,479,29)
  500. trink:SetSize(64,64)
  501. trink.Icon = CreateFrame("Frame", nil, trink)
  502. trink.Icon:SetFrameLevel(trink:GetFrameLevel() - 1)
  503. trink:SetFrameStrata("HIGH")
  504. trink.Icon:SetAllPoints()
  505. trink.Icon.Texture = trink.Icon:CreateTexture(nil, "ARTWORK")
  506. --trink.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,149,6)
  507. trink.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,479,29)
  508. trink.Icon.Texture:SetSize(64,64)
  509. trink.Icon.Texture:SetTexture("Interface\\Icons\\ability_creature_poison_06")
  510. trink.Icon.Border = CreateFrame("Frame", nil, trink.Icon)
  511. trink.Icon.Border:SetAllPoints()
  512. trink.Icon.Border.Texture = trink.Icon.Border:CreateTexture(nil, Border)
  513. trink:RegisterEvent("UNIT_AURA")
  514. trink:SetScript("OnEvent", function(self, event, unit)
  515. trink.CheckAura(unit)
  516. end)
  517. function trink.CheckAura(unit)
  518. local spellname = GetSpellInfo(177038)
  519. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitBuff("player", spellname)
  520. if id and unitCaster == "player" then
  521. trink:Show()
  522. trink:SetCooldown(expirationTime - duration - 0.5, duration)
  523. return
  524. end
  525. trink:Hide()
  526. end
  527. --ADRENALINE
  528. local rush = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
  529. rush:SetDrawEdge(false)
  530. rush:ClearAllPoints()
  531. --rush:SetPoint("BOTTOMRIGHT",PlayerFrame,149,6)
  532. rush:SetPoint("BOTTOMRIGHT",PlayerFrame,479,93)
  533. rush:SetSize(64,64)
  534. rush.Icon = CreateFrame("Frame", nil, rush)
  535. rush.Icon:SetFrameLevel(rush:GetFrameLevel() - 1)
  536. rush:SetFrameStrata("HIGH")
  537. rush.Icon:SetAllPoints()
  538. rush.Icon.Texture = rush.Icon:CreateTexture(nil, "ARTWORK")
  539. --rush.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,149,6)
  540. rush.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,479,93)
  541. rush.Icon.Texture:SetSize(64,64)
  542. rush.Icon.Texture:SetTexture("Interface\\Icons\\spell_shadow_shadowworddominate")
  543. rush.Icon.Border = CreateFrame("Frame", nil, rush.Icon)
  544. rush.Icon.Border:SetAllPoints()
  545. rush.Icon.Border.Texture = rush.Icon.Border:CreateTexture(nil, Border)
  546. rush:RegisterEvent("UNIT_AURA")
  547. rush:SetScript("OnEvent", function(self, event, unit)
  548. rush.CheckAura(unit)
  549. end)
  550. function rush.CheckAura(unit)
  551. local spellname = GetSpellInfo(13750)
  552. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitBuff("player", spellname)
  553. if id and unitCaster == "player" then
  554. rush:Show()
  555. rush:SetCooldown(expirationTime - duration - 0.5, duration)
  556. return
  557. end
  558. rush:Hide()
  559. end
  560. --RING PROC
  561. local ring = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
  562. ring:SetDrawEdge(false)
  563. ring:ClearAllPoints()
  564. --ring:SetPoint("BOTTOMRIGHT",PlayerFrame,149,-28)
  565. ring:SetPoint("BOTTOMRIGHT",PlayerFrame,479,-35)
  566. ring:SetSize(64,64)
  567. ring.Icon = CreateFrame("Frame", nil, ring)
  568. ring.Icon:SetFrameLevel(ring:GetFrameLevel() - 1)
  569. ring:SetFrameStrata("HIGH")
  570. ring.Icon:SetAllPoints()
  571. ring.Icon.Texture = ring.Icon:CreateTexture(nil, "ARTWORK")
  572. --ring.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,149,-28)
  573. ring.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,479,-35)
  574. ring.Icon.Texture:SetSize(64,64)
  575. ring.Icon.Texture:SetTexture("Interface\\Icons\\spell_holy_mindsooth")
  576. ring.Icon.Border = CreateFrame("Frame", nil, ring.Icon)
  577. ring.Icon.Border:SetAllPoints()
  578. ring.Icon.Border.Texture = ring.Icon.Border:CreateTexture(nil, Border)
  579. ring:RegisterEvent("UNIT_AURA")
  580. ring:SetScript("OnEvent", function(self, event, unit)
  581. ring.CheckAura(unit)
  582. end)
  583. function ring.CheckAura(unit)
  584. local spellname = GetSpellInfo(177159)
  585. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitBuff("player", spellname)
  586. if id and unitCaster == "player" then
  587. ring:Show()
  588. ring:SetCooldown(expirationTime - duration - 0.5, duration)
  589. return
  590. end
  591. ring:Hide()
  592. end
  593. -- blade flurry tracker
  594. local blade = CreateFrame("Cooldown", nil, PlayerFrame)
  595. blade:SetDrawEdge(false)
  596. blade:ClearAllPoints()
  597. blade:SetPoint("BOTTOMRIGHT",PlayerFrame,160,-40)
  598. blade:SetSize(40,40)
  599. blade.Icon = CreateFrame("Frame", nil, blade)
  600. blade.Icon:SetFrameLevel(blade:GetFrameLevel() - 1)
  601. blade:SetFrameStrata("HIGH")
  602. blade.Icon:SetAllPoints()
  603. blade.Icon.Texture = blade.Icon:CreateTexture(nil, "ARTWORK")
  604. blade.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,160,-40)
  605. blade.Icon.Texture:SetSize(40,40)
  606. blade.Icon.Texture:SetTexture("Interface\\Icons\\ability_warrior_punishingblow")
  607. blade.Icon.Border = CreateFrame("Frame", nil, blade.Icon)
  608. blade.Icon.Border:SetAllPoints()
  609. blade.Icon.Border.Texture = blade.Icon.Border:CreateTexture(nil, Border)
  610. blade:RegisterEvent("UNIT_AURA")
  611. blade:SetScript("OnEvent", function(self, event, unit)
  612. blade.CheckAura(unit)
  613. end)
  614. function blade.CheckAura(unit)
  615. local spellname = GetSpellInfo(13877)
  616. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitBuff("player", spellname)
  617. if id and unitCaster == "player" then
  618. blade:Show()
  619. blade:SetCooldown(expirationTime - duration - 0.5, duration)
  620. return
  621. end
  622. blade:Hide()
  623. end
  624.  
  625. --vendetta tracker
  626. local vend = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
  627. vend:SetDrawEdge(false)
  628. vend:ClearAllPoints()
  629. vend:SetPoint("BOTTOMRIGHT",PlayerFrame,160,-40)
  630. vend:SetSize(40,40)
  631. vend.Icon = CreateFrame("Frame", nil, vend)
  632. vend.Icon:SetFrameLevel(vend:GetFrameLevel() - 1)
  633. vend:SetFrameStrata("HIGH")
  634. vend.Icon:SetAllPoints()
  635. vend.Icon.Texture = vend.Icon:CreateTexture(nil, "ARTWORK")
  636. vend.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,160,-40)
  637. vend.Icon.Texture:SetSize(40,40)
  638. vend.Icon.Texture:SetTexture("Interface\\Icons\\ability_rogue_deadliness")
  639. vend.Icon.Border = CreateFrame("Frame", nil, vend.Icon)
  640. vend.Icon.Border:SetAllPoints()
  641. vend.Icon.Border.Texture = vend.Icon.Border:CreateTexture(nil, Border)
  642. vend:RegisterEvent("UNIT_AURA")
  643. vend:SetScript("OnEvent", function(self, event, unit)
  644. vend.CheckAura(unit)
  645. end)
  646. function vend.CheckAura(unit)
  647. local spellname = GetSpellInfo(79140)
  648. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitDebuff("target", spellname)
  649. if id and unitCaster == "player" then
  650. vend:Show()
  651. vend:SetCooldown(expirationTime - duration - 0.5, duration)
  652. return
  653. end
  654. vend:Hide()
  655. end
  656. --rupture tracker
  657. local rupt = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
  658. rupt:SetDrawEdge(false)
  659. rupt:ClearAllPoints()
  660. rupt:SetPoint("BOTTOMRIGHT",PlayerFrame,160,40)
  661. rupt:SetSize(40,40)
  662. rupt.Icon = CreateFrame("Frame", nil, rupt)
  663. rupt.Icon:SetFrameLevel(rupt:GetFrameLevel() - 1)
  664. rupt:SetFrameStrata("HIGH")
  665. rupt.Icon:SetAllPoints()
  666. rupt.Icon.Texture = rupt.Icon:CreateTexture(nil, "ARTWORK")
  667. rupt.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,160,40)
  668. rupt.Icon.Texture:SetSize(40,40)
  669. rupt.Icon.Texture:SetTexture("Interface\\Icons\\ability_rogue_rupture")
  670. rupt.Icon.Border = CreateFrame("Frame", nil, rupt.Icon)
  671. rupt.Icon.Border:SetAllPoints()
  672. rupt.Icon.Border.Texture = rupt.Icon.Border:CreateTexture(nil, Border)
  673. rupt:RegisterEvent("UNIT_AURA")
  674. rupt:SetScript("OnEvent", function(self, event, unit)
  675. rupt.CheckAura(unit)
  676. end)
  677. function rupt.CheckAura(unit)
  678. local spellname = GetSpellInfo(1943)
  679. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitDebuff("target", spellname)
  680. if id and unitCaster == "player" then
  681. rupt:Show()
  682. rupt:SetCooldown(expirationTime - duration - 0.5, duration)
  683. return
  684. end
  685. rupt:Hide()
  686. end
  687. --strike tracker
  688. local strike = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
  689. strike:SetDrawEdge(false)
  690. strike:ClearAllPoints()
  691. strike:SetPoint("BOTTOMRIGHT",PlayerFrame,160,40)
  692. strike:SetSize(40,40)
  693. strike.Icon = CreateFrame("Frame", nil, strike)
  694. strike.Icon:SetFrameLevel(strike:GetFrameLevel() - 1)
  695. strike:SetFrameStrata("HIGH")
  696. strike.Icon:SetAllPoints()
  697. strike.Icon.Texture = strike.Icon:CreateTexture(nil, "ARTWORK")
  698. strike.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,160,40)
  699. strike.Icon.Texture:SetSize(40,40)
  700. strike.Icon.Texture:SetTexture("Interface\\Icons\\inv_sword_97")
  701. strike.Icon.Border = CreateFrame("Frame", nil, strike.Icon)
  702. strike.Icon.Border:SetAllPoints()
  703. strike.Icon.Border.Texture = strike.Icon.Border:CreateTexture(nil, Border)
  704. strike:RegisterEvent("UNIT_AURA")
  705. strike:SetScript("OnEvent", function(self, event, unit)
  706. strike.CheckAura(unit)
  707. end)
  708. function strike.CheckAura(unit)
  709. local spellname = GetSpellInfo(84617)
  710. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitDebuff("target", spellname)
  711. if id and unitCaster == "player" then
  712. strike:Show()
  713. strike:SetCooldown(expirationTime - duration - 0.5, duration)
  714. return
  715. end
  716. strike:Hide()
  717. end
  718. end
  719.  
  720. --combat script
  721. if (Combat == 1) then
  722. 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()
  723. 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)
  724. 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()
  725. 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)
  726. end
  727.  
  728.  --SDB fix
  729. if (ShadowDanceBar == 1) then
  730. local shadowdancebar = 2 -- внимание! это номер панели для шд
  731. local f = CreateFrame('frame', 'myownstatedriver', UIParent, 'SecureHandlerStateTemplate')
  732. for i=1,12 do f:SetFrameRef('ActionButton'..i, _G['ActionButton'..i]) end
  733. f:Execute([[ buttons = table.new() for i = 1, 12 do table.insert(buttons, self:GetFrameRef('ActionButton'..i)) end ]])
  734. f:SetAttribute('_onstate-page', [[  for i, button in ipairs(buttons) do button:SetAttribute('actionpage', tonumber(newstate)) end ]])
  735. local getBar = function()
  736.     local class, spec = select(2, UnitClass('player')), GetSpecialization()
  737.     local pages = {
  738.         ['DRUID'] = '[bonusbar:1,nostealth] 7; [bonusbar:1,stealth] 8; [bonusbar:2] 8; [bonusbar:3] 9; [bonusbar:4] 10;',        
  739.         ['WARRIOR'] = '[bonusbar:1] 7; [bonusbar:2] 8; [bonusbar:3] 9;',
  740.         ['PRIEST'] = '[bonusbar:1] 7;',
  741.         ['ROGUE'] = '[form:1][form:'..(spec==3 and 3 or 2)..',stealth] 7; [form:'..(spec==3 and 3 or 2)..',nostealth]'..shadowdancebar..';',
  742.         ['WARLOCK'] = '[form:2] 10;',
  743.         ['MONK'] = '[form:1] '..(spec == 1 and 8 or spec == 2 and 9 or spec == 3 and 7 or 9)..'; [form:2] 7;',
  744.         ['DEFAULT'] = '[vehicleui] 12; [bar:2] 2; [bar:3] 3; [bar:4] 4; [bar:5] 5; [bar:6] 6;',
  745.     }
  746.     local condition, page = pages['DEFAULT'], pages[class]
  747.     if page then condition = condition..' '..page end
  748.     condition = condition..' 1'
  749.     return condition
  750. end
  751. RegisterStateDriver(f, 'page', getBar())
  752. end
  753.  
  754. --interrupt announcer
  755. if (InterruptA == 1) then
  756. local f = CreateFrame("Frame")
  757. local function Update(self, event, ...)
  758.         if event == "COMBAT_LOG_EVENT_UNFILTERED" then     
  759.         local timestamp, eventType, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, _, spellID, spellName, _, extraskillID, extraSkillName = ...
  760.         if eventType == "SPELL_INTERRUPT" and sourceName == UnitName("player") then
  761.             SendChatMessage("Interrupted >> "..GetSpellLink(extraskillID).."!", "SAY")
  762.         end
  763.     end
  764. end
  765. f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
  766. f:SetScript("OnEvent", Update)
  767. end
  768.  
  769. -- Class colors in arena frames
  770.  
  771. if (cArenas == 1) then
  772. local frame = CreateFrame("FRAME")
  773. frame:RegisterEvent("PLAYER_ENTERING_WORLD")
  774. frame:RegisterEvent("PARTY_MEMBERS_CHANGED")
  775. frame:RegisterEvent("PLAYER_TARGET_CHANGED")
  776. frame:RegisterEvent("PLAYER_FOCUS_CHANGED")
  777. frame:RegisterEvent("ARENA_OPPONENT_UPDATE")
  778. frame:RegisterEvent("PLAYER_CONTROL_GAINED")
  779. frame:RegisterEvent("PLAYER_CONTROL_LOST")
  780. frame:RegisterEvent("ADDON_LOADED");
  781. local function DoArenaColorHook()
  782.         hooksecurefunc("ArenaEnemyFrame_Unlock",
  783.                 function(self)
  784.                         local color=RAID_CLASS_COLORS[select(2,UnitClass(self.unit)) or ""]
  785.                         if color then
  786.                                 self.healthbar:SetStatusBarColor(color.r,color.g,color.b)
  787.                                 self.healthbar.lockColor=true
  788.                         end                                            
  789.                 end
  790.         )
  791. end
  792. local function eventHandler(self, event, arg, ...)
  793.         if event == "ADDON_LOADED" then
  794.                 if arg == "Blizzard_ArenaUI" then
  795.                         self:UnregisterEvent(event);
  796.                         DoArenaColorHook();
  797.                 end
  798.         end            
  799. end
  800. if IsAddOnLoaded("Blizzard_ArenaUI") then
  801.         DoArenaColorHook();
  802. end
  803. frame:SetScript("OnEvent", eventHandler)
  804. end
  805.  
  806. --DRTracker Warlords of Draenor
  807. if (DRTrackerWoD == 1) then
  808. local DRTracker = CreateFrame("Cooldown", "DRTracker", UIParent)
  809. local DRs = {}
  810. local lastChangedFrame = nil
  811. DRTracker:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
  812. DRTracker:RegisterEvent("ADDON_LOADED")
  813. local spellIds = { -- DR Categories listed here http://eu.battle.net/wow/en/forum/topic/11267997531
  814.     -- Many thanks to those that assisted the creation of the original list from LoseControl.
  815.     -- Categories: Stun (1), Silence (2), Disorient/Fear (3), Incapacitate/Polymorph (4), Roots (5)
  816.     -- Death Knight
  817.     [108194] = "Stun",      -- Asphyxiate
  818.     [115001] = "Stun",      -- Remorseless Winter
  819.     [47476]  = "Silence",       -- Strangulate
  820.     [96294]  = "Root",      -- Chains of Ice (Chilblains)
  821.     -- Death Knight Ghoul
  822.     [91800]  = "Stun",      -- Gnaw
  823.     [91797]  = "Stun",      -- Monstrous Blow (Dark Transformation)
  824.     [91807]  = "Root",      -- Shambling Rush (Dark Transformation)
  825.     -- Druid
  826.     [113801] = "Stun",      -- Bash (Force of Nature - Feral Treants)
  827.     [102795] = "Stun",      -- Bear Hug
  828.     [33786]  = "Disorient",     -- Cyclone
  829.     [99]     = "Incap",     -- Disorienting (Incapacitating) Roar
  830.     [22570]  = "Stun",      -- Maim
  831.     [5211]   = "Stun",      -- Mighty Bash
  832.     [163505]   = "Stun",        -- Rake
  833.     [114238] = "Silence",       -- Fae Silence (Glyph of Fae Silence)
  834.     [81261]  = "Silence",       -- Solar Beam
  835.     [339]    = "Root",      -- Entangling Roots
  836.     [113770] = "Root",      -- Entangling Roots (Force of Nature - Balance Treants)
  837.     [19975]  = "Root",      -- Entangling Roots (Nature's Grasp)
  838.     [45334]  = "Root",      -- Immobilized (Wild Charge - Bear)
  839.     [102359] = "Root",      -- Mass Entanglement
  840.     -- Hunter
  841.     [117526] = "Stun",      -- Binding Shot
  842.     [3355]   = "Incap",     -- Freezing Trap
  843.     [1513]   = "Disorient",     -- Scare Beast
  844.     [19386]  = "Incap",     -- Wyvern Sting
  845.     [34490]  = "Silence",       -- Silencing Shot
  846.     [19185]  = "Root",      -- Entrapment
  847.     [64803]  = "Root",      -- Entrapment
  848.     [128405] = "Root",      -- Narrow Escape
  849.     -- Mage
  850.     [118271] = "Stun",      -- Combustion Impact
  851.     [44572]  = "Stun",      -- Deep Freeze
  852.     [31661]  = "Disorient",     -- Dragon's Breath
  853.     [118]    = "Incap",     -- Polymorph
  854.     [61305]  = "Incap",     -- Polymorph: Black Cat
  855.     [28272]  = "Incap",     -- Polymorph: Pig
  856.     [61721]  = "Incap",     -- Polymorph: Rabbit
  857.     [61780]  = "Incap",     -- Polymorph: Turkey
  858.     [28271]  = "Incap",     -- Polymorph: Turtle
  859.     [82691]  = "Incap",     -- Ring of Frost
  860.     [102051] = "Silence",       -- Frostjaw (also a root)
  861.     [122]    = "Root",      -- Frost Nova
  862.     [111340] = "Root",      -- Ice Ward
  863.     -- Mage Water Elemental
  864.     [33395]  = "Root",      -- Freeze
  865.     -- Monk
  866.     [123393] = "Incap",     -- Breath of Fire (Glyph of Breath of Fire)
  867.     [119392] = "Stun",      -- Charging Ox Wave
  868.     [120086] = "Stun",      -- Fists of Fury
  869.     [119381] = "Stun",      -- Leg Sweep
  870.     [115078] = "Incap",     -- Paralysis
  871.     [137460] = "Incap",     -- Silenced (Ring of Peace)
  872.     [116706] = "Root",      -- Disable
  873.     [123407] = "Root",      -- Spinning Fire Blossom
  874.     -- Paladin
  875.     [105421] = "Disorient",     -- Blinding Light
  876.     [115752] = "Stun",      -- Blinding Light (Glyph of Blinding Light)
  877.     [105593] = "Stun",      -- Fist of Justice
  878.     [853]    = "Stun",      -- Hammer of Justice
  879.     [119072] = "Stun",      -- Holy Wrath
  880.     [20066]  = "Incap",     -- Repentance
  881.     [10326]  = "Disorient",     -- Turn Evil
  882.     [145067] = "Disorient",     -- Turn Evil (Evil is a Point of View)
  883.     [31935]  = "Silence",       -- Avenger's Shield
  884.     -- Priest
  885.     [605]    = "Incap",     -- Dominate Mind
  886.     [88625]  = "Incap",     -- Holy Word: Chastise
  887.     [64044]  = "Incap",     -- Psychic Horror
  888.     [8122]   = "Disorient",     -- Psychic Scream
  889.     [113792] = "Disorient",     -- Psychic Terror (Psyfiend)
  890.     [9484]   = "Disorient",     -- Shackle Undead
  891.     [15487]  = "Silence",       -- Silence
  892.     [87194]  = "Root",      -- Glyph of Mind Blast
  893.     [114404] = "Root",      -- Void Tendril's Grasp
  894.     -- Rogue
  895.     [2094]   = "Disorient",     -- Blind
  896.     [1833]   = "Stun",      -- Cheap Shot
  897.     [1776]   = "Incap",     -- Gouge
  898.     [408]    = "Stun",      -- Kidney Shot
  899.     [6770]   = "Incap",     -- Sap
  900.     [1330]   = "Silence",       -- Garrote - Silence
  901.     -- Shaman
  902.     [51514]  = "Incap",     -- Hex
  903.     [118905] = "Stun",      -- Static Charge (Capacitor Totem)
  904.     [64695]  = "Root",      -- Earthgrab (Earthgrab Totem)
  905.     [63685]  = "Root",      -- Freeze (Frozen Power)
  906.     -- Shaman Primal Earth Elemental
  907.     [118345] = "Stun",      -- Pulverize
  908.     -- Warlock
  909.     [710]    = "Incap",     -- Banish
  910.     [137143] = "Incap",     -- Blood Horror
  911.     [5782]   = "Disorient",     -- Fear
  912.     [118699] = "Disorient",     -- Fear
  913.     [130616] = "Disorient",     -- Fear (Glyph of Fear)
  914.     [5484]   = "Disorient",     -- Howl of Terror
  915.     [22703]  = "Stun",      -- Infernal Awakening
  916.     [6789]   = "Incap",     -- Mortal Coil
  917.     [132412] = "Disorient",     -- Seduction (Grimoire of Sacrifice)
  918.     [30283]  = "Stun",      -- Shadowfury
  919.     [132409] = "Silence",       -- Spell Lock (Grimoire of Sacrifice)
  920.     [31117]  = "Silence",       -- Unstable Affliction
  921.     -- Warlock Pets
  922.     [89766]  = "Stun",      -- Axe Toss (Felguard/Wrathguard)
  923.     [115268] = "Disorient",     -- Mesmerize (Shivarra)
  924.     [6358]   = "Disorient",     -- Seduction (Succubus)
  925.     [115782] = "Silence",       -- Optical Blast (Observer)
  926.     [24259]  = "Silence",       -- Spell Lock (Felhunter)
  927.     -- Warrior
  928.     --[7922]   = "Root",        -- Charge Stun
  929.     [5246]   = "Disorient",     -- Intimidating Shout (aoe)
  930.     [20511]  = "Disorient",     -- Intimidating Shout (targeted)
  931.     [132168] = "Stun",      -- Shockwave
  932.     [107570] = "Stun",      -- Storm Bolt
  933.     [132169] = "Stun",      -- Storm Bolt
  934.     [18498]  = "Silence",       -- Silenced - Gag Order (PvE only)
  935.     [107566] = "Root",      -- Staggering Shout
  936.     [105771] = "Root",      -- Warbringer
  937.     -- Other
  938.     [107079] = "Incap",     -- Quaking Palm
  939.     [13327]  = "Stun",      -- Reckless Charge
  940.     [20549]  = "Stun",      -- War Stomp
  941.     [25046]  = "Silence",       -- Arcane Torrent (Energy)
  942.     [28730]  = "Silence",       -- Arcane Torrent (Mana)
  943.     [50613]  = "Silence",       -- Arcane Torrent (Runic Power)
  944.     [69179]  = "Silence",       -- Arcane Torrent (Rage)
  945.     [80483]  = "Silence",       -- Arcane Torrent (Focus)
  946.     [129597] = "Silence",       -- Arcane Torrent (Chi)
  947.     [39965]  = "Root",      -- Frost Grenade
  948.     [55536]  = "Root",      -- Frostweave Net
  949.     [13099]  = "Root",      -- Net-o-Matic
  950. }
  951.  
  952. function DRTracker:GetSpellCategory(spellID) -- Returns CC category of the spellIDs listed above
  953.     return spellID and spellIds[spellID] or nil
  954. end
  955.  
  956. function DRTracker:OnEvent(event, ...) -- Runs things, and stuff.
  957.     self[event](self, ...)
  958. end
  959. DRTracker:SetScript("OnEvent", DRTracker.OnEvent)
  960.  
  961. function DRTracker:ADDON_LOADED(addonName) -- Anchor DR trackers
  962.     if addonName == "Blizzard_ArenaUI" then
  963.         local arenaFrame
  964.         for i = 1, 5 do
  965.         arenaFrame = "ArenaEnemyFrame"..i
  966.         --local loc = -30 -- (Depreciated) Distance between the left edge of each frame. Should match the width of the frame.
  967.             for j = 1, 5 do
  968.                 local DR = CreateFrame("Frame", arenaFrame.."DR"..j, ArenaEnemyFrames)
  969.                 DR:ClearAllPoints()
  970.                 DR:SetPoint("BOTTOMRIGHT", arenaFrame, "TOPLEFT", 0, -10)
  971.                 DR:SetSize(24, 24) -- (Width, Height) of each frame. A perfect square is preferable, otherwise the spell icon will look stretched.
  972.                 DR.border = DR:CreateTexture(nil, "LOW")
  973.                 DR.border:SetAllPoints()
  974.                 DR.border:SetTexture("Interface\\BUTTONS\\UI-Quickslot-Depress.png")
  975.                 DR.icon = DR:CreateTexture(nil, "BACKGROUND")
  976.                 DR.shown = false
  977.                 DR.severity = 1
  978.                 DR.unit = i
  979.                 DR.cate = j
  980.                 DR.applied = 0
  981.                 DR.sweep = CreateFrame("Cooldown", nil, DR, "CooldownFrameTemplate")
  982.                 DR.sweep:ClearAllPoints()
  983.                 DR.sweep:SetAllPoints(DR)
  984.                 local function OnShow(self)
  985.                     local curX = 0
  986.                     for b=1,5 do
  987.                         local curFrame = DRs["arena"..DR.unit..b]
  988.                         if curFrame.shown == true and b ~= self.cate then
  989.                             curX = curX - 30
  990.                         end
  991.                     end
  992.                     self:ClearAllPoints()
  993.                     self:SetPoint("BOTTOMRIGHT", "ArenaEnemyFrame"..self.unit, "TOPLEFT", curX, -10)
  994.                     self.shown = true
  995.                     self.applied = GetTime()
  996.                 end
  997.                 DR:HookScript("OnShow", OnShow)
  998.  
  999.                 local function OnHide(self)
  1000.                     for b = 1,5 do
  1001.                         local curFrame = DRs["arena"..self.unit..b]
  1002.                         if curFrame and curFrame.shown == true and curFrame.applied > self.applied then
  1003.                             local _, _, _, x = curFrame:GetPoint(1)
  1004.                             curFrame:ClearAllPoints()
  1005.                             curFrame:SetPoint("BOTTOMRIGHT", "ArenaEnemyFrame"..curFrame.unit, "TOPLEFT", x+30, -10)
  1006.                         end
  1007.                     end
  1008.                     self:ClearAllPoints()
  1009.                     self:SetPoint("BOTTOMRIGHT", "ArenaEnemyFrame"..self.unit, "TOPLEFT", 0, -10)
  1010.                 end
  1011.                 DR:HookScript("OnHide", OnHide)
  1012.                
  1013.                 local function DREnd(self, elapsed)
  1014.                     if self.sweep:GetCooldownDuration() == 0 and self.shown == true then
  1015.                         self:Hide()
  1016.                         self.shown = false
  1017.                         self.severity = 1
  1018.                     end
  1019.                 end
  1020.                 DR:HookScript("OnUpdate", DREnd)
  1021.                
  1022.                 DR:Hide()
  1023.                 DRs["arena"..i..j] = DR
  1024.             end
  1025.         end
  1026.     end
  1027. end
  1028.  
  1029. function DRTracker:SetTexture(Frame, spellID) -- Sets displayed icon to last spell.
  1030.     if Frame.shown == true then
  1031.         Frame.dur = Frame.sweep:GetCooldownDuration()
  1032.         Frame:Hide()
  1033.     end
  1034.     lastChangedFrame = Frame
  1035.     local _, _, icon, _, _, _, _, _, _ = GetSpellInfo(spellID)
  1036.     Frame.icon:ClearAllPoints()
  1037.     Frame.icon:SetAllPoints()
  1038.     Frame.icon:SetTexture(icon)
  1039.     Frame:Show()
  1040.     if Frame.severity == 1 then
  1041.         Frame.border:SetVertexColor(1, 1, 0, 1)
  1042.         Frame.severity = 2
  1043.     elseif Frame.severity == 2 then
  1044.         Frame.border:SetVertexColor(1, .4, 0, 1)
  1045.         Frame.severity = 3
  1046.     elseif Frame.severity == 3 then
  1047.         Frame.border:SetVertexColor(1, 0, 0, 1)
  1048.     end
  1049. end
  1050.  
  1051. function DRTracker:TimerStart(GUID, spellID, spellName) -- Primary function; begins CD sweep and icon updates. Not a good idea to edit any of this.
  1052.     local _, instanceType = IsInInstance()
  1053.     if instanceType ~= "arena" then
  1054.         return
  1055.     end
  1056.     local cat = DRTracker:GetSpellCategory(spellID)
  1057.     if(UnitGUID("arena1") == GUID) then
  1058.         local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff("arena1", spellName)
  1059.         if(cat=="Stun") then
  1060.             DRTracker:SetTexture(DRs["arena1"..1], spellID)
  1061.             CooldownFrame_SetTimer(DRs["arena1"..1].sweep, GetTime(), 17+duration, 1)
  1062.         elseif(cat=="Silence") then
  1063.             DRTracker:SetTexture(DRs["arena1"..2], spellID)
  1064.             CooldownFrame_SetTimer(DRs["arena1"..2].sweep, GetTime(), 17+duration, 1)
  1065.         elseif(cat=="Disorient") then
  1066.             DRTracker:SetTexture(DRs["arena1"..3], spellID)
  1067.             CooldownFrame_SetTimer(DRs["arena1"..3].sweep, GetTime(), 17+duration, 1)
  1068.         elseif(cat=="Incap") then
  1069.             DRTracker:SetTexture(DRs["arena1"..4], spellID)
  1070.             CooldownFrame_SetTimer(DRs["arena1"..4].sweep, GetTime(), 17+duration, 1)
  1071.         else
  1072.             DRTracker:SetTexture(DRs["arena1"..5], spellID)
  1073.             CooldownFrame_SetTimer(DRs["arena1"..5].sweep, GetTime(), 17+duration, 1)
  1074.         end
  1075.     elseif(UnitGUID("arena2") == GUID) then
  1076.     local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff("arena2", spellName)
  1077.         if(cat=="Stun") then
  1078.             DRTracker:SetTexture(DRs["arena2"..1], spellID)
  1079.             CooldownFrame_SetTimer(DRs["arena2"..1].sweep, GetTime(), 17+duration, 1)
  1080.         elseif(cat=="Silence") then
  1081.             DRTracker:SetTexture(DRs["arena2"..2], spellID)
  1082.             CooldownFrame_SetTimer(DRs["arena2"..2].sweep, GetTime(), 17+duration, 1)
  1083.         elseif(cat=="Disorient") then
  1084.             DRTracker:SetTexture(DRs["arena2"..3], spellID)
  1085.             CooldownFrame_SetTimer(DRs["arena2"..3].sweep, GetTime(), 17+duration, 1)
  1086.         elseif(cat=="Incap") then
  1087.             DRTracker:SetTexture(DRs["arena2"..4], spellID)
  1088.             CooldownFrame_SetTimer(DRs["arena2"..4].sweep, GetTime(), 17+duration, 1)
  1089.         else
  1090.             DRTracker:SetTexture(DRs["arena2"..5], spellID)
  1091.             CooldownFrame_SetTimer(DRs["arena2"..5].sweep, GetTime(), 17+duration, 1)
  1092.         end
  1093.     elseif(UnitGUID("arena3") == GUID) then
  1094.     local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff("arena3", spellName)
  1095.         if(cat=="Stun") then
  1096.             DRTracker:SetTexture(DRs["arena3"..1], spellID)
  1097.             CooldownFrame_SetTimer(DRs["arena3"..1].sweep, GetTime(), 17+duration, 1)
  1098.         elseif(cat=="Silence") then
  1099.             DRTracker:SetTexture(DRs["arena3"..2], spellID)
  1100.             CooldownFrame_SetTimer(DRs["arena3"..2].sweep, GetTime(), 17+duration, 1)
  1101.         elseif(cat=="Disorient") then
  1102.             DRTracker:SetTexture(DRs["arena3"..3], spellID)
  1103.             CooldownFrame_SetTimer(DRs["arena3"..3].sweep, GetTime(), 17+duration, 1)
  1104.         elseif(cat=="Incap") then
  1105.             DRTracker:SetTexture(DRs["arena3"..4], spellID)
  1106.             CooldownFrame_SetTimer(DRs["arena3"..4].sweep, GetTime(), 17+duration, 1)
  1107.         else
  1108.             DRTracker:SetTexture(DRs["arena3"..5], spellID)
  1109.             CooldownFrame_SetTimer(DRs["arena3"..5].sweep, GetTime(), 17+duration, 1)
  1110.         end
  1111.     elseif(UnitGUID("arena4") == GUID) then
  1112.     local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff("arena4", spellName)
  1113.         if(cat=="Stun") then
  1114.             DRTracker:SetTexture(DRs["arena4"..1], spellID)
  1115.             CooldownFrame_SetTimer(DRs["arena4"..1].sweep, GetTime(), 17+duration, 1)
  1116.         elseif(cat=="Silence") then
  1117.             DRTracker:SetTexture(DRs["arena4"..2], spellID)
  1118.             CooldownFrame_SetTimer(DRs["arena4"..2].sweep, GetTime(), 17+duration, 1)
  1119.         elseif(cat=="Disorient") then
  1120.             DRTracker:SetTexture(DRs["arena4"..3], spellID)
  1121.             CooldownFrame_SetTimer(DRs["arena4"..3].sweep, GetTime(), 17+duration, 1)
  1122.         elseif(cat=="Incap") then
  1123.             DRTracker:SetTexture(DRs["arena4"..4], spellID)
  1124.             CooldownFrame_SetTimer(DRs["arena4"..4].sweep, GetTime(), 17+duration, 1)
  1125.         else
  1126.             DRTracker:SetTexture(DRs["arena4"..5], spellID)
  1127.             CooldownFrame_SetTimer(DRs["arena4"..5].sweep, GetTime(), 17+duration, 1)
  1128.         end
  1129.     elseif(UnitGUID("arena5") == GUID) then
  1130.         local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff("arena5", spellName)
  1131.         if(cat=="Stun") then
  1132.             DRTracker:SetTexture(DRs["arena5"..1], spellID)
  1133.             CooldownFrame_SetTimer(DRs["arena5"..1].sweep, GetTime(), 17+duration, 1)
  1134.         elseif(cat=="Silence") then
  1135.             DRTracker:SetTexture(DRs["arena5"..2], spellID)
  1136.             CooldownFrame_SetTimer(DRs["arena5"..2].sweep, GetTime(), 17+duration, 1)
  1137.         elseif(cat=="Disorient") then
  1138.             DRTracker:SetTexture(DRs["arena5"..3], spellID)
  1139.             CooldownFrame_SetTimer(DRs["arena5"..3].sweep, GetTime(), 17+duration, 1)
  1140.         elseif(cat=="Incap") then
  1141.             DRTracker:SetTexture(DRs["arena5"..4], spellID)
  1142.             CooldownFrame_SetTimer(DRs["arena5"..4].sweep, GetTime(), 17+duration, 1)
  1143.         else
  1144.             DRTracker:SetTexture(DRs["arena5"..5], spellID)
  1145.             CooldownFrame_SetTimer(DRs["arena5"..5].sweep, GetTime(), 17+duration, 1)
  1146.         end
  1147.     end
  1148.     return
  1149. end
  1150.  
  1151. function DRTracker:GetDRs()
  1152.     return DRTracker and DRs
  1153. end
  1154.  
  1155. function DRTracker:COMBAT_LOG_EVENT_UNFILTERED(timeStamp, eventType, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, spellID, spellName, spellSchool, auraType)
  1156.     if eventType == "SPELL_AURA_APPLIED" or eventType == "SPELL_AURA_REFRESH" then -- Crowd control landed, time to do stuff.
  1157.         if auraType == "DEBUFF" and DRTracker:GetSpellCategory(spellID) then
  1158.             DRTracker:TimerStart(destGUID, spellID, spellName)
  1159.         end
  1160.     end
  1161. end
  1162. end
  1163. print("Autoscript v6.0.3 loaded!\n\n\n")
  1164. --config//
  1165. local EnemyCooldowns = 1
  1166. local FCTtweaks = 1
  1167. local Macro = 1
  1168. local LoCRemover = 1
  1169. local ArenaTrinkets = 1
  1170. local RogueDR = 1
  1171. local Combat = 1
  1172. local UnitFrames = 1
  1173. local ShadowDanceBar = 0
  1174. local InterruptA = 1
  1175. local cArenas = 1
  1176. local DRTrackerWoD = 1
  1177. --//config
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183. --enemy cooldowns
  1184. if (EnemyCooldowns == 1) then
  1185. local frame = CreateFrame("FRAME", "EnemyCooldowns")
  1186. frame:RegisterEvent("PLAYER_ENTERING_WORLD")
  1187. local function eventHandler(self, event, ...)
  1188. USS="UNIT_SPELLCAST_SUCCEEDED";OE="OnEvent";F="Frame";CF=CreateFrame;BO="Border";xb=630;yb=320;sb=24;ib=1;ii=1  
  1189. 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
  1190. 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
  1191. 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
  1192. --rogue
  1193. 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);
  1194. 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);
  1195. 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);
  1196. 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);
  1197. 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);
  1198. 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);
  1199. 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);
  1200. 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);
  1201. 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);
  1202. 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);
  1203. --warlock
  1204. 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);
  1205. 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);
  1206. 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);
  1207. 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);
  1208. 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);
  1209. 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);
  1210. 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);
  1211. 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);
  1212. 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);
  1213. --mage
  1214. 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);
  1215. 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);
  1216. 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);
  1217. 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);
  1218. 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);
  1219. 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);
  1220. --dk
  1221. 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);
  1222. 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);
  1223. 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);
  1224. 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);
  1225. 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);
  1226. 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);
  1227. 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);
  1228. 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);
  1229. 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);
  1230. 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);
  1231. --priest
  1232. 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);
  1233. 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);
  1234. 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);
  1235. 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);
  1236. 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);
  1237. 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);
  1238. --paladin
  1239. 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);
  1240. 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);
  1241. 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);
  1242. 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);
  1243. 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);
  1244. 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);
  1245. 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);
  1246. 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);
  1247. --warrior
  1248. 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);
  1249. 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);
  1250. 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);
  1251. 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);
  1252. 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);
  1253. 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);
  1254. 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);
  1255. 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);
  1256. 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);
  1257. 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);
  1258. 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);
  1259. --druid
  1260. 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);
  1261. 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);
  1262. 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);
  1263. 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);
  1264. 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);
  1265. 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);
  1266. 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);
  1267. 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);
  1268. 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);
  1269. 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);
  1270. 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);
  1271. --shaman
  1272. 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);
  1273. 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);
  1274. 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);
  1275. 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);
  1276. 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);
  1277. 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);
  1278. 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);
  1279. 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);
  1280. 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);
  1281. 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);
  1282. 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);
  1283. --hunter
  1284. 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);
  1285. 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);
  1286. 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);
  1287. 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);
  1288. 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);
  1289. --monk
  1290. 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);
  1291. 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);
  1292. 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);
  1293. end
  1294. frame:SetScript("OnEvent", eventHandler)
  1295. end
  1296.  
  1297. --FCTtweaks
  1298. if (FCTtweaks == 1) then
  1299. local frame = CreateFrame("FRAME", "DefaultUIScrips")
  1300. frame:RegisterEvent("PLAYER_ENTERING_WORLD")
  1301.      local function eventHandler(self, event, ...)
  1302.        -- LARGE_NUMBER_SEPERATOR = ""
  1303.        SetCVar('BreakUpLargeNumbers', 0)
  1304.         COMBAT_TEXT_HEIGHT = 20;
  1305.         COMBAT_TEXT_SCROLLSPEED = 3.0
  1306.         --UIErrorsFrame:UnregisterEvent("UI_ERROR_MESSAGE")
  1307.         UIErrorsFrame:SetScale(0.7)
  1308.         COMBAT_TEXT_TYPE_INFO.PERIODIC_HEAL_ABSORB.show = nil
  1309.         --COMBAT_TEXT_TYPE_INFO.PERIODIC_HEAL.show = nil
  1310.         --COMBAT_TEXT_TYPE_INFO.PERIODIC_HEAL_CRIT.show = nil
  1311.         --COMBAT_TEXT_TYPE_INFO.HEAL_CRIT.show = nil
  1312.         --COMBAT_TEXT_TYPE_INFO.HEAL.show = nil
  1313.         COMBAT_TEXT_TYPE_INFO.HEAL_CRIT_ABSORB.show = nil
  1314.         COMBAT_TEXT_TYPE_INFO.HEAL_ABSORB.show = nil
  1315.         COMBAT_TEXT_TYPE_INFO.ABSORB.show = nil
  1316.         COMBAT_TEXT_TYPE_INFO.SPELL_ABSORB.show = nil
  1317.         COMBAT_TEXT_TYPE_INFO["ENTERING_COMBAT"].r = 1
  1318.         COMBAT_TEXT_TYPE_INFO["ENTERING_COMBAT"].g = 0.82
  1319.         COMBAT_TEXT_TYPE_INFO["ENTERING_COMBAT"].b = 0
  1320.         COMBAT_TEXT_TYPE_INFO["LEAVING_COMBAT"].r = 1
  1321.         COMBAT_TEXT_TYPE_INFO["LEAVING_COMBAT"].g = 0.82
  1322.         COMBAT_TEXT_TYPE_INFO["LEAVING_COMBAT"].b = 0
  1323.         PlayerHitIndicator:SetFont("Fonts\\font.ttf",30)  
  1324.         ENTERING_COMBAT = "+Combat"
  1325.         LEAVING_COMBAT = "-Combat"     
  1326. end
  1327. frame:SetScript("OnEvent", eventHandler)
  1328. --combat text font
  1329. local fontName = "Fonts\\font1.ttf"
  1330. local fontHeight = 25
  1331. local fFlags = ""
  1332. local function FS_SetFont()
  1333.     DAMAGE_TEXT_FONT = fontName
  1334.     COMBAT_TEXT_HEIGHT = fontHeight
  1335.     COMBAT_TEXT_CRIT_MAXHEIGHT = fontHeight + 1
  1336.     COMBAT_TEXT_CRIT_MINHEIGHT = fontHeight - 1
  1337.     local fName, fHeight, fFlags = CombatTextFont:GetFont()
  1338.     CombatTextFont:SetFont(fontName, fontHeight, fFlags)
  1339. end
  1340. FS_SetFont()
  1341. --combat text location
  1342. local f = CreateFrame("FRAME");
  1343. f:SetScript("OnEvent", function(self,event,...)
  1344. local arg1 =...;        
  1345.      if (arg1=="Blizzard_CombatText") then
  1346.         f:UnregisterEvent("ADDON_LOADED");
  1347.         hooksecurefunc("CombatText_UpdateDisplayedMessages",
  1348.         function ()
  1349.         COMBAT_TEXT_LOCATIONS =
  1350.         {startX  = 0,
  1351.         --startY = 384 * COMBAT_TEXT_Y_SCALE, endX =0,endY = 159 * COMBAT_TEXT_Y_SCALE};
  1352.         startY = 164 * COMBAT_TEXT_Y_SCALE, endX =0,endY = 80 * COMBAT_TEXT_Y_SCALE};
  1353.         end)end end)
  1354. f:RegisterEvent("ADDON_LOADED");
  1355. end
  1356.  
  1357. --macro/binds
  1358. if (Macro == 1) then
  1359. --[[hooksecurefunc('ActionButton_UpdateHotkeys', function(self)
  1360.     local macro, hotkey = _G[self:GetName()..'Name'], _G[self:GetName()..'HotKey']
  1361.     if macro and hotkey then macro:Hide() hotkey:Hide() end
  1362. end) ]]--
  1363. hooksecurefunc('ActionButton_UpdateHotkeys', function(self)
  1364.     local macro = _G[self:GetName()..'Name']
  1365.     if macro then macro:Hide() end
  1366. end)
  1367. end
  1368.  
  1369. --unit farmes tweaks
  1370. if (UnitFrames == 1) then
  1371. MainMenuBarLeftEndCap:SetAlpha(0)
  1372. MainMenuBarRightEndCap:SetAlpha(0)
  1373. for i=0,3 do _G["MainMenuBarTexture"..i]:SetAlpha(0)end
  1374. for i=0,3 do _G["MainMenuMaxLevelBar"..i]:SetAlpha(0)end
  1375. CompactRaidFrameContainer:SetScale(0.85)
  1376. ObjectiveTrackerFrame:SetScale(0.75)
  1377. ObjectiveTrackerBlocksFrame.QuestHeader:SetAlpha(0)
  1378. hooksecurefunc("PlayerFrame_ResetPosition", function(self)
  1379.  self:ClearAllPoints()
  1380.  self:SetPoint("CENTER", -370, 70)
  1381.  TargetFrame:ClearAllPoints()
  1382.  TargetFrame:SetPoint("BOTTOMRIGHT",PlayerFrame,100,-45)
  1383.  FocusFrame:ClearAllPoints()
  1384.  FocusFrame:SetPoint("BOTTOMRIGHT",PlayerFrame,750,0)
  1385. end)
  1386.  StanceButton1:ClearAllPoints()
  1387.  StanceButton1:SetPoint("BOTTOMLEFT",MultiBarBottomLeftButton2,-500,0)
  1388.  StanceButton1.SetPoint = function() end
  1389. --player frame tweaks
  1390. hooksecurefunc("PlayerFrame_UpdateStatus", function()
  1391. if IsResting("player") then PlayerStatusTexture:Hide()PlayerRestIcon:Hide()PlayerRestGlow:Hide()PlayerStatusGlow:Hide()
  1392. elseif PlayerFrame.inCombat then PlayerStatusTexture:Hide()PlayerAttackIcon:Show()PlayerRestIcon:Hide()PlayerAttackGlow:Hide()
  1393. PlayerRestGlow:Hide()PlayerStatusGlow:Hide()PlayerAttackBackground:Hide() end end)
  1394. -- background tweaks
  1395. hooksecurefunc('TargetFrame_CheckFaction', function(self)
  1396.   if ( not UnitPlayerControlled(self.unit)
  1397.   and UnitIsTapped(self.unit)
  1398.   and not UnitIsTappedByPlayer(self.unit)
  1399.   and not UnitIsTappedByAllThreatList(self.unit) ) then
  1400.     self.nameBackground:SetVertexColor(0.0, 0.0, 0.0, 0.5);
  1401.     if ( self.portrait ) then
  1402.       self.portrait:SetVertexColor(0.5, 0.5, 0.5);
  1403.     end
  1404.   else
  1405.     self.nameBackground:SetVertexColor(0.0, 0.0, 0.0, 0.5);
  1406.     if ( self.portrait ) then
  1407.       self.portrait:SetVertexColor(1.0, 1.0, 1.0);
  1408.     end
  1409.   end  
  1410. end)
  1411. -- hp
  1412. local f=function(v)if(v>=1e4) then return ('%.1fk'):format(v/1e3):gsub('%.?0+([km])$','%1')  else return v end end
  1413.         hooksecurefunc("TextStatusBar_UpdateTextString",function(s)
  1414.         if not GetCVarBool("statusTextPercentage") then
  1415.             if s.TextString and s.currValue then
  1416.             s.TextString:SetText(f(s.currValue))           
  1417.           end
  1418.      end
  1419. end)
  1420. local hptext = TargetFrameHealthBar:CreateFontString("TargetHealthPercentageFontString", "OVERLAY")
  1421. hptext:SetPoint("RIGHT", TargetFrameHealthBar, "RIGHT", 28, 0)
  1422. hptext:SetFont("Fonts\\font.ttf", 12, "OUTLINE")
  1423. hptext:SetShadowColor(0,0,0)
  1424. hptext:SetShadowOffset(1,-1)
  1425. hptext:SetTextColor(0.1,1.0,0.1)
  1426. hptext:SetJustifyH("RIGHT")
  1427.  
  1428. TargetFrameHealthBar:RegisterEvent("PLAYER_TARGET_CHANGED")
  1429. TargetFrameHealthBar:RegisterEvent("UNIT_HEALTH")
  1430.  
  1431. TargetFrameHealthBar:SetScript("OnEvent", function (self, event, ...)
  1432.     if ((event == "UNIT_HEALTH") and ((...) ~= "target")) then
  1433.         return
  1434.     end
  1435.     if (UnitIsDeadOrGhost("target")) then
  1436.         hptext:SetText("")
  1437.     else
  1438.         local perc = UnitHealth("target") / UnitHealthMax("target") * 100
  1439.         hptext:SetText(string.format("%u", perc))
  1440.     end
  1441. end)
  1442.  
  1443.  
  1444. --class colored hp bars
  1445. local UnitIsPlayer,UnitIsConnected, UnitClass, RAID_CLASS_COLORS = UnitIsPlayer,UnitIsConnected,UnitClass, RAID_CLASS_COLORS
  1446. local _, class, c
  1447. local function colour(statusbar, unit, name)
  1448.       if UnitIsPlayer(unit) and UnitIsConnected(unit) and unit == statusbar.unit and UnitClass(unit) then
  1449.           _, class = UnitClass(unit) c = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
  1450.           statusbar:SetStatusBarColor(c.r, c.g, c.b)         
  1451.           statusbar = _G["PlayerFrame".."HealthBar"]:SetStatusBarColor(0.1, 1.0, 0.1)--playerframe fix   
  1452.       end    
  1453. end
  1454. hooksecurefunc("UnitFrameHealthBar_Update", colour)
  1455. hooksecurefunc("HealthBar_OnValueChanged", function(self)colour(self, self.unit)end)
  1456. --class colored names
  1457. hooksecurefunc("UnitFrame_Update", function(self)
  1458. if UnitClass(self.unit) then
  1459. local c = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[select(2,UnitClass(self.unit))]
  1460. self.name:SetTextColor(c.r,c.g,c.b,1) self.name:SetFont("Fonts\\font.ttf", 12)end end)
  1461. end
  1462.  
  1463. --Loss-Of-Control Remover
  1464. if (LoCRemover == 1) then
  1465. select(1,LossOfControlFrame:GetRegions()):SetAlpha(0)
  1466. select(2,LossOfControlFrame:GetRegions()):SetAlpha(0)
  1467. select(3,LossOfControlFrame:GetRegions()):SetAlpha(0)
  1468. select(5,LossOfControlFrame:GetRegions()):SetAlpha(0)
  1469. --[[hooksecurefunc("CooldownFrame_SetTimer", function(self)
  1470.     if self.currentCooldownType == COOLDOWN_TYPE_LOSS_OF_CONTROL then
  1471.         self:SetCooldown(0, 0)
  1472.     end
  1473. end)]]--
  1474. hooksecurefunc('CooldownFrame_SetTimer',function(self)
  1475. if self.currentCooldownType == COOLDOWN_TYPE_LOSS_OF_CONTROL then
  1476. self:SetEdgeTexture("Interface\\Cooldown\\cooldown2");
  1477. self:SetCooldown(4500,4500);
  1478. self:SetSwipeColor(0.35,0.25,0.25,0);
  1479. end
  1480. end)
  1481. end
  1482.  
  1483. --arena/bg trinkets
  1484. if (ArenaTrinkets == 1) then
  1485. -- // ArenaTrinkets
  1486. -- // Lorti - 2013
  1487. ArenaTrinkets = CreateFrame("Frame", nil, UIParent)
  1488. function ArenaTrinkets:Initialize()
  1489. for i = 1, MAX_ARENA_ENEMIES do
  1490. local ArenaFrame = _G["ArenaEnemyFrame"..i]
  1491. self:CreateIcon(ArenaFrame)
  1492. end
  1493. end
  1494. function ArenaTrinkets:CreateIcon(frame)
  1495. local trinket = CreateFrame("Cooldown", nil, frame, "CooldownFrameTemplate")
  1496. trinket:SetFrameLevel(frame:GetFrameLevel() + 3)
  1497. trinket:SetDrawEdge(false)
  1498. trinket:ClearAllPoints()
  1499. trinket:SetPoint("LEFT", frame, "RIGHT", 0, -1)
  1500. trinket:SetSize(22, 22)
  1501.  
  1502. trinket.Icon = CreateFrame("Frame", nil, trinket)
  1503. trinket.Icon:SetFrameLevel(trinket:GetFrameLevel() - 1)
  1504. trinket.Icon:SetAllPoints()
  1505. trinket.Icon.Texture = trinket.Icon:CreateTexture(nil, "BORDER")
  1506. trinket.Icon.Texture:SetPoint("TOPLEFT", -3, 2)
  1507. trinket.Icon.Texture:SetSize(24, 24)
  1508. SetPortraitToTexture(trinket.Icon.Texture, UnitFactionGroup('player') == "Horde" and "Interface\\Icons\\inv_jewelry_trinketpvp_02" or "Interface\\Icons\\inv_jewelry_trinketpvp_01")
  1509.  
  1510. trinket.Icon.Border = CreateFrame("Frame", nil, trinket.Icon)
  1511. trinket.Icon.Border:SetFrameLevel(trinket:GetFrameLevel() + 1)
  1512. trinket.Icon.Border:SetAllPoints()
  1513. trinket.Icon.Border.Texture = trinket.Icon.Border:CreateTexture(nil, "ARTWORK")
  1514. trinket.Icon.Border.Texture:SetTexture("Interface\\Minimap\\MiniMap-TrackingBorder")
  1515. if IsAddOnLoaded("Lorti UI") then
  1516. trinket.Icon.Border.Texture:SetVertexColor(.005,.005,.005)
  1517. end
  1518. trinket.Icon.Border.Texture:SetPoint("TOPLEFT", -9, 7)
  1519. trinket.Icon.Border.Texture:SetSize(63, 63)
  1520. local id = frame:GetID()
  1521. self["arena"..id] = trinket
  1522.  
  1523. if ( trinket ) then
  1524. trinket.Icon:SetParent(trinket:GetParent())
  1525. trinket.Icon:SetScale(1)
  1526. trinket.Icon:SetFrameLevel(trinket:GetFrameLevel() - 1)
  1527. else
  1528. for i = 1, MAX_ARENA_ENEMIES do
  1529. trinket.Icon:SetParent(trinket:GetParent())
  1530. trinket.Icon:SetScale(1)
  1531. trinket.Icon:SetFrameLevel(trinket:GetFrameLevel() - 1)
  1532. end
  1533. end
  1534. end
  1535. function ArenaTrinkets:ShowTrinkets()
  1536. for i = 1, MAX_ARENA_ENEMIES do
  1537. self["arena"..i].Icon:Show()
  1538. self["arena"..i]:Show()
  1539. self["arena"..i]:SetCooldown(0, 0)
  1540. end
  1541. end
  1542. function ArenaTrinkets:HideTrinkets()
  1543. for i = 1, MAX_ARENA_ENEMIES do
  1544. self["arena"..i].Icon:Hide()
  1545. self["arena"..i]:Hide()
  1546. self["arena"..i]:SetCooldown(0, 0)
  1547. end
  1548. end
  1549. ArenaTrinkets:SetScript("OnEvent", function(self, event, ...) return self[event](self, ...) end)
  1550. function ArenaTrinkets:UNIT_SPELLCAST_SUCCEEDED(unitID, spell)
  1551. if not ArenaTrinkets[unitID] then return end
  1552.  
  1553. if spell == GetSpellInfo(42292) or spell == GetSpellInfo(59752) then -- Trinket and EMFH
  1554. CooldownFrame_SetTimer(self[unitID], GetTime(), 120, 1)
  1555. elseif spell == GetSpellInfo(7744) then -- WOTF
  1556. CooldownFrame_SetTimer(self[unitID], GetTime(), 30, 1)
  1557. end
  1558. end
  1559. function ArenaTrinkets:PLAYER_ENTERING_WORLD()
  1560. local _, instanceType = IsInInstance()
  1561. if instanceType == "arena" then
  1562. ArenaEnemyFrame1:ClearAllPoints()
  1563. ArenaEnemyFrame1:SetPoint("BOTTOMLEFT", FocusFrame, "BOTTOMLEFT", 0, -30)
  1564. ArenaEnemyFrame1.SetPoint = function() end
  1565. ArenaEnemyFrame2:ClearAllPoints()
  1566. ArenaEnemyFrame2:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -50)
  1567. ArenaEnemyFrame2.SetPoint = function() end
  1568. ArenaEnemyFrame3:ClearAllPoints()
  1569. ArenaEnemyFrame3:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -100)
  1570. ArenaEnemyFrame3.SetPoint = function() end
  1571. ArenaEnemyFrame4:ClearAllPoints()
  1572. ArenaEnemyFrame4:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -150)
  1573. ArenaEnemyFrame4.SetPoint = function() end
  1574. ArenaEnemyFrame5:ClearAllPoints()
  1575. ArenaEnemyFrame5:SetPoint("BOTTOMLEFT", ArenaEnemyFrame1, "BOTTOMLEFT", 0, -200)
  1576. ArenaEnemyFrame5.SetPoint = function() end
  1577. ArenaPrepFrame1:ClearAllPoints()
  1578. ArenaPrepFrame1:SetPoint("BOTTOMLEFT", FocusFrame, "BOTTOMLEFT", 0, -30)
  1579. ArenaPrepFrame1.SetPoint = function() end
  1580. ArenaPrepFrame2:ClearAllPoints()
  1581. ArenaPrepFrame2:SetPoint("TOPRIGHT", ArenaPrepFrame1, "TOPRIGHT", 0, -50)
  1582. ArenaPrepFrame2.SetPoint = function() end
  1583. ArenaPrepFrame3:ClearAllPoints()
  1584. ArenaPrepFrame3:SetPoint("TOPRIGHT", ArenaPrepFrame1, "TOPRIGHT", 0, -100)
  1585. ArenaPrepFrame3.SetPoint = function() end
  1586. ArenaPrepFrame4:ClearAllPoints()
  1587. ArenaPrepFrame4:SetPoint("TOPRIGHT", ArenaPrepFrame1, "TOPRIGHT", 0, -150)
  1588. ArenaPrepFrame4.SetPoint = function() end
  1589. ArenaPrepFrame5:ClearAllPoints()
  1590. ArenaPrepFrame5:SetPoint("TOPRIGHT", ArenaPrepFrame1, "TOPRIGHT", 0, -200)
  1591. ArenaPrepFrame5.SetPoint = function() end
  1592. self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
  1593. ArenaTrinkets:ShowTrinkets()
  1594. SetBinding("TAB", "TARGETNEARESTENEMYPLAYER")
  1595. else
  1596. ArenaTrinkets:HideTrinkets()
  1597. SetBinding("TAB", "TARGETNEARESTENEMY")
  1598. if ( self:IsEventRegistered("UNIT_SPELLCAST_SUCCEEDED") ) then
  1599. self:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED")
  1600. end
  1601. end
  1602. end
  1603. ArenaTrinkets:RegisterEvent("PLAYER_ENTERING_WORLD")
  1604. function ArenaTrinkets:PLAYER_LOGIN()
  1605. if not IsAddOnLoaded("Blizzard_ArenaUI") then
  1606. LoadAddOn("Blizzard_ArenaUI")
  1607. end
  1608. self:Initialize()
  1609. end
  1610. ArenaTrinkets:RegisterEvent("PLAYER_LOGIN")
  1611. end
  1612. --diminishing returns
  1613.  
  1614. --rogue drtracker
  1615. if (RogueDR == 1) then
  1616.     --[[USD="UNIT_SPELLCAST_SUCCEEDED";OT="OnEvent";FR="Frame";RF=CreateFrame;RD="Border";UE=UnitName
  1617. CS=RF(FR) CS.c=RF("Cooldown","CST",CS.t,"CooldownFrameTemplate") CS.c:SetDrawEdge(false)CS:RegisterEvent(USD)
  1618. 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")
  1619. 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)
  1620. SP=RF(FR) SP.c=RF("Cooldown","SAP",SP.t,"CooldownFrameTemplate") SP.c:SetDrawEdge(false) SP:RegisterEvent(USD)
  1621. 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")
  1622. 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)]]--
  1623. -- snd tracker
  1624.  
  1625. local snd = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
  1626. snd:SetDrawEdge(false)
  1627. snd:ClearAllPoints()
  1628. snd:SetPoint("BOTTOMRIGHT",PlayerFrame,120,0)
  1629. snd:SetSize(40,40)
  1630. snd.Icon = CreateFrame("Frame", nil, snd)
  1631. snd.Icon:SetFrameLevel(snd:GetFrameLevel() - 1)
  1632. snd:SetFrameStrata("HIGH")
  1633. snd.Icon:SetAllPoints()
  1634. snd.Icon.Texture = snd.Icon:CreateTexture(nil, "ARTWORK")
  1635. snd.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,120,0)
  1636. snd.Icon.Texture:SetSize(40,40)
  1637. snd.Icon.Texture:SetTexture("Interface\\Icons\\ability_rogue_slicedice")
  1638. snd.Icon.Border = CreateFrame("Frame", nil, snd.Icon)
  1639. snd.Icon.Border:SetAllPoints()
  1640. snd.Icon.Border.Texture = snd.Icon.Border:CreateTexture(nil, Border)
  1641. snd:RegisterEvent("UNIT_AURA")
  1642. snd:SetScript("OnEvent", function(self, event, unit)
  1643. snd.CheckAura(unit)
  1644. end)
  1645. function snd.CheckAura(unit)
  1646. local spellname = GetSpellInfo(5171)
  1647. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitBuff("player", spellname)
  1648. if id and unitCaster == "player" then
  1649. snd:Show()
  1650. snd:SetCooldown(expirationTime - duration - 0.5, duration)
  1651. return
  1652. end
  1653. snd:Hide()
  1654. end
  1655.  
  1656. --TRINKET PROC
  1657. local trink = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
  1658. trink:SetDrawEdge(false)
  1659. trink:ClearAllPoints()
  1660. --trink:SetPoint("BOTTOMRIGHT",PlayerFrame,149,6)
  1661. trink:SetPoint("BOTTOMRIGHT",PlayerFrame,479,29)
  1662. trink:SetSize(64,64)
  1663. trink.Icon = CreateFrame("Frame", nil, trink)
  1664. trink.Icon:SetFrameLevel(trink:GetFrameLevel() - 1)
  1665. trink:SetFrameStrata("HIGH")
  1666. trink.Icon:SetAllPoints()
  1667. trink.Icon.Texture = trink.Icon:CreateTexture(nil, "ARTWORK")
  1668. --trink.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,149,6)
  1669. trink.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,479,29)
  1670. trink.Icon.Texture:SetSize(64,64)
  1671. trink.Icon.Texture:SetTexture("Interface\\Icons\\ability_creature_poison_06")
  1672. trink.Icon.Border = CreateFrame("Frame", nil, trink.Icon)
  1673. trink.Icon.Border:SetAllPoints()
  1674. trink.Icon.Border.Texture = trink.Icon.Border:CreateTexture(nil, Border)
  1675. trink:RegisterEvent("UNIT_AURA")
  1676. trink:SetScript("OnEvent", function(self, event, unit)
  1677. trink.CheckAura(unit)
  1678. end)
  1679. function trink.CheckAura(unit)
  1680. local spellname = GetSpellInfo(177038)
  1681. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitBuff("player", spellname)
  1682. if id and unitCaster == "player" then
  1683. trink:Show()
  1684. trink:SetCooldown(expirationTime - duration - 0.5, duration)
  1685. return
  1686. end
  1687. trink:Hide()
  1688. end
  1689. --ADRENALINE
  1690. local rush = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
  1691. rush:SetDrawEdge(false)
  1692. rush:ClearAllPoints()
  1693. --rush:SetPoint("BOTTOMRIGHT",PlayerFrame,149,6)
  1694. rush:SetPoint("BOTTOMRIGHT",PlayerFrame,479,93)
  1695. rush:SetSize(64,64)
  1696. rush.Icon = CreateFrame("Frame", nil, rush)
  1697. rush.Icon:SetFrameLevel(rush:GetFrameLevel() - 1)
  1698. rush:SetFrameStrata("HIGH")
  1699. rush.Icon:SetAllPoints()
  1700. rush.Icon.Texture = rush.Icon:CreateTexture(nil, "ARTWORK")
  1701. --rush.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,149,6)
  1702. rush.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,479,93)
  1703. rush.Icon.Texture:SetSize(64,64)
  1704. rush.Icon.Texture:SetTexture("Interface\\Icons\\spell_shadow_shadowworddominate")
  1705. rush.Icon.Border = CreateFrame("Frame", nil, rush.Icon)
  1706. rush.Icon.Border:SetAllPoints()
  1707. rush.Icon.Border.Texture = rush.Icon.Border:CreateTexture(nil, Border)
  1708. rush:RegisterEvent("UNIT_AURA")
  1709. rush:SetScript("OnEvent", function(self, event, unit)
  1710. rush.CheckAura(unit)
  1711. end)
  1712. function rush.CheckAura(unit)
  1713. local spellname = GetSpellInfo(13750)
  1714. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitBuff("player", spellname)
  1715. if id and unitCaster == "player" then
  1716. rush:Show()
  1717. rush:SetCooldown(expirationTime - duration - 0.5, duration)
  1718. return
  1719. end
  1720. rush:Hide()
  1721. end
  1722. --RING PROC
  1723. local ring = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
  1724. ring:SetDrawEdge(false)
  1725. ring:ClearAllPoints()
  1726. --ring:SetPoint("BOTTOMRIGHT",PlayerFrame,149,-28)
  1727. ring:SetPoint("BOTTOMRIGHT",PlayerFrame,479,-35)
  1728. ring:SetSize(64,64)
  1729. ring.Icon = CreateFrame("Frame", nil, ring)
  1730. ring.Icon:SetFrameLevel(ring:GetFrameLevel() - 1)
  1731. ring:SetFrameStrata("HIGH")
  1732. ring.Icon:SetAllPoints()
  1733. ring.Icon.Texture = ring.Icon:CreateTexture(nil, "ARTWORK")
  1734. --ring.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,149,-28)
  1735. ring.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,479,-35)
  1736. ring.Icon.Texture:SetSize(64,64)
  1737. ring.Icon.Texture:SetTexture("Interface\\Icons\\spell_holy_mindsooth")
  1738. ring.Icon.Border = CreateFrame("Frame", nil, ring.Icon)
  1739. ring.Icon.Border:SetAllPoints()
  1740. ring.Icon.Border.Texture = ring.Icon.Border:CreateTexture(nil, Border)
  1741. ring:RegisterEvent("UNIT_AURA")
  1742. ring:SetScript("OnEvent", function(self, event, unit)
  1743. ring.CheckAura(unit)
  1744. end)
  1745. function ring.CheckAura(unit)
  1746. local spellname = GetSpellInfo(177159)
  1747. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitBuff("player", spellname)
  1748. if id and unitCaster == "player" then
  1749. ring:Show()
  1750. ring:SetCooldown(expirationTime - duration - 0.5, duration)
  1751. return
  1752. end
  1753. ring:Hide()
  1754. end
  1755. -- blade flurry tracker
  1756. local blade = CreateFrame("Cooldown", nil, PlayerFrame)
  1757. blade:SetDrawEdge(false)
  1758. blade:ClearAllPoints()
  1759. blade:SetPoint("BOTTOMRIGHT",PlayerFrame,160,-40)
  1760. blade:SetSize(40,40)
  1761. blade.Icon = CreateFrame("Frame", nil, blade)
  1762. blade.Icon:SetFrameLevel(blade:GetFrameLevel() - 1)
  1763. blade:SetFrameStrata("HIGH")
  1764. blade.Icon:SetAllPoints()
  1765. blade.Icon.Texture = blade.Icon:CreateTexture(nil, "ARTWORK")
  1766. blade.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,160,-40)
  1767. blade.Icon.Texture:SetSize(40,40)
  1768. blade.Icon.Texture:SetTexture("Interface\\Icons\\ability_warrior_punishingblow")
  1769. blade.Icon.Border = CreateFrame("Frame", nil, blade.Icon)
  1770. blade.Icon.Border:SetAllPoints()
  1771. blade.Icon.Border.Texture = blade.Icon.Border:CreateTexture(nil, Border)
  1772. blade:RegisterEvent("UNIT_AURA")
  1773. blade:SetScript("OnEvent", function(self, event, unit)
  1774. blade.CheckAura(unit)
  1775. end)
  1776. function blade.CheckAura(unit)
  1777. local spellname = GetSpellInfo(13877)
  1778. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitBuff("player", spellname)
  1779. if id and unitCaster == "player" then
  1780. blade:Show()
  1781. blade:SetCooldown(expirationTime - duration - 0.5, duration)
  1782. return
  1783. end
  1784. blade:Hide()
  1785. end
  1786.  
  1787. --vendetta tracker
  1788. local vend = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
  1789. vend:SetDrawEdge(false)
  1790. vend:ClearAllPoints()
  1791. vend:SetPoint("BOTTOMRIGHT",PlayerFrame,160,-40)
  1792. vend:SetSize(40,40)
  1793. vend.Icon = CreateFrame("Frame", nil, vend)
  1794. vend.Icon:SetFrameLevel(vend:GetFrameLevel() - 1)
  1795. vend:SetFrameStrata("HIGH")
  1796. vend.Icon:SetAllPoints()
  1797. vend.Icon.Texture = vend.Icon:CreateTexture(nil, "ARTWORK")
  1798. vend.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,160,-40)
  1799. vend.Icon.Texture:SetSize(40,40)
  1800. vend.Icon.Texture:SetTexture("Interface\\Icons\\ability_rogue_deadliness")
  1801. vend.Icon.Border = CreateFrame("Frame", nil, vend.Icon)
  1802. vend.Icon.Border:SetAllPoints()
  1803. vend.Icon.Border.Texture = vend.Icon.Border:CreateTexture(nil, Border)
  1804. vend:RegisterEvent("UNIT_AURA")
  1805. vend:SetScript("OnEvent", function(self, event, unit)
  1806. vend.CheckAura(unit)
  1807. end)
  1808. function vend.CheckAura(unit)
  1809. local spellname = GetSpellInfo(79140)
  1810. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitDebuff("target", spellname)
  1811. if id and unitCaster == "player" then
  1812. vend:Show()
  1813. vend:SetCooldown(expirationTime - duration - 0.5, duration)
  1814. return
  1815. end
  1816. vend:Hide()
  1817. end
  1818. --rupture tracker
  1819. local rupt = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
  1820. rupt:SetDrawEdge(false)
  1821. rupt:ClearAllPoints()
  1822. rupt:SetPoint("BOTTOMRIGHT",PlayerFrame,160,40)
  1823. rupt:SetSize(40,40)
  1824. rupt.Icon = CreateFrame("Frame", nil, rupt)
  1825. rupt.Icon:SetFrameLevel(rupt:GetFrameLevel() - 1)
  1826. rupt:SetFrameStrata("HIGH")
  1827. rupt.Icon:SetAllPoints()
  1828. rupt.Icon.Texture = rupt.Icon:CreateTexture(nil, "ARTWORK")
  1829. rupt.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,160,40)
  1830. rupt.Icon.Texture:SetSize(40,40)
  1831. rupt.Icon.Texture:SetTexture("Interface\\Icons\\ability_rogue_rupture")
  1832. rupt.Icon.Border = CreateFrame("Frame", nil, rupt.Icon)
  1833. rupt.Icon.Border:SetAllPoints()
  1834. rupt.Icon.Border.Texture = rupt.Icon.Border:CreateTexture(nil, Border)
  1835. rupt:RegisterEvent("UNIT_AURA")
  1836. rupt:SetScript("OnEvent", function(self, event, unit)
  1837. rupt.CheckAura(unit)
  1838. end)
  1839. function rupt.CheckAura(unit)
  1840. local spellname = GetSpellInfo(1943)
  1841. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitDebuff("target", spellname)
  1842. if id and unitCaster == "player" then
  1843. rupt:Show()
  1844. rupt:SetCooldown(expirationTime - duration - 0.5, duration)
  1845. return
  1846. end
  1847. rupt:Hide()
  1848. end
  1849. --strike tracker
  1850. local strike = CreateFrame("Cooldown", nil, PlayerFrame, "CooldownFrameTemplate")
  1851. strike:SetDrawEdge(false)
  1852. strike:ClearAllPoints()
  1853. strike:SetPoint("BOTTOMRIGHT",PlayerFrame,160,40)
  1854. strike:SetSize(40,40)
  1855. strike.Icon = CreateFrame("Frame", nil, strike)
  1856. strike.Icon:SetFrameLevel(strike:GetFrameLevel() - 1)
  1857. strike:SetFrameStrata("HIGH")
  1858. strike.Icon:SetAllPoints()
  1859. strike.Icon.Texture = strike.Icon:CreateTexture(nil, "ARTWORK")
  1860. strike.Icon.Texture:SetPoint("BOTTOMRIGHT",PlayerFrame,160,40)
  1861. strike.Icon.Texture:SetSize(40,40)
  1862. strike.Icon.Texture:SetTexture("Interface\\Icons\\inv_sword_97")
  1863. strike.Icon.Border = CreateFrame("Frame", nil, strike.Icon)
  1864. strike.Icon.Border:SetAllPoints()
  1865. strike.Icon.Border.Texture = strike.Icon.Border:CreateTexture(nil, Border)
  1866. strike:RegisterEvent("UNIT_AURA")
  1867. strike:SetScript("OnEvent", function(self, event, unit)
  1868. strike.CheckAura(unit)
  1869. end)
  1870. function strike.CheckAura(unit)
  1871. local spellname = GetSpellInfo(84617)
  1872. local _, _, _, _, _, duration, expirationTime, unitCaster, _, _, id = UnitDebuff("target", spellname)
  1873. if id and unitCaster == "player" then
  1874. strike:Show()
  1875. strike:SetCooldown(expirationTime - duration - 0.5, duration)
  1876. return
  1877. end
  1878. strike:Hide()
  1879. end
  1880. end
  1881.  
  1882. --combat script
  1883. if (Combat == 1) then
  1884. 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()
  1885. 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)
  1886. 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()
  1887. 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)
  1888. end
  1889.  
  1890.  --SDB fix
  1891. if (ShadowDanceBar == 1) then
  1892. local shadowdancebar = 2 -- внимание! это номер панели для шд
  1893. local f = CreateFrame('frame', 'myownstatedriver', UIParent, 'SecureHandlerStateTemplate')
  1894. for i=1,12 do f:SetFrameRef('ActionButton'..i, _G['ActionButton'..i]) end
  1895. f:Execute([[ buttons = table.new() for i = 1, 12 do table.insert(buttons, self:GetFrameRef('ActionButton'..i)) end ]])
  1896. f:SetAttribute('_onstate-page', [[  for i, button in ipairs(buttons) do button:SetAttribute('actionpage', tonumber(newstate)) end ]])
  1897. local getBar = function()
  1898.     local class, spec = select(2, UnitClass('player')), GetSpecialization()
  1899.     local pages = {
  1900.         ['DRUID'] = '[bonusbar:1,nostealth] 7; [bonusbar:1,stealth] 8; [bonusbar:2] 8; [bonusbar:3] 9; [bonusbar:4] 10;',        
  1901.         ['WARRIOR'] = '[bonusbar:1] 7; [bonusbar:2] 8; [bonusbar:3] 9;',
  1902.         ['PRIEST'] = '[bonusbar:1] 7;',
  1903.         ['ROGUE'] = '[form:1][form:'..(spec==3 and 3 or 2)..',stealth] 7; [form:'..(spec==3 and 3 or 2)..',nostealth]'..shadowdancebar..';',
  1904.         ['WARLOCK'] = '[form:2] 10;',
  1905.         ['MONK'] = '[form:1] '..(spec == 1 and 8 or spec == 2 and 9 or spec == 3 and 7 or 9)..'; [form:2] 7;',
  1906.         ['DEFAULT'] = '[vehicleui] 12; [bar:2] 2; [bar:3] 3; [bar:4] 4; [bar:5] 5; [bar:6] 6;',
  1907.     }
  1908.     local condition, page = pages['DEFAULT'], pages[class]
  1909.     if page then condition = condition..' '..page end
  1910.     condition = condition..' 1'
  1911.     return condition
  1912. end
  1913. RegisterStateDriver(f, 'page', getBar())
  1914. end
  1915.  
  1916. --interrupt announcer
  1917. if (InterruptA == 1) then
  1918. local f = CreateFrame("Frame")
  1919. local function Update(self, event, ...)
  1920.         if event == "COMBAT_LOG_EVENT_UNFILTERED" then     
  1921.         local timestamp, eventType, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, _, spellID, spellName, _, extraskillID, extraSkillName = ...
  1922.         if eventType == "SPELL_INTERRUPT" and sourceName == UnitName("player") then
  1923.             SendChatMessage("Interrupted >> "..GetSpellLink(extraskillID).."!", "SAY")
  1924.         end
  1925.     end
  1926. end
  1927. f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
  1928. f:SetScript("OnEvent", Update)
  1929. end
  1930.  
  1931. -- Class colors in arena frames
  1932.  
  1933. if (cArenas == 1) then
  1934. local frame = CreateFrame("FRAME")
  1935. frame:RegisterEvent("PLAYER_ENTERING_WORLD")
  1936. frame:RegisterEvent("PARTY_MEMBERS_CHANGED")
  1937. frame:RegisterEvent("PLAYER_TARGET_CHANGED")
  1938. frame:RegisterEvent("PLAYER_FOCUS_CHANGED")
  1939. frame:RegisterEvent("ARENA_OPPONENT_UPDATE")
  1940. frame:RegisterEvent("PLAYER_CONTROL_GAINED")
  1941. frame:RegisterEvent("PLAYER_CONTROL_LOST")
  1942. frame:RegisterEvent("ADDON_LOADED");
  1943. local function DoArenaColorHook()
  1944.         hooksecurefunc("ArenaEnemyFrame_Unlock",
  1945.                 function(self)
  1946.                         local color=RAID_CLASS_COLORS[select(2,UnitClass(self.unit)) or ""]
  1947.                         if color then
  1948.                                 self.healthbar:SetStatusBarColor(color.r,color.g,color.b)
  1949.                                 self.healthbar.lockColor=true
  1950.                         end                                            
  1951.                 end
  1952.         )
  1953. end
  1954. local function eventHandler(self, event, arg, ...)
  1955.         if event == "ADDON_LOADED" then
  1956.                 if arg == "Blizzard_ArenaUI" then
  1957.                         self:UnregisterEvent(event);
  1958.                         DoArenaColorHook();
  1959.                 end
  1960.         end            
  1961. end
  1962. if IsAddOnLoaded("Blizzard_ArenaUI") then
  1963.         DoArenaColorHook();
  1964. end
  1965. frame:SetScript("OnEvent", eventHandler)
  1966. end
  1967.  
  1968. --DRTracker Warlords of Draenor
  1969. if (DRTrackerWoD == 1) then
  1970. local DRTracker = CreateFrame("Cooldown", "DRTracker", UIParent)
  1971. local DRs = {}
  1972. local lastChangedFrame = nil
  1973. DRTracker:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
  1974. DRTracker:RegisterEvent("ADDON_LOADED")
  1975. local spellIds = { -- DR Categories listed here http://eu.battle.net/wow/en/forum/topic/11267997531
  1976.     -- Many thanks to those that assisted the creation of the original list from LoseControl.
  1977.     -- Categories: Stun (1), Silence (2), Disorient/Fear (3), Incapacitate/Polymorph (4), Roots (5)
  1978.     -- Death Knight
  1979.     [108194] = "Stun",      -- Asphyxiate
  1980.     [115001] = "Stun",      -- Remorseless Winter
  1981.     [47476]  = "Silence",       -- Strangulate
  1982.     [96294]  = "Root",      -- Chains of Ice (Chilblains)
  1983.     -- Death Knight Ghoul
  1984.     [91800]  = "Stun",      -- Gnaw
  1985.     [91797]  = "Stun",      -- Monstrous Blow (Dark Transformation)
  1986.     [91807]  = "Root",      -- Shambling Rush (Dark Transformation)
  1987.     -- Druid
  1988.     [113801] = "Stun",      -- Bash (Force of Nature - Feral Treants)
  1989.     [102795] = "Stun",      -- Bear Hug
  1990.     [33786]  = "Disorient",     -- Cyclone
  1991.     [99]     = "Incap",     -- Disorienting (Incapacitating) Roar
  1992.     [22570]  = "Stun",      -- Maim
  1993.     [5211]   = "Stun",      -- Mighty Bash
  1994.     [163505]   = "Stun",        -- Rake
  1995.     [114238] = "Silence",       -- Fae Silence (Glyph of Fae Silence)
  1996.     [81261]  = "Silence",       -- Solar Beam
  1997.     [339]    = "Root",      -- Entangling Roots
  1998.     [113770] = "Root",      -- Entangling Roots (Force of Nature - Balance Treants)
  1999.     [19975]  = "Root",      -- Entangling Roots (Nature's Grasp)
  2000.     [45334]  = "Root",      -- Immobilized (Wild Charge - Bear)
  2001.     [102359] = "Root",      -- Mass Entanglement
  2002.     -- Hunter
  2003.     [117526] = "Stun",      -- Binding Shot
  2004.     [3355]   = "Incap",     -- Freezing Trap
  2005.     [1513]   = "Disorient",     -- Scare Beast
  2006.     [19386]  = "Incap",     -- Wyvern Sting
  2007.     [34490]  = "Silence",       -- Silencing Shot
  2008.     [19185]  = "Root",      -- Entrapment
  2009.     [64803]  = "Root",      -- Entrapment
  2010.     [128405] = "Root",      -- Narrow Escape
  2011.     -- Mage
  2012.     [118271] = "Stun",      -- Combustion Impact
  2013.     [44572]  = "Stun",      -- Deep Freeze
  2014.     [31661]  = "Disorient",     -- Dragon's Breath
  2015.     [118]    = "Incap",     -- Polymorph
  2016.     [61305]  = "Incap",     -- Polymorph: Black Cat
  2017.     [28272]  = "Incap",     -- Polymorph: Pig
  2018.     [61721]  = "Incap",     -- Polymorph: Rabbit
  2019.     [61780]  = "Incap",     -- Polymorph: Turkey
  2020.     [28271]  = "Incap",     -- Polymorph: Turtle
  2021.     [82691]  = "Incap",     -- Ring of Frost
  2022.     [102051] = "Silence",       -- Frostjaw (also a root)
  2023.     [122]    = "Root",      -- Frost Nova
  2024.     [111340] = "Root",      -- Ice Ward
  2025.     -- Mage Water Elemental
  2026.     [33395]  = "Root",      -- Freeze
  2027.     -- Monk
  2028.     [123393] = "Incap",     -- Breath of Fire (Glyph of Breath of Fire)
  2029.     [119392] = "Stun",      -- Charging Ox Wave
  2030.     [120086] = "Stun",      -- Fists of Fury
  2031.     [119381] = "Stun",      -- Leg Sweep
  2032.     [115078] = "Incap",     -- Paralysis
  2033.     [137460] = "Incap",     -- Silenced (Ring of Peace)
  2034.     [116706] = "Root",      -- Disable
  2035.     [123407] = "Root",      -- Spinning Fire Blossom
  2036.     -- Paladin
  2037.     [105421] = "Disorient",     -- Blinding Light
  2038.     [115752] = "Stun",      -- Blinding Light (Glyph of Blinding Light)
  2039.     [105593] = "Stun",      -- Fist of Justice
  2040.     [853]    = "Stun",      -- Hammer of Justice
  2041.     [119072] = "Stun",      -- Holy Wrath
  2042.     [20066]  = "Incap",     -- Repentance
  2043.     [10326]  = "Disorient",     -- Turn Evil
  2044.     [145067] = "Disorient",     -- Turn Evil (Evil is a Point of View)
  2045.     [31935]  = "Silence",       -- Avenger's Shield
  2046.     -- Priest
  2047.     [605]    = "Incap",     -- Dominate Mind
  2048.     [88625]  = "Incap",     -- Holy Word: Chastise
  2049.     [64044]  = "Incap",     -- Psychic Horror
  2050.     [8122]   = "Disorient",     -- Psychic Scream
  2051.     [113792] = "Disorient",     -- Psychic Terror (Psyfiend)
  2052.     [9484]   = "Disorient",     -- Shackle Undead
  2053.     [15487]  = "Silence",       -- Silence
  2054.     [87194]  = "Root",      -- Glyph of Mind Blast
  2055.     [114404] = "Root",      -- Void Tendril's Grasp
  2056.     -- Rogue
  2057.     [2094]   = "Disorient",     -- Blind
  2058.     [1833]   = "Stun",      -- Cheap Shot
  2059.     [1776]   = "Incap",     -- Gouge
  2060.     [408]    = "Stun",      -- Kidney Shot
  2061.     [6770]   = "Incap",     -- Sap
  2062.     [1330]   = "Silence",       -- Garrote - Silence
  2063.     -- Shaman
  2064.     [51514]  = "Incap",     -- Hex
  2065.     [118905] = "Stun",      -- Static Charge (Capacitor Totem)
  2066.     [64695]  = "Root",      -- Earthgrab (Earthgrab Totem)
  2067.     [63685]  = "Root",      -- Freeze (Frozen Power)
  2068.     -- Shaman Primal Earth Elemental
  2069.     [118345] = "Stun",      -- Pulverize
  2070.     -- Warlock
  2071.     [710]    = "Incap",     -- Banish
  2072.     [137143] = "Incap",     -- Blood Horror
  2073.     [5782]   = "Disorient",     -- Fear
  2074.     [118699] = "Disorient",     -- Fear
  2075.     [130616] = "Disorient",     -- Fear (Glyph of Fear)
  2076.     [5484]   = "Disorient",     -- Howl of Terror
  2077.     [22703]  = "Stun",      -- Infernal Awakening
  2078.     [6789]   = "Incap",     -- Mortal Coil
  2079.     [132412] = "Disorient",     -- Seduction (Grimoire of Sacrifice)
  2080.     [30283]  = "Stun",      -- Shadowfury
  2081.     [132409] = "Silence",       -- Spell Lock (Grimoire of Sacrifice)
  2082.     [31117]  = "Silence",       -- Unstable Affliction
  2083.     -- Warlock Pets
  2084.     [89766]  = "Stun",      -- Axe Toss (Felguard/Wrathguard)
  2085.     [115268] = "Disorient",     -- Mesmerize (Shivarra)
  2086.     [6358]   = "Disorient",     -- Seduction (Succubus)
  2087.     [115782] = "Silence",       -- Optical Blast (Observer)
  2088.     [24259]  = "Silence",       -- Spell Lock (Felhunter)
  2089.     -- Warrior
  2090.     --[7922]   = "Root",        -- Charge Stun
  2091.     [5246]   = "Disorient",     -- Intimidating Shout (aoe)
  2092.     [20511]  = "Disorient",     -- Intimidating Shout (targeted)
  2093.     [132168] = "Stun",      -- Shockwave
  2094.     [107570] = "Stun",      -- Storm Bolt
  2095.     [132169] = "Stun",      -- Storm Bolt
  2096.     [18498]  = "Silence",       -- Silenced - Gag Order (PvE only)
  2097.     [107566] = "Root",      -- Staggering Shout
  2098.     [105771] = "Root",      -- Warbringer
  2099.     -- Other
  2100.     [107079] = "Incap",     -- Quaking Palm
  2101.     [13327]  = "Stun",      -- Reckless Charge
  2102.     [20549]  = "Stun",      -- War Stomp
  2103.     [25046]  = "Silence",       -- Arcane Torrent (Energy)
  2104.     [28730]  = "Silence",       -- Arcane Torrent (Mana)
  2105.     [50613]  = "Silence",       -- Arcane Torrent (Runic Power)
  2106.     [69179]  = "Silence",       -- Arcane Torrent (Rage)
  2107.     [80483]  = "Silence",       -- Arcane Torrent (Focus)
  2108.     [129597] = "Silence",       -- Arcane Torrent (Chi)
  2109.     [39965]  = "Root",      -- Frost Grenade
  2110.     [55536]  = "Root",      -- Frostweave Net
  2111.     [13099]  = "Root",      -- Net-o-Matic
  2112. }
  2113.  
  2114. function DRTracker:GetSpellCategory(spellID) -- Returns CC category of the spellIDs listed above
  2115.     return spellID and spellIds[spellID] or nil
  2116. end
  2117.  
  2118. function DRTracker:OnEvent(event, ...) -- Runs things, and stuff.
  2119.     self[event](self, ...)
  2120. end
  2121. DRTracker:SetScript("OnEvent", DRTracker.OnEvent)
  2122.  
  2123. function DRTracker:ADDON_LOADED(addonName) -- Anchor DR trackers
  2124.     if addonName == "Blizzard_ArenaUI" then
  2125.         local arenaFrame
  2126.         for i = 1, 5 do
  2127.         arenaFrame = "ArenaEnemyFrame"..i
  2128.         --local loc = -30 -- (Depreciated) Distance between the left edge of each frame. Should match the width of the frame.
  2129.             for j = 1, 5 do
  2130.                 local DR = CreateFrame("Frame", arenaFrame.."DR"..j, ArenaEnemyFrames)
  2131.                 DR:ClearAllPoints()
  2132.                 DR:SetPoint("BOTTOMRIGHT", arenaFrame, "TOPLEFT", 0, -10)
  2133.                 DR:SetSize(24, 24) -- (Width, Height) of each frame. A perfect square is preferable, otherwise the spell icon will look stretched.
  2134.                 DR.border = DR:CreateTexture(nil, "LOW")
  2135.                 DR.border:SetAllPoints()
  2136.                 DR.border:SetTexture("Interface\\BUTTONS\\UI-Quickslot-Depress.png")
  2137.                 DR.icon = DR:CreateTexture(nil, "BACKGROUND")
  2138.                 DR.shown = false
  2139.                 DR.severity = 1
  2140.                 DR.unit = i
  2141.                 DR.cate = j
  2142.                 DR.applied = 0
  2143.                 DR.sweep = CreateFrame("Cooldown", nil, DR, "CooldownFrameTemplate")
  2144.                 DR.sweep:ClearAllPoints()
  2145.                 DR.sweep:SetAllPoints(DR)
  2146.                 local function OnShow(self)
  2147.                     local curX = 0
  2148.                     for b=1,5 do
  2149.                         local curFrame = DRs["arena"..DR.unit..b]
  2150.                         if curFrame.shown == true and b ~= self.cate then
  2151.                             curX = curX - 30
  2152.                         end
  2153.                     end
  2154.                     self:ClearAllPoints()
  2155.                     self:SetPoint("BOTTOMRIGHT", "ArenaEnemyFrame"..self.unit, "TOPLEFT", curX, -10)
  2156.                     self.shown = true
  2157.                     self.applied = GetTime()
  2158.                 end
  2159.                 DR:HookScript("OnShow", OnShow)
  2160.  
  2161.                 local function OnHide(self)
  2162.                     for b = 1,5 do
  2163.                         local curFrame = DRs["arena"..self.unit..b]
  2164.                         if curFrame and curFrame.shown == true and curFrame.applied > self.applied then
  2165.                             local _, _, _, x = curFrame:GetPoint(1)
  2166.                             curFrame:ClearAllPoints()
  2167.                             curFrame:SetPoint("BOTTOMRIGHT", "ArenaEnemyFrame"..curFrame.unit, "TOPLEFT", x+30, -10)
  2168.                         end
  2169.                     end
  2170.                     self:ClearAllPoints()
  2171.                     self:SetPoint("BOTTOMRIGHT", "ArenaEnemyFrame"..self.unit, "TOPLEFT", 0, -10)
  2172.                 end
  2173.                 DR:HookScript("OnHide", OnHide)
  2174.                
  2175.                 local function DREnd(self, elapsed)
  2176.                     if self.sweep:GetCooldownDuration() == 0 and self.shown == true then
  2177.                         self:Hide()
  2178.                         self.shown = false
  2179.                         self.severity = 1
  2180.                     end
  2181.                 end
  2182.                 DR:HookScript("OnUpdate", DREnd)
  2183.                
  2184.                 DR:Hide()
  2185.                 DRs["arena"..i..j] = DR
  2186.             end
  2187.         end
  2188.     end
  2189. end
  2190.  
  2191. function DRTracker:SetTexture(Frame, spellID) -- Sets displayed icon to last spell.
  2192.     if Frame.shown == true then
  2193.         Frame.dur = Frame.sweep:GetCooldownDuration()
  2194.         Frame:Hide()
  2195.     end
  2196.     lastChangedFrame = Frame
  2197.     local _, _, icon, _, _, _, _, _, _ = GetSpellInfo(spellID)
  2198.     Frame.icon:ClearAllPoints()
  2199.     Frame.icon:SetAllPoints()
  2200.     Frame.icon:SetTexture(icon)
  2201.     Frame:Show()
  2202.     if Frame.severity == 1 then
  2203.         Frame.border:SetVertexColor(1, 1, 0, 1)
  2204.         Frame.severity = 2
  2205.     elseif Frame.severity == 2 then
  2206.         Frame.border:SetVertexColor(1, .4, 0, 1)
  2207.         Frame.severity = 3
  2208.     elseif Frame.severity == 3 then
  2209.         Frame.border:SetVertexColor(1, 0, 0, 1)
  2210.     end
  2211. end
  2212.  
  2213. function DRTracker:TimerStart(GUID, spellID, spellName) -- Primary function; begins CD sweep and icon updates. Not a good idea to edit any of this.
  2214.     local _, instanceType = IsInInstance()
  2215.     if instanceType ~= "arena" then
  2216.         return
  2217.     end
  2218.     local cat = DRTracker:GetSpellCategory(spellID)
  2219.     if(UnitGUID("arena1") == GUID) then
  2220.         local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff("arena1", spellName)
  2221.         if(cat=="Stun") then
  2222.             DRTracker:SetTexture(DRs["arena1"..1], spellID)
  2223.             CooldownFrame_SetTimer(DRs["arena1"..1].sweep, GetTime(), 17+duration, 1)
  2224.         elseif(cat=="Silence") then
  2225.             DRTracker:SetTexture(DRs["arena1"..2], spellID)
  2226.             CooldownFrame_SetTimer(DRs["arena1"..2].sweep, GetTime(), 17+duration, 1)
  2227.         elseif(cat=="Disorient") then
  2228.             DRTracker:SetTexture(DRs["arena1"..3], spellID)
  2229.             CooldownFrame_SetTimer(DRs["arena1"..3].sweep, GetTime(), 17+duration, 1)
  2230.         elseif(cat=="Incap") then
  2231.             DRTracker:SetTexture(DRs["arena1"..4], spellID)
  2232.             CooldownFrame_SetTimer(DRs["arena1"..4].sweep, GetTime(), 17+duration, 1)
  2233.         else
  2234.             DRTracker:SetTexture(DRs["arena1"..5], spellID)
  2235.             CooldownFrame_SetTimer(DRs["arena1"..5].sweep, GetTime(), 17+duration, 1)
  2236.         end
  2237.     elseif(UnitGUID("arena2") == GUID) then
  2238.     local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff("arena2", spellName)
  2239.         if(cat=="Stun") then
  2240.             DRTracker:SetTexture(DRs["arena2"..1], spellID)
  2241.             CooldownFrame_SetTimer(DRs["arena2"..1].sweep, GetTime(), 17+duration, 1)
  2242.         elseif(cat=="Silence") then
  2243.             DRTracker:SetTexture(DRs["arena2"..2], spellID)
  2244.             CooldownFrame_SetTimer(DRs["arena2"..2].sweep, GetTime(), 17+duration, 1)
  2245.         elseif(cat=="Disorient") then
  2246.             DRTracker:SetTexture(DRs["arena2"..3], spellID)
  2247.             CooldownFrame_SetTimer(DRs["arena2"..3].sweep, GetTime(), 17+duration, 1)
  2248.         elseif(cat=="Incap") then
  2249.             DRTracker:SetTexture(DRs["arena2"..4], spellID)
  2250.             CooldownFrame_SetTimer(DRs["arena2"..4].sweep, GetTime(), 17+duration, 1)
  2251.         else
  2252.             DRTracker:SetTexture(DRs["arena2"..5], spellID)
  2253.             CooldownFrame_SetTimer(DRs["arena2"..5].sweep, GetTime(), 17+duration, 1)
  2254.         end
  2255.     elseif(UnitGUID("arena3") == GUID) then
  2256.     local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff("arena3", spellName)
  2257.         if(cat=="Stun") then
  2258.             DRTracker:SetTexture(DRs["arena3"..1], spellID)
  2259.             CooldownFrame_SetTimer(DRs["arena3"..1].sweep, GetTime(), 17+duration, 1)
  2260.         elseif(cat=="Silence") then
  2261.             DRTracker:SetTexture(DRs["arena3"..2], spellID)
  2262.             CooldownFrame_SetTimer(DRs["arena3"..2].sweep, GetTime(), 17+duration, 1)
  2263.         elseif(cat=="Disorient") then
  2264.             DRTracker:SetTexture(DRs["arena3"..3], spellID)
  2265.             CooldownFrame_SetTimer(DRs["arena3"..3].sweep, GetTime(), 17+duration, 1)
  2266.         elseif(cat=="Incap") then
  2267.             DRTracker:SetTexture(DRs["arena3"..4], spellID)
  2268.             CooldownFrame_SetTimer(DRs["arena3"..4].sweep, GetTime(), 17+duration, 1)
  2269.         else
  2270.             DRTracker:SetTexture(DRs["arena3"..5], spellID)
  2271.             CooldownFrame_SetTimer(DRs["arena3"..5].sweep, GetTime(), 17+duration, 1)
  2272.         end
  2273.     elseif(UnitGUID("arena4") == GUID) then
  2274.     local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff("arena4", spellName)
  2275.         if(cat=="Stun") then
  2276.             DRTracker:SetTexture(DRs["arena4"..1], spellID)
  2277.             CooldownFrame_SetTimer(DRs["arena4"..1].sweep, GetTime(), 17+duration, 1)
  2278.         elseif(cat=="Silence") then
  2279.             DRTracker:SetTexture(DRs["arena4"..2], spellID)
  2280.             CooldownFrame_SetTimer(DRs["arena4"..2].sweep, GetTime(), 17+duration, 1)
  2281.         elseif(cat=="Disorient") then
  2282.             DRTracker:SetTexture(DRs["arena4"..3], spellID)
  2283.             CooldownFrame_SetTimer(DRs["arena4"..3].sweep, GetTime(), 17+duration, 1)
  2284.         elseif(cat=="Incap") then
  2285.             DRTracker:SetTexture(DRs["arena4"..4], spellID)
  2286.             CooldownFrame_SetTimer(DRs["arena4"..4].sweep, GetTime(), 17+duration, 1)
  2287.         else
  2288.             DRTracker:SetTexture(DRs["arena4"..5], spellID)
  2289.             CooldownFrame_SetTimer(DRs["arena4"..5].sweep, GetTime(), 17+duration, 1)
  2290.         end
  2291.     elseif(UnitGUID("arena5") == GUID) then
  2292.         local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossDebuff, value1, value2, value3 = UnitDebuff("arena5", spellName)
  2293.         if(cat=="Stun") then
  2294.             DRTracker:SetTexture(DRs["arena5"..1], spellID)
  2295.             CooldownFrame_SetTimer(DRs["arena5"..1].sweep, GetTime(), 17+duration, 1)
  2296.         elseif(cat=="Silence") then
  2297.             DRTracker:SetTexture(DRs["arena5"..2], spellID)
  2298.             CooldownFrame_SetTimer(DRs["arena5"..2].sweep, GetTime(), 17+duration, 1)
  2299.         elseif(cat=="Disorient") then
  2300.             DRTracker:SetTexture(DRs["arena5"..3], spellID)
  2301.             CooldownFrame_SetTimer(DRs["arena5"..3].sweep, GetTime(), 17+duration, 1)
  2302.         elseif(cat=="Incap") then
  2303.             DRTracker:SetTexture(DRs["arena5"..4], spellID)
  2304.             CooldownFrame_SetTimer(DRs["arena5"..4].sweep, GetTime(), 17+duration, 1)
  2305.         else
  2306.             DRTracker:SetTexture(DRs["arena5"..5], spellID)
  2307.             CooldownFrame_SetTimer(DRs["arena5"..5].sweep, GetTime(), 17+duration, 1)
  2308.         end
  2309.     end
  2310.     return
  2311. end
  2312.  
  2313. function DRTracker:GetDRs()
  2314.     return DRTracker and DRs
  2315. end
  2316.  
  2317. function DRTracker:COMBAT_LOG_EVENT_UNFILTERED(timeStamp, eventType, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, spellID, spellName, spellSchool, auraType)
  2318.     if eventType == "SPELL_AURA_APPLIED" or eventType == "SPELL_AURA_REFRESH" then -- Crowd control landed, time to do stuff.
  2319.         if auraType == "DEBUFF" and DRTracker:GetSpellCategory(spellID) then
  2320.             DRTracker:TimerStart(destGUID, spellID, spellName)
  2321.         end
  2322.     end
  2323. end
  2324. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement