Mercurial > wow > skeencore3beastmasteryhunter
comparison SkeenCoreLib.lua @ 0:4dbfbe163c49 v1.0.1
Added files
| author | Emil Madsen <skeen@cs.au.dk> |
|---|---|
| date | Tue, 28 Jun 2011 14:10:09 +0200 |
| parents | |
| children | 629e6e84fd18 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:4dbfbe163c49 |
|---|---|
| 1 function GetDebuffDuration(name) | |
| 2 local name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitDebuff("target", name) | |
| 3 | |
| 4 if name ~= nil and isMine == "player" then | |
| 5 return (expirationTime - GetTime()) | |
| 6 else | |
| 7 return 0 | |
| 8 end | |
| 9 end | |
| 10 | |
| 11 function GetBuffDuration(name) | |
| 12 local name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitBuff("player", name) | |
| 13 | |
| 14 if name ~= nil then | |
| 15 return (expirationTime - GetTime()) | |
| 16 else | |
| 17 return 0 | |
| 18 end | |
| 19 end | |
| 20 | |
| 21 function GetCooldown(name) | |
| 22 local start, duration, enabled = GetSpellCooldown(name); | |
| 23 if duration ~= nil then | |
| 24 return (duration + start - GetTime()) | |
| 25 else | |
| 26 return 60 | |
| 27 end | |
| 28 end |
