pkuderov

GuardEvent func for MonkTimers

Apr 28th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. GuardEvent = function(self, event, unit)
  2.     if event == "UNIT_AURA" then
  3.         if unit == "player" then
  4.             local start, duration, enabled = GetSpellCooldown(self.cdspell)
  5.             if duration and duration > 0 then
  6.                 self.timer:Start(start+duration-GetTime(), duration)
  7.                 self.timer:StartBarTimer(start+duration-GetTime(), duration)
  8.             else
  9.                 self.timer:Stop()
  10.                 self.timer:StopBarTimer()
  11.             end
  12.         end
  13.     else
  14.         GlowEvent(self, event, unit)
  15.     end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment