Mercurial > wow > reagentmaker
comparison utils.lua @ 0:eba26c900e99
Initial commit, save state before using secure menus
| author | contrebasse |
|---|---|
| date | Mon, 28 Mar 2011 22:32:26 +0200 |
| parents | |
| children | ed0582126cae |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:eba26c900e99 |
|---|---|
| 1 local addonName, A = ... | |
| 2 | |
| 3 do | |
| 4 -- WoW frames | |
| 5 local DEFAULT_CHAT_FRAME = DEFAULT_CHAT_FRAME | |
| 6 | |
| 7 function A.DEBUG(msg) | |
| 8 DEFAULT_CHAT_FRAME:AddMessage(msg or "nil",1,0,0) | |
| 9 end -- function | |
| 10 end | |
| 11 | |
| 12 do | |
| 13 -- Lua functions | |
| 14 local select = select | |
| 15 local tonumber = tonumber | |
| 16 local sfind = string.find | |
| 17 | |
| 18 function A.link2ID(link) | |
| 19 return tonumber(select(3,sfind(link or "", "-*:(%d+)[:|].*")) or "") | |
| 20 end -- function | |
| 21 end -- do |
