lotrointerface.com
Search Downloads

LoTROInterface SVN KragenBars

[/] [branches/] [3.21/] [KragenBars/] [CaptainBars.lua] - Blame information for rev 72

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 72 Kragenwar-3044
import "Turbine.UI";
2 Kragenwar-3044
import "Turbine.UI.Lotro";
3 Kragenwar-3044
import "Turbine.Gameplay";
4 Kragenwar-3044
import "KragenPlugs.Utils";
5 Kragenwar-3044
import "KragenPlugs.KragenBars";
6 Kragenwar-3044
 
7 Kragenwar-3044
CaptainBars = class( KragenPlugs.KragenBars.ClassBar );
8 Kragenwar-3044
 
9 Kragenwar-3044
function CaptainBars:Constructor()
10 Kragenwar-3044
 
11 Kragenwar-3044
        KragenPlugs.KragenBars.ClassBar.Constructor( self );
12 Kragenwar-3044
 
13 Kragenwar-3044
    -- SET AND UPDATE DEFAULT SETTINGS
14 Kragenwar-3044
    if (not settings.class) then
15 Kragenwar-3044
        settings.class = vars.playerclass;
16 Kragenwar-3044
        self:DefaultSettings();
17 Kragenwar-3044
        self:ShowSetup();
18 Kragenwar-3044
    else
19 Kragenwar-3044
        self.settings = settings.classinfo;
20 Kragenwar-3044
        if (settings.vers ~= vars.vers) then
21 Kragenwar-3044
                self:UpdateSettings();
22 Kragenwar-3044
        end
23 Kragenwar-3044
    end
24 Kragenwar-3044
 
25 Kragenwar-3044
        -- CLASS SPECIFIC VARIABLES
26 Kragenwar-3044
    self.fear = 0;
27 Kragenwar-3044
 
28 Kragenwar-3044
        -- DEFINE THE EFFECT LIST BASED ON CLIENT LANGUAGE
29 Kragenwar-3044
        self.DefineEffectList = function()
30 Kragenwar-3044
                self.effectlist = {};
31 Kragenwar-3044
                -- ENGLISH CLIENT
32 Kragenwar-3044
                if (settings.language == 1) then
33 Kragenwar-3044
                        self.effectlist['EnemyDefeatResponse']          = 'Enemy Defeat Response';
34 Kragenwar-3044
                        self.effectlist['FellowDefeatResponse']         = 'Fellow Defeat Response';
35 Kragenwar-3044
                        self.effectlist['BattleReadied']                        = 'Battle-readied';
36 Kragenwar-3044
                        self.effectlist['BattleHardened']                       = 'Battle-hardened';
37 Kragenwar-3044
                        self.effectlist['Motivated']                            = 'Motivated';
38 Kragenwar-3044
                        self.effectlist['InDefenceOfMiddleEarth']       = 'In Defence of Middle-earth';
39 Kragenwar-3044
                        self.effectlist['OnGuard']                                      = 'On Guard';
40 Kragenwar-3044
                        self.effectlist['RelentlessAttack']                     = 'Relentless Attack';
41 Kragenwar-3044
                        self.effectlist['Focus']                                        = 'Focus';
42 Kragenwar-3044
                        self.effectlist['BannerOfWar']                          = 'Banner of War';
43 Kragenwar-3044
                        self.effectlist['ImprovedBannerOfWar']          = 'Improved Banner of War';
44 Kragenwar-3044
                        self.effectlist['BannerOfHope']                         = 'Banner of Hope';
45 Kragenwar-3044
                        self.effectlist['ImprovedBannerOfHope']         = 'Improved Banner of Hope';
46 Kragenwar-3044
                        self.effectlist['BannerOfVictory']                      = 'Banner of Victory';
47 Kragenwar-3044
                        self.effectlist['ImprovedBannerOfVictory']      = 'Improved Banner of Victory';
48 Kragenwar-3044
 
49 Kragenwar-3044
                -- FRENCH CLIENT
50 Kragenwar-3044
                elseif (settings.language == 2) then
51 Kragenwar-3044
                        self.effectlist['EnemyDefeatResponse']          = 'Evènement de défaite (ennemi)';
52 Kragenwar-3044
                        self.effectlist['FellowDefeatResponse']         = 'Evénement de défaite (allié)';
53 Kragenwar-3044
                        self.effectlist['BattleReadied']                        = 'Battle-readied';
54 Kragenwar-3044
                        self.effectlist['BattleHardened']                       = 'Battle-hardened';
55 Kragenwar-3044
                        self.effectlist['Motivated']                            = 'Motivation';
56 Kragenwar-3044
                        self.effectlist['InDefenceOfMiddleEarth']       = 'Défense de la Terre du Milieu';
57 Kragenwar-3044
                        self.effectlist['OnGuard']                                      = 'En garde';
58 Kragenwar-3044
                        self.effectlist['RelentlessAttack']                     = 'Attaque retenue';
59 Kragenwar-3044
                        self.effectlist['Focus']                                        = 'Concentration';
60 Kragenwar-3044
                        self.effectlist['BannerOfWar']                          = 'Bannière de Guerre';
61 Kragenwar-3044
                        self.effectlist['ImprovedBannerOfWar']          = 'Bannière de Guerre améliorée';
62 Kragenwar-3044
                        self.effectlist['BannerOfHope']                         = "Bannière d'Espoir";
63 Kragenwar-3044
                        self.effectlist['ImprovedBannerOfHope']         = "Bannière d'Espoir améliorée";
64 Kragenwar-3044
                        self.effectlist['BannerOfVictory']                      = 'Bannière de Victoire';
65 Kragenwar-3044
                        self.effectlist['ImprovedBannerOfVictory']      = 'Bannière de Victoire améliorée';
66 Kragenwar-3044
                        Turbine.Shell.WriteLine("Some features may not function with the French Client.  If you would like to help with French effect names goto http://www.lotrointerface.com/downloads/info384-KragenBars.html");
67 Kragenwar-3044
 
68 Kragenwar-3044
                -- GERMAN CLIENT
69 Kragenwar-3044
                elseif (settings.language == 3) then
70 Kragenwar-3044
                        self.effectlist['EnemyDefeatResponse']          = 'Erwiderung "Vernichtung des Gegners"';
71 Kragenwar-3044
                        self.effectlist['FellowDefeatResponse']         = 'Erwiderung "Vernichtung eines Gefährten"';
72 Kragenwar-3044
                        self.effectlist['BattleReadied']                        = 'Battle-readied';
73 Kragenwar-3044
                        self.effectlist['BattleHardened']                       = 'Battle-hardened';
74 Kragenwar-3044
                        self.effectlist['Motivated']                            = 'Motiviert';
75 Kragenwar-3044
                        self.effectlist['InDefenceOfMiddleEarth']       = 'Verteidigung von Mittelerde';
76 Kragenwar-3044
                        self.effectlist['OnGuard']                                      = 'In Bereitschaft';
77 Kragenwar-3044
                        self.effectlist['RelentlessAttack']                     = 'Gnadenloser Angriff';
78 Kragenwar-3044
                        self.effectlist['Focus']                                        = 'Fokus';
79 Kragenwar-3044
                        self.effectlist['BannerOfWar']                          = 'Kriegsbanner';
80 Kragenwar-3044
                        self.effectlist['ImprovedBannerOfWar']          = 'Verbesserung: Kriegsbanner';
81 Kragenwar-3044
                        self.effectlist['BannerOfHope']                         = 'Banner der Hoffnung';
82 Kragenwar-3044
                        self.effectlist['ImprovedBannerOfHope']         = 'Verbesserung: Banner der Hoffnung';
83 Kragenwar-3044
                        self.effectlist['BannerOfVictory']                      = 'Banner des Sieges';
84 Kragenwar-3044
                        self.effectlist['ImprovedBannerOfVictory']      = 'Verbesserung: Banner des Sieges';
85 Kragenwar-3044
                        Turbine.Shell.WriteLine("Some features may not function with the German Client.  If you would like to help with German effect names goto http://www.lotrointerface.com/downloads/info384-KragenBars.html");
86 Kragenwar-3044
                end
87 Kragenwar-3044
        end
88 Kragenwar-3044
 
89 Kragenwar-3044
    -- BUILD WINDOWS BARS SKILLS AND MULTIS --
90 Kragenwar-3044
 
91 Kragenwar-3044
    -- Build Windows
92 Kragenwar-3044
    self.windows["Healing"]                     = SkillWindow("Healing",                        1, 1, 4, 1,     self.settings["Healing"]         );
93 Kragenwar-3044
        self.windows["Buffs"]                   = SkillWindow("Buffs",                          5, 1, 3, 1,     self.settings["Buffs"]           );
94 Kragenwar-3044
        self.windows["ClassItems"]              = SkillWindow("Class Items",                    9, 1, 3, 1,     self.settings["ClassItems"]      );
95 Kragenwar-3044
    self.windows["Marks"]                       = SkillWindow("Marks",                          1, 2, 3, 1,     self.settings["Marks"]           );
96 Kragenwar-3044
    self.windows["ShieldBro"]           = SkillWindow("Shield Brother",         4, 2, 4, 1,     self.settings["ShieldBro"]   );
97 Kragenwar-3044
    self.windows["BattleBuffs"]         = SkillWindow("Battle Buffs",           9, 2, 2, 1,     self.settings["BattleBuffs"] );
98 Kragenwar-3044
    self.windows["Defeat"]                      = SkillWindow("DefeatResponse",         1, 3, 4, 1,     self.settings["Defeat"]          );
99 Kragenwar-3044
        self.windows["Emergency"]               = SkillWindow("Emergency",                      5, 3, 2, 1,     self.settings["Emergency"]       );
100 Kragenwar-3044
    self.windows["Rez"]                         = SkillWindow("Rez",                            7, 3, 2, 1,     self.settings["Rez"]             );
101 Kragenwar-3044
    self.windows["Banners"]                     = SkillWindow("Banners/Heralds",        10, 3, 2, 1,    self.settings["Banners"]         );
102 Kragenwar-3044
    self.windows["Debuff"]                      = SkillWindow("Debuff",                         9, 3, 1, 1,     self.settings["Debuff"]          );
103 Kragenwar-3044
        self.windows["Attack"]                  = SkillWindow("Attack",                         1, 4, 4, 1,     self.settings["Attack"]          );
104 Kragenwar-3044
    self.windows["Gated"]                       = SkillWindow("Gated",                          5, 4, 3, 1,     self.settings["Gated"]           );
105 Kragenwar-3044
    self.windows["Utility"]                     = SkillWindow("Utility",                        8, 4, 1, 1,     self.settings["Utility"]         );
106 Kragenwar-3044
    self.windows["Threat"]                      = SkillWindow("Threat",                         9, 4, 3, 1,     self.settings["Threat"]          );
107 Kragenwar-3044
 
108 Kragenwar-3044
    -- Build Bars
109 Kragenwar-3044
    self.bars["Attack"]                 = SkillBar(self.windows["Attack"],                      1, 1, 4, 1, true, false);
110 Kragenwar-3044
    self.bars["Gated"]                  = SkillBar(self.windows["Gated"],                       1, 1, 3, 1, true, false);
111 Kragenwar-3044
    self.bars["Marks"]                  = SkillBar(self.windows["Marks"],                       1, 1, 3, 1, true, true);
112 Kragenwar-3044
    self.bars["MultiMark"]              = SkillBar(self.windows["Marks"],                       1, 1, 1, 1, true, true);
113 Kragenwar-3044
    self.bars["ShieldBro"]              = SkillBar(self.windows["ShieldBro"],           1, 1, 4, 1, true, false);
114 Kragenwar-3044
    self.bars["Defeat"]                 = SkillBar(self.windows["Defeat"],                      1, 1, 4, 1, true, true);
115 Kragenwar-3044
    self.bars["Healing"]                = SkillBar(self.windows["Healing"],             1, 1, 4, 1, true, false);
116 Kragenwar-3044
    self.bars["Buffs"]                  = SkillBar(self.windows["Buffs"],                       1, 1, 3, 1, true, false);
117 Kragenwar-3044
    self.bars["Emergency"]              = SkillBar(self.windows["Emergency"],           1, 1, 2, 1, true, false);
118 Kragenwar-3044
    self.bars["Rez"]                    = SkillBar(self.windows["Rez"],                         1, 1, 2, 1, true, false);
119 Kragenwar-3044
    self.bars["Threat"]                 = SkillBar(self.windows["Threat"],                      1, 1, 3, 1, true, false);
120 Kragenwar-3044
    self.bars["Utility"]                = SkillBar(self.windows["Utility"],             1, 1, 1, 1, true, false);
121 Kragenwar-3044
    self.bars["Debuff"]                 = SkillBar(self.windows["Debuff"],                      1, 1, 1, 1, true, false);
122 Kragenwar-3044
    self.bars["BattleBuffs"]    = SkillBar(self.windows["BattleBuffs"],         1, 1, 2, 1, true, false);
123 Kragenwar-3044
    self.bars["Banners"]                = SkillBar(self.windows["Banners"],             1, 1, 2, 1, true, false);
124 Kragenwar-3044
        self.bars["ClassItems"]         = SkillBar(self.windows["ClassItems"],          1, 1, 3, 1, true, false);
125 Kragenwar-3044
 
126 Kragenwar-3044
        -- Build Skills
127 Kragenwar-3044
    self.skills["DefensiveStrike"]                      = SkillSlot(self.bars["Attack"],        1, 1, true, { 1, 54 }, { "0x70002F73", "0x7000FF86" } );
128 Kragenwar-3044
    self.skills["SureStrike"]                           = SkillSlot(self.bars["Attack"],        2, 1, true, 1, "0x700215CF");
129 Kragenwar-3044
    self.skills["BattleShout"]                          = SkillSlot(self.bars["Attack"],        3, 1, true, 1, "0x70002F67");
130 Kragenwar-3044
    self.skills["CuttingAttack"]                        = SkillSlot(self.bars["Attack"],        4, 1, true, 4, "0x70003E4C");
131 Kragenwar-3044
 
132 Kragenwar-3044
    self.skills["DevastatingBlow"]                      = SkillSlot(self.bars["Gated"],         1, 1, not self.settings["Features"].gated, 2, "0x70002FCF");
133 Kragenwar-3044
    self.skills["PressingAttack"]                       = SkillSlot(self.bars["Gated"],         2, 1, not self.settings["Features"].gated, 10, "0x70003E50");
134 Kragenwar-3044
    self.skills["BladeOfElendil"]                       = SkillSlot(self.bars["Gated"],         3, 1, not self.settings["Features"].gated, { 30, 52 }, { "0x7000AD9A", "0x70017D31" } );
135 Kragenwar-3044
 
136 Kragenwar-3044
    self.skills["NobleMark"]                            = SkillSlot(self.bars["Marks"],         1, 1, not self.settings["Features"].multimarks, 12, "0x70003E4F");
137 Kragenwar-3044
        self.skills["TellingMark"]                              = SkillSlot(self.bars["Marks"],         2, 1, not self.settings["Features"].multimarks, 18, "0x70003E4D");
138 Kragenwar-3044
    self.skills["RevealingMark"]                        = SkillSlot(self.bars["Marks"],         3, 1, not self.settings["Features"].multimarks, 30, "0x70003E56");
139 Kragenwar-3044
 
140 Kragenwar-3044
    self.skills["ShieldBrother"]                        = SkillSlot(self.bars["ShieldBro"], 1, 1, true, { 22, 64 }, { "0x7000A1D8", "0x70020DF6" } );
141 Kragenwar-3044
    self.skills["Inspire"]                                      = SkillSlot(self.bars["ShieldBro"], 2, 1, true, 22, "0x7000A1D7");
142 Kragenwar-3044
    self.skills["ToArms"]                                       = SkillSlot(self.bars["ShieldBro"], 3, 1, true, 40, "0x7000AA0D");
143 Kragenwar-3044
    self.skills["StrengthOfWill"]                       = SkillSlot(self.bars["ShieldBro"], 4, 1, true, 48, "0x7000B058");
144 Kragenwar-3044
 
145 Kragenwar-3044
    self.skills["RallyingCry"]                          = SkillSlot(self.bars["Defeat"],        1, 1, false, 2, "0x70002F4F");
146 Kragenwar-3044
    self.skills["WarCry"]                                       = SkillSlot(self.bars["Defeat"],        2, 1, false, 4, "0x70002F58");
147 Kragenwar-3044
    self.skills["RoutingCry"]                           = SkillSlot(self.bars["Defeat"],        3, 1, false, 8, "0x70002F61");
148 Kragenwar-3044
    self.skills["ShadowsLament"]                        = SkillSlot(self.bars["Defeat"],        4, 1, self.settings["Features"].lament, 60, "0x7000FF8B");
149 Kragenwar-3044
 
150 Kragenwar-3044
    self.skills["WordsOfCourage"]                       = SkillSlot(self.bars["Healing"],       1, 1, true, 14, "0x70003E51");
151 Kragenwar-3044
    self.skills["MusterCourage"]                        = SkillSlot(self.bars["Healing"],       2, 1, true, 16, "0x70002F99");
152 Kragenwar-3044
    self.skills["ValiantStrike"]                        = SkillSlot(self.bars["Healing"],       3, 1, true, 58, "0x7000FF6D");
153 Kragenwar-3044
    self.skills["ShieldOfTheDunadain"]          = SkillSlot(self.bars["Healing"],       4, 1, self.settings["Features"].shield, 41, "0x700012F9");
154 Kragenwar-3044
 
155 Kragenwar-3044
    self.skills["MotivatingSpeech"]                     = SkillSlot(self.bars["Buffs"],         1, 1, true, 16, "0x70003E52");
156 Kragenwar-3044
    self.skills["IDOME"]                                        = SkillSlot(self.bars["Buffs"],         2, 1, self.settings["Features"].idome, 41, "0x7000130D");
157 Kragenwar-3044
 
158 Kragenwar-3044
    self.skills["LastStand"]                            = SkillSlot(self.bars["Emergency"], 2, 1, true, 22, "0x70003E54");
159 Kragenwar-3044
        self.skills["InHarmsWay"]                               = SkillSlot(self.bars["Emergency"], 1, 1, true, 36, "0x70003E58");
160 Kragenwar-3044
 
161 Kragenwar-3044
    self.skills["EscapeFromDarkness"]           = SkillSlot(self.bars["Rez"],           1, 1, true, 20, "0x70002F45");
162 Kragenwar-3044
    self.skills["CryOfVengence"]                        = SkillSlot(self.bars["Rez"],           2, 1, false, 32, "0x70003E57");
163 Kragenwar-3044
 
164 Kragenwar-3044
    self.skills["Kick"]                                         = SkillSlot(self.bars["Utility"],       1, 1, true, 44, "0x7000AA0E");
165 Kragenwar-3044
 
166 Kragenwar-3044
        self.skills["ThreateningShout"]                 = SkillSlot(self.bars["Threat"],        1, 1, true, 26, "0x70002FD5");
167 Kragenwar-3044
    self.skills["GraveWound"]                           = SkillSlot(self.bars["Threat"],        2, 1, true, 42, "0x7000AA0F");
168 Kragenwar-3044
    self.skills["Withdraw"]                                     = SkillSlot(self.bars["Threat"],        3, 1, true, { 46, 62 }, { "0x7000AA10", "0x7001F4C9" } );
169 Kragenwar-3044
 
170 Kragenwar-3044
    self.skills["OathbreakersShame"]            = SkillSlot(self.bars["Debuff"],        1, 1, self.settings["Features"].oathbreakers, 41, "0x70001306");
171 Kragenwar-3044
 
172 Kragenwar-3044
    self.skills["MakeHaste"]                            = SkillSlot(self.bars["BattleBuffs"],   1, 1, true, 8, "0x70003E4E");
173 Kragenwar-3044
        self.skills["TimeOfNeed"]                               = SkillSlot(self.bars["BattleBuffs"],   2, 1, true, 50, "0x7000AA12");
174 Kragenwar-3044
 
175 Kragenwar-3044
        self.skills["SummoningHorn"]                    = ItemSlot(self.bars["ClassItems"],     1, 1, self.settings["Quickslots"].horn["active"], self.settings["Quickslots"].horn["type"], self.settings["Quickslots"].horn["data"]);
176 Kragenwar-3044
        self.skills["BattleTonic"]                              = ItemSlot(self.bars["ClassItems"],     2, 1, self.settings["Quickslots"].tonic["active"], self.settings["Quickslots"].tonic["type"], self.settings["Quickslots"].tonic["data"]);
177 Kragenwar-3044
        self.skills["BlazonedCrest"]                    = ItemSlot(self.bars["ClassItems"],     3, 1, self.settings["Quickslots"].crest["active"], self.settings["Quickslots"].crest["type"], self.settings["Quickslots"].crest["data"]);
178 Kragenwar-3044
 
179 Kragenwar-3044
    -- Build MultiMark Slot
180 Kragenwar-3044
        self.multi["Marks"]             = SkillMultiSlot(self.bars["MultiMark"], 1, 1, true);
181 Kragenwar-3044
        self.multi["Marks"]:AddShortCut("NobleMark",            12, "0x70003E4F");
182 Kragenwar-3044
    self.multi["Marks"]:AddShortCut("TellingMark",              18, "0x70003E4D");
183 Kragenwar-3044
    self.multi["Marks"]:AddShortCut("RevealingMark",    30, "0x70003E56");
184 Kragenwar-3044
    self.multi["Marks"]:LevelCheck();
185 Kragenwar-3044
 
186 Kragenwar-3044
        -- Build Tactic Slot
187 Kragenwar-3044
    self.multi["Tactic"]                = SkillMultiSlot(self.bars["Buffs"], 3, 1, true);
188 Kragenwar-3044
        self.multi["Tactic"]:AddShortCut("OnGuard",              6, "0x70003E53");
189 Kragenwar-3044
    self.multi["Tactic"]:AddShortCut("Relentless",      28, "0x70003E55");
190 Kragenwar-3044
    self.multi["Tactic"]:AddShortCut("Focus",           38, "0x70003E59");
191 Kragenwar-3044
    self.multi["Tactic"]:LevelCheck();
192 Kragenwar-3044
 
193 Kragenwar-3044
        -- Build Herald Slot
194 Kragenwar-3044
    self.multi["Heralds"]               = SkillMultiSlot(self.bars["Banners"], 1, 1, true);
195 Kragenwar-3044
        self.multi["Heralds"]:AddShortCut("War",                10, "0x70002F7A");
196 Kragenwar-3044
    self.multi["Heralds"]:AddShortCut("Hope",           24, "0x70002FAF");
197 Kragenwar-3044
    self.multi["Heralds"]:AddShortCut("Victory",        34, "0x70002F1A");
198 Kragenwar-3044
    self.multi["Heralds"]:AddShortCut("Archer",         56, "0x7000FC78");
199 Kragenwar-3044
    self.multi["Heralds"]:LevelCheck();
200 Kragenwar-3044
 
201 Kragenwar-3044
        -- Build Banner Slot
202 Kragenwar-3044
    self.multi["Banners"]               = ItemMultiSlot(self.bars["Banners"], 2, 1, true);
203 Kragenwar-3044
        self.multi["Banners"]:AddShortCut("Banner1",    self.settings["Quickslots"].banner1["active"], self.settings["Quickslots"].banner1["type"], self.settings["Quickslots"].banner1["data"]);
204 Kragenwar-3044
        self.multi["Banners"]:AddShortCut("Banner2",    self.settings["Quickslots"].banner2["active"], self.settings["Quickslots"].banner2["type"], self.settings["Quickslots"].banner2["data"]);
205 Kragenwar-3044
        self.multi["Banners"]:AddShortCut("Banner3",    self.settings["Quickslots"].banner3["active"], self.settings["Quickslots"].banner3["type"], self.settings["Quickslots"].banner3["data"]);
206 Kragenwar-3044
    self.multi["Banners"]:AddShortCut("Armament",       self.settings["Quickslots"].armament["active"], self.settings["Quickslots"].armament["type"], self.settings["Quickslots"].armament["data"]);
207 Kragenwar-3044
        self.multi["Banners"]:Refresh(true);
208 Kragenwar-3044
 
209 Kragenwar-3044
    -- SET COMBAT STATES
210 Kragenwar-3044
    self.multi["Heralds"]:SetCombat( false, true );
211 Kragenwar-3044
        self.skills["SummoningHorn"]:SetCombat( false, true );
212 Kragenwar-3044
 
213 Kragenwar-3044
 
214 Kragenwar-3044
        -- CLASS SPECIFIC SETUP/DEFAULT CODE
215 Kragenwar-3044
        -- Default Marks (seperate or multi)
216 Kragenwar-3044
    if (not self.settings["Features"].multimarks) then
217 Kragenwar-3044
                if (self.windows["Marks"].rotate == 0) then
218 Kragenwar-3044
                self.windows["Marks"]:SetSize(35*3, 35);
219 Kragenwar-3044
                self.windows["Marks"].width = 3;
220 Kragenwar-3044
                self.windows["Marks"].height = 1;
221 Kragenwar-3044
                self.multi["Marks"]:SetActive(false);
222 Kragenwar-3044
                self.skills["NobleMark"]:SetActive(true);
223 Kragenwar-3044
                self.skills["TellingMark"]:SetActive(true);
224 Kragenwar-3044
                self.skills["RevealingMark"]:SetActive(true);
225 Kragenwar-3044
                self.bars["MultiMark"]:SetZOrder(-10);
226 Kragenwar-3044
                self.bars["Marks"]:SetZOrder(0);
227 Kragenwar-3044
                else
228 Kragenwar-3044
                    self.windows["Marks"]:SetSize(35, 35 * 3);
229 Kragenwar-3044
                self.windows["Marks"].width = 1;
230 Kragenwar-3044
                self.windows["Marks"].height = 3;
231 Kragenwar-3044
                self.multi["Marks"]:SetActive(false);
232 Kragenwar-3044
                self.skills["NobleMark"]:SetActive(true);
233 Kragenwar-3044
                self.skills["TellingMark"]:SetActive(true);
234 Kragenwar-3044
                self.skills["RevealingMark"]:SetActive(true);
235 Kragenwar-3044
                self.bars["MultiMark"]:SetZOrder(-10);
236 Kragenwar-3044
                self.bars["Marks"]:SetZOrder(0);
237 Kragenwar-3044
                end
238 Kragenwar-3044
        else
239 Kragenwar-3044
        self.windows["Marks"]:SetSize(35, 35);
240 Kragenwar-3044
        self.multi["Marks"]:SetPosition(0, 0);
241 Kragenwar-3044
        self.windows["Marks"].width = 1;
242 Kragenwar-3044
        self.windows["Marks"].height = 1;
243 Kragenwar-3044
        self.multi["Marks"]:SetActive(true);
244 Kragenwar-3044
        self.skills["NobleMark"]:SetActive(false);
245 Kragenwar-3044
        self.skills["TellingMark"]:SetActive(false);
246 Kragenwar-3044
        self.skills["RevealingMark"]:SetActive(false);
247 Kragenwar-3044
        self.bars["MultiMark"]:SetZOrder(0);
248 Kragenwar-3044
        self.bars["Marks"]:SetZOrder(-10);
249 Kragenwar-3044
        end
250 Kragenwar-3044
 
251 Kragenwar-3044
        -- CLASS SPECIFIC EVENTS
252 Kragenwar-3044
 
253 Kragenwar-3044
        -- INITIALIZE BARS
254 Kragenwar-3044
        self:InitBars();
255 Kragenwar-3044
        self:CombatChange(vars.player:IsInCombat());
256 Kragenwar-3044
 
257 Kragenwar-3044
 
258 Kragenwar-3044
end
259 Kragenwar-3044
 
260 Kragenwar-3044
 
261 Kragenwar-3044
-- ADD EFFECT EVENT
262 Kragenwar-3044
function CaptainBars:AddEffect( effectIndex )
263 Kragenwar-3044
        local effect = vars.player:GetEffects():Get( effectIndex );
264 Kragenwar-3044
 
265 Kragenwar-3044
    if (effect:GetName() == self.effectlist["EnemyDefeatResponse"]) then
266 Kragenwar-3044
                self.bars["Defeat"]:SetState( true, effect:GetID());
267 Kragenwar-3044
                self.skills["RallyingCry"]:SetActive( true );
268 Kragenwar-3044
                self.skills["WarCry"]:SetActive( true );
269 Kragenwar-3044
                self.skills["RoutingCry"]:SetActive( true );
270 Kragenwar-3044
                self.skills["ShadowsLament"]:SetActive( true );
271 Kragenwar-3044
 
272 Kragenwar-3044
    elseif (effect:GetName() == self.effectlist["BattleReadied"]) then
273 Kragenwar-3044
                self.skills["DevastatingBlow"]:SetState( true, true, effect:GetID());
274 Kragenwar-3044
                self.skills["PressingAttack"]:SetState( true, true, effect:GetID());
275 Kragenwar-3044
 
276 Kragenwar-3044
    elseif (effect:GetName() == self.effectlist["BattleHardened"]) then
277 Kragenwar-3044
                self.skills["BladeOfElendil"]:SetState( true, true, effect:GetID());
278 Kragenwar-3044
 
279 Kragenwar-3044
    elseif (effect:GetName() == self.effectlist["FellowDefeatResponse"]) then
280 Kragenwar-3044
                self.skills["CryOfVengence"]:SetState( true, true, effect:GetID());
281 Kragenwar-3044
 
282 Kragenwar-3044
    elseif (effect:GetName() == self.effectlist["Motivated"]) then
283 Kragenwar-3044
                self.skills["MotivatingSpeech"]:SetState( true, true, effect:GetID());
284 Kragenwar-3044
                if (self.settings["Features"].buffactive == 2) then
285 Kragenwar-3044
                        self.skills["MotivatingSpeech"]:SetHover( self.skills["MotivatingSpeech"].state );
286 Kragenwar-3044
                elseif (self.settings["Features"].buffactive >= 3) then
287 Kragenwar-3044
                        self.skills["MotivatingSpeech"]:SetActive( not self.skills["MotivatingSpeech"].state );
288 Kragenwar-3044
                end
289 Kragenwar-3044
                if (self.settings["Features"].buffactive == 4) then
290 Kragenwar-3044
                        self.skills["MotivatingSpeech"]:StartTimer(effect:GetDuration() * .82, true);
291 Kragenwar-3044
                end
292 Kragenwar-3044
 
293 Kragenwar-3044
    elseif (effect:GetName() == self.effectlist["OnGuard"] or effect:GetName() == self.effectlist["RelentlessAttack"] or effect:GetName() == self.effectlist["Focus"] ) then
294 Kragenwar-3044
                self.multi["Tactic"]:SetState( true, true, effect:GetID());
295 Kragenwar-3044
                self.multi["Tactic"]:SetHover( self.settings["Features"].tacticactive == 2 );
296 Kragenwar-3044
        if (self.settings["Features"].tacticactive == 4) then
297 Kragenwar-3044
                        self.multi["Tactic"]:StartTimer(effect:GetDuration() * .82, true);
298 Kragenwar-3044
                end
299 Kragenwar-3044
                if (self.settings["Features"].tacticactive <= 2) then
300 Kragenwar-3044
                        self.multi["Tactic"]:SetActive(true);
301 Kragenwar-3044
                end
302 Kragenwar-3044
 
303 Kragenwar-3044
    elseif (effect:GetName() == self.effectlist["InDefenceOfMiddleEarth"]) then
304 Kragenwar-3044
                self.skills["IDOME"]:SetState( true, self.settings["Features"].idome, effect:GetID());
305 Kragenwar-3044
                if (self.settings["Features"].buffactive == 2) then
306 Kragenwar-3044
                        self.skills["IDOME"]:SetHover( self.skills["IDOME"].state );
307 Kragenwar-3044
                elseif (self.settings["Features"].buffactive >= 3) then
308 Kragenwar-3044
                        self.skills["IDOME"]:SetActive( not self.skills["IDOME"].state and self.settings["Features"].idome );
309 Kragenwar-3044
                end
310 Kragenwar-3044
                if (self.settings["Features"].buffactive == 4) then
311 Kragenwar-3044
                        self.skills["IDOME"]:StartTimer(effect:GetDuration() * .82, true);
312 Kragenwar-3044
                end
313 Kragenwar-3044
 
314 Kragenwar-3044
        elseif (effect:GetName() == self.effectlist["BannerOfWar"] or effect:GetName() == self.effectlist["BannerOfVictory"] or effect:GetName() == self.effectlist["BannerOfHope"] or effect:GetName() == self.effectlist["ImprovedBannerOfWar"] or effect:GetName() == self.effectlist["ImprovedBannerOfVictory"] or effect:GetName() == self.effectlist["ImprovedBannerOfHope"] ) then
315 Kragenwar-3044
                self.multi["Heralds"]:SetState( true, true, effect:GetID());
316 Kragenwar-3044
                self.multi["Heralds"]:SetHover(true);
317 Kragenwar-3044
                self.multi["Banners"]:SetState( true, true, effect:GetID());
318 Kragenwar-3044
                self.multi["Banners"]:SetHover(true);
319 Kragenwar-3044
 
320 Kragenwar-3044
        -- Fear
321 Kragenwar-3044
        elseif (effect:GetCategory() == Turbine.Gameplay.EffectCategory.Fear ) then
322 Kragenwar-3044
                self.fear = self.fear + 1;
323 Kragenwar-3044
                if (self.settings["Features"].fearindicator) then
324 Kragenwar-3044
                        self.skills["MusterCourage"]:SetColor("purple");
325 Kragenwar-3044
                end
326 Kragenwar-3044
 
327 Kragenwar-3044
        end
328 Kragenwar-3044
 
329 Kragenwar-3044
end
330 Kragenwar-3044
 
331 Kragenwar-3044
-- REMOVE EFFECT EVENT
332 Kragenwar-3044
function CaptainBars:RemoveEffect( effect )
333 Kragenwar-3044
 
334 Kragenwar-3044
        -- SetState can be called on both bars and skills
335 Kragenwar-3044
        -- it will store the incoming effect id and flag the state as well as trigger visibility
336 Kragenwar-3044
        -- SetState(effectstate:Boolean,  visibility:Boolean,  effectid:int);
337 Kragenwar-3044
 
338 Kragenwar-3044
        if (effect:GetName() == self.effectlist["EnemyDefeatResponse"]) then
339 Kragenwar-3044
                self.bars["Defeat"]:SetState( false, effect:GetID());
340 Kragenwar-3044
                if (not self.bars["Defeat"].state) then
341 Kragenwar-3044
                        self.skills["RallyingCry"]:SetActive( false );
342 Kragenwar-3044
                        self.skills["WarCry"]:SetActive( false );
343 Kragenwar-3044
                        self.skills["RoutingCry"]:SetActive( false );
344 Kragenwar-3044
                        self.skills["ShadowsLament"]:SetActive( self.settings["Features"].lament);
345 Kragenwar-3044
                end
346 Kragenwar-3044
 
347 Kragenwar-3044
    elseif (effect:GetName() == self.effectlist["BattleReadied"]) then
348 Kragenwar-3044
                self.skills["DevastatingBlow"]:SetState( false, not self.settings["Features"].gated, effect:GetID());
349 Kragenwar-3044
                self.skills["PressingAttack"]:SetState( false, not self.settings["Features"].gated, effect:GetID());
350 Kragenwar-3044
 
351 Kragenwar-3044
    elseif (effect:GetName() == self.effectlist["BattleHardened"]) then
352 Kragenwar-3044
                self.skills["BladeOfElendil"]:SetState( false, not self.settings["Features"].gated, effect:GetID());
353 Kragenwar-3044
 
354 Kragenwar-3044
        elseif (effect:GetName() == self.effectlist["FellowDefeatResponse"]) then
355 Kragenwar-3044
            self.skills["CryOfVengence"]:SetState( false, false, effect:GetID());
356 Kragenwar-3044
 
357 Kragenwar-3044
        elseif (effect:GetName() == self.effectlist["Motivated"]) then
358 Kragenwar-3044
            self.skills["MotivatingSpeech"]:SetState( false, true, effect:GetID());
359 Kragenwar-3044
                if (not self.skills["MotivatingSpeech"].state) then
360 Kragenwar-3044
                        self.skills["MotivatingSpeech"]:SetHover( false );
361 Kragenwar-3044
                end
362 Kragenwar-3044
 
363 Kragenwar-3044
    elseif (effect:GetName() == self.effectlist["OnGuard"] or effect:GetName() == self.effectlist["RelentlessAttack"] or effect:GetName() == self.effectlist["Focus"]) then
364 Kragenwar-3044
            self.multi["Tactic"]:SetState( false, true, effect:GetID());
365 Kragenwar-3044
 
366 Kragenwar-3044
    elseif (effect:GetName() == self.effectlist["InDefenceOfMiddleEarth"]) then
367 Kragenwar-3044
                self.skills["IDOME"]:SetState( false, self.settings["Features"].idome, effect:GetID());
368 Kragenwar-3044
                if (not self.skills["IDOME"].state) then
369 Kragenwar-3044
                        self.skills["IDOME"]:SetHover( false );
370 Kragenwar-3044
                end
371 Kragenwar-3044
 
372 Kragenwar-3044
        elseif (effect:GetName() == self.effectlist["BannerOfWar"] or effect:GetName() == self.effectlist["BannerOfVictory"] or effect:GetName() == self.effectlist["BannerOfHope"] or effect:GetName() == self.effectlist["ImprovedBannerOfWar"] or effect:GetName() == self.effectlist["ImprovedBannerOfVictory"] or effect:GetName() == self.effectlist["ImprovedBannerOfHope"] ) then
373 Kragenwar-3044
                self.multi["Heralds"]:SetState( false, true, effect:GetID());
374 Kragenwar-3044
                self.multi["Heralds"]:SetHover(false);
375 Kragenwar-3044
                self.multi["Banners"]:SetState( false, true, effect:GetID());
376 Kragenwar-3044
                self.multi["Banners"]:SetHover(false);
377 Kragenwar-3044
 
378 Kragenwar-3044
        -- Fear
379 Kragenwar-3044
        elseif (effect:GetCategory() == Turbine.Gameplay.EffectCategory.Fear ) then
380 Kragenwar-3044
                self.fear = self.fear - 1;
381 Kragenwar-3044
                if (self.fear == 0) then
382 Kragenwar-3044
                        self.skills["MusterCourage"]:SetColor();
383 Kragenwar-3044
                end
384 Kragenwar-3044
 
385 Kragenwar-3044
        end
386 Kragenwar-3044
 
387 Kragenwar-3044
end
388 Kragenwar-3044
 
389 Kragenwar-3044
-- DEFAULT SETTINGS
390 Kragenwar-3044
function CaptainBars:DefaultSettings()
391 Kragenwar-3044
        self.settings = { };
392 Kragenwar-3044
 
393 Kragenwar-3044
        self.settings["Attack"] = { active = true, x = 0, y = 0, rotate = 0 };
394 Kragenwar-3044
        self.settings["Gated"] = { active = true, x = 0, y = 0, rotate = 0 };
395 Kragenwar-3044
        self.settings["Marks"] = { active = true, x = 0, y = 0, rotate = 0 };
396 Kragenwar-3044
        self.settings["ShieldBro"] = { active = true, x = 0, y = 0, rotate = 0 };
397 Kragenwar-3044
        self.settings["Defeat"] = { active = true, x = 0, y = 0, rotate = 0 };
398 Kragenwar-3044
        self.settings["Healing"] = { active = true, x = 0, y = 0, rotate = 0 };
399 Kragenwar-3044
        self.settings["Buffs"] = { active = true, x = 0, y = 0, rotate = 0 };
400 Kragenwar-3044
        self.settings["Emergency"] = { active = true, x = 0, y = 0, rotate = 0 };
401 Kragenwar-3044
        self.settings["Rez"] = { active = true, x = 0, y = 0, rotate = 0 };
402 Kragenwar-3044
        self.settings["Utility"] = { active = true, x = 0, y = 0, rotate = 0 };
403 Kragenwar-3044
        self.settings["Threat"] = { active = true, x = 0, y = 0, rotate = 0 };
404 Kragenwar-3044
        self.settings["Debuff"] = { active = true, x = 0, y = 0, rotate = 0 };
405 Kragenwar-3044
        self.settings["BattleBuffs"] = { active = true, x = 0, y = 0, rotate = 0 };
406 Kragenwar-3044
        self.settings["Banners"] = { active = true, x = 0, y = 0, rotate = 0 };
407 Kragenwar-3044
        self.settings["ClassItems"] = { active = true, x = 0, y = 0, rotate = 0 };
408 Kragenwar-3044
 
409 Kragenwar-3044
        self.settings["Features"] = { };
410 Kragenwar-3044
        self.settings["Features"].idome = false;
411 Kragenwar-3044
        self.settings["Features"].shield = false;
412 Kragenwar-3044
        self.settings["Features"].oathbreakers = false;
413 Kragenwar-3044
        self.settings["Features"].lament = false;
414 Kragenwar-3044
    self.settings["Features"].gated = true;
415 Kragenwar-3044
    self.settings["Features"].multimarks = false;
416 Kragenwar-3044
    self.settings["Features"].lockmarks = false;
417 Kragenwar-3044
    self.settings["Features"].fearindicator = true;
418 Kragenwar-3044
    self.settings["Features"].buffactive = 4;
419 Kragenwar-3044
    self.settings["Features"].tacticactive = 2;
420 Kragenwar-3044
 
421 Kragenwar-3044
 
422 Kragenwar-3044
    self.settings["Quickslots"] = { };
423 Kragenwar-3044
        self.settings["Quickslots"].banner1 = { active = true,  type = Turbine.UI.Lotro.ShortcutType.Undefined, data = ""};
424 Kragenwar-3044
        self.settings["Quickslots"].banner2 = { active = true,  type = Turbine.UI.Lotro.ShortcutType.Undefined, data = ""};
425 Kragenwar-3044
        self.settings["Quickslots"].banner3 = { active = true,  type = Turbine.UI.Lotro.ShortcutType.Undefined, data = ""};
426 Kragenwar-3044
        self.settings["Quickslots"].armament = { active = true,  type = Turbine.UI.Lotro.ShortcutType.Undefined, data = ""};
427 Kragenwar-3044
        self.settings["Quickslots"].horn = { active = true,  type = Turbine.UI.Lotro.ShortcutType.Undefined, data = ""};
428 Kragenwar-3044
        self.settings["Quickslots"].tonic = { active = true,  type = Turbine.UI.Lotro.ShortcutType.Undefined, data = ""};
429 Kragenwar-3044
        self.settings["Quickslots"].crest = { active = true,  type = Turbine.UI.Lotro.ShortcutType.Undefined, data = ""};
430 Kragenwar-3044
 
431 Kragenwar-3044
end
432 Kragenwar-3044
 
433 Kragenwar-3044
-- UPDATE SETTINGS
434 Kragenwar-3044
function CaptainBars:UpdateSettings()
435 Kragenwar-3044
    if (settings.vers < 3.01) then
436 Kragenwar-3044
 
437 Kragenwar-3044
                if (self.settings["Features"].buffdisappear) then self.settings["Features"].buffactive = 4; else self.settings["Features"].buffactive = 2; end
438 Kragenwar-3044
                if (self.settings["Features"].tactichover) then self.settings["Features"].tacticactive = 2; else self.settings["Features"].tacticactive = 4; end
439 Kragenwar-3044
 
440 Kragenwar-3044
        self.settings["Features"].buffdisappear = nil;
441 Kragenwar-3044
                self.settings["Features"].tactichover = nil;
442 Kragenwar-3044
        end
443 Kragenwar-3044
        if (settings.vers < 3.20) then
444 Kragenwar-3044
                self.settings["ClassItems"] = { active = true, x = 0, y = 0, rotate = 0 };
445 Kragenwar-3044
                self.settings["Quickslots"].horn = { active = true,  type = Turbine.UI.Lotro.ShortcutType.Undefined, data = ""};
446 Kragenwar-3044
                self.settings["Quickslots"].tonic = { active = true,  type = Turbine.UI.Lotro.ShortcutType.Undefined, data = ""};
447 Kragenwar-3044
                self.settings["Quickslots"].crest = { active = true,  type = Turbine.UI.Lotro.ShortcutType.Undefined, data = ""};
448 Kragenwar-3044
        end
449 Kragenwar-3044
        settings.vers = vars.vers;
450 Kragenwar-3044
end
451 Kragenwar-3044
 
452 Kragenwar-3044
 
453 Kragenwar-3044
-- DISPLAY SETUP WINDOW AND SET ALL CHECKBOXES COMBOBOXES SLIDERS AND QUICKSLOTS
454 Kragenwar-3044
function CaptainBars:ShowSetup()
455 Kragenwar-3044
        self.setup:SetVisible(true);
456 Kragenwar-3044
 
457 Kragenwar-3044
        self.setupbb.opacityslider:SetValue(settings.opacity * 100);
458 Kragenwar-3044
        self.setupbb.checkboxlock:SetChecked(settings.lockslots);
459 Kragenwar-3044
        self.setupbb.checkboxgrid:SetChecked(settings.snaptogrid);
460 Kragenwar-3044
        self.setupbb.combolangbox:SetSelection(settings.language);
461 Kragenwar-3044
 
462 Kragenwar-3044
        self.setupbb.checkboxbb1:SetText("Attack");
463 Kragenwar-3044
        self.setupbb.checkboxbb1:SetChecked (self.settings["Attack"].active);
464 Kragenwar-3044
        self.setupbb.checkboxbb1:SetVisible(true);
465 Kragenwar-3044
        self.setupbb.checkboxbb2:SetText("Gated Attack");
466 Kragenwar-3044
        self.setupbb.checkboxbb2:SetChecked (self.settings["Gated"].active);
467 Kragenwar-3044
        self.setupbb.checkboxbb2:SetVisible(true);
468 Kragenwar-3044
        self.setupbb.checkboxbb3:SetText("Marks");
469 Kragenwar-3044
        self.setupbb.checkboxbb3:SetChecked (self.settings["Marks"].active);
470 Kragenwar-3044
        self.setupbb.checkboxbb3:SetVisible(true);
471 Kragenwar-3044
        self.setupbb.checkboxbb4:SetText("Shield Brother");
472 Kragenwar-3044
        self.setupbb.checkboxbb4:SetChecked (self.settings["ShieldBro"].active);
473 Kragenwar-3044
        self.setupbb.checkboxbb4:SetVisible(true);
474 Kragenwar-3044
        self.setupbb.checkboxbb5:SetText("Defeat Response");
475 Kragenwar-3044
        self.setupbb.checkboxbb5:SetChecked (self.settings["Defeat"].active);
476 Kragenwar-3044
        self.setupbb.checkboxbb5:SetVisible(true);
477 Kragenwar-3044
        self.setupbb.checkboxbb6:SetText("Healing");
478 Kragenwar-3044
        self.setupbb.checkboxbb6:SetChecked (self.settings["Healing"].active);
479 Kragenwar-3044
        self.setupbb.checkboxbb6:SetVisible(true);
480 Kragenwar-3044
        self.setupbb.checkboxbb7:SetText("Buffs");
481 Kragenwar-3044
        self.setupbb.checkboxbb7:SetChecked (self.settings["Buffs"].active);
482 Kragenwar-3044
        self.setupbb.checkboxbb7:SetVisible(true);
483 Kragenwar-3044
        self.setupbb.checkboxbb8:SetText("Emergency");
484 Kragenwar-3044
        self.setupbb.checkboxbb8:SetChecked (self.settings["Emergency"].active);
485 Kragenwar-3044
        self.setupbb.checkboxbb8:SetVisible(true);
486 Kragenwar-3044
        self.setupbb.checkboxbb9:SetText("Rez");
487 Kragenwar-3044
        self.setupbb.checkboxbb9:SetChecked (self.settings["Rez"].active);
488 Kragenwar-3044
        self.setupbb.checkboxbb9:SetVisible(true);
489 Kragenwar-3044
        self.setupbb.checkboxbb10:SetText("Utility");
490 Kragenwar-3044
        self.setupbb.checkboxbb10:SetChecked (self.settings["Utility"].active);
491 Kragenwar-3044
        self.setupbb.checkboxbb10:SetVisible(true);
492 Kragenwar-3044
        self.setupbb.checkboxbb11:SetText("Threat");
493 Kragenwar-3044
        self.setupbb.checkboxbb11:SetChecked (self.settings["Threat"].active);
494 Kragenwar-3044
        self.setupbb.checkboxbb11:SetVisible(true);
495 Kragenwar-3044
        self.setupbb.checkboxbb12:SetText("Debuff");
496 Kragenwar-3044
        self.setupbb.checkboxbb12:SetChecked (self.settings["Debuff"].active);
497 Kragenwar-3044
        self.setupbb.checkboxbb12:SetVisible(true);
498 Kragenwar-3044
        self.setupbb.checkboxbb13:SetText("Battle Buffs");
499 Kragenwar-3044
        self.setupbb.checkboxbb13:SetChecked (self.settings["BattleBuffs"].active);
500 Kragenwar-3044
        self.setupbb.checkboxbb13:SetVisible(true);
501 Kragenwar-3044
        self.setupbb.checkboxbb14:SetText("Banners/Heralds");
502 Kragenwar-3044
        self.setupbb.checkboxbb14:SetChecked (self.settings["Banners"].active);
503 Kragenwar-3044
        self.setupbb.checkboxbb14:SetVisible(true);
504 Kragenwar-3044
 
505 Kragenwar-3044
        self.setupf.checkboxf1:SetText("IDOME");
506 Kragenwar-3044
        self.setupf.checkboxf1:SetChecked (self.settings["Features"].idome);
507 Kragenwar-3044
        self.setupf.checkboxf1:SetVisible(true);
508 Kragenwar-3044
        self.setupf.checkboxf2:SetText("Shield of the Dunadain");
509 Kragenwar-3044
        self.setupf.checkboxf2:SetChecked (self.settings["Features"].shield);
510 Kragenwar-3044
        self.setupf.checkboxf2:SetVisible(true);
511 Kragenwar-3044
        self.setupf.checkboxf3:SetText("Oathbreaker's Shame");
512 Kragenwar-3044
        self.setupf.checkboxf3:SetChecked (self.settings["Features"].oathbreakers);
513 Kragenwar-3044
        self.setupf.checkboxf3:SetVisible(true);
514 Kragenwar-3044
        self.setupf.checkboxf4:SetText("Master of War");
515 Kragenwar-3044
        self.setupf.checkboxf4:SetChecked (self.settings["Features"].lament);
516 Kragenwar-3044
        self.setupf.checkboxf4:SetVisible(true);
517 Kragenwar-3044
 
518 Kragenwar-3044
        self.setupf.checkboxf10:SetText("Gate Skills");
519 Kragenwar-3044
        self.setupf.checkboxf10:SetChecked (self.settings["Features"].gated);
520 Kragenwar-3044
        self.setupf.checkboxf10:SetVisible(true);
521 Kragenwar-3044
    self.setupf.checkboxf11:SetText("Multi Marks");
522 Kragenwar-3044
        self.setupf.checkboxf11:SetChecked (self.settings["Features"].multimarks);
523 Kragenwar-3044
        self.setupf.checkboxf11:SetVisible(true);
524 Kragenwar-3044
        self.setupf.checkboxf12:SetText("Fear Indicator");
525 Kragenwar-3044
        self.setupf.checkboxf12:SetChecked (self.settings["Features"].fearindicator);
526 Kragenwar-3044
        self.setupf.checkboxf12:SetVisible(true);
527 Kragenwar-3044
 
528 Kragenwar-3044
        self.setupf.combo1box.listBox:ClearItems();
529 Kragenwar-3044
        self.setupf.combo1Label:SetText("Motivated/IDoME Active");
530 Kragenwar-3044
        self.setupf.combo1Label:SetVisible(true);
531 Kragenwar-3044
        local combolist = {"None", "Dim", "Hide", "Early Warning"}
532 Kragenwar-3044
        for k,v in pairs(combolist) do
533 Kragenwar-3044
                self.setupf.combo1box:AddItem(v, k);
534 Kragenwar-3044
        end
535 Kragenwar-3044
        self.setupf.combo1box:SetVisible(true);
536 Kragenwar-3044
        self.setupf.combo1box:SetSelection(self.settings["Features"].buffactive);
537 Kragenwar-3044
 
538 Kragenwar-3044
        self.setupf.combo2box.listBox:ClearItems();
539 Kragenwar-3044
        self.setupf.combo2Label:SetText("Tactic Active");
540 Kragenwar-3044
        self.setupf.combo2Label:SetVisible(true);
541 Kragenwar-3044
        local combolist = {"None", "Dim", "Hide", "Early Warning"}
542 Kragenwar-3044
        for k,v in pairs(combolist) do
543 Kragenwar-3044
                self.setupf.combo2box:AddItem(v, k);
544 Kragenwar-3044
        end
545 Kragenwar-3044
        self.setupf.combo2box:SetVisible(true);
546 Kragenwar-3044
        self.setupf.combo2box:SetSelection(self.settings["Features"].tacticactive);
547 Kragenwar-3044
 
548 Kragenwar-3044
        pcall(function() self.setupqs.quickslot1:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].banner1["type"], self.settings["Quickslots"].banner1["data"] ) ); end);
549 Kragenwar-3044
        self.setupqs.quickslot1:SetVisible(true);
550 Kragenwar-3044
        self.setupqs.quickslot1cb:SetText("Banner 1");
551 Kragenwar-3044
        self.setupqs.quickslot1cb:SetChecked(self.settings["Quickslots"].banner1["active"]);
552 Kragenwar-3044
        self.setupqs.quickslot1cb:SetVisible(true);
553 Kragenwar-3044
 
554 Kragenwar-3044
        pcall(function() self.setupqs.quickslot2:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].banner2["type"], self.settings["Quickslots"].banner2["data"] ) ); end);
555 Kragenwar-3044
        self.setupqs.quickslot2:SetVisible(true);
556 Kragenwar-3044
        self.setupqs.quickslot2cb:SetText("Banner 2");
557 Kragenwar-3044
        self.setupqs.quickslot2cb:SetChecked(self.settings["Quickslots"].banner2["active"]);
558 Kragenwar-3044
        self.setupqs.quickslot2cb:SetVisible(true);
559 Kragenwar-3044
 
560 Kragenwar-3044
        pcall(function() self.setupqs.quickslot3:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].banner3["type"], self.settings["Quickslots"].banner3["data"] ) ); end);
561 Kragenwar-3044
        self.setupqs.quickslot3:SetVisible(true);
562 Kragenwar-3044
        self.setupqs.quickslot3cb:SetText("Banner 3");
563 Kragenwar-3044
        self.setupqs.quickslot3cb:SetChecked(self.settings["Quickslots"].banner3["active"]);
564 Kragenwar-3044
        self.setupqs.quickslot3cb:SetVisible(true);
565 Kragenwar-3044
 
566 Kragenwar-3044
        pcall(function() self.setupqs.quickslot4:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].armament["type"], self.settings["Quickslots"].armament["data"] ) ); end);
567 Kragenwar-3044
        self.setupqs.quickslot4:SetVisible(true);
568 Kragenwar-3044
        self.setupqs.quickslot4cb:SetText("Armaments");
569 Kragenwar-3044
        self.setupqs.quickslot4cb:SetChecked(self.settings["Quickslots"].armament["active"]);
570 Kragenwar-3044
        self.setupqs.quickslot4cb:SetVisible(true);
571 Kragenwar-3044
 
572 Kragenwar-3044
        pcall(function() self.setupqs.quickslot5:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].horn["type"], self.settings["Quickslots"].horn["data"] ) ); end);
573 Kragenwar-3044
        self.setupqs.quickslot5:SetVisible(true);
574 Kragenwar-3044
        self.setupqs.quickslot5cb:SetText("Summoning Horn");
575 Kragenwar-3044
        self.setupqs.quickslot5cb:SetChecked(self.settings["Quickslots"].horn["active"]);
576 Kragenwar-3044
        self.setupqs.quickslot5cb:SetVisible(true);
577 Kragenwar-3044
 
578 Kragenwar-3044
        pcall(function() self.setupqs.quickslot6:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].tonic["type"], self.settings["Quickslots"].tonic["data"] ) ); end);
579 Kragenwar-3044
        self.setupqs.quickslot6:SetVisible(true);
580 Kragenwar-3044
        self.setupqs.quickslot6cb:SetText("Battle Tonics");
581 Kragenwar-3044
        self.setupqs.quickslot6cb:SetChecked(self.settings["Quickslots"].tonic["active"]);
582 Kragenwar-3044
        self.setupqs.quickslot6cb:SetVisible(true);
583 Kragenwar-3044
 
584 Kragenwar-3044
        pcall(function() self.setupqs.quickslot7:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].crest["type"], self.settings["Quickslots"].crest["data"] ) ); end);
585 Kragenwar-3044
        self.setupqs.quickslot7:SetVisible(true);
586 Kragenwar-3044
        self.setupqs.quickslot7cb:SetText("Blazoned Crests");
587 Kragenwar-3044
        self.setupqs.quickslot7cb:SetChecked(self.settings["Quickslots"].crest["active"]);
588 Kragenwar-3044
        self.setupqs.quickslot7cb:SetVisible(true);
589 Kragenwar-3044
end
590 Kragenwar-3044
 
591 Kragenwar-3044
-- SET ALL VARIABLES OFF OF SETUP WINDOW
592 Kragenwar-3044
function CaptainBars:SetupClosing()
593 Kragenwar-3044
        settings.opacity = self.setupbb.opacityslider:GetValue() / 100;
594 Kragenwar-3044
        settings.lockslots = self.setupbb.checkboxlock:IsChecked();
595 Kragenwar-3044
        settings.snaptogrid = self.setupbb.checkboxgrid:IsChecked();
596 Kragenwar-3044
        settings.language = self.setupbb.combolangbox:GetSelection();
597 Kragenwar-3044
 
598 Kragenwar-3044
        self.settings["Attack"].active = self.setupbb.checkboxbb1:IsChecked();
599 Kragenwar-3044
    self.settings["Gated"].active = self.setupbb.checkboxbb2:IsChecked();
600 Kragenwar-3044
    self.settings["Marks"].active = self.setupbb.checkboxbb3:IsChecked();
601 Kragenwar-3044
    self.settings["ShieldBro"].active = self.setupbb.checkboxbb4:IsChecked();
602 Kragenwar-3044
    self.settings["Defeat"].active = self.setupbb.checkboxbb5:IsChecked();
603 Kragenwar-3044
    self.settings["Healing"].active = self.setupbb.checkboxbb6:IsChecked();
604 Kragenwar-3044
    self.settings["Buffs"].active = self.setupbb.checkboxbb7:IsChecked();
605 Kragenwar-3044
    self.settings["Emergency"].active = self.setupbb.checkboxbb8:IsChecked();
606 Kragenwar-3044
    self.settings["Rez"].active = self.setupbb.checkboxbb9:IsChecked();
607 Kragenwar-3044
        self.settings["Utility"].active = self.setupbb.checkboxbb10:IsChecked();
608 Kragenwar-3044
    self.settings["Threat"].active = self.setupbb.checkboxbb11:IsChecked();
609 Kragenwar-3044
    self.settings["Debuff"].active = self.setupbb.checkboxbb12:IsChecked();
610 Kragenwar-3044
    self.settings["BattleBuffs"].active = self.setupbb.checkboxbb13:IsChecked();
611 Kragenwar-3044
    self.settings["Banners"].active = self.setupbb.checkboxbb14:IsChecked();
612 Kragenwar-3044
 
613 Kragenwar-3044
        self.settings["Features"].idome = self.setupf.checkboxf1:IsChecked();
614 Kragenwar-3044
    self.settings["Features"].shield = self.setupf.checkboxf2:IsChecked();
615 Kragenwar-3044
    self.settings["Features"].oathbreakers = self.setupf.checkboxf3:IsChecked();
616 Kragenwar-3044
    self.settings["Features"].lament = self.setupf.checkboxf4:IsChecked();
617 Kragenwar-3044
 
618 Kragenwar-3044
    self.settings["Features"].gated = self.setupf.checkboxf10:IsChecked();
619 Kragenwar-3044
    self.settings["Features"].multimarks = self.setupf.checkboxf11:IsChecked();
620 Kragenwar-3044
    self.settings["Features"].fearindicator = self.setupf.checkboxf12:IsChecked();
621 Kragenwar-3044
 
622 Kragenwar-3044
    self.settings["Features"].buffactive = self.setupf.combo1box:GetSelection();
623 Kragenwar-3044
    self.settings["Features"].tacticactive = self.setupf.combo2box:GetSelection();
624 Kragenwar-3044
 
625 Kragenwar-3044
    self.settings["Quickslots"].banner1 = { active = self.setupqs.quickslot1cb:IsChecked(), type = self.setupqs.quickslot1:GetShortcut():GetType(), data = self.setupqs.quickslot1:GetShortcut():GetData() };
626 Kragenwar-3044
    self.settings["Quickslots"].banner2 = { active = self.setupqs.quickslot2cb:IsChecked(), type = self.setupqs.quickslot2:GetShortcut():GetType(), data = self.setupqs.quickslot2:GetShortcut():GetData() };
627 Kragenwar-3044
    self.settings["Quickslots"].banner3 = { active = self.setupqs.quickslot3cb:IsChecked(), type = self.setupqs.quickslot3:GetShortcut():GetType(), data = self.setupqs.quickslot3:GetShortcut():GetData() };
628 Kragenwar-3044
    self.settings["Quickslots"].armament = { active = self.setupqs.quickslot4cb:IsChecked(), type = self.setupqs.quickslot4:GetShortcut():GetType(), data = self.setupqs.quickslot4:GetShortcut():GetData() };
629 Kragenwar-3044
        self.settings["Quickslots"].horn = { active = self.setupqs.quickslot5cb:IsChecked(), type = self.setupqs.quickslot5:GetShortcut():GetType(), data = self.setupqs.quickslot5:GetShortcut():GetData() };
630 Kragenwar-3044
        self.settings["Quickslots"].tonic = { active = self.setupqs.quickslot6cb:IsChecked(), type = self.setupqs.quickslot6:GetShortcut():GetType(), data = self.setupqs.quickslot6:GetShortcut():GetData() };
631 Kragenwar-3044
        self.settings["Quickslots"].crest = { active = self.setupqs.quickslot7cb:IsChecked(), type = self.setupqs.quickslot7:GetShortcut():GetType(), data = self.setupqs.quickslot7:GetShortcut():GetData() };
632 Kragenwar-3044
 
633 Kragenwar-3044
        self:SaveSettings();
634 Kragenwar-3044
        self:Refresh();
635 Kragenwar-3044
 
636 Kragenwar-3044
end
637 Kragenwar-3044
 
638 Kragenwar-3044
-- REFRESH SKILLS AND BARS
639 Kragenwar-3044
function CaptainBars:Refresh()
640 Kragenwar-3044
 
641 Kragenwar-3044
        -- GENERIC REFRESH (Required for all classes)
642 Kragenwar-3044
        self:RefreshBars();
643 Kragenwar-3044
 
644 Kragenwar-3044
        -- REDEFINE EFFECTLIST IN CASE OF LANGUAGE CHANGE
645 Kragenwar-3044
        self.DefineEffectList();
646 Kragenwar-3044
 
647 Kragenwar-3044
    -- CLASS SPECIFIC REFRESH
648 Kragenwar-3044
    -- Setup Marks (Seperate or Multi)
649 Kragenwar-3044
    if (not self.settings["Features"].multimarks) then
650 Kragenwar-3044
                if (self.windows["Marks"].rotate == 0) then
651 Kragenwar-3044
                self.windows["Marks"]:SetSize(35*3, 35);
652 Kragenwar-3044
                self.windows["Marks"].width = 3;
653 Kragenwar-3044
                self.windows["Marks"].height = 1;
654 Kragenwar-3044
                self.multi["Marks"]:SetActive(false);
655 Kragenwar-3044
                self.skills["NobleMark"]:SetActive(true);
656 Kragenwar-3044
                self.skills["TellingMark"]:SetActive(true);
657 Kragenwar-3044
                self.skills["RevealingMark"]:SetActive(true);
658 Kragenwar-3044
                self.bars["MultiMark"]:SetZOrder(-10);
659 Kragenwar-3044
                self.bars["Marks"]:SetZOrder(0);
660 Kragenwar-3044
                else
661 Kragenwar-3044
                    self.windows["Marks"]:SetSize(35, 35 * 3);
662 Kragenwar-3044
                self.windows["Marks"].width = 1;
663 Kragenwar-3044
                self.windows["Marks"].height = 3;
664 Kragenwar-3044
                self.multi["Marks"]:SetActive(false);
665 Kragenwar-3044
                self.skills["NobleMark"]:SetActive(true);
666 Kragenwar-3044
                self.skills["TellingMark"]:SetActive(true);
667 Kragenwar-3044
                self.skills["RevealingMark"]:SetActive(true);
668 Kragenwar-3044
                self.bars["MultiMark"]:SetZOrder(-10);
669 Kragenwar-3044
                self.bars["Marks"]:SetZOrder(0);
670 Kragenwar-3044
                end
671 Kragenwar-3044
        else
672 Kragenwar-3044
        self.windows["Marks"]:SetSize(35, 35);
673 Kragenwar-3044
        self.multi["Marks"]:SetPosition(0, 0);
674 Kragenwar-3044
        self.windows["Marks"].width = 1;
675 Kragenwar-3044
        self.windows["Marks"].height = 1;
676 Kragenwar-3044
        self.multi["Marks"]:SetActive(true);
677 Kragenwar-3044
        self.skills["NobleMark"]:SetActive(false);
678 Kragenwar-3044
        self.skills["TellingMark"]:SetActive(false);
679 Kragenwar-3044
        self.skills["RevealingMark"]:SetActive(false);
680 Kragenwar-3044
        self.bars["MultiMark"]:SetZOrder(0);
681 Kragenwar-3044
        self.bars["Marks"]:SetZOrder(-10);
682 Kragenwar-3044
        end
683 Kragenwar-3044
 
684 Kragenwar-3044
        -- Setup Features
685 Kragenwar-3044
        self.skills["ShieldOfTheDunadain"]:SetActive(self.settings["Features"].shield);
686 Kragenwar-3044
        self.skills["OathbreakersShame"]:SetActive(self.settings["Features"].oathbreakers);
687 Kragenwar-3044
        self.skills["DevastatingBlow"]:SetActive(not self.settings["Features"].gated or self.skills["DevastatingBlow"].state);
688 Kragenwar-3044
        self.skills["PressingAttack"]:SetActive(not self.settings["Features"].gated or self.skills["PressingAttack"].state);
689 Kragenwar-3044
        self.skills["BladeOfElendil"]:SetActive(not self.settings["Features"].gated or self.skills["BladeOfElendil"].state);
690 Kragenwar-3044
        self.skills["ShadowsLament"]:SetActive(self.settings["Features"].lament or self.bars["Defeat"].state);
691 Kragenwar-3044
 
692 Kragenwar-3044
        -- Level Check Multis
693 Kragenwar-3044
    self.multi["Tactic"]:LevelCheck();
694 Kragenwar-3044
    self.multi["Marks"]:LevelCheck();
695 Kragenwar-3044
    self.multi["Heralds"]:LevelCheck();
696 Kragenwar-3044
 
697 Kragenwar-3044
        -- Setup Quickslots
698 Kragenwar-3044
        self.skills["SummoningHorn"]:SetQuickslot(self.settings["Quickslots"].horn["active"], self.settings["Quickslots"].horn["type"], self.settings["Quickslots"].horn["data"]);
699 Kragenwar-3044
        self.skills["BattleTonic"]:SetQuickslot(self.settings["Quickslots"].tonic["active"], self.settings["Quickslots"].tonic["type"], self.settings["Quickslots"].tonic["data"]);
700 Kragenwar-3044
        self.skills["BlazonedCrest"]:SetQuickslot(self.settings["Quickslots"].crest["active"], self.settings["Quickslots"].crest["type"], self.settings["Quickslots"].crest["data"]);
701 Kragenwar-3044
 
702 Kragenwar-3044
        -- Rebuild Banner Multi
703 Kragenwar-3044
        self.multi["Banners"]:Clear();
704 Kragenwar-3044
        self.multi["Banners"]:AddShortCut("Banner 1",   self.settings["Quickslots"].banner1["active"], self.settings["Quickslots"].banner1["type"], self.settings["Quickslots"].banner1["data"]);
705 Kragenwar-3044
        self.multi["Banners"]:AddShortCut("Banner 2",   self.settings["Quickslots"].banner2["active"], self.settings["Quickslots"].banner2["type"], self.settings["Quickslots"].banner2["data"]);
706 Kragenwar-3044
        self.multi["Banners"]:AddShortCut("Banner 3",   self.settings["Quickslots"].banner3["active"], self.settings["Quickslots"].banner3["type"], self.settings["Quickslots"].banner3["data"]);
707 Kragenwar-3044
    self.multi["Banners"]:AddShortCut("Armament",       self.settings["Quickslots"].armament["active"], self.settings["Quickslots"].armament["type"], self.settings["Quickslots"].armament["data"]);
708 Kragenwar-3044
        self.multi["Banners"]:Refresh(true);
709 Kragenwar-3044
 
710 Kragenwar-3044
        -- Set Buff Visibility/Hover based on BuffActive settings
711 Kragenwar-3044
    self.skills["MotivatingSpeech"]:SetActive( true );
712 Kragenwar-3044
        self.skills["MotivatingSpeech"]:SetHover( false );
713 Kragenwar-3044
    self.skills["IDOME"]:SetActive( self.settings["Features"].idome );
714 Kragenwar-3044
        self.skills["IDOME"]:SetHover( false );
715 Kragenwar-3044
        if (self.settings["Features"].buffactive == 2) then
716 Kragenwar-3044
                self.skills["MotivatingSpeech"]:SetHover( self.skills["MotivatingSpeech"].state );
717 Kragenwar-3044
                self.skills["IDOME"]:SetHover( self.skills["IDOME"].state );
718 Kragenwar-3044
        elseif (self.settings["Features"].buffactive >= 3) then
719 Kragenwar-3044
                self.skills["MotivatingSpeech"]:SetActive( not self.skills["MotivatingSpeech"].state );
720 Kragenwar-3044
                self.skills["IDOME"]:SetActive( not self.skills["IDOME"].state and self.settings["Features"].idome );
721 Kragenwar-3044
        end
722 Kragenwar-3044
        self.multi["Tactic"]:SetActive( true );
723 Kragenwar-3044
        self.multi["Tactic"]:SetHover( false );
724 Kragenwar-3044
        if (self.settings["Features"].tacticactive == 2) then
725 Kragenwar-3044
                self.multi["Tactic"]:SetHover( self.multi["Tactic"].state );
726 Kragenwar-3044
        elseif (self.settings["Features"].tacticactive >= 3) then
727 Kragenwar-3044
                self.multi["Tactic"]:SetActive( not self.multi["Tactic"].state );
728 Kragenwar-3044
        end
729 Kragenwar-3044
 
730 Kragenwar-3044
        -- Set Fear Indicator
731 Kragenwar-3044
        if (self.settings["Features"].fearindicator and self.fear > 0) then
732 Kragenwar-3044
                self.skills["MusterCourage"]:SetColor("purple");
733 Kragenwar-3044
        else
734 Kragenwar-3044
                self.skills["MusterCourage"]:SetColor();
735 Kragenwar-3044
        end
736 Kragenwar-3044
 
737 Kragenwar-3044
    -- Refresh States
738 Kragenwar-3044
    self:CombatChange(vars.player:IsInCombat());
739 Kragenwar-3044
 
740 Kragenwar-3044
        Turbine.Shell.WriteLine("KragenBars: Captain Bars refresh completed successfully.");
741 Kragenwar-3044
 
742 Kragenwar-3044
end

All times are GMT -5. The time now is 06:27 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui