Advertisement
wit4er

wit4er's config

Mar 30th, 2012
1,636
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 37.64 KB | None | 0 0
  1. ----------------------------------------------------------------------------------------------------
  2. --ArenaTrinkets--
  3. ----------------------------------------------------------------------------------------------------
  4. local trinkets = {}
  5. local events = CreateFrame("Frame")
  6. function events:ADDON_LOADED(addonName)
  7.     if addonName ~= "Blizzard_ArenaUI" then
  8.         return
  9.     end
  10.         ArenaEnemyFrame1:ClearAllPoints()
  11.         ArenaEnemyFrame1:SetPoint("CENTER", nil, "CENTER", 209.0, 204.0)
  12.         --ArenaEnemyFrames:SetScale(1.1)       
  13.     local arenaFrame, trinket
  14.     for i = 1, MAX_ARENA_ENEMIES do
  15.         arenaFrame = "ArenaEnemyFrame"..i
  16.         trinket = CreateFrame("Cooldown", arenaFrame.."Trinket", ArenaEnemyFrames)
  17.         trinket:SetPoint("TOPRIGHT", arenaFrame, 30, -6)
  18.         trinket:SetSize(24, 24)
  19.         trinket.icon = trinket:CreateTexture(nil, "BACKGROUND")
  20.         trinket.icon:SetAllPoints()
  21.         trinket.icon:SetTexture("Interface\\Icons\\inv_jewelry_trinketpvp_01")
  22.         trinket:Hide()
  23.         trinkets["arena"..i] = trinket
  24.     end
  25.     self:UnregisterEvent("ADDON_LOADED")
  26. end
  27. function events:UNIT_SPELLCAST_SUCCEEDED(unitID, spell, rank, lineID, spellID)
  28.     if not trinkets[unitID] then
  29.         return
  30.     end
  31.     if spellID == 59752 or spellID == 42292 then
  32.         CooldownFrame_SetTimer(trinkets[unitID], GetTime(), 120, 1)
  33.         SendChatMessage("Trinket used by: "..GetUnitName(unitID, true), "PARTY")
  34.     elseif spellID == 7744 then
  35.         CooldownFrame_SetTimer(trinkets[unitID], GetTime(), 45, 1)
  36.         SendChatMessage("WotF used by: "..GetUnitName(unitID, true), "PARTY")
  37.     end
  38. end
  39. function events:PLAYER_ENTERING_WORLD()
  40.     local _, instanceType = IsInInstance()
  41.     if instanceType == "arena" then
  42.         self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
  43.     elseif self:IsEventRegistered("UNIT_SPELLCAST_SUCCEEDED") then
  44.         self:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED")
  45.         for _, trinket in pairs(trinkets) do
  46.             trinket:SetCooldown(0, 0)
  47.             trinket:Hide()
  48.         end
  49.     end
  50. end
  51. --[[SLASH_TESTAEF1 = "/testaef"
  52. SlashCmdList["TESTAEF"] = function(msg, editBox)
  53.     if not IsAddOnLoaded("Blizzard_ArenaUI") then
  54.         LoadAddOn("Blizzard_ArenaUI")
  55.     end
  56.     ArenaEnemyFrames:Show()
  57.     local arenaFrame
  58.     for i = 1, 3 do
  59.         arenaFrame = _G["ArenaEnemyFrame"..i]      
  60.         arenaFrame.classPortrait:SetTexture("Interface\\TargetingFrame\\UI-Classes-Circles")
  61.         arenaFrame.classPortrait:SetTexCoord(unpack(CLASS_ICON_TCOORDS["WARRIOR"]))
  62.         arenaFrame.name:SetText("Dispelme")
  63.         arenaFrame:Show()
  64.         CooldownFrame_SetTimer(trinkets["arena"..i], GetTime(), 120, 1)    
  65.     end
  66. end
  67. events:SetScript("OnEvent", function(self, event, ...) return self[event](self, ...) end)
  68. events:RegisterEvent("ADDON_LOADED")
  69. events:RegisterEvent("PLAYER_ENTERING_WORLD")]]--
  70. ----------------------------------------------------------------------------------------------------
  71. --ClassIcons--
  72. ----------------------------------------------------------------------------------------------------
  73. --[[hooksecurefunc("UnitFramePortrait_Update",function(self)
  74.         if self.portrait then
  75.                 if UnitIsPlayer(self.unit) then
  76.                 if self.unit == "player" then return end
  77.                         local t = CLASS_ICON_TCOORDS[select(2,UnitClass(self.unit))]
  78.                         if t then
  79.                                 self.portrait:SetTexture("Interface\\TargetingFrame\\UI-Classes-Circles")
  80.                                 self.portrait:SetTexCoord(unpack(t))
  81.                         end                
  82.         else
  83.            self.portrait:SetTexCoord(0,1,0,1)
  84.         end                    
  85.         end
  86. end)]]--
  87. ----------------------------------------------------------------------------------------------------
  88. --Combat--
  89. ----------------------------------------------------------------------------------------------------
  90. 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()
  91.         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)
  92.         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()
  93.         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)
  94.  
  95. ----------------------------------------------------------------------------------------------------
  96. --EnemyCooldownsImproved--
  97. ----------------------------------------------------------------------------------------------------
  98. --wit4er
  99. local USS="UNIT_SPELLCAST_SUCCEEDED"
  100. local OE="OnEvent"
  101. local PvP="Interface\\Icons\\inv_jewelry_trinketpvp_01"
  102. local F="Frame"
  103. local CF=CreateFrame
  104. local BO="Border"
  105. local PvPT="PvP Trinket"
  106. local EMFH="Every Man For Himself"
  107. local UC=UnitClass
  108. local SCM=SendChatMessage
  109. local RW="RAID_WARNING"
  110. local xb=200 --x position
  111. local yb=530 --y position
  112. local sb=26  --icon size
  113. local ib=5   --interval
  114. function TrS(f,x,y,cd,T,s,h)
  115.          f:SetPoint("BOTTOMLEFT",x,y)
  116.          f:SetSize(s,s)
  117.          f.c=CF("Cooldown",cd)
  118.          f.c:SetAllPoints(f)
  119.                  f.t=f:CreateTexture(nil,BO)
  120.          f.t:SetAllPoints()
  121.          f.t:SetTexture(T);
  122.          if not h then
  123.                       f:Hide();
  124.          end
  125.                  f:RegisterEvent(USS)
  126. end
  127. function Ts(f,cd,U,N,S,TI)
  128.          if CPz(N,S,U) then
  129.                     f:Show();
  130.                     CooldownFrame_SetTimer(cd,GetTime(),TI,1)
  131.                         f.elapsed = 0                                   --hidden
  132.             f:SetScript('OnUpdate', function(self, elapsed)
  133.             if self.elapsed > TI+1 then
  134.             self:SetScript('OnUpdate', nil)
  135.             self:Hide();
  136.             else
  137.             self.elapsed = self.elapsed + elapsed
  138.             end
  139.          end)                                                       --hidden        
  140.                  end
  141. end
  142. function CPz(N,S,U)
  143.          if(N==S and
  144.                    (U=="arena1"
  145.                    or U=="arena2"
  146.                    or U=="arena3"
  147.                    or U=="arenapet1"
  148.                    or U=="arenapet2"
  149.                    or U=="arenapet3"
  150.                    or U=="target"
  151.                    or U=="focus"))then
  152.                    return true
  153.                    else
  154.                    return false
  155.                   end
  156. end
  157.  
  158. t1p="Interface\\Icons\\ability_rogue_shadowdance";t1=CF(F);TrS(t1,xb,yb,"cd1",t1p,sb,false);
  159. t1:SetScript(OE,function(self,event,...) Ts(t1,cd1,select(1,...),select(5,...),51713,60) end);
  160. t2p="Interface\\Icons\\ability_rogue_kidneyshot";t2=CF(F);TrS(t2,xb+sb,yb,"cd2",t2p,sb,false);
  161. t2:SetScript(OE,function(self,event,...) Ts(t2,cd2,select(1,...),select(5,...),408,20) end);
  162. t3p="Interface\\Icons\\spell_shadow_nethercloak";t3=CF(F);TrS(t3,xb+sb*2,yb,"cd3",t3p,sb,false);
  163. t3:SetScript(OE,function(self,event,...) Ts(t3,cd3,select(1,...),select(5,...),31224,90) end);
  164. t4p="Interface\\Icons\\ability_rogue_combatreadiness";t4=CF(F);TrS(t4,xb+sb*2,yb,"cd4",t4p,sb,false);
  165. t4:SetScript(OE,function(self,event,...) Ts(t4,cd4,select(1,...),select(5,...),74001,90) end);
  166. t5p="Interface\\Icons\\ability_vanish";t5=CF(F);TrS(t5,xb+sb*3,yb,"cd5",t5p,sb,false);
  167. t5:SetScript(OE,function(self,event,...) Ts(t5,cd5,select(1,...),select(5,...),1856,120) end);
  168. t6p="Interface\\Icons\\ability_rogue_dismantle";t6=CF(F);TrS(t6,xb+sb*4,yb,"cd6",t6p,sb,false);
  169. t6:SetScript(OE,function(self,event,...) Ts(t6,cd6,select(1,...),select(5,...),51722,60) end);
  170. t7p="Interface\\Icons\\ability_rogue_shadowstep";t7=CF(F);TrS(t7,xb+sb*5,yb,"cd7",t7p,sb,false);
  171. t7:SetScript(OE,function(self,event,...) Ts(t7,cd7,select(1,...),select(5,...),36554,24) end);
  172. t8p="Interface\\Icons\\spell_shadow_mindsteal";t8=CF(F);TrS(t8,xb+sb*6,yb,"cd8",t8p,sb,false);
  173. t8:SetScript(OE,function(self,event,...) Ts(t8,cd8,select(1,...),select(5,...),2094,120) end);
  174. t9p="Interface\\Icons\\ability_rogue_smoke";t9=CF(F);TrS(t9,xb+sb*7,yb,"cd9",t9p,sb,false);
  175. t9:SetScript(OE,function(self,event,...) Ts(t9,cd9,select(1,...),select(5,...),76577,180) end);
  176. t10p="Interface\\Icons\\ability_rogue_preparation";t10=CF(F);TrS(t10,xb+sb*8,yb,"cd10",t10p,sb,false);
  177. t10:SetScript(OE,function(self,event,...) Ts(t10,cd10,select(1,...),select(5,...),14185,300) end);
  178.  
  179. t11p="Interface\\Icons\\spell_shadow_deathscream";t11=CF(F);TrS(t11,xb,yb-(sb+ib),"cd11",t11p,sb,false);
  180. t11:SetScript(OE,function(self,event,...) Ts(t11,cd11,select(1,...),select(5,...),5484,32) end);
  181. t12p="Interface\\Icons\\spell_shadow_deathcoil";t12=CF(F);TrS(t12,xb+sb*2,yb-(sb+ib),"cd12",t12p,sb,false);
  182. t12:SetScript(OE,function(self,event,...) Ts(t12,cd12,select(1,...),select(5,...),6789,90) end);
  183. t13p="Interface\\Icons\\spell_shadow_demoniccircleteleport";t13=CF(F);TrS(t13,xb+sb,yb-(sb+ib),"cd13",t13p,sb,false);
  184. t13:SetScript(OE,function(self,event,...) Ts(t13,cd13,select(1,...),select(5,...),48020,25) end);
  185. t14p="Interface\\Icons\\spell_shadow_mindrot";t14=CF(F);TrS(t14,xb+sb*3,yb-(sb+ib),"cd14",t14p,sb,false);
  186. t14:SetScript(OE,function(self,event,...) Ts(t14,cd14,select(1,...),select(5,...),19647,24) end);
  187.  
  188. t15p="Interface\\Icons\\ability_mage_deepfreeze";t15=CF(F);TrS(t15,xb,yb-2*(sb+ib),"cd15",t15p,sb,false);
  189. t15:SetScript(OE,function(self,event,...) Ts(t15,cd15,select(1,...),select(5,...),44572,30) end);
  190. t16p="Interface\\Icons\\spell_frost_wizardmark";t16=CF(F);TrS(t16,xb+sb,yb-2*(sb+ib),"cd16",t16p,sb,false);
  191. t16:SetScript(OE,function(self,event,...) Ts(t16,cd16,select(1,...),select(5,...),11958,480) end);
  192. t17p="Interface\\Icons\\spell_arcane_blink";t17=CF(F);TrS(t17,xb+sb*2,yb-2*(sb+ib),"cd17",t17p,sb,false);
  193. t17:SetScript(OE,function(self,event,...) Ts(t17,cd17,select(1,...),select(5,...),1953,15) end);
  194. t59p="Interface\\Icons\\spell_frost_iceshock";t59=CF(F);TrS(t59,xb+sb*3,yb-2*(sb+ib),"cd59",t59p,sb,false);
  195. t59:SetScript(OE,function(self,event,...) Ts(t59,cd59,select(1,...),select(5,...),2139,24) end);
  196.  
  197. t18p="Interface\\Icons\\spell_shadow_soulleech_3";t18=CF(F);TrS(t18,xb,yb-3*(sb+ib),"cd18",t18p,sb,false);
  198. t18:SetScript(OE,function(self,event,...) Ts(t18,cd18,select(1,...),select(5,...),47476,120) end);
  199. t19p="Interface\\Icons\\spell_shadow_antimagicshell";t19=CF(F);TrS(t19,xb+sb,yb-3*(sb+ib),"cd19",t19p,sb,false);
  200. t19:SetScript(OE,function(self,event,...) Ts(t19,cd19,select(1,...),select(5,...),48707,45) end);
  201. t20p="Interface\\Icons\\spell_deathknight_iceboundfortitude";t20=CF(F);TrS(t20,xb+sb*2,yb-3*(sb+ib),"cd20",t20p,sb,false);
  202. t20:SetScript(OE,function(self,event,...) Ts(t20,cd20,select(1,...),select(5,...),48792,180) end);
  203. t21p="Interface\\Icons\\inv_sword_62";t21=CF(F);TrS(t21,xb+sb*3,yb-3*(sb+ib),"cd21",t21p,sb,false);
  204. t21:SetScript(OE,function(self,event,...) Ts(t21,cd21,select(1,...),select(5,...),47568,300) end);
  205. t22p="Interface\\Icons\\spell_shadow_raisedead";t22=CF(F);TrS(t22,xb+sb*4,yb-3*(sb+ib),"cd22",t22p,sb,false);
  206. t22:SetScript(OE,function(self,event,...) Ts(t22,cd22,select(1,...),select(5,...),49039,120) end);
  207. t23p="Interface\\Icons\\spell_deathknight_strangulate";t23=CF(F);TrS(t23,xb+sb*5,yb-3*(sb+ib),"cd23",t23p,sb,false);
  208. t23:SetScript(OE,function(self,event,...) Ts(t23,cd23,select(1,...),select(5,...),49576,25) end);
  209. t24p="Interface\\Icons\\spell_deathknight_antimagiczone";t24=CF(F);TrS(t24,xb+sb*6,yb-3*(sb+ib),"cd24",t24p,sb,false);
  210. t24:SetScript(OE,function(self,event,...) Ts(t24,cd24,select(1,...),select(5,...),51052,120) end);
  211. t25p="Interface\\Icons\\ability_deathknight_summongargoyle";t25=CF(F);TrS(t25,xb+sb*7,yb-3*(sb+ib),"cd25",t25p,sb,false);
  212. t25:SetScript(OE,function(self,event,...) Ts(t25,cd25,select(1,...),select(5,...),49206,180) end);
  213.  
  214. t26p="Interface\\Icons\\spell_shadow_psychicscream";t26=CF(F);TrS(t26,xb,yb-4*(sb+ib),"cd26",t26p,sb,false);
  215. t26:SetScript(OE,function(self,event,...) Ts(t26,cd26,select(1,...),select(5,...),8122,26) end);
  216. t27p="Interface\\Icons\\spell_shadow_psychicscream";t27=CF(F);TrS(t27,xb+sb,yb-4*(sb+ib),"cd27",t27p,sb,false);
  217. t27:SetScript(OE,function(self,event,...) Ts(t27,cd27,select(1,...),select(5,...),8122,30) end);
  218. t28p="Interface\\Icons\\spell_frost_windwalkon";t28=CF(F);TrS(t28,xb+sb*2,yb-4*(sb+ib),"cd28",t28p,sb,false);
  219. t28:SetScript(OE,function(self,event,...) Ts(t28,cd28,select(1,...),select(5,...),89485,45) end);
  220. t29p="Interface\\Icons\\spell_holy_painsupression";t29=CF(F);TrS(t29,xb+sb*3,yb-4*(sb+ib),"cd29",t29p,sb,false);
  221. t29:SetScript(OE,function(self,event,...) Ts(t29,cd29,select(1,...),select(5,...),33206,180) end);
  222. t30p="Interface\\Icons\\spell_shadow_dispersion";t30=CF(F);TrS(t30,xb+sb*4,yb-4*(sb+ib),"cd30",t30p,sb,false);
  223. t30:SetScript(OE,function(self,event,...) Ts(t30,cd30,select(1,...),select(5,...),47585,75) end);
  224. t31p="Interface\\Icons\\spell_shadow_psychichorrors";t31=CF(F);TrS(t31,xb+sb*5,yb-4*(sb+ib),"cd31",t31p,sb,false);
  225. t31:SetScript(OE,function(self,event,...) Ts(t31,cd31,select(1,...),select(5,...),64044,90) end);
  226. t32p="Interface\\Icons\\ability_priest_silence";t32=CF(F);TrS(t32,xb+sb*6,yb-4*(sb+ib),"cd32",t32p,sb,false);
  227. t32:SetScript(OE,function(self,event,...) Ts(t32,cd32,select(1,...),select(5,...),15487,45) end);
  228.  
  229. t33p="Interface\\Icons\\spell_holy_sealofvalor";t33=CF(F);TrS(t33,xb,yb-5*(sb+ib),"cd33",t33p,sb,false);
  230. t33:SetScript(OE,function(self,event,...) Ts(t33,cd33,select(1,...),select(5,...),1044,25) end);
  231. t34p="Interface\\Icons\\spell_holy_sealofmight";t34=CF(F);TrS(t34,xb+sb,yb-5*(sb+ib),"cd34",t34p,sb,false);
  232. t34:SetScript(OE,function(self,event,...) Ts(t34,cd34,select(1,...),select(5,...),853,40) end);
  233. t58p="Interface\\Icons\\spell_holy_sealofmight";t58=CF(F);TrS(t58,xb+sb*2,yb-5*(sb+ib),"cd58",t58p,sb,false);
  234. t58:SetScript(OE,function(self,event,...) Ts(t58,cd58,select(1,...),select(5,...),853,60) end);
  235. t35p="Interface\\Icons\\spell_holy_sealofsacrifice";t35=CF(F);TrS(t35,xb+sb*3,yb-5*(sb+ib),"cd35",t35p,sb,false);
  236. t35:SetScript(OE,function(self,event,...) Ts(t35,cd35,select(1,...),select(5,...),6940,90) end);
  237. t36p="Interface\\Icons\\spell_holy_sealofprotection";t36=CF(F);TrS(t36,xb+sb*4,yb-5*(sb+ib),"cd36",t36p,sb,false);
  238. t36:SetScript(OE,function(self,event,...) Ts(t36,cd36,select(1,...),select(5,...),1022,180) end);
  239. t37p="Interface\\Icons\\spell_holy_divineshield";t37=CF(F);TrS(t37,xb+sb*5,yb-5*(sb+ib),"cd37",t37p,sb,false);
  240. t37:SetScript(OE,function(self,event,...) Ts(t37,cd37,select(1,...),select(5,...),642,300) end);
  241. t38p="Interface\\Icons\\spell_holy_auramastery";t38=CF(F);TrS(t38,xb+sb*6,yb-5*(sb+ib),"cd38",t38p,sb,false);
  242. t38:SetScript(OE,function(self,event,...) Ts(t38,cd38,select(1,...),select(5,...),31821,120) end);
  243.  
  244. t39p="Interface\\Icons\\ability_warrior_charge";t39=CF(F);TrS(t39,xb,yb-6*(sb+ib),"cd39",t39p,sb,false);
  245. t39:SetScript(OE,function(self,event,...) Ts(t39,cd39,select(1,...),select(5,...),100,13) end);
  246. t40p="Interface\\Icons\\inv_mace_62";t40=CF(F);TrS(t40,xb+sb,yb-6*(sb+ib),"cd40",t40p,sb,false);
  247. t40:SetScript(OE,function(self,event,...) Ts(t40,cd40,select(1,...),select(5,...),85388,45) end);
  248. t41p="Interface\\Icons\\ability_heroicleap";t41=CF(F);TrS(t41,xb+sb*2,yb-6*(sb+ib),"cd41",t41p,sb,false);
  249. t41:SetScript(OE,function(self,event,...) Ts(t41,cd41,select(1,...),select(5,...),6544,60) end);
  250. t42p="Interface\\Icons\\spell_nature_ancestralguardian";t42=CF(F);TrS(t42,xb+sb*3,yb-6*(sb+ib),"cd42",t42p,sb,false);
  251. t42:SetScript(OE,function(self,event,...) Ts(t42,cd42,select(1,...),select(5,...),18499,30) end);
  252. t43p="Interface\\Icons\\ability_criticalstrike";t43=CF(F);TrS(t43,xb+sb*4,yb-6*(sb+ib),"cd43",t43p,sb,false);
  253. t43:SetScript(OE,function(self,event,...) Ts(t43,cd43,select(1,...),select(5,...),1719,300) end);
  254. t44p="Interface\\Icons\\ability_warrior_shieldwall";t44=CF(F);TrS(t44,xb+sb*5,yb-6*(sb+ib),"cd44",t44p,sb,false);
  255. t44:SetScript(OE,function(self,event,...) Ts(t44,cd44,select(1,...),select(5,...),871,300) end);
  256.  
  257. t45p="Interface\\Icons\\ability_hunter_pet_bear";t45=CF(F);TrS(t45,xb,yb-7*(sb+ib),"cd45",t45p,sb,false);
  258. t45:SetScript(OE,function(self,event,...) Ts(t45,cd45,select(1,...),select(5,...),16979,14) end);
  259. t46p="Interface\\Icons\\spell_druid_feralchargecat";t46=CF(F);TrS(t46,xb+sb,yb-7*(sb+ib),"cd46",t46p,sb,false);
  260. t46:SetScript(OE,function(self,event,...) Ts(t46,cd46,select(1,...),select(5,...),49376,28) end);
  261. t47p="Interface\\Icons\\spell_nature_stoneclawtotem";t47=CF(F);TrS(t47,xb+sb*2,yb-7*(sb+ib),"cd47",t47p,sb,false);
  262. t47:SetScript(OE,function(self,event,...) Ts(t47,cd47,select(1,...),select(5,...),22812,60) end);
  263. t48p="Interface\\Icons\\ability_druid_bash";t48=CF(F);TrS(t48,xb+sb*3,yb-7*(sb+ib),"cd48",t48p,sb,false);
  264. t48:SetScript(OE,function(self,event,...) Ts(t48,cd48,select(1,...),select(5,...),5211,60) end);
  265. t49p="Interface\\Icons\\ability_druid_tigersroar";t49=CF(F);TrS(t49,xb+sb*4,yb-7*(sb+ib),"cd49",t49p,sb,false);
  266. t49:SetScript(OE,function(self,event,...) Ts(t49,cd49,select(1,...),select(5,...),61336,180) end);
  267. t50p="Interface\\Icons\\ability_druid_berserk";t50=CF(F);TrS(t50,xb+sb*5,yb-7*(sb+ib),"cd50",t50p,sb,false);
  268. t50:SetScript(OE,function(self,event,...) Ts(t50,cd50,select(1,...),select(5,...),50334,180) end);
  269.  
  270. t51p="Interface\\Icons\\ability_golemstormbolt";t51=CF(F);TrS(t51,xb+sb*4,yb-2*(sb+ib),"cd51",t51p,sb,false);
  271. t51:SetScript(OE,function(self,event,...) Ts(t51,cd51,select(1,...),select(5,...),19503,30) end);
  272. t52p="Interface\\Icons\\spell_frost_chainsofice";t52=CF(F);TrS(t52,xb+sb*5,yb-2*(sb+ib),"cd52",t52p,sb,false);
  273. t52:SetScript(OE,function(self,event,...) Ts(t52,cd52,select(1,...),select(5,...),1499,30) end);
  274. t53p="Interface\\Icons\\ability_whirlwind";t53=CF(F);TrS(t53,xb+sb*6,yb-2*(sb+ib),"cd53",t53p,sb,false);
  275. t53:SetScript(OE,function(self,event,...) Ts(t53,cd53,select(1,...),select(5,...),19263,120) end);
  276. t54p="Interface\\Icons\\ability_rogue_feint";t54=CF(F);TrS(t54,xb+sb*7,yb-2*(sb+ib),"cd54",t54p,sb,false);
  277. t54:SetScript(OE,function(self,event,...) Ts(t54,cd54,select(1,...),select(5,...),781,16) end);
  278.  
  279. t55p="Interface\\Icons\\spell_shaman_hex";t55=CF(F);TrS(t55,xb+sb*4,yb-(sb+ib),"cd55",t55p,sb,false);
  280. t55:SetScript(OE,function(self,event,...) Ts(t55,cd55,select(1,...),select(5,...),51514,35) end);
  281. t56p="Interface\\Icons\\spell_shaman_spiritlink";t56=CF(F);TrS(t56,xb+sb*5,yb-(sb+ib),"cd56",t56p,sb,false);
  282. t56:SetScript(OE,function(self,event,...) Ts(t56,cd56,select(1,...),select(5,...),98008,180) end);
  283. t57p="Interface\\Icons\\spell_nature_tremortotem";t57=CF(F);TrS(t57,xb+sb*6,yb-(sb+ib),"cd57",t57p,sb,false);
  284. t57:SetScript(OE,function(self,event,...) Ts(t57,cd57,select(1,...),select(5,...),8143,60) end);
  285. ----------------------------------------------------------------------------------------------------
  286. --CombatTextFont--
  287. ----------------------------------------------------------------------------------------------------
  288. local fontName = "Interface\\AddOns\\NeilyoScript\\font.ttf"
  289. local fontHeight = 40
  290. local fFlags = ""
  291. local function FS_SetFont()
  292.     DAMAGE_TEXT_FONT = fontName
  293.     COMBAT_TEXT_HEIGHT = fontHeight
  294.     COMBAT_TEXT_CRIT_MAXHEIGHT = fontHeight + 2
  295.     COMBAT_TEXT_CRIT_MINHEIGHT = fontHeight - 2
  296.     local fName, fHeight, fFlags = CombatTextFont:GetFont()
  297.     CombatTextFont:SetFont(fontName, fontHeight, fFlags)
  298. end
  299. FS_SetFont()
  300. ----------------------------------------------------------------------------------------------------
  301. --Move Stopwatch and Hide all--
  302. ----------------------------------------------------------------------------------------------------
  303. local frame = CreateFrame("FRAME", "DefaultUIScrips")
  304. frame:RegisterEvent("PLAYER_ENTERING_WORLD")
  305.      local function eventHandler(self, event, ...)
  306.         --StopwatchFrame:Show()            
  307.         --StopwatchFrame:SetScale(.01)
  308.         --StopwatchFrame:ClearAllPoints()      
  309.         --StopwatchFrame:SetPoint("TOPLEFT",23400,0)
  310.         --StopwatchTicker:SetScale(100)    
  311.         --StopwatchTicker:SetPoint("TOPLEFT",0,-80)
  312.         --StopwatchFrame:SetMovable(false)
  313.         TargetFrameTextureFramePVPIcon:SetAlpha(0)
  314.         FocusFrameTextureFramePVPIcon:SetAlpha(0)      
  315.         PlayerPVPIcon:SetAlpha(0)                  
  316.         for i = 1, 12 do
  317.            _G["BonusActionButton"..i.."Name"]:Hide()
  318.            _G["ActionButton"..i.."Name"]:Hide()
  319.            _G["MultiBarBottomLeftButton"..i.."Name"]:Hide()
  320.            _G["MultiBarBottomRightButton"..i.."Name"]:Hide()
  321.            _G["ActionButton"..i.."HotKey"]:SetAlpha(0)
  322.            _G["BonusActionButton"..i.."HotKey"]:SetAlpha(0)
  323.            _G["MultiBarBottomLeftButton"..i.."HotKey"]:SetAlpha(0)
  324.            _G["MultiBarBottomRightButton"..i.."HotKey"]:SetAlpha(0)
  325.         end    
  326. end
  327. frame:SetScript("OnEvent", eventHandler)
  328. ----------------------------------------------------------------------------------------------------  
  329. --HP--
  330. ----------------------------------------------------------------------------------------------------
  331. local f=function(v)if(v>=1e4) then return ('%.1fk'):format(v/1e3):gsub('%.?0+([km])$','%1') else return v end end
  332.         hooksecurefunc("TextStatusBar_UpdateTextString",function(s)
  333.         if not GetCVarBool("statusTextPercentage") then
  334.             if s.TextString and s.currValue then
  335.             s.TextString:SetText(f(s.currValue))           
  336.           end
  337.      end
  338.     end)
  339. ----------------------------------------------------------------------------------------------------   
  340. --Safe Queue--
  341. ----------------------------------------------------------------------------------------------------
  342. local queueTime
  343. local queue = 0
  344. local button2 = StaticPopupDialogs["CONFIRM_BATTLEFIELD_ENTRY"].button2
  345. local remaining = 0
  346. local function SafeQueue_Timer()
  347.         local secs = GetBattlefieldPortExpiration(queue)
  348.         if secs > 0 then
  349.                 local p = StaticPopup_Visible("CONFIRM_BATTLEFIELD_ENTRY")    
  350.                 if p then
  351.                         local color
  352.                         if remaining ~= secs then
  353.                                 remaining = secs
  354.                                 if secs > 20 then
  355.                                         color = "f20ff20"
  356.                                 elseif secs > 10 then
  357.                                         color = "fffff00"
  358.                                 else
  359.                                         color = "fff0000"
  360.                                 end
  361.         local str=string.gsub(_G[p .. "Text"]:GetText(), ".+\n", "У вас есть |cf"..color.. SecondsToTime(secs) .. "|r чтобы вступить в битву\n\n")
  362.                                 _G[p .. "Text"]:SetText(str)
  363.        
  364.                         end
  365.                 end
  366.         end    
  367. end
  368.  
  369. local function SafeQueue_Update()
  370.         local queued
  371.         for i=1, GetMaxBattlefieldID() do
  372.                 local status, _, _, _, _, _, registeredMatch = GetBattlefieldStatus(i)
  373.                 if registeredMatch == 1 then
  374.                         if status == "queued" then
  375.                                 queued = true
  376.                                 if not queueTime then
  377.           queueTime = GetTime()
  378.         end    
  379.                         elseif status == "confirm" then
  380.                         if queueTime then
  381.                                 queueTime = nil          
  382.                         end
  383.         remaining = 0
  384.         queue = i        
  385.                         end
  386.                         break
  387.                 end
  388.         end
  389.         if not queued and queueTime then queueTime = nil end
  390. end
  391.  
  392. frame = CreateFrame("Frame", nil, UIParent)
  393. frame:SetScript("OnEvent", SafeQueue_Update)
  394. frame:SetScript("OnUpdate", SafeQueue_Timer)
  395. frame:RegisterEvent("UPDATE_BATTLEFIELD_STATUS")
  396. StaticPopupDialogs["CONFIRM_BATTLEFIELD_ENTRY"].button2 = nil
  397. StaticPopupDialogs["CONFIRM_BATTLEFIELD_ENTRY"].hideOnEscape = false
  398.  
  399. ----------------------------------------------------------------------------------------------------
  400. --Lorti Big Debuffs--
  401. ----------------------------------------------------------------------------------------------------
  402.   --[[hooksecurefunc("TargetFrame_UpdateAuraPositions", function(self, auraName, numAuras, numOppositeAuras,largeAuraList, updateFunc, maxRowWidth, offsetX)
  403.     local AURA_OFFSET_Y = 3
  404.     local LARGE_AURA_SIZE = 27 -- развер ВАШИХ баффов/дебаффов.
  405.     local SMALL_AURA_SIZE = 15 -- развер чужих баффов/дебаффов.
  406.     local size
  407.     local offsetY = AURA_OFFSET_Y
  408.     local rowWidth = 0
  409.     local firstBuffOnRow = 1
  410.     for i=1, numAuras do
  411.      if ( largeAuraList[i] ) then
  412.        size = LARGE_AURA_SIZE
  413.        offsetY = AURA_OFFSET_Y + AURA_OFFSET_Y
  414.      else
  415.        size = SMALL_AURA_SIZE
  416.      end
  417.      if ( i == 1 ) then
  418.        rowWidth = size
  419.        self.auraRows = self.auraRows + 1
  420.      else
  421.        rowWidth = rowWidth + size + offsetX
  422.      end
  423.      if ( rowWidth > maxRowWidth ) then
  424.        updateFunc(self, auraName, i, numOppositeAuras, firstBuffOnRow, size, offsetX, offsetY)
  425.        rowWidth = size
  426.        self.auraRows = self.auraRows + 1
  427.        firstBuffOnRow = i
  428.        offsetY = AURA_OFFSET_Y
  429.      else
  430.        updateFunc(self, auraName, i, numOppositeAuras, i - 1, size, offsetX, offsetY)
  431.      end
  432.     end
  433.     end)]]--
  434. ----------------------------------------------------------------------------------------------------   
  435. -- Class colors in arena frames
  436. ----------------------------------------------------------------------------------------------------
  437. local frame = CreateFrame("FRAME")
  438. frame:RegisterEvent("PLAYER_ENTERING_WORLD")
  439. frame:RegisterEvent("PARTY_MEMBERS_CHANGED")
  440. frame:RegisterEvent("PLAYER_TARGET_CHANGED")
  441. frame:RegisterEvent("PLAYER_FOCUS_CHANGED")
  442. frame:RegisterEvent("UNIT_FACTION")
  443. frame:RegisterEvent("ARENA_OPPONENT_UPDATE")
  444. frame:RegisterEvent("PLAYER_CONTROL_GAINED")
  445. frame:RegisterEvent("PLAYER_CONTROL_LOST")
  446. frame:RegisterEvent("ADDON_LOADED");
  447.  
  448. local function DoArenaColorHook()
  449.         hooksecurefunc("ArenaEnemyFrame_Unlock",
  450.                 function(self)
  451.                         local color=RAID_CLASS_COLORS[select(2,UnitClass(self.unit)) or ""]
  452.                         if color then
  453.                                 self.healthbar:SetStatusBarColor(color.r,color.g,color.b)
  454.                                 self.healthbar.lockColor=true
  455.                         end                    
  456.                 end
  457.         )
  458. end
  459.  
  460. local function eventHandler(self, event, arg, ...)
  461.         if (event == "UNIT_FACTION" and arg ~= "target" and arg ~= "focus") then return end
  462.        
  463.         if event == "ADDON_LOADED" then
  464.                 if arg == "Blizzard_ArenaUI" then
  465.                         self:UnregisterEvent(event);
  466.                         DoArenaColorHook();
  467.                 end
  468.         end            
  469.         if UnitExists("target") then                
  470.                 TargetFrameNameBackground:SetVertexColor(0.0, 0.0, 0.0, 0)
  471.         end
  472.         if UnitExists("focus") then                
  473.                 FocusFrameNameBackground:SetVertexColor(0.0, 0.0, 0.0, 0)
  474.         end
  475.        
  476.        
  477. end
  478. if IsAddOnLoaded("Blizzard_ArenaUI") then
  479.         DoArenaColorHook();
  480. end
  481. frame:SetScript("OnEvent", eventHandler)
  482. ----------------------------------------------------------------------------------------------------
  483. --Woundman DRTracker--
  484. ----------------------------------------------------------------------------------------------------
  485. USD="UNIT_SPELLCAST_SUCCEEDED";OT="OnEvent";FR="Frame";RF=CreateFrame;RD="Border";UE=UnitName
  486. CS=RF(FR) CS.c=RF("Cooldown","CST",CS.t) CS:RegisterEvent(USD)
  487. CS.c:SetAllPoints(CS) CS:SetPoint("TOPRIGHT",FocusFrame,-192,1)CS:SetSize(22,22)CS:Hide()CS.t=CS:CreateTexture(nil,RD)CS.t:SetAllPoints()CS.t:SetTexture("Interface\\Icons\\ability_rogue_kidneyshot")
  488. CS:SetScript(OT,function(self,event,...)if UE(select(1,...))==UE("player")and select(5,...)==1833 then CST:SetCooldown(GetTime(),23)CS:Show()CS.elapsed = 0 CS:SetScript('OnUpdate', function(self, elapsed)if self.elapsed > 24 then self:SetScript('OnUpdate', nil) self:Hide() else self.elapsed = self.elapsed + elapsed end end)end if UE(select(1,...))==UE("player")and select(5,...)==408 then CST:SetCooldown(GetTime(),25)CS:Show() CS.elapsed = 0 CS:SetScript('OnUpdate', function(self, elapsed)if self.elapsed > 26 then self:SetScript('OnUpdate', nil) self:Hide()else self.elapsed = self.elapsed + elapsed end end)end end)
  489. SP=RF(FR) SP.c=RF("Cooldown","SAP",SP.t) SP:RegisterEvent(USD)
  490. SP.c:SetAllPoints(SP) SP:SetPoint("TOPRIGHT",FocusFrame,-170,1)SP:Hide()SP:SetSize(22,22)SP.t=SP:CreateTexture(nil,RD)SP.t:SetAllPoints()SP.t:SetTexture("Interface\\Icons\\ability_gouge")
  491. SP:SetScript(OT,function(self,event,...)if UE(select(1,...))==UE("player")and select(5,...)==6770 then SAP:SetCooldown(GetTime(),27)SP:Show()SP.elapsed = 0 SP:SetScript('OnUpdate', function(self, elapsed)if self.elapsed > 28 then self:SetScript('OnUpdate', nil) self:Hide()else self.elapsed = self.elapsed + elapsed end end)end if UE(select(1,...))==UE("player")and select(5,...)==1776 then SAP:SetCooldown(GetTime(),23)SP:Show()SP.elapsed = 0 SP:SetScript('OnUpdate', function(self, elapsed)if self.elapsed > 24 then self:SetScript('OnUpdate', nil) self:Hide()else self.elapsed = self.elapsed + elapsed end end)end end)
  492. GR=RF(FR) GR.c=RF("Cooldown","GAR",GR.t)  
  493. GR.c:SetAllPoints(GR) GR:SetPoint("TOPRIGHT",FocusFrame,-148,1)GR:Hide()GR:SetSize(22,22)GR.t=GR:CreateTexture(nil,RD)GR.t:SetAllPoints()GR.t:SetTexture("Interface\\Icons\\spell_shadow_mindrot")
  494. GR:SetScript(OT,function(self,event,...)if UE(select(1,...))==UE("player")and select(5,...)==703 then GAR:SetCooldown(GetTime(),23)GR:Show()GR.elapsed = 0 GR:SetScript('OnUpdate', function(self, elapsed)if self.elapsed > 25 then self:SetScript('OnUpdate', nil) self:Hide()else self.elapsed = self.elapsed + elapsed end end)end end) GR:RegisterEvent(USD)
  495. ----------------------------------------------------------------------------------------------------
  496. --DR Tracker
  497. ----------------------------------------------------------------------------------------------------
  498. --drx=86 f:SetPoint(dp,gaef(f,n),dp,drx+(r-1)*25,-2)
  499. DRt={{5211,12809,44572,47481,2812,853,408,22570,6785,30283,46968,20549,85388,1833,9005},{118,6770,1776,49203,28272,28271,61305,61721,61780,82691,51514},{5782,8122,5484,20511,2094}}
  500. drx=100;drs=35;dp="RIGHT";dre="COMBAT_LOG_EVENT_UNFILTERED"drp="PLAYER_ENTERING_WORLD"dra="ARENA_OPPONENT_UPDATE"LoadAddOn("Blizzard_ArenaUI")function gaef(f,n)return _G["ArenaEnemyFrame"..n.."HealthBar"]end
  501. function rDR(f)f.e=1;f.t:SetTexture(nil)f.c:Hide()end function sDR(f)f.e=f.e+1;f.c:Show()end function gDRt(i,j)return _G["drc"..i..":"..j]end function runDR(f,n)CooldownFrame_SetTimer(f.c,GetTime(),18,1)eDR(f,n)sDR(f)oDR(n)end
  502. function eDR(f,n)local t=1;f:SetScript("OnUpdate",function(s,e)t=t+e;if(t>=18)then f:SetScript("OnUpdate",nil)rDR(f)oDR(n)end end)end function cDR(f,n,s)if f.e<4 then local _,_,t=GetSpellInfo(s)f.t:SetTexture(t)runDR(f,n)end end
  503. function oDR(n)local r=1;for j in ipairs(DRt)do local f=gDRt(n,j)f:SetPoint(dp,gaef(f,n),dp,drx+(r-1)*40,-2)r=r+1;end end function uDR(n,s)for i,t in ipairs(DRt)do for _,j in ipairs(t)do if s==j then cDR(gDRt(n,i),n,s)end end end end
  504. function DRc(i,j)local f=CreateFrame("Frame",nil,UIParent)f:SetSize(drs,drs)f.t=f:CreateTexture(nil,"BORDER")f.t:SetAllPoints(true)f.c=CreateFrame("Cooldown",nil,f)f.c:SetAllPoints(f)f.e=1 return f end
  505. function clDR(_,e,_,_,_,_,_,d,_,_,_,s)if(e=="SPELL_AURA_REMOVED" or e=="SPELL_AURA_REFRESH")then for i=1,5 do local ag=UnitGUID("arena"..i)if(ag ~= nil and d==ag)then uDR(i,s)end end end end
  506. function iDRt(o,m)for i=1,m do for j in ipairs(DRt)do local f=gDRt(i,j)rDR(f)if o then f:Show()end end end end for i=1,5 do for j in ipairs(DRt)do _G["drc"..i..":"..j]=DRc(i,j)end end
  507. dt=CreateFrame("Frame")dt:SetScript("OnEvent",function(_,e,...)if e==dre then clDR(...)elseif e==dra then iDRt(1,GetNumArenaOpponents())else iDRt(nil,5)end end)dt:RegisterEvent(dra)dt:RegisterEvent(drp)dt:RegisterEvent(dre)
  508. ----------------------------------------------------------------------------------------------------
  509. ---- Say interrupt
  510. ----------------------------------------------------------------------------------------------------
  511. --[[local f = CreateFrame("Frame")
  512. local function Update(self, event, ...)
  513.    
  514.     local pvpType = GetZonePVPInfo()   
  515.         f:UnregisterEvent("ZONE_CHANGED_NEW_AREA") 
  516.     if event == "COMBAT_LOG_EVENT_UNFILTERED" then
  517.         if UnitInRaid("player") and GetNumRaidMembers() > 5 then channel = "RAID" elseif GetNumPartyMembers() > 0 then channel = "PARTY" else return end
  518.         -- local channel = "SAY"
  519.         local timestamp, eventType, _, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, _, spellID, spellName, _, extraskillID, extraSkillName = ...
  520.         if eventType == "SPELL_INTERRUPT" and sourceName == UnitName("player") then
  521.             SendChatMessage("Interrupted -> "..GetSpellLink(extraskillID).."!", channel)
  522.         end
  523.     end
  524. end
  525. f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
  526. f:RegisterEvent("ZONE_CHANGED_NEW_AREA")
  527. f:SetScript("OnEvent", Update)]]--
  528. ----------------------------------------------------------------------------------------------------
  529. --Class Colored PartyFrames--
  530. ----------------------------------------------------------------------------------------------------
  531. local UnitIsPlayer,--UnitPlayerOrPetInParty,
  532. UnitIsConnected, UnitClass, RAID_CLASS_COLORS =
  533. UnitIsPlayer,
  534. --UnitPlayerOrPetInParty,
  535. UnitIsConnected,
  536. UnitClass, RAID_CLASS_COLORS
  537. local _, class, c
  538. local function colour(statusbar, unit, name)
  539.       if UnitIsPlayer(unit) and
  540.           --UnitPlayerOrPetInParty(unit) and
  541.           UnitIsConnected(unit) and
  542.           unit == statusbar.unit and
  543.           UnitClass(unit) then
  544.           _, class = UnitClass(unit)
  545.           c = CUSTOM_CLASS_COLORS and
  546.           CUSTOM_CLASS_COLORS[class] or
  547.           RAID_CLASS_COLORS[class]
  548.           statusbar:SetStatusBarColor(c.r, c.g, c.b)         
  549.           statusbar = _G["PlayerFrame".."HealthBar"]:SetStatusBarColor(0.1, 1.0, 0.1)--playerframe fix
  550.                   --statusbar = _G["TargetFrame".."HealthBar"]:SetStatusBarColor(0.1, 1.0, 0.1)--targetframe fix
  551.                   --statusbar = _G["FocusFrame".."HealthBar"]:SetStatusBarColor(0.1, 1.0, 0.1)--focusframe fix
  552.                  
  553. end end
  554.  
  555. hooksecurefunc("UnitFrameHealthBar_Update", colour)
  556. hooksecurefunc("HealthBar_OnValueChanged", function(self)
  557. colour(self, self.unit)
  558. end)
  559. local sb = _G.GameTooltipStatusBar
  560. local addon = CreateFrame("Frame", "StatusColour")
  561. addon:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
  562. addon:SetScript("OnEvent", function()
  563. colour(sb, "mouseover")
  564. end)
  565.  
  566. hooksecurefunc("UnitFrame_Update", function(self)
  567.         if UnitClass(self.unit) then
  568.                 local c = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[select(2,UnitClass(self.unit))]
  569.                 self.name:SetTextColor(c.r,c.g,c.b,1)              
  570. self.name:SetFont("Fonts\\skurri.ttf", 12)    
  571.         end
  572. end)                    
  573. ----------------------------------------------------------------------------------------------------
  574. --PartyTrinkets--
  575. ----------------------------------------------------------------------------------------------------
  576. --[[local trinkets = {}
  577. local events = CreateFrame("Frame")        
  578. local partyFrame, trinket
  579.     for i = 1, MAX_PARTY_MEMBERS do
  580.         partyFrame = "PartyMemberFrame"..i
  581.         trinket = CreateFrame("Cooldown", partyFrame.."Trinket")
  582.         trinket:SetPoint("TOPRIGHT", partyFrame, 30, -6)
  583.         trinket:SetSize(24, 24)
  584.         trinket.icon = trinket:CreateTexture(nil, "BACKGROUND")
  585.         trinket.icon:SetAllPoints()
  586.         trinket.icon:SetTexture("Interface\\Icons\\inv_jewelry_trinketpvp_02")
  587.         trinket:Hide()
  588.         trinkets["party"..i] = trinket
  589.     end
  590. function events:UNIT_SPELLCAST_SUCCEEDED(unitID, spell, rank, lineID, spellID)
  591.     if not trinkets[unitID] then
  592.         return
  593.     end
  594.     if spellID == 59752 or spellID == 42292 then
  595.         CooldownFrame_SetTimer(trinkets[unitID], GetTime(), 120, 1)        
  596.     elseif spellID == 7744 then
  597.         CooldownFrame_SetTimer(trinkets[unitID], GetTime(), 45, 1)        
  598.     end
  599. end
  600. function events:PLAYER_ENTERING_WORLD()        
  601.              self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")              
  602.              for _, trinket in pairs(trinkets) do
  603.                trinket:SetCooldown(0, 0)
  604.                trinket:Hide()
  605.              end
  606. end
  607. events:SetScript("OnEvent", function(self, event, ...) return self[event](self, ...) end)
  608. events:RegisterEvent("PLAYER_ENTERING_WORLD")]]--
  609. ----------------------------------------------------------------------------------------------------
  610. --Dispell--
  611. ----------------------------------------------------------------------------------------------------
  612. hooksecurefunc("TargetFrame_UpdateAuras", function(s)
  613.         for i = 1, MAX_TARGET_BUFFS do
  614.                 _, _, ic, _, dT = UnitBuff(s.unit, i)
  615.                 if(ic and (not s.maxBuffs or i<=s.maxBuffs)) then
  616.                         fS=_G[s:GetName()..'Buff'..i..'Stealable']
  617.                         if(UnitIsEnemy(PlayerFrame.unit, s.unit) and dT=='') then
  618.                                 fS:Show()
  619.                         else
  620.                                 fS:Hide()
  621.                         end
  622.                 end
  623.         end
  624. end)
  625.  
  626. ----------------------------------------------------------------------------------------------------
  627. --FocusFrameTweaks--
  628. ----------------------------------------------------------------------------------------------------
  629. hooksecurefunc(FocusFrameSpellBar, "Show", function()
  630.  
  631.         FocusFrameSpellBar:ClearAllPoints()
  632.  
  633.         FocusFrameSpellBar:SetPoint("LEFT", FocusFrame, "LEFT", -190, 5)
  634.  
  635.         FocusFrameSpellBar.SetPoint = function() end
  636.  
  637. end)
  638.  
  639. frame:SetScript("OnEvent", eventHandler)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement