Advertisement
wit4er

wit4er's config v3

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