vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | CooldownCountCT_Saved_GenerateButtonUpdateList = nil; |
2 | CooldownCountCT_BarNames = {"CT_ActionButton", "CT2_ActionButton", "CT3_ActionButton", "CT4_ActionButton", "CT5_ActionButton"}; |
||
3 | CooldownCountCT_ButtonNameFormat = "CT%s_ActionButton%d"; |
||
4 | CooldownCountCT_NumberOfButtons = 12; |
||
5 | CooldownCountCT_NumberOfBars = 5; |
||
6 | CooldownCountCT_NormalBar = 1; |
||
7 | |||
8 | function CooldownCountCT_OnLoad() |
||
9 | if ( CooldownCountCT_NormalBar == 1 ) then |
||
10 | for k,v in CooldownCountCT_BarNames do |
||
11 | if ( getglobal(v.."1") ) then |
||
12 | table.insert(CooldownCount_ButtonNames, v); |
||
13 | end |
||
14 | end |
||
15 | else |
||
16 | CooldownCountCT_Saved_GenerateButtonUpdateList = CooldownCount_GenerateButtonUpdateList; |
||
17 | CooldownCount_GenerateButtonUpdateList = CooldownCountCT_GenerateButtonUpdateList; |
||
18 | end |
||
19 | CooldownCount_RegenerateList(); |
||
20 | end |
||
21 | |||
22 | |||
23 | function CooldownCountCT_GenerateButtonUpdateList() |
||
24 | local updateList = CooldownCountCT_Saved_GenerateButtonUpdateList(); |
||
25 | local name = nil; |
||
26 | local barString = ""; |
||
27 | for bar = 1, CooldownCountCT_NumberOfBars do |
||
28 | if ( bar > 1 ) then |
||
29 | barString = bar..""; |
||
30 | end |
||
31 | for i = 1, CooldownCountCT_NumberOfButtons do |
||
32 | name = format(CooldownCountCT_ButtonNameFormat, barString, i); |
||
33 | if ( getglobal(name) ) then |
||
34 | table.insert(updateList, name); |
||
35 | end |
||
36 | end |
||
37 | end |
||
38 | return updateList; |
||
39 | end |