vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | |
2 | ace:RegisterFunctions(AH_MailCollect, { |
||
3 | |||
4 | version = AH_MailCollect.ACEUTIL_VERSION, |
||
5 | |||
6 | ParseCash = function(c) |
||
7 | local c=ace.round(c or 0) |
||
8 | return floor(c/(100*100)),mod(floor(c/100),100),mod(floor(c),100) |
||
9 | end, |
||
10 | |||
11 | ColorText = function(c,...) |
||
12 | if(not c) then return ace.concat(arg) end |
||
13 | if(type(c)=="table") then |
||
14 | return "|cff"..ace.HexDigit(c[1] or c.r)..ace.HexDigit(c[2] or c.g).. |
||
15 | ace.HexDigit(c[3] or c.b)..ace.concat(arg).."|r" |
||
16 | end |
||
17 | return "|cff"..c..ace.concat(arg).."|r" |
||
18 | end, |
||
19 | |||
20 | CashTextLetters = function(cash,sep,nocol) |
||
21 | -- Arg order for these doesn't matter, so swap them if sep is TRUE |
||
22 | if((sep==TRUE) or (sep==true)) then sep=nocol; nocol=TRUE end |
||
23 | local g,s,c=ace.ParseCash(cash or 0) |
||
24 | local str="" |
||
25 | if(g>0) then |
||
26 | if(nocol) then str=g..ACEG_LETTER_GOLD |
||
27 | else |
||
28 | str=ace.ColorText(ACEG_COLOR_HEX_GOLD,g..ACEG_LETTER_GOLD) |
||
29 | end |
||
30 | end |
||
31 | if(s>0) then |
||
32 | if(str ~= "") then str = str..(sep or " ") end |
||
33 | if(nocol) then str=str..s..ACEG_LETTER_SILVER |
||
34 | else |
||
35 | str=str..ace.ColorText(ACEG_COLOR_HEX_SILVER,s..ACEG_LETTER_SILVER) |
||
36 | end |
||
37 | end |
||
38 | if(c>0) then |
||
39 | if(str ~= "") then str=str..(sep or " ") end |
||
40 | if(nocol) then str=str..c..ACEG_LETTER_COPPER |
||
41 | else |
||
42 | str=str..ace.ColorText(ACEG_COLOR_HEX_COPPER,c..ACEG_LETTER_COPPER) |
||
43 | end |
||
44 | end |
||
45 | return str |
||
46 | end, |
||
47 | |||
48 | }) |