Advertisement
Guest User

Untitled

a guest
Mar 30th, 2012
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.28 KB | None | 0 0
  1. local a = CreateFrame("Frame")
  2. a:SetScript("OnEvent",function(self,event)
  3.     if event == "PLAYER_ENTERING_WORLD" then
  4.         -- Debug Chat
  5.         ChatTypeInfo.WHISPER.sticky = 0
  6.         ChatTypeInfo.BN_WHISPER.sticky = 0
  7.         -- Hide DragonFrames at ActionBars etc
  8.         MainMenuBarLeftEndCap:Hide()
  9.         MainMenuBarRightEndCap:Hide()
  10.         MainMenuBarTexture0:Hide()
  11.         MainMenuBarTexture1:Hide()
  12.         MainMenuBarTexture2:Hide()
  13.         MainMenuBarTexture3:Hide()
  14.         BonusActionBarFrameTexture1:SetAlpha(0)
  15.         BonusActionBarFrameTexture2:SetAlpha(0)
  16.         BonusActionBarFrameTexture3:SetAlpha(0)
  17.         BonusActionBarFrameTexture4:SetAlpha(0)
  18.         MainMenuMaxLevelBar0:Hide()
  19.         MainMenuMaxLevelBar1:Hide()
  20.         MainMenuMaxLevelBar2:Hide()
  21.         MainMenuMaxLevelBar3:Hide()
  22.         PetName:Hide()
  23.         TargetFrameTextureFramePVPIcon:SetAlpha(0)
  24.         FocusFrameTextureFramePVPIcon:SetAlpha(0)
  25.         PlayerPVPIcon:SetAlpha(0)
  26.         for i=1,12 do
  27.        _G["ActionButton"..i.."HotKey"]:SetAlpha(0)
  28.        _G["MultiBarBottomRightButton"..i.."HotKey"]:SetAlpha(0)
  29.        _G["MultiBarBottomLeftButton"..i.."HotKey"]:SetAlpha(0)
  30.        _G["BonusActionButton"..i.."HotKey"]:SetAlpha(0)
  31.        _G["MultiBarLeftButton"..i.."HotKey"]:SetAlpha(0)
  32.        _G["MultiBarRightButton"..i.."HotKey"]:SetAlpha(0)
  33.        --_G["ActionButton"..i.."Name"]:SetAlpha(0)
  34.        --_G["MultiBarBottomRightButton"..i.."Name"]:SetAlpha(0)
  35.        --_G["MultiBarBottomLeftButton"..i.."Name"]:SetAlpha(0)
  36.        --_G["BonusActionButton"..i.."Name"]:SetAlpha(0)
  37.        --_G["MultiBarLeftButton"..i.."Name"]:SetAlpha(0)
  38.        --_G["MultiBarRightButton"..i.."Name"]:SetAlpha(0)
  39.         end
  40.         -- Hide Left Raid Frame Manager
  41.         CompactRaidFrameManager:SetAlpha(0)
  42.         -- Bottom Left/Right bar moving
  43.         MultiBarBottomLeft:ClearAllPoints()
  44.         MultiBarBottomLeft:SetPoint("BOTTOMLEFT",ActionButton1,"TOPLEFT",0,6)
  45.         MultiBarBottomLeft.SetPoint = function() end
  46.         MultiBarBottomRight:ClearAllPoints()
  47.         MultiBarBottomRight:SetPoint("BOTTOMLEFT",ActionBarDownButton,"TOPLEFT",9.2,19)
  48.         MultiBarBottomRight.SetPoint = function() end
  49.         -- FocusFrame under TargetFrame
  50.         FocusFrame:ClearAllPoints()
  51.         FocusFrame:SetPoint("CENTER", TargetFrame, "CENTER", 0, -236)
  52.         FocusFrame.SetPoint = function() end
  53.         -- PetBar Moving
  54.         PetActionBarFrame:ClearAllPoints()
  55.         PetActionBarFrame:SetPoint("BOTTOMLEFT",ActionButton1,"TOPLEFT",-7,46.8)
  56.         -- Left/Right Bars moving
  57.         MultiBarLeft:ClearAllPoints()
  58.         MultiBarLeft:SetPoint("BOTTOMRIGHT", UIParent,-43,86)
  59.         MultiBarLeft.SetPoint = function() end
  60.         MultiBarRight:ClearAllPoints()
  61.         MultiBarRight:SetPoint("BOTTOMRIGHT", UIParent,-1,86)
  62.         MultiBarRight.SetPoint = function() end
  63.         -- MultiCastActionBarFrame
  64.         --MultiCastActionBarFrame:ClearAllPoints()
  65.         --MultiCastActionBarFrame:SetPoint("BOTTOMLEFT",ActionButton1,"TOPLEFT",23,45.5)
  66.         --MultiCastActionBarFrame.SetPoint = function() end
  67.         -- Stance Bar moving
  68.         ShapeshiftBarFrame:ClearAllPoints()
  69.         ShapeshiftBarFrame:SetPoint("BOTTOM", UIParent, "BOTTOM", -473, 86)
  70.         ShapeshiftBarFrame.SetPoint = function() end
  71.         -- Silence Stopwatch
  72.         f=CreateFrame("Frame")
  73.         f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
  74.         f:SetScript("OnEvent", function(self,event,...)
  75.         if UnitIsEnemy(select(1,...),"player")==1
  76.         and select(5,...)==15487
  77.         then Stopwatch_StartCountdown(0,0,44) Stopwatch_Play()
  78.         end
  79.         end)
  80.         ----------------------------------------------:: Silence Stopwatch
  81.         -- Stopwatch improve
  82.         StopwatchFrame:Show()
  83.         --StopwatchFrame:SetScale(.01)
  84.         --StopwatchFrame:ClearAllPoints()
  85.         --StopwatchFrame:SetPoint("TOPLEFT",40500,0)
  86.         --StopwatchTicker:SetScale(100)
  87.         --StopwatchTicker:SetPoint("TOPLEFT",430,-241)
  88.         --StopwatchFrame:SetMovable(false)
  89.         StopwatchFrame:SetScale(.01)
  90.         StopwatchFrame:ClearAllPoints()
  91.         StopwatchFrame:SetPoint("TOPLEFT",42150,0)
  92.         StopwatchTicker:SetScale(120)
  93.         StopwatchTicker:SetPoint("TOPLEFT",430,-199.4)
  94.      
  95.  
  96.         ----------------------------------------------:: Stopwatch improve
  97.         end
  98.        
  99.                 -- Trinket
  100.  
  101. if event == "ADDON_LOADED" then
  102.         if IsAddOnLoaded("Blizzard_ArenaUI") then
  103.             --if select(2,IsInInstance()) == "arena" then
  104.                 ArenaEnemyFrame1:ClearAllPoints()
  105.                 ArenaEnemyFrames:SetScale(1.1)
  106.                 ArenaEnemyFrame1:SetPoint("TOPRIGHT",20,6)
  107. rc=35;rfc=CooldownFrame_SetTimer;aef="ArenaEnemyFrame";hb="HealthBar";trt=GetItemIcon(37865)ctf = CreateFrame;oe="ARENA_OPPONENT_UPDATE"ve="PLAYER_ENTERING_WORLD"tr="RIGHT"LoadAddOn("Blizzard_ArenaUI")
  108. function Cr(i)local f=ctf("Frame",nil,UIParent)f:SetPoint(tr,_G[aef..i..hb],tr,67,0)f:SetSize(rc,rc)f.t=f:CreateTexture(nil,"BORDER")f.t:SetAllPoints(true)f.t:SetTexture(trt)f.c=CreateFrame("Cooldown",nil,f)f.c:SetAllPoints(f)return f;end
  109. function ur(f,i)f:SetScript("OnEvent",function(_,e,u,_,_,_,s)if(u=="arena"..i)then if(s==42292 or s==59752)then rfc(f.c,GetTime(),120,1)elseif(s==7744)then rfc(f.c,GetTime(),30,1)end end end)f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")end
  110. for i=1,5 do _G["rf"..i]=Cr(i)local f=_G["rf"..i]ur(f,i)f:Hide()end function str(o,m)for i=1, m do local f=_G["rf"..i]if o then f:Show()else f:Hide()f.c:Hide()end end end
  111. tk=ctf("Frame")tk:SetScript("OnEvent",function(_,e)if e==oe then str(1,GetNumArenaOpponents())else str(nil,5)end end)tk:RegisterEvent(oe)tk:RegisterEvent(ve)      
  112.         --end
  113.             end
  114. end
  115. a:RegisterEvent("ADDON_LOADED")
  116. ----------------------------------------------:: Trinket
  117. -- WotF announce
  118. local wotf = CreateFrame("Frame")
  119. wotf.playername = UnitName("player")
  120. wotf:SetScript("OnEvent",function(...)
  121.         local h = {...}
  122.  
  123.         if ((h[14]== 7744)
  124.         and (h[11] == wotf.playername)
  125.         and (h[4] == "SPELL_AURA_APPLIED"))
  126.         then
  127.                 SendChatMessage("WotF", "PARTY")
  128.         end
  129. end)
  130. wotf:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
  131. ----------------------------------------------:: WotF announce
  132. -- Trinket announce
  133. local trinket = CreateFrame("Frame")
  134. trinket.playername = UnitName("player")
  135. trinket:SetScript("OnEvent",function(...)
  136.         local n = {...}
  137.  
  138.         if ((n[14]== 42292)
  139.         and (n[11] == trinket.playername)
  140.         and (n[4] == "SPELL_AURA_APPLIED"))
  141.         then
  142.                 SendChatMessage("Trinket", "PARTY")
  143.         end
  144. end)
  145. trinket:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
  146. -- Hide AFK/DND in chat tabs
  147. local previd, data, result = 0, {}, nil
  148.  
  149. local function filter(self, event, msg, name, _, _, _, _, _, _, _, _, id)
  150.     if previd == id then
  151.         return result
  152.     else
  153.         previd = id
  154.         if data[name] and data[name] == msg then
  155.             result = true
  156.         else
  157.             data[name] = msg
  158.             result = false
  159.         end
  160.         return result
  161.     end
  162. end
  163.  
  164. ChatFrame_AddMessageEventFilter("CHAT_MSG_AFK", filter)
  165. ChatFrame_AddMessageEventFilter("CHAT_MSG_DND", filter)
  166. ----------------------------------------------:: Hide AFK/DND in chat tabs
  167. -- Hide Chat Tabs
  168. CHAT_FRAME_TAB_NORMAL_NOMOUSE_ALPHA = 0
  169. CHAT_FRAME_TAB_SELECTED_NOMOUSE_ALPHA = 0
  170.  
  171. for i=1,NUM_CHAT_WINDOWS do
  172. local tab = _G["ChatFrame"..i.."Tab"]
  173. tab.noMouseAlpha = 0
  174. tab:SetAlpha(0)
  175. end
  176. end)
  177. a:RegisterEvent("PLAYER_ENTERING_WORLD")
  178. ----------------------------------------------:: Hide Chat Tabs
  179.  
  180. ----------------------------------------------:: 3
  181.  
  182. _,Class=UnitClass("player");   
  183. if Class == "WARRIOR" then
  184.     bl  = {6673,469,871,1719,21118,84584, 85730}   
  185. elseif Class == "SHAMAN" then
  186.     bl={52127,53390,32734,73685}
  187. elseif Class == "PALADIN" then
  188.     bl = {85497,88819,54149}
  189. elseif Class == "PRIEST" then
  190.     bl = {6346, 96267, 10060}
  191. elseif Class == "DRUID" then
  192.     bl={52127,32734,61295,55277,8178,73685,16177,96230,52109}
  193. elseif Class == "ROGUE" then
  194.     bl={52127,32734,61295,55277,8178,73685,16177,96230,52109}  
  195. elseif Class == "MAGE" then
  196.     bl={64343, 44544, 57761}
  197. elseif Class == "WARLOCK" then
  198.     bl={52127,32734,61295,55277,8178,73685,16177,96230,52109}
  199. elseif Class == "HUNTER" then
  200.     bl={52127,32734,61295,55277,8178,73685,16177,96230,52109}
  201. elseif Class == "DEATHKNIGHT" then
  202.     bl={57330, 81340, 53365}
  203. end
  204.  
  205. ----------------------------------------------:: 1
  206. bs=30;
  207. xb=-415.3;
  208. yb=339.6;
  209. br=3;
  210.  
  211. bdr="BORDER"
  212. be="UNIT_AURA"
  213. cbf=CreateFrame;
  214. gi=GetSpellInfo;
  215. bm=math.ceil;
  216. fm=math.floor;
  217. st=STANDARD_TEXT_FONT;
  218. function cu(s) return UnitBuff("player",gi(s))end
  219. ----------------------------------------------:: 2
  220. function Cb(i,s)
  221.     local _,_,t3=gi(s)
  222.     local f=cbf("Frame")
  223.     f:SetSize(bs,bs)
  224.     f.t=f:CreateTexture(nil,bdr)
  225.     f.t:SetAllPoints(true)
  226.     f.t:SetTexture(t3)
  227.     f.f=f:CreateFontString(nil,bdr)
  228.     f.f:SetFont(st,12,"OUTLINE")
  229.     f.f:SetPoint("BOTTOMRIGHT",0,0)
  230.     return f;
  231. end
  232. ----------------------------------------------:: 3
  233. function vb(s,i,row)
  234.     local b1,_,_,b4=cu(s)
  235.     local f=_G["B"..i]
  236.     if b1 then
  237.         f:Show()
  238.         f:SetPoint("CENTER",xb+(bs+5)*bm((row-1)%br),yb-(bs+10)*bm(row/br))
  239.         if(b4>1)then
  240.             f.f:SetText(b4)
  241.         else
  242.             f.f:SetText("")
  243.         end
  244.         row=row+1;
  245.     end
  246.    
  247.     return row;
  248. end
  249. ----------------------------------------------:: 4
  250. function ub()
  251.     for i,s in ipairs(bl)do
  252.     local b,_,_,_,_,_,k=cu(s)
  253.         if b then
  254.             local vt=fm(k-GetTime())               
  255.             if (vt>=60)then
  256.                 vt=bm(vt/60)
  257.                 _G["B"..i].c:SetText(vt.."m")
  258.             elseif vt >= 0 then
  259.                 _G["B"..i].c:SetText(vt.."s")
  260.             end                    
  261.         end
  262.     end
  263. end
  264. ----------------------------------------------:: 5
  265. function Cc(f)
  266.     f.c=f:CreateFontString(nil,bdr)
  267.     f.c:SetFont(st,12,"OUTLINE")
  268.     f.c:SetPoint("CENTER",0,-25)
  269. end
  270.  
  271. function db()
  272.     for i in ipairs(bl)do
  273.         _G["B"..i]:Hide()
  274.     end
  275. end
  276. ----------------------------------------------:: 6
  277. for i,s in ipairs(bl)do
  278.     _G["B"..i]=Cb(i,s)
  279.     Cc(_G["B"..i])
  280.     _G["B"..i]:Hide()
  281.    
  282. end
  283.  
  284. function bb()  
  285.     db()
  286.     local bw=1;
  287.     for i,s in ipairs(bl)do
  288.         bw=vb(s,i,bw)
  289.     end
  290. end
  291.  
  292.  
  293. bk=cbf("Frame")
  294. bk:SetScript("OnEvent",bb)
  295. bk:SetScript("OnUpdate",ub)
  296. bk:RegisterEvent(be)
  297. ----------------------------------------------:: 7
  298.  
  299. cs=15;
  300. ps=1;
  301. ctp="CENTER"
  302. ptp="BOTTOMRIGHT"
  303. cp=5;
  304. ct=UNIT_NAME_FONT;
  305.  
  306. crt=2;
  307. cDB={}
  308. action={}
  309. ccf=CreateFrame;
  310. gac=GetActionCooldown;
  311. ol="OUTLINE"
  312. cpe="PLAYER_ENTERING_WORLD"
  313. cau="ACTIONBAR_UPDATE_COOLDOWN"
  314. co="OnUpdate"
  315. ----------------------------------------------:: 1
  316.  
  317. function rt(f)
  318.     f.e=nil
  319.     f.t:SetText("")
  320.     f:SetScript(co,nil)
  321. end
  322.  
  323. function sf(f,v)
  324.     f.t:SetFont(ct,f.s*v,ol)
  325. end
  326.  
  327. function acv(b)
  328.     local x=b.cooldown
  329.     x.a=b.action
  330.    
  331.     action[x]=x
  332. end
  333.  
  334. function scv(p,f,po,s)
  335.     if(s>1)then
  336.         f.t:SetPoint(po,p)
  337.     end
  338.     f.s=s;
  339. end
  340.  
  341. ----------------------------------------------:: 2
  342.  
  343. function sr(f,e)
  344.     if(e>60)then
  345.         sf(f,0.7)
  346.         if(f.s==cs)then
  347.             return"%d:%02d",e,e
  348.         else
  349.             return"%dm",e+60,e
  350.         end
  351.     elseif(e>=cp)then
  352.         sf(f,1)
  353.         f.t:SetTextColor(1,1,0,1)
  354.         return"%d",e
  355.     elseif(e>1)then
  356.         sf(f,0.9)
  357.         f.t:SetTextColor(1,0,0,1)      
  358.         return"%d",e
  359.     else
  360.         return
  361.     end
  362. end
  363.  
  364. ----------------------------------------------:: 3
  365. function suc(f)
  366.     if not f.e then
  367.         f.e=1;
  368.         f:SetScript(co,function(s,e)
  369.             f.c=f.c+e;
  370.             local fo,v1,v2=sr(f,f.r-f.c)
  371.             if not fo then
  372.                 rt(f)
  373.             elseif not v2 then
  374.                 f.t:SetFormattedText(fo,v1)
  375.             else
  376.                 f.t:SetTextColor(1,1,1,1)
  377.                 f.t:SetFormattedText(fo,v1/60,v2%60)
  378.             end
  379.         end)
  380.     end
  381. end
  382. ----------------------------------------------:: 4
  383. function scs(p,f)  
  384.     if(p:GetSize()<35)then
  385.         scv(p,f,ptp,ps)
  386.     else
  387.         scv(p,f,ctp,cs)
  388.     end
  389. end
  390.  
  391. function gict(f)
  392.     local c=ccf("Frame",nil,f)
  393.     c:SetFrameLevel(f:GetFrameLevel()+5)
  394.     c.t=c:CreateFontString(nil,"OVERLAY")
  395.     c.t:SetAllPoints(c)
  396.     scs(f:GetParent(),c)
  397.     return c;
  398. end
  399. ----------------------------------------------:: 5
  400.  
  401. function gct(f)
  402.     if not cDB[f]then
  403.         local c=gict(f)
  404.         c:SetSize(c.s*crt,c.s*crt)
  405.         sf(c,1)
  406.         cDB[f]=c;
  407.     end
  408.     return cDB[f]
  409. end
  410. ------------------
  411.  
  412. function cvf(f,s,d)
  413.     local c=gct(f)
  414.    
  415.     if(s and d)then
  416.         c.b=s;
  417.         c.d=d;
  418.         if(s>0 and d>1.5)then          
  419.             c.c=0;
  420.             c.r=d-(GetTime()-s);
  421.             suc(c)
  422.         else
  423.             rt(c)
  424.         end
  425.     end
  426. end
  427. ----------------------------------------------:: 6
  428. function cvc(DB)
  429.     for c in pairs(DB)do
  430.         if c.a then
  431.             local s,d=gac(c.a)
  432.             cvf(c,s,d)
  433.         end
  434.     end
  435. end
  436.  
  437. function pcv(_,e)
  438.     if e==cau then
  439.         cvc(action)
  440.     else
  441.         cvc(cDB)
  442.     end
  443. end
  444.  
  445. for _,b in pairs(ActionBarButtonEventsFrame.frames)do
  446.     acv(b)
  447. end
  448.  
  449. ----------------------------------------------:: 7
  450.  
  451. vc=ccf("Frame")
  452. vc:SetScript("OnEvent",pcv)
  453. vc:RegisterEvent(cpe)
  454. vc:RegisterEvent(cau)
  455.  
  456. hooksecurefunc(getmetatable(ActionButton1Cooldown).__index,"SetCooldown",cvf)
  457. hooksecurefunc("SetActionUIButton",acv)
  458.  
  459. ----------------------------------------------:: 8
  460.  
  461.  
  462. _,Class=UnitClass("player");
  463. if Class == "WARRIOR" then
  464.     li={}
  465.     cd={}
  466. elseif Class == "SHAMAN" then
  467.     li={57994,6552,1766,47528,96231,80965,2139,19647}
  468.     cd={5,9,9,9,9,9,23,23}
  469. elseif Class == "PALADIN" then
  470.     li={57994,6552,1766,47528,96231,80965,2139,19647}
  471.     cd={5,9,9,9,9,9,23,23}
  472. elseif Class == "PRIEST" then
  473.     li={57994,6552,1766,47528,96231,80965,2139,19647}
  474.     cd={5,9,9,9,9,9,23,23}
  475. elseif Class == "DRUID" then
  476.     li={}
  477.     cd={}
  478. elseif Class == "ROGUE" then
  479.     li={}
  480.     cd={}
  481. elseif Class == "MAGE" then
  482.     li={57994,6552,1766,47528,96231,80965,2139,19647}
  483.     cd={5,9,9,9,9,9,23,23}
  484. elseif Class == "WARLOCK" then
  485.     li={}
  486.     cd={}
  487. elseif Class == "DEATHKNIGHT" then
  488.     li={}
  489.     cd={}
  490. end
  491.  
  492.  
  493. fl=0;
  494. ic=35;
  495. xp=-123.5;
  496. yp=-158.5;
  497. n=8;
  498. sfc=CooldownFrame_SetTimer;
  499. crf=CreateFrame;
  500. ce=math.ceil;
  501. ih=IsInInstance;
  502. gsi=GetSpellInfo;
  503. up=UIParent
  504. pe="PLAYER_ENTERING_WORLD"
  505. cdf="Cooldown"
  506.  
  507. function cf(i,s,x,y)
  508.     local _,_,t=gsi(s)
  509.     local f=crf("Frame",nil,up)
  510.     f:SetPoint("CENTER",x,y)
  511.     f:SetSize(ic,ic)
  512.     f.t = f:CreateTexture(nil,"BORDER")
  513.     f.t:SetAllPoints(true)
  514.     f.t:SetTexture(t)
  515.     f.c=CreateFrame(cdf,nil,f)
  516.     f.c:SetAllPoints(f)
  517.     f.c:SetDrawEdge(true)
  518.     f.c:SetReverse(reverse)
  519.     return f;
  520. end
  521.  
  522. function ud(f,ls,lc)
  523.     f:SetScript("OnEvent",
  524.     function(_,_,_,e,_,_,_,b,_,_,_,_,_,s)
  525.         if((bit.band(b,0x40) == 0x40)and e=="SPELL_CAST_SUCCESS"and s==ls)then
  526.             sfc(f.c,GetTime(),lc,1)
  527.         end
  528.     end)   
  529.     f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
  530. end
  531.  
  532. for i,s in ipairs(li)do
  533.     _G["ib"..i] = cf(i,s,xp+(ic+0)*ce((i-1)%n),yp-(ic+5)*ce(i/n))
  534.     ud(_G["ib"..i],s,cd[i])
  535. end
  536.  
  537. ik=crf("Frame")
  538. ik:SetScript("OnEvent",
  539. function()
  540.     local _,t=ih()
  541.     for i,s in ipairs(li)do
  542.         local f=_G["ib"..i]
  543.         if(t=="arena"or fl==0)then             
  544.             f:Show()
  545.             f.c:Show()         
  546.         else           
  547.             f:Hide()
  548.             f.c:Hide()     
  549.         end
  550.     end
  551. end)
  552. ik:RegisterEvent(pe)
  553. hooksecurefunc("ActionButton_OnEvent",function(self, event, ...)
  554.                 if ( event == "PLAYER_TARGET_CHANGED" ) then
  555.                         self.newTimer = self.rangeTimer
  556.                 end
  557.         end)
  558.  
  559.         hooksecurefunc("ActionButton_UpdateUsable",function(self)
  560.                 local icon = _G[self:GetName().."Icon"]
  561.                 local valid = IsActionInRange(self.action)
  562.  
  563.                 if ( valid == 0 ) then
  564.                         icon:SetVertexColor(1.0, 0.1, 0.1) -- SetAlpha(0.3)SetVertexColor(1.0, 0.1, 0.1)
  565.                 end
  566.         end)
  567.  
  568.         hooksecurefunc("ActionButton_OnUpdate",function(self, elapsed)
  569.                 local rangeTimer = self.newTimer
  570.  
  571.                 if ( rangeTimer ) then
  572.                         rangeTimer = rangeTimer - elapsed
  573.  
  574.                         if ( rangeTimer <= 0 ) then
  575.                                 ActionButton_UpdateUsable(self)
  576.                                 rangeTimer = TOOLTIP_UPDATE_TIME
  577.                         end
  578.  
  579.                         self.newTimer = rangeTimer
  580.                 end
  581.         end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement