lotrointerface.com
Search Downloads

LoTROInterface SVN KragenBars

[/] [branches/] [3.12/] [KragenBars/] [MiniBars.lua] - Rev 40

Compare with Previous | Blame | View Log

import "Turbine.UI";
import "Turbine.UI.Lotro";
import "Turbine.Gameplay";
import "KragenPlugs.Utils";
import "KragenPlugs.KragenBars";

MiniBars = class( KragenPlugs.KragenBars.ClassBar );

function MiniBars:Constructor()

        KragenPlugs.KragenBars.ClassBar.Constructor( self );

    -- SET AND UPDATE DEFAULT SETTINGS
    if (not settings.class) then
        settings.class = vars.playerclass;
        self:DefaultSettings();
        self:ShowSetup();
    else
        self.settings = settings.classinfo;
        if (settings.vers ~= vars.vers) then
                self:UpdateSettings();
        end
    end
 
        self.effectlist = { };
        -- ENGLISH CLIENT
        if (vars.locale == 'en') then
                self.effectlist["BalladofVigour"]                                               = "Ballad of Vigour";
                self.effectlist["BalladofSteel"]                                                = "Ballad of Steel";
                self.effectlist["BalladofResonance"]                                    = "Ballad of Resonance";
                self.effectlist["BalladofSwiftness"]                                    = "Ballad of Swiftness";
                self.effectlist["BalladofBalance"]                                              = "Ballad of Balance";
                self.effectlist["BalladoftheStout"]                                     = "Ballad of the Stout";
                self.effectlist["BalladofWar"]                                                  = "Ballad of War";
                self.effectlist["BalladofUnshakeableWill"]                              = "Ballad of Unshakeable Will";
                self.effectlist["BalladofFlame"]                                                = "Ballad of Flame";
                self.effectlist["AnthemoftheFreePeoples"]                               = "Anthem of the Free Peoples";
                self.effectlist["AnthemofCompassion"]                                   = "Anthem of Compassion";
                self.effectlist["BalladTier1"]                                                  = "Ballad Tier 1";
                self.effectlist["BalladTier2"]                                                  = "Ballad Tier 2";
                self.effectlist["BalladTier3"]                                                  = "Ballad Tier 3";
                self.effectlist["Warspeech"]                                                    = "War-speech";
                self.effectlist["Silenced"]                                                     = "Silenced";
                self.effectlist["TaleofHeroism"]                                                = "Tale of Heroism";
                self.effectlist["TaleofBattle"]                                                 = "Tale of Battle";
                self.effectlist["TaleofWarding"]                                                = "Tale of Warding";
                self.effectlist["TaleofFrostandFlame"]                                  = "Tale of Frost and Flame";
                self.effectlist["TaleofWardingandHeroism"]                              = "Tale of Warding and Heroism";
                self.effectlist["TaleofFrostandFlamesBattle"]                   = "Tale of Frost and Flame's Battle";
                self.effectlist["LuteStringsofMinorSubtlety"]                   = "Lute Strings of Minor Subtlety";
                self.effectlist["LuteStringsofSubtlety"]                                = "Lute Strings of Subtlety";
                self.effectlist["LuteStringsofGreaterSubtlety"]                 = "Lute Strings of Greater Subtlety";
                self.effectlist["ImprovedLuteStringsofMinorSubtlety"]   = "Improved Lute Strings of Minor Subtlety";
                self.effectlist["ImprovedLuteStringsofSubtlety"]                = "Improved Lute Strings of Subtlety";
                self.effectlist["ImprovedLuteStringsofGreaterSubtlety"] = "Improved Lute Strings of Greater Subtlety";
        elseif (vars.locale == 'fr') then
                self.effectlist["BalladofVigour"]                                               = "Ballad of Vigour";
                self.effectlist["BalladofSteel"]                                                = "Ballad of Steel";
                self.effectlist["BalladofResonance"]                                    = "Ballad of Resonance";
                self.effectlist["BalladofSwiftness"]                                    = "Ballad of Swiftness";
                self.effectlist["BalladofBalance"]                                              = "Ballad of Balance";
                self.effectlist["BalladoftheStout"]                                     = "Ballad of the Stout";
                self.effectlist["BalladofWar"]                                                  = "Ballad of War";
                self.effectlist["BalladofUnshakeableWill"]                              = "Ballad of Unshakeable Will";
                self.effectlist["BalladofFlame"]                                                = "Ballad of Flame";
                self.effectlist["AnthemoftheFreePeoples"]                               = "Anthem of the Free Peoples";
                self.effectlist["AnthemofCompassion"]                                   = "Anthem of Compassion";
                self.effectlist["BalladTier1"]                                                  = "Ballad Tier 1";
                self.effectlist["BalladTier2"]                                                  = "Ballad Tier 2";
                self.effectlist["BalladTier3"]                                                  = "Ballad Tier 3";
                self.effectlist["Warspeech"]                                                    = "War-speech";
                self.effectlist["Silenced"]                                                     = "Silenced";
                self.effectlist["TaleofHeroism"]                                                = "Tale of Heroism";
                self.effectlist["TaleofBattle"]                                                 = "Tale of Battle";
                self.effectlist["TaleofWarding"]                                                = "Tale of Warding";
                self.effectlist["TaleofFrostandFlame"]                                  = "Tale of Frost and Flame";
                self.effectlist["TaleofWardingandHeroism"]                              = "Tale of Warding and Heroism";
                self.effectlist["TaleofFrostandFlamesBattle"]                   = "Tale of Frost and Flame's Battle";
                self.effectlist["LuteStringsofMinorSubtlety"]                   = "Lute Strings of Minor Subtlety";
                self.effectlist["LuteStringsofSubtlety"]                                = "Lute Strings of Subtlety";
                self.effectlist["LuteStringsofGreaterSubtlety"]                 = "Lute Strings of Greater Subtlety";
                self.effectlist["ImprovedLuteStringsofMinorSubtlety"]   = "Improved Lute Strings of Minor Subtlety";
                self.effectlist["ImprovedLuteStringsofSubtlety"]                = "Improved Lute Strings of Subtlety";
                self.effectlist["ImprovedLuteStringsofGreaterSubtlety"] = "Improved Lute Strings of Greater Subtlety";
        elseif (vars.locale == 'de') then
                self.effectlist["BalladofVigour"]                                               = "Ballade der Lebenskraft";
                self.effectlist["BalladofSteel"]                                                = "Ballade des Stahls";
                self.effectlist["BalladofResonance"]                                    = "Ballade der Resonanz";
                self.effectlist["BalladofSwiftness"]                                    = "Ballade der Schnelligkeit";
                self.effectlist["BalladofBalance"]                                              = "Ballade des Gleichgewichts";
                self.effectlist["BalladoftheStout"]                                     = "Ballade der Starken";
                self.effectlist["BalladofWar"]                                                  = "Ballade des Krieges";
                self.effectlist["BalladofUnshakeableWill"]                              = "Ballade der Willenskraft";
                self.effectlist["BalladofFlame"]                                                = "Ballade der Flamme";
                self.effectlist["AnthemoftheFreePeoples"]                               = "Hymne der freien Völker";
                self.effectlist["AnthemofCompassion"]                                   = "Hymne des Mitgefühls";
                self.effectlist["BalladTier1"]                                                  = "Ballade, Stufe 1";
                self.effectlist["BalladTier2"]                                                  = "Ballade, Stufe 2";
                self.effectlist["BalladTier3"]                                                  = "Ballade, Stufe 3";
                self.effectlist["Warspeech"]                                                    = "Kriegsrede";
                self.effectlist["Silenced"]                                                     = "Verstummt";
                self.effectlist["TaleofHeroism"]                                                = "Heldensage";
                self.effectlist["TaleofBattle"]                                                 = "Geschichte des Gefechts";
                self.effectlist["TaleofWarding"]                                                = "Geschichte der Bewachung";
                self.effectlist["TaleofFrostandFlame"]                                  = "Geschichte von Frost- und Flamme";
                self.effectlist["TaleofWardingandHeroism"]                              = "Geschichte der Bewachung und Heldensagen";
                self.effectlist["TaleofFrostandFlamesBattle"]                   = "Geschichte vom Frost-und Flammengefecht";
                self.effectlist["LuteStringsofMinorSubtlety"]                   = "Lauten-Saiten der geringen Unauffälligkeit";
                self.effectlist["LuteStringsofSubtlety"]                                = "Lauten-Saiten der Unauffälligkeit";
                self.effectlist["LuteStringsofGreaterSubtlety"]                 = "Lauten-Saiten der grossen Unauffälligkeit";
                self.effectlist["ImprovedLuteStringsofMinorSubtlety"]   = "Verbesserung: Lauten-Saiten der geringen Unauffälligkeit";
                self.effectlist["ImprovedLuteStringsofSubtlety"]                = "Verbesserung: Lauten-Saiten der Unauffälligkeit";
                self.effectlist["ImprovedLuteStringsofGreaterSubtlety"] = "Verbesserung: Lauten-Saiten der grossen Unauffälligkeit";

        end

 
    -- BUILD WINDOWS BARS SKILLS AND MULTIS --
 
    -- ALL X, Y, WIDTH, HEIGHT values are in quickslot (ie: 1 width = the width of one quickslot: 35 px);
    -- Build Windows        SkillWindow( name:String, defaultx:int, defaulty:int, width:int, height:int, settings:table);
    self.windows["BalladsT1"]           = SkillWindow("BalladsT1",              1, 1, 3, 1,     self.settings["BalladsT1"]      );
    self.windows["BalladsT2"]           = SkillWindow("BalladsT2",              1, 2, 3, 1,     self.settings["BalladsT2"]      );
    self.windows["BalladsT3"]           = SkillWindow("BalladsT3",              1, 3, 3, 1,     self.settings["BalladsT3"]  );
    self.windows["Anthems"]                     = SkillWindow("Anthems",                1, 4, 4, 1,     self.settings["Anthems"]        );
    self.windows["Warspeech"]           = SkillWindow("Warspeech",              4, 1, 1, 1,     self.settings["Warspeech"]      );
        self.windows["Calls"]                   = SkillWindow("Calls",                  5, 1, 3, 1,     self.settings["Calls"]          );
        self.windows["Damage"]                  = SkillWindow("Damage",                 8, 1, 2, 1,     self.settings["Damage"]         );
    self.windows["Dethreat"]            = SkillWindow("Dethreat",               10, 1, 2, 1,    self.settings["Dethreat"]       );
    self.windows["Melee"]                       = SkillWindow("Melee",                  4, 2, 2, 1,     self.settings["Melee"]          );
    self.windows["Heals"]                       = SkillWindow("Heals",                  1, 5, 6, 1,     self.settings["Heals"]          );
    self.windows["Tales"]                       = SkillWindow("Tales",                  6, 2, 1, 1,     self.settings["Tales"]          );
    self.windows["Utility"]                     = SkillWindow("Utility",                7, 2, 5, 1,     self.settings["Utility"]        );
    self.windows["Rez"]                         = SkillWindow("Rez",                    4, 3, 3, 1,     self.settings["Rez"]            );
    self.windows["CrowdControl"]        = SkillWindow("CrowdControl",   8, 3, 3, 1,     self.settings["CrowdControl"]);
    self.windows["PowerShield"]         = SkillWindow("PowerShield",    5, 4, 1, 1,     self.settings["PowerShield"]);
    self.windows["Silenced"]            = SkillWindow("Silenced",               6, 4, 1, 1,     self.settings["Silenced"]       );
    self.windows["Cure"]                        = SkillWindow("Cure",                   7, 4, 2, 1,     self.settings["Cure"]           );
        self.windows["Consumables"]             = SkillWindow("Consumables",    9, 4, 2, 1,             self.settings["Consumables"]);
    
    -- Build Bars           SkillBar( parent:SkillWindow, x:int, y:int, width:int, height:int, active:Boolean, exclusive:boolean);
    self.bars["BalladsT1"]                      = SkillBar(self.windows["BalladsT1"],   1, 1, 3, 1, true, false);
    self.bars["BalladsT2"]                      = SkillBar(self.windows["BalladsT2"],   1, 1, 3, 1, true, false);
    self.bars["BalladsT3"]                      = SkillBar(self.windows["BalladsT3"],   1, 1, 3, 1, true, false);
    self.bars["Anthems"]                        = SkillBar(self.windows["Anthems"],     1, 1, 4, 1, true, false);
    self.bars["Warspeech"]                      = SkillBar(self.windows["Warspeech"],   1, 1, 1, 1, true, false);
    self.bars["Calls"]                          = SkillBar(self.windows["Calls"],               1, 1, 3, 1, true, false);
    self.bars["Damage"]                         = SkillBar(self.windows["Damage"],              1, 1, 2, 1, true, false);
    self.bars["Dethreat"]                       = SkillBar(self.windows["Dethreat"],    1, 1, 2, 1, true, false);
    self.bars["Melee"]                          = SkillBar(self.windows["Melee"],               1, 1, 2, 1, true, false);
    self.bars["Heals"]              = SkillBar(self.windows["Heals"],           1, 1, 6, 1, true, false);
    self.bars["Tales"]                          = SkillBar(self.windows["Tales"],               1, 1, 1, 1, true, false);
    self.bars["Utility"]                        = SkillBar(self.windows["Utility"],     1, 1, 5, 1, true, false);
    self.bars["Rez"]                            = SkillBar(self.windows["Rez"],                 1, 1, 3, 1, true, false);
    self.bars["CrowdControl"]           = SkillBar(self.windows["CrowdControl"], 1, 1, 3, 1, true, false);
    self.bars["PowerShield"]            = SkillBar(self.windows["PowerShield"], 1, 1, 1, 1, true, false);
    self.bars["Silenced"]                       = SkillBar(self.windows["Silenced"],    1, 1, 1, 1, true, false);
    self.bars["Cure"]                           = SkillBar(self.windows["Cure"],                1, 1, 2, 1, true, false);
        self.bars["Consumables"]                = SkillBar(self.windows["Consumables"], 1, 1, 2, 1, true, false);
    

        -- Build Skills         SkillSlot( parent:SkillBar, x:int, y:int, active:Boolean, level:int, hexcode:String );
    self.skills["BalladofVigour"]                       = SkillSlot(self.bars["BalladsT1"],     1, 1, true, 1, "0x70003E7C");
    self.skills["BalladofSteel"]                        = SkillSlot(self.bars["BalladsT1"],     2, 1, true, 4, "0x70003E7E");
    self.skills["BalladofResonance"]            = SkillSlot(self.bars["BalladsT1"],     3, 1, true, 8, "0x700031A8");
    
    self.skills["BalladofSwiftness"]            = SkillSlot(self.bars["BalladsT2"],     1, 1, false, 2, "0x70003E7F");
    self.skills["BalladofBalance"]                      = SkillSlot(self.bars["BalladsT2"],     2, 1, false, 12, "0x70003E83");
    self.skills["BalladoftheStout"]                     = SkillSlot(self.bars["BalladsT2"],     3, 1, false, 36, "0x70003E8F");
    
    self.skills["BalladofWar"]                          = SkillSlot(self.bars["BalladsT3"],     1, 1, false, 6, "0x7000317F");
    self.skills["BalladofUnshakeableWill"]      = SkillSlot(self.bars["BalladsT3"],     2, 1, false, 8, "0x70003E80");
    self.skills["BalladofFlame"]                        = SkillSlot(self.bars["BalladsT3"],     3, 1, false, 32, "0x70003E8D");
    
    self.skills["AnthemoftheFreePeoples"]       = SkillSlot(self.bars["Anthems"],               1, 1, false, 18, "0x70003E88");
    self.skills["AnthemofCompassion"]           = SkillSlot(self.bars["Anthems"],               2, 1, false, 24, "0x70003E8A");
    self.skills["AnthemoftheValar"]                     = SkillSlot(self.bars["Anthems"],               3, 1, false, 40, "0x70003184");
    self.skills["AnthemoftheWizards"]           = SkillSlot(self.bars["Anthems"],               4, 1, false, 41, "0x70001270");
    
    self.skills["Warspeech"]                            = SkillSlot(self.bars["Warspeech"],     1, 1, true, 10, "0x7000B699");

    self.skills["CallofOrome"]                          = SkillSlot(self.bars["Calls"],                 1, 1, false, 14, "0x7000B69A");
    self.skills["CalloftheSecondAge"]           = SkillSlot(self.bars["Calls"],                 2, 1, false, 34, "0x7000B69B");
    self.skills["CalltoFate"]                           = SkillSlot(self.bars["Calls"],                 3, 1, false, 56, "0x7000F250");
    
    self.skills["EchoesofBattle"]                       = SkillSlot(self.bars["Damage"],                1, 1, true, 6, "0x7000B697");
    self.skills["PiercingCry"]                          = SkillSlot(self.bars["Damage"],                2, 1, true, 2, "0x70003E7D");
    
    self.skills["SongofSoothing"]                       = SkillSlot(self.bars["Dethreat"],              1, 1, true, 28, "0x700031B7");
    self.skills["StillasDeath"]                         = SkillSlot(self.bars["Dethreat"],              2, 1, true, 38, "0x70003E90");

    self.skills["NobleCause"]                           = SkillSlot(self.bars["Melee"],                 1, 1, true, 14, "0x70003E84");
    self.skills["HeraldsStrike"]                        = SkillSlot(self.bars["Melee"],                 2, 1, true, { 1, 52 }, { "0x70003E7A", "0x70015A3C" });

    self.skills["RaisetheSpirit"]                       = SkillSlot(self.bars["Heals"],                 1, 1, true, 1, "0x70003E7B");
    self.skills["BolsterCourage"]                       = SkillSlot(self.bars["Heals"],                 2, 1, true, 16, "0x70003E85");
    self.skills["InspireFellows"]                       = SkillSlot(self.bars["Heals"],                 3, 1, true, 20, "0x70003E81");
    self.skills["TriumphantSpirit"]                     = SkillSlot(self.bars["Heals"],                 4, 1, true, 30, "0x70003E8C");
    self.skills["ChordofSalvation"]                     = SkillSlot(self.bars["Heals"],                 5, 1, true, 38, "0x7000BC01");
    self.skills["SoliloquyofSpirit"]            = SkillSlot(self.bars["Heals"],                 6, 1, true, 60, "0x7000F1F4");
    
    self.skills["SongofAid"]                            = SkillSlot(self.bars["Utility"],               1, 1, true, 30, "0x7000318C");
    self.skills["CalltotheFellowship"]          = SkillSlot(self.bars["Utility"],               2, 1, true, 46, "0x7000B69D");
    self.skills["GiftoftheHammerhand"]          = SkillSlot(self.bars["Utility"],               3, 1, true, 48, "0x7000B69E");
    self.skills["CalltoGreatness"]                      = SkillSlot(self.bars["Utility"],               4, 1, true, 50, "0x7000B69C");
    self.skills["SongoftheHopefulHeart"]        = SkillSlot(self.bars["Utility"],               5, 1, self.settings["Features"].hopefulheart, 41, "0x7000125F");
    
    self.skills["SongofRestoration"]            = SkillSlot(self.bars["Rez"],                   1, 1, true, { 18, 62 }, { "0x70003E86", "0x7000F25F" });
    self.skills["EnliveningGrace"]                      = SkillSlot(self.bars["Rez"],                   2, 1, true, 20, "0x700031AD");
    self.skills["Rally"]                                        = SkillSlot(self.bars["Rez"],                   3, 1, self.settings["Features"].rally, 41, "0x70001251");
 
        self.skills["CryoftheValar"]                    = SkillSlot(self.bars["CrowdControl"],  1, 1, true, 12, "0x70003E82");
        self.skills["SongoftheDead"]                    = SkillSlot(self.bars["CrowdControl"],  2, 1, true, 16, "0x70003E87");
        self.skills["SongofDistraction"]                = SkillSlot(self.bars["CrowdControl"],  3, 1, true, 34, "0x70003E8E");
    
    self.skills["LayoftheHammerhand"]           = SkillSlot(self.bars["PowerShield"],   1, 1, true, { 42, 64 }, { "0x70003E91", "0x70020DF9" });

    self.skills["CryoftheChorus"]                       = SkillSlot(self.bars["Silenced"],              1, 1, true, { 26, 54 }, { "0x700031B2", "0x7000F260" });
        
    self.skills["CureFear"]                                     = SkillSlot(self.bars["Cure"],                  1, 1, true, 26, "0x70003E8B");
    self.skills["FellowshipsHeart"]                     = SkillSlot(self.bars["Cure"],                  2, 1, self.settings["Features"].fellowshipsheart, 45, "0x70006CEB");
    
        -- Build Quickslots         ItemSlot( parent:SkillBar, x:int, y:int, active:Boolean, type:int, data:String );
        self.skills["LuteStrings"]                              = ItemSlot(self.bars["Consumables"],    1, 1, self.settings["Quickslots"].lutestrings["active"], self.settings["Quickslots"].lutestrings["type"], self.settings["Quickslots"].lutestrings["data"]);
        self.skills["SheetMusic"]                               = ItemSlot(self.bars["Consumables"],    2, 1, self.settings["Quickslots"].sheetmusic["active"], self.settings["Quickslots"].sheetmusic["type"], self.settings["Quickslots"].sheetmusic["data"]);
        
    -- Build MultiSlots         SkillMultiSlot( parent:SkillBar, x:int, y:int, active:Boolean );
    --                                                  multi:AddShortCut(name:String, level:int, hex:String);
        self.multi["TalesSlot"]                         = SkillMultiSlot(self.bars["Tales"], 1, 1, true);
        self.multi["TalesSlot"]:AddShortCut("TaleofHeroism",            22, "0x70003E89");
    self.multi["TalesSlot"]:AddShortCut("TaleofBattle",                 32, "0x7000B661");
    self.multi["TalesSlot"]:AddShortCut("TaleofWarding",                44, "0x7000B660");
    self.multi["TalesSlot"]:AddShortCut("TaleofFrostandFlame",  58, "0x7000F216");
    if (self.settings["Features"].mastertales) then self.multi["TalesSlot"]:AddShortCut("TaleofWardingandHeroism",              55, "0x7000F21B"); end
    if (self.settings["Features"].mastertales) then self.multi["TalesSlot"]:AddShortCut("TaleofFrostandFlamesBattle",   55, "0x7000F21C"); end
    self.multi["TalesSlot"]:LevelCheck();
        self.multi["TalesSlot"]:SetIndex(self.settings["Features"].primarytale);

        -- Set Combat States
        self.skills["SongofSoothing"]:SetCombat(true, false);
        self.skills["StillasDeath"]:SetCombat(true, false);
        self.skills["SongofRestoration"]:SetCombat(false, true);
        self.skills["EnliveningGrace"]:SetCombat(false, true);
        self.skills["SheetMusic"]:SetCombat(true, false);

        
    -- EVENTS

        -- Stance Change Event
        AddCallback(vars.classattr, "StanceChanged", function(sender, args)
                KragenBars:StanceChange(vars.classattr:GetStance());
        end);
        
        -- Ballad Tier Change Events
        AddCallback(vars.classattr, "IsSerenadeTier1AvailableChanged", function(sender, args)
                KragenBars:BalladT1Change(vars.classattr:IsSerenadeTier1Available());
        end);
        
        AddCallback(vars.classattr, "IsSerenadeTier2Changed", function(sender, args)
                KragenBars:BalladT2Change(vars.classattr:IsSerenadeTier2Available());
        end);
        
        AddCallback(vars.classattr, "IsSerenadeTier3Changed", function(sender, args)
                KragenBars:BalladT3Change(vars.classattr:IsSerenadeTier3Available());
        end);
        

        -- INITIALIZE BARS
        self:InitBars();
        self:CombatChange(vars.player:IsInCombat());
        self:StanceChange(vars.classattr:GetStance());
        self:BalladT1Change(vars.classattr:IsSerenadeTier1Available());
        self:BalladT2Change(vars.classattr:IsSerenadeTier2Available());
        self:BalladT2Change(vars.classattr:IsSerenadeTier2Available());
        
end


-- ADD EFFECT EVENT
function MiniBars:AddEffect( effectIndex )
        local effect = vars.player:GetEffects():Get( effectIndex );
        
        if (effect:GetName() == self.effectlist["BalladofVigour"] and self.settings["Features"].activeballad ~= 1) then
                self.skills["BalladofVigour"]:SetState( true , true, effect:GetID());
                if (self.settings["Features"].activeballad == 2) then
                        self.skills["BalladofVigour"]:SetHover(true);
                elseif (self.settings["Features"].activeballad == 3) then
                        self.skills["BalladofVigour"]:SetActive(false);
                end

        elseif (effect:GetName() == self.effectlist["BalladofSteel"] and self.settings["Features"].activeballad ~= 1) then
                self.skills["BalladofSteel"]:SetState( true , true, effect:GetID());
                if (self.settings["Features"].activeballad == 2) then
                        self.skills["BalladofSteel"]:SetHover(true);
                elseif (self.settings["Features"].activeballad == 3) then
                        self.skills["BalladofSteel"]:SetActive(false);
                end

        elseif (effect:GetName() == self.effectlist["BalladofResonance"] and self.settings["Features"].activeballad ~= 1) then
                self.skills["BalladofResonance"]:SetState( true , true, effect:GetID());
                if (self.settings["Features"].activeballad == 2) then
                        self.skills["BalladofResonance"]:SetHover(true);
                elseif (self.settings["Features"].activeballad == 3) then
                        self.skills["BalladofResonance"]:SetActive(false);
                end

        elseif (effect:GetName() == self.effectlist["BalladofSwiftness"] and self.settings["Features"].activeballad ~= 1) then
                self.skills["BalladofSwiftness"]:SetState( true , true, effect:GetID());
                if (self.settings["Features"].activeballad == 2) then
                        self.skills["BalladofSwiftness"]:SetHover(true);
                elseif (self.settings["Features"].activeballad == 3) then
                        self.skills["BalladofSwiftness"]:SetActive(false);
                end

        elseif (effect:GetName() == self.effectlist["BalladofBalance"] and self.settings["Features"].activeballad ~= 1) then
                self.skills["BalladofBalance"]:SetState( true , true, effect:GetID());
                if (self.settings["Features"].activeballad == 2) then
                        self.skills["BalladofBalance"]:SetHover(true);
                elseif (self.settings["Features"].activeballad == 3) then
                        self.skills["BalladofBalance"]:SetActive(false);
                end

        elseif (effect:GetName() == self.effectlist["BalladoftheStout"] and self.settings["Features"].activeballad ~= 1) then
                self.skills["BalladoftheStout"]:SetState( true , true, effect:GetID());
                if (self.settings["Features"].activeballad == 2) then
                        self.skills["BalladoftheStout"]:SetHover(true);
                elseif (self.settings["Features"].activeballad == 3) then
                        self.skills["BalladoftheStout"]:SetActive(false);
                end

        elseif (effect:GetName() == self.effectlist["BalladofWar"] and self.settings["Features"].activeballad ~= 1) then
                self.skills["BalladofWar"]:SetState( true , true, effect:GetID());
                if (self.settings["Features"].activeballad == 2) then
                        self.skills["BalladofWar"]:SetHover(true);
                elseif (self.settings["Features"].activeballad == 3) then
                        self.skills["BalladofWar"]:SetActive(false);
                end

        elseif (effect:GetName() == self.effectlist["BalladofUnshakeableWill"] and self.settings["Features"].activeballad ~= 1) then
                self.skills["BalladofUnshakeableWill"]:SetState( true , true, effect:GetID());
                if (self.settings["Features"].activeballad == 2) then
                        self.skills["BalladofUnshakeableWill"]:SetHover(true);
                elseif (self.settings["Features"].activeballad == 3) then
                        self.skills["BalladofUnshakeableWill"]:SetActive(false);
                end

        elseif (effect:GetName() == self.effectlist["BalladofFlame"] and self.settings["Features"].activeballad ~= 1) then
                self.skills["BalladofFlame"]:SetState( true , true, effect:GetID());
                if (self.settings["Features"].activeballad == 2) then
                        self.skills["BalladofFlame"]:SetHover(true);
                elseif (self.settings["Features"].activeballad == 3) then
                        self.skills["BalladofFlame"]:SetActive(false);
                end

        elseif (effect:GetName() == self.effectlist["AnthemoftheFreePeoples"] and self.settings["Features"].activeballad ~= 1) then
                self.skills["AnthemoftheFreePeoples"]:SetState( true , true, effect:GetID());
                if (self.settings["Features"].activeballad == 2) then
                        self.skills["AnthemoftheFreePeoples"]:SetHover(true);
                elseif (self.settings["Features"].activeballad == 3) then
                        self.skills["AnthemoftheFreePeoples"]:SetActive(false);
                end

        elseif (effect:GetName() == self.effectlist["AnthemofCompassion"] and self.settings["Features"].activeballad ~= 1) then
                self.skills["AnthemofCompassion"]:SetState( true , true, effect:GetID());
                if (self.settings["Features"].activeballad == 2) then
                        self.skills["AnthemofCompassion"]:SetHover(true);
                elseif (self.settings["Features"].activeballad == 3) then
                        self.skills["AnthemofCompassion"]:SetActive(false);
                end
                
        elseif (effect:GetName() == self.effectlist["BalladTier1"]) then
                self.bars["BalladsT2"]:SetState(true, effect:GetID());
                if (self.settings["Features"].activeballad == 1 or self.settings["Features"].activeballad == 2) then
                        self.skills["BalladofSwiftness"]:SetActive(true);
                        self.skills["BalladofBalance"]:SetActive(true);
                        self.skills["BalladoftheStout"]:SetActive(true);
                else
                        self.skills["BalladofSwiftness"]:SetActive(not self.skills["BalladofSwiftness"].state);
                        self.skills["BalladofBalance"]:SetActive(not self.skills["BalladofBalance"].state);
                        self.skills["BalladoftheStout"]:SetActive(not self.skills["BalladoftheStout"].state);
                end

        elseif (effect:GetName() == self.effectlist["BalladTier2"]) then
                self.bars["BalladsT3"]:SetState(true, effect:GetID());
                if (self.settings["Features"].activeballad == 1 or self.settings["Features"].activeballad == 2) then
                        self.skills["BalladofWar"]:SetActive(true);
                        self.skills["BalladofUnshakeableWill"]:SetActive(true);
                        self.skills["BalladofFlame"]:SetActive(true);
                else
                        self.skills["BalladofWar"]:SetActive(not self.skills["BalladofWar"].state);
                        self.skills["BalladofUnshakeableWill"]:SetActive(not self.skills["BalladofUnshakeableWill"].state);
                        self.skills["BalladofFlame"]:SetActive(not self.skills["BalladofFlame"].state);
                end

        elseif (effect:GetName() == self.effectlist["BalladTier3"]) then
                self.bars["Anthems"]:SetState(true, effect:GetID());
                self.skills["AnthemoftheValar"]:SetActive(true);
                self.skills["AnthemoftheWizards"]:SetActive(self.settings["Features"].wizards);
                if (self.settings["Features"].activeballad == 1 or self.settings["Features"].activeballad == 2) then
                        self.skills["AnthemoftheFreePeoples"]:SetActive(true);
                        self.skills["AnthemofCompassion"]:SetActive(true);
                else
                        self.skills["AnthemoftheFreePeoples"]:SetActive(not self.skills["AnthemoftheFreePeoples"].state);
                        self.skills["AnthemofCompassion"]:SetActive(not self.skills["AnthemofCompassion"].state);
                end
        
        elseif (effect:GetName() == self.effectlist["Warspeech"]) then
                self.skills["CallofOrome"]:SetActive(true);
                self.skills["CalloftheSecondAge"]:SetActive(true);
                self.skills["CalltoFate"]:SetActive(true);
                
        elseif (effect:GetName() == self.effectlist["Silenced"]) then
        self.skills["CryoftheChorus"]:SetState( true , true, effect:GetID());
                
        elseif (effect:GetName() == self.effectlist["TaleofHeroism"] or effect:GetName() == self.effectlist["TaleofBattle"] or effect:GetName() == self.effectlist["TaleofWarding"] or effect:GetName() == self.effectlist["TaleofFrostandFlame"] or effect:GetName() == self.effectlist["TaleofWardingandHeroism"] or effect:GetName() == self.effectlist["TaleofFrostandFlamesBattle"]) then
        self.multi["TalesSlot"]:SetState( true , true, effect:GetID());
                self.multi["TalesSlot"]:SetHover(true);
                
        elseif (effect:GetName() == self.effectlist["LuteStringsofMinorSubtlety"] or effect:GetName() == self.effectlist["ImprovedLuteStringsofMinorSubtlety"] or effect:GetName() == self.effectlist["LuteStringsofSubtlety"] or effect:GetName() == self.effectlist["ImprovedLuteStringsofSubtlety"] or effect:GetName() == self.effectlist["LuteStringsofGreaterSubtlety"] or effect:GetName() == self.effectlist["ImprovedLuteStringsofGreaterSubtlety"]) then
                self.skills["LuteStrings"]:SetState(true, false, effect:GetID());
                self.skills["LuteStrings"]:SetHover(true);
                self.skills["LuteStrings"]:StartTimer(effect:GetDuration() * .85, true);
        
    end
end


-- REMOVE EFFECT EVENT
function MiniBars:RemoveEffect( effect )

        -- SetState can be called on both bars and skills
        -- it will store the incoming effect id and flag the state as well as trigger visibility
        -- SetState(effectstate:Boolean,  visibility:Boolean,  effectid:int);

        if (effect:GetName() == self.effectlist["BalladofVigour"]) then
                self.skills["BalladofVigour"]:SetState( false , true, effect:GetID());
                self.skills["BalladofVigour"]:SetHover(false);

        elseif (effect:GetName() == self.effectlist["BalladofSteel"]) then
                self.skills["BalladofSteel"]:SetState( false , true, effect:GetID());
                self.skills["BalladofSteel"]:SetHover(false);

        elseif (effect:GetName() == self.effectlist["BalladofResonance"]) then
                self.skills["BalladofResonance"]:SetState( false , true, effect:GetID());
                self.skills["BalladofResonance"]:SetHover(false);

        elseif (effect:GetName() == self.effectlist["BalladofSwiftness"]) then
                self.skills["BalladofSwiftness"]:SetState( false , self.bars["BalladsT2"].state, effect:GetID());
                self.skills["BalladofSwiftness"]:SetHover(false);

        elseif (effect:GetName() == self.effectlist["BalladofBalance"]) then
                self.skills["BalladofBalance"]:SetState( false , self.bars["BalladsT2"].state, effect:GetID());
                self.skills["BalladofBalance"]:SetHover(false);

        elseif (effect:GetName() == self.effectlist["BalladoftheStout"]) then
                self.skills["BalladoftheStout"]:SetState( false , self.bars["BalladsT2"].state, effect:GetID());
                self.skills["BalladoftheStout"]:SetHover(false);

        elseif (effect:GetName() == self.effectlist["BalladofWar"]) then
                self.skills["BalladofWar"]:SetState( false , self.bars["BalladsT3"].state, effect:GetID());
                self.skills["BalladofWar"]:SetHover(false);

        elseif (effect:GetName() == self.effectlist["BalladofUnshakeableWill"]) then
                self.skills["BalladofUnshakeableWill"]:SetState( false , self.bars["BalladsT3"].state, effect:GetID());
                self.skills["BalladofUnshakeableWill"]:SetHover(false);

        elseif (effect:GetName() == self.effectlist["BalladofFlame"]) then
                self.skills["BalladofFlame"]:SetState( false , self.bars["BalladsT3"].state, effect:GetID());
                self.skills["BalladofFlame"]:SetHover(false);

        elseif (effect:GetName() == self.effectlist["AnthemoftheFreePeoples"]) then
                self.skills["AnthemoftheFreePeoples"]:SetState( false , self.bars["Anthems"].state, effect:GetID());
                self.skills["AnthemoftheFreePeoples"]:SetHover(false);

        elseif (effect:GetName() == self.effectlist["AnthemofCompassion"]) then
                self.skills["AnthemofCompassion"]:SetState( false , self.bars["Anthems"].state, effect:GetID());
                self.skills["AnthemofCompassion"]:SetHover(false);

        elseif (effect:GetName() == self.effectlist["BalladTier1"]) then
                self.bars["BalladsT2"]:SetState(false, effect:GetID());
                if (self.settings["Features"].activeballad == 1 or self.settings["Features"].activeballad == 2) then
                        self.skills["BalladofSwiftness"]:SetActive(self.bars["BalladsT2"].state);
                        self.skills["BalladofBalance"]:SetActive(self.bars["BalladsT2"].state);
                        self.skills["BalladoftheStout"]:SetActive(self.bars["BalladsT2"].state);
                else
                        self.skills["BalladofSwiftness"]:SetActive(self.bars["BalladsT2"].state and not self.skills["BalladofSwiftness"].state);
                        self.skills["BalladofBalance"]:SetActive(self.bars["BalladsT2"].state and not self.skills["BalladofBalance"].state);
                        self.skills["BalladoftheStout"]:SetActive(self.bars["BalladsT2"].state and not self.skills["BalladoftheStout"].state);
                end

        elseif (effect:GetName() == self.effectlist["BalladTier2"]) then
                self.bars["BalladsT3"]:SetState(false, effect:GetID());
                if (self.settings["Features"].activeballad == 1 or self.settings["Features"].activeballad == 2) then
                        self.skills["BalladofWar"]:SetActive(self.bars["BalladsT3"].state);
                        self.skills["BalladofUnshakeableWill"]:SetActive(self.bars["BalladsT3"].state);
                        self.skills["BalladofFlame"]:SetActive(self.bars["BalladsT3"].state);
                else
                        self.skills["BalladofWar"]:SetActive(self.bars["BalladsT3"].state and not self.skills["BalladofWar"].state);
                        self.skills["BalladofUnshakeableWill"]:SetActive(self.bars["BalladsT3"].state and not self.skills["BalladofUnshakeableWill"].state);
                        self.skills["BalladofFlame"]:SetActive(self.bars["BalladsT3"].state and not self.skills["BalladofFlame"].state);
                end

        elseif (effect:GetName() == self.effectlist["BalladTier3"]) then
                self.bars["Anthems"]:SetState(false, effect:GetID());
                if (self.settings["Features"].activeballad == 1 or self.settings["Features"].activeballad == 2) then
                        self.skills["AnthemoftheFreePeoples"]:SetActive(self.bars["Anthems"].state);
                        self.skills["AnthemofCompassion"]:SetActive(self.bars["Anthems"].state);
                else
                        self.skills["AnthemoftheFreePeoples"]:SetActive(self.bars["Anthems"].state and not self.skills["AnthemoftheFreePeoples"].state);
                        self.skills["AnthemofCompassion"]:SetActive(self.bars["Anthems"].state and not self.skills["AnthemofCompassion"].state);
                end
                self.skills["AnthemoftheValar"]:SetActive(false);
                self.skills["AnthemoftheWizards"]:SetActive(false);
                
        elseif (effect:GetName() == self.effectlist["Warspeech"]) then
                self.skills["CallofOrome"]:SetActive(false);
                self.skills["CalloftheSecondAge"]:SetActive(false);
                self.skills["CalltoFate"]:SetActive(false);
                
        elseif (effect:GetName() == self.effectlist["Silenced"]) then
        self.skills["CryoftheChorus"]:SetState( false , false, effect:GetID());

        elseif (effect:GetName() == self.effectlist["TaleofHeroism"] or effect:GetName() == self.effectlist["TaleofBattle"] or effect:GetName() == self.effectlist["TaleofWarding"] or effect:GetName() == self.effectlist["TaleofFrostandFlame"] or effect:GetName() == self.effectlist["TaleofWardingandHeroism"] or effect:GetName() == self.effectlist["TaleofFrostandFlamesBattle"]) then
        self.multi["TalesSlot"]:SetState( false , true, effect:GetID());
                self.multi["TalesSlot"]:SetHover(false);
        
        elseif (effect:GetName() == self.effectlist["LuteStringsofMinorSubtlety"] or effect:GetName() == self.effectlist["ImprovedLuteStringsofMinorSubtlety"] or effect:GetName() == self.effectlist["LuteStringsofSubtlety"] or effect:GetName() == self.effectlist["ImprovedLuteStringsofSubtlety"] or effect:GetName() == self.effectlist["LuteStringsofGreaterSubtlety"] or effect:GetName() == self.effectlist["ImprovedLuteStringsofGreaterSubtlety"]) then
                self.skills["LuteStrings"]:SetState(false, true, effect:GetID());
                self.skills["LuteStrings"]:SetHover(false);
        
        end
end


function MiniBars:StanceChange(stance)
        -- Turbine.Shell.WriteLine("KragenBars: Stance Change: " ..vars.classattr:GetStance());

        -- if (stance == 1) then
                -- self.skills["CallofOrome"]:SetActive(true);
                -- self.skills["CalloftheSecondAge"]:SetActive(true);
                -- self.skills["CalltoFate"]:SetActive(true);
        -- else
                -- self.skills["CallofOrome"]:SetActive(false);
                -- self.skills["CalloftheSecondAge"]:SetActive(false);
                -- self.skills["CalltoFate"]:SetActive(false);
        -- end

end


function MiniBars:BalladT1Change(bol)
        -- if (vars.classattr:IsSerenadeTier1Available()) then
                -- Turbine.Shell.WriteLine("KragenBars: BalladT1 Change: true");
        -- else
                -- Turbine.Shell.WriteLine("KragenBars: BalladT1 Change: false");
        -- end
                
        -- if (bol) then
                -- if (self.settings["Features"].activeballad == 0 or self.settings["Features"].activeballad == 1) then
                        -- self.skills["BalladofSwiftness"]:SetActive(true);
                        -- self.skills["BalladofBalance"]:SetActive(true);
                        -- self.skills["BalladoftheStout"]:SetActive(true);
                -- else
                        -- self.skills["BalladofSwiftness"]:SetActive(not self.skills["BalladofSwiftness"].state);
                        -- self.skills["BalladofBalance"]:SetActive(not self.skills["BalladofBalance"].state);
                        -- self.skills["BalladoftheStout"]:SetActive(not self.skills["BalladoftheStout"].state);
                -- end
        -- else
                -- self.skills["BalladofSwiftness"]:SetActive(false);
                -- self.skills["BalladofBalance"]:SetActive(false);
                -- self.skills["BalladoftheStout"]:SetActive(false);
        -- end

end


function MiniBars:BalladT2Change(bol)
        -- if (vars.classattr:IsSerenadeTier2Available()) then
                -- Turbine.Shell.WriteLine("KragenBars: BalladT2 Change: true");
        -- else
                -- Turbine.Shell.WriteLine("KragenBars: BalladT2 Change: false");
        -- end


        -- if (bol) then
                -- if (self.settings["Features"].activeballad == 0 or self.settings["Features"].activeballad == 1) then
                        -- self.skills["BalladofWar"]:SetActive(true);
                        -- self.skills["BalladofUnshakeableWill"]:SetActive(true);
                        -- self.skills["BalladofFlame"]:SetActive(true);
                -- else
                        -- self.skills["BalladofWar"]:SetActive(not self.skills["BalladofWar"].state);
                        -- self.skills["BalladofUnshakeableWill"]:SetActive(not self.skills["BalladofUnshakeableWill"].state);
                        -- self.skills["BalladofFlame"]:SetActive(not self.skills["BalladofFlame"].state);
                -- end
        -- else
                -- self.skills["BalladofWar"]:SetActive(false);
                -- self.skills["BalladofUnshakeableWill"]:SetActive(false);
                -- self.skills["BalladofFlame"]:SetActive(false);
        -- end

end


function MiniBars:BalladT3Change(bol)
        -- if (vars.classattr:IsSerenadeTier3Available()) then
                -- Turbine.Shell.WriteLine("KragenBars: BalladT3 Change: true");
        -- else
                -- Turbine.Shell.WriteLine("KragenBars: BalladT3 Change: false");
        -- end

        -- if (bol) then
                -- self.skills["AnthemoftheValar"]:SetActive(true);
                -- self.skills["AnthemoftheWizards"]:SetActive(self.settings["Features"].wizards);
                -- if (self.settings["Features"].activeballad == 0 or self.settings["Features"].activeballad == 1) then
                        -- self.skills["AnthemoftheFreePeoples"]:SetActive(true);
                        -- self.skills["AnthemofCompassion"]:SetActive(true);
                -- else
                        -- self.skills["AnthemoftheFreePeoples"]:SetActive(not self.skills["AnthemoftheFreePeoples"].state);
                        -- self.skills["AnthemofCompassion"]:SetActive(not self.skills["AnthemofCompassion"].state);
                -- end
        -- else
                -- self.skills["AnthemoftheFreePeoples"]:SetActive(false);
                -- self.skills["AnthemofCompassion"]:SetActive(false);
        -- end

end


function MiniBars:DefaultSettings()
        self.settings = { };
        
        local windowlist = {"BalladsT1", "BalladsT2", "BalladsT3", "Anthems", "Warspeech", "Calls", "Damage", "Dethreat", "Melee", "Heals", "Tales", "Utility", "Rez", "CrowdControl", "PowerShield", "Silenced", "Cure", "Consumables"};
        for k,v in pairs(windowlist) do
                self.settings[v] = { active = true, x = 0, y = 0, rotate = 0 };
        end
        
        self.settings["Features"] = { };
        self.settings["Features"].activeballad = 1;
        self.settings["Features"].wizards = false;
        self.settings["Features"].primarytale = 1;
        self.settings["Features"].mastertales = false;
        self.settings["Features"].hopefulheart = false;
        self.settings["Features"].rally = false;
        self.settings["Features"].fellowshipsheart = false;
        
        self.settings["Quickslots"] = { };
        self.settings["Quickslots"].lutestrings = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
        self.settings["Quickslots"].sheetmusic = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };


end


function MiniBars:UpdateSettings()
        if (settings.vers < 3.12) then
                self.settings["Consumables"] = { active = true, x = 0, y = 0, rotate = 0 };
                
                self.settings["Quickslots"] = { };
                self.settings["Quickslots"].lutestrings = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
                self.settings["Quickslots"].sheetmusic = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };

        end

        settings.vers = vars.vers;

end


function MiniBars:ShowSetup()
        self.setup:SetVisible(true);

        self.setupbb.opacityslider:SetValue(settings.opacity * 100);
        self.setupbb.checkboxlock:SetChecked(settings.lockslots);
        self.setupbb.checkboxgrid:SetChecked(settings.snaptogrid);

        self.setupbb.checkboxbb1:SetText("Ballads: Tier 1");
        self.setupbb.checkboxbb1:SetChecked (self.settings["BalladsT1"].active);
        self.setupbb.checkboxbb1:SetVisible(true);
        self.setupbb.checkboxbb2:SetText("Ballads: Tier 2");
        self.setupbb.checkboxbb2:SetChecked (self.settings["BalladsT2"].active);
        self.setupbb.checkboxbb2:SetVisible(true);
        self.setupbb.checkboxbb3:SetText("Ballads: Tier 3");
        self.setupbb.checkboxbb3:SetChecked (self.settings["BalladsT3"].active);
        self.setupbb.checkboxbb3:SetVisible(true);
        self.setupbb.checkboxbb4:SetText("Anthems");
        self.setupbb.checkboxbb4:SetChecked (self.settings["Anthems"].active);
        self.setupbb.checkboxbb4:SetVisible(true);
        self.setupbb.checkboxbb5:SetText("Warspeech");
        self.setupbb.checkboxbb5:SetChecked (self.settings["Warspeech"].active);
        self.setupbb.checkboxbb5:SetVisible(true);
        self.setupbb.checkboxbb6:SetText("Calls");
        self.setupbb.checkboxbb6:SetChecked (self.settings["Calls"].active);
        self.setupbb.checkboxbb6:SetVisible(true);
        self.setupbb.checkboxbb7:SetText("Damage");
        self.setupbb.checkboxbb7:SetChecked (self.settings["Damage"].active);
        self.setupbb.checkboxbb7:SetVisible(true);
        self.setupbb.checkboxbb8:SetText("Dethreat");
        self.setupbb.checkboxbb8:SetChecked (self.settings["Dethreat"].active);
        self.setupbb.checkboxbb8:SetVisible(true);
        self.setupbb.checkboxbb9:SetText("Melee");
        self.setupbb.checkboxbb9:SetChecked (self.settings["Melee"].active);
        self.setupbb.checkboxbb9:SetVisible(true);
        self.setupbb.checkboxbb10:SetText("Heals");
        self.setupbb.checkboxbb10:SetChecked (self.settings["Heals"].active);
        self.setupbb.checkboxbb10:SetVisible(true);
        self.setupbb.checkboxbb11:SetText("Tales");
        self.setupbb.checkboxbb11:SetChecked (self.settings["Tales"].active);
        self.setupbb.checkboxbb11:SetVisible(true);
        self.setupbb.checkboxbb12:SetText("Utility");
        self.setupbb.checkboxbb12:SetChecked (self.settings["Utility"].active);
        self.setupbb.checkboxbb12:SetVisible(true);
        self.setupbb.checkboxbb13:SetText("Rez");
        self.setupbb.checkboxbb13:SetChecked (self.settings["Rez"].active);
        self.setupbb.checkboxbb13:SetVisible(true);
        self.setupbb.checkboxbb14:SetText("Crowd Control");
        self.setupbb.checkboxbb14:SetChecked (self.settings["CrowdControl"].active);
        self.setupbb.checkboxbb14:SetVisible(true);
        self.setupbb.checkboxbb15:SetText("Power Shield");
        self.setupbb.checkboxbb15:SetChecked (self.settings["PowerShield"].active);
        self.setupbb.checkboxbb15:SetVisible(true);
        self.setupbb.checkboxbb16:SetText("Silenced");
        self.setupbb.checkboxbb16:SetChecked (self.settings["Silenced"].active);
        self.setupbb.checkboxbb16:SetVisible(true);
        self.setupbb.checkboxbb17:SetText("Cure");
        self.setupbb.checkboxbb17:SetChecked (self.settings["Cure"].active);
        self.setupbb.checkboxbb17:SetVisible(true);
        self.setupbb.checkboxbb18:SetText("Consumables");
        self.setupbb.checkboxbb18:SetChecked (self.settings["Consumables"].active);
        self.setupbb.checkboxbb18:SetVisible(true);

        self.setupf.checkboxf1:SetText("Anthem...Wizards");
        self.setupf.checkboxf1:SetChecked (self.settings["Features"].wizards);
        self.setupf.checkboxf1:SetVisible(true);
        self.setupf.checkboxf2:SetText("Song..Hopeful Heart");
        self.setupf.checkboxf2:SetChecked (self.settings["Features"].hopefulheart);
        self.setupf.checkboxf2:SetVisible(true);
        self.setupf.checkboxf3:SetText("Rally!");
        self.setupf.checkboxf3:SetChecked (self.settings["Features"].rally);
        self.setupf.checkboxf3:SetVisible(true);
        self.setupf.checkboxf4:SetText("Fellowship's Heart");
        self.setupf.checkboxf4:SetChecked (self.settings["Features"].fellowshipsheart);
        self.setupf.checkboxf4:SetVisible(true);

        self.setupf.combo1box.listBox:ClearItems();
        self.setupf.combo1Label:SetText("Primary Tale");
        self.setupf.combo1Label:SetVisible(true);
        local combolist = {"Tale of Heroism", "Tale of Battle", "Tale of Warding", "Tale of Frost and Flame", "Tale of Warding and Heroism", "Tale of Frost and Flame's Battle"};
        for k,v in pairs(combolist) do
                self.setupf.combo1box:AddItem(v, k);
        end
        self.setupf.combo1box:SetVisible(true);
        self.setupf.combo1box:SetSelection(self.settings["Features"].primarytale);
        
        self.setupf.combo2box.listBox:ClearItems();
        self.setupf.combo2Label:SetText("Active Ballad Effect");
        self.setupf.combo2Label:SetVisible(true);
        combolist = {"None", "Dim", "Hide"};
        for k,v in pairs(combolist) do
            self.setupf.combo2box:AddItem(v, k);
        end
        self.setupf.combo2box:SetVisible(true);
        self.setupf.combo2box:SetSelection(self.settings["Features"].activeballad);

        self.setupqs.quickslot1:SetVisible(true);
    pcall(function() self.setupqs.quickslot1:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].lutestrings["type"], self.settings["Quickslots"].lutestrings["data"] ) ); end);
        self.setupqs.quickslot1cb:SetText("Lute Strings");
        self.setupqs.quickslot1cb:SetChecked(self.settings["Quickslots"].lutestrings["active"]);
        self.setupqs.quickslot1cb:SetVisible(true);
        self.setupqs.quickslot2:SetVisible(true);
    pcall(function() self.setupqs.quickslot2:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].sheetmusic["type"], self.settings["Quickslots"].sheetmusic["data"] ) ); end);
        self.setupqs.quickslot2cb:SetText("Sheet Music");
        self.setupqs.quickslot2cb:SetChecked(self.settings["Quickslots"].sheetmusic["active"]);
        self.setupqs.quickslot2cb:SetVisible(true);

        
end


function MiniBars:SetupClosing()
        self.settings["BalladsT1"].active = self.setupbb.checkboxbb1:IsChecked();
    self.settings["BalladsT2"].active = self.setupbb.checkboxbb2:IsChecked();
    self.settings["BalladsT3"].active = self.setupbb.checkboxbb3:IsChecked();
    self.settings["Anthems"].active = self.setupbb.checkboxbb4:IsChecked();
    self.settings["Warspeech"].active = self.setupbb.checkboxbb5:IsChecked();
    self.settings["Calls"].active = self.setupbb.checkboxbb6:IsChecked();
    self.settings["Damage"].active = self.setupbb.checkboxbb7:IsChecked();
    self.settings["Dethreat"].active = self.setupbb.checkboxbb8:IsChecked();
    self.settings["Melee"].active = self.setupbb.checkboxbb9:IsChecked();
    self.settings["Heals"].active = self.setupbb.checkboxbb10:IsChecked();
    self.settings["Tales"].active = self.setupbb.checkboxbb11:IsChecked();
    self.settings["Utility"].active = self.setupbb.checkboxbb12:IsChecked();
    self.settings["Rez"].active = self.setupbb.checkboxbb13:IsChecked();
    self.settings["CrowdControl"].active = self.setupbb.checkboxbb14:IsChecked();
    self.settings["PowerShield"].active = self.setupbb.checkboxbb15:IsChecked();
    self.settings["Silenced"].active = self.setupbb.checkboxbb16:IsChecked();
    self.settings["Cure"].active = self.setupbb.checkboxbb17:IsChecked();
    self.settings["Consumables"].active = self.setupbb.checkboxbb18:IsChecked();

        self.settings["Features"].wizards = self.setupf.checkboxf1:IsChecked();
    self.settings["Features"].hopefulheart = self.setupf.checkboxf2:IsChecked();
    self.settings["Features"].rally = self.setupf.checkboxf3:IsChecked();
    self.settings["Features"].fellowshipsheart = self.setupf.checkboxf4:IsChecked();

    self.settings["Features"].primarytale = self.setupf.combo1box:GetSelection();
    self.settings["Features"].activeballad = self.setupf.combo2box:GetSelection();
        
        if (self.setupqs.quickslot1:GetShortcut():GetData() ~= "" ) then
                self.settings["Quickslots"].lutestrings = { active = self.setupqs.quickslot1cb:IsChecked(), type = self.setupqs.quickslot1:GetShortcut():GetType(), data = self.setupqs.quickslot1:GetShortcut():GetData() };
        else
                self.settings["Quickslots"].lutestrings = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
        end
        if (self.setupqs.quickslot2:GetShortcut():GetData() ~= "" ) then
                self.settings["Quickslots"].sheetmusic = { active = self.setupqs.quickslot2cb:IsChecked(), type = self.setupqs.quickslot2:GetShortcut():GetType(), data = self.setupqs.quickslot2:GetShortcut():GetData() };
        else
                self.settings["Quickslots"].sheetmusic = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
        end

        settings.opacity = (self.setupbb.opacityslider:GetValue() / 100);
        settings.lockslots = self.setupbb.checkboxlock:IsChecked();
        settings.snaptogrid = self.setupbb.checkboxgrid:IsChecked();

        self:SaveSettings();
        self:Refresh();

end


function MiniBars:Refresh()

        -- GENERIC REFRESH (Required for all classes)
        self:RefreshBars();

    -- CLASS SPECIFIC REFRESH
    -- Setup Features
        self.skills["AnthemoftheWizards"]:SetActive(self.settings["Features"].wizards);
        self.skills["SongoftheHopefulHeart"]:SetActive(self.settings["Features"].hopefulheart);
        self.skills["Rally"]:SetActive(self.settings["Features"].rally);
        self.skills["FellowshipsHeart"]:SetActive(self.settings["Features"].fellowshipsheart);
        
        self.skills["LuteStrings"]:SetQuickslot(self.settings["Quickslots"].lutestrings["active"], self.settings["Quickslots"].lutestrings["type"], self.settings["Quickslots"].lutestrings["data"]);
        self.skills["SheetMusic"]:SetQuickslot(self.settings["Quickslots"].sheetmusic["active"], self.settings["Quickslots"].sheetmusic["type"], self.settings["Quickslots"].sheetmusic["data"]);

        -- Build Multi Slots
        self.multi["TalesSlot"]:Clear();
        self.multi["TalesSlot"]:AddShortCut("TaleofHeroism",            22, "0x70003E89");
    self.multi["TalesSlot"]:AddShortCut("TaleofBattle",                 32, "0x7000B661");
    self.multi["TalesSlot"]:AddShortCut("TaleofWarding",                44, "0x7000B660");
    self.multi["TalesSlot"]:AddShortCut("TaleofFrostandFlame",  58, "0x7000F216");
    if (self.settings["Features"].mastertales) then self.multi["TalesSlot"]:AddShortCut("TaleofWardingandHeroism",              55, "0x7000F21B"); end
    if (self.settings["Features"].mastertales) then self.multi["TalesSlot"]:AddShortCut("TaleofFrostandFlamesBattle",   55, "0x7000F21C"); end
    self.multi["TalesSlot"]:LevelCheck();
        self.multi["TalesSlot"]:SetIndex(self.settings["Features"].primarytale);
        if (self.multi["TalesSlot"].effectid ~= 0) then
                self.multi["TalesSlot"]:SetHover(true);
        end             
    
    -- Refresh States
    self:CombatChange(vars.player:IsInCombat());
        self:StanceChange(vars.classattr:GetStance());
        self:BalladT1Change(vars.classattr:IsSerenadeTier1Available());
        self:BalladT2Change(vars.classattr:IsSerenadeTier2Available());
        self:BalladT2Change(vars.classattr:IsSerenadeTier2Available());
        
        Turbine.Shell.WriteLine("KragenBars: Minstrel Bars refresh completed successfully.");

end

Compare with Previous | Blame


All times are GMT -5. The time now is 02:53 PM.


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