lotrointerface.com
Search Downloads

LoTROInterface SVN KragenBars

[/] [branches/] [3.20/] [KragenBars/] [ChampionBars.lua] - Rev 133

Go to most recent revision | Compare with Previous | Blame | View Log

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

ChampionBars = class( KragenPlugs.KragenBars.ClassBar );

function ChampionBars: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
    
        -- CLASS SPECIFIC VARIABLES
    self.fear = 0;
    self.controlledburnflag = false;
        self.stance = 0;
        
        -- DEFINE THE EFFECT LIST BASED ON CLIENT LANGUAGE
        self.DefineEffectList = function()
                self.effectlist = {};
                -- ENGLISH CLIENT
                if (settings.language == 1) then
                        self.effectlist['EnemyDefeatResponse']          = 'Enemy Defeat Response';
                        self.effectlist['BlockingBlades']                       = 'Blocking Blades';
                        self.effectlist['ArdentFlurry']                         = 'Ardent Flurry';
                        self.effectlist['GloriousExchange']                     = 'Glorious Exchange';
                        self.effectlist['Flurry']                                       = 'Flurry';
                        self.effectlist['ImprovedFlurry']                       = 'Improved Flurry';
                        self.effectlist['ExchangeOfBlows']                      = 'Exchange of Blows';
                        self.effectlist['ImprovedExchange']                     = 'Improved Exchange of Blows';
                        self.effectlist['Stunned']                                      = 'Stunned';
                        self.effectlist['Dazed']                                        = 'Dazed';      
                        self.effectlist['KnockedDown']                          = 'Knocked Down';
                        self.effectlist['Rooted']                                       = 'Rooted';
                        self.effectlist['Silenced']                             = 'Silenced';
                        self.effectlist['Disarmed']                             = 'Primary Weapon: Disarmed';
                        self.effectlist['ControlledBurn']                       = 'Controlled Burn';
                        self.effectlist['GreatCleave']                          = 'Great Cleave';
                        self.effectlist['DeathStorm']                           = 'Death Storm';
                        self.effectlist['Fervor']                                       = "Champion's Fervour";
                        self.effectlist['Ardor']                                        = "Ardour";
                        self.effectlist['Glory']                                        = "Glory";
                        
                -- FRENCH CLIENT
                elseif (settings.language == 2) then
                        self.effectlist['EnemyDefeatResponse']          = 'Evènement de défaite (ennemi)';
                        self.effectlist['BlockingBlades']                       = 'Lames bloquantes';
                        self.effectlist['ArdentFlurry']                         = 'Rafale ardente';
                        self.effectlist['GloriousExchange']                     = 'Echange glorieux';
                        self.effectlist['Flurry']                                       = 'Rafale';
                        self.effectlist['ImprovedFlurry']                       = 'Rafale améliorée';
                        self.effectlist['ExchangeOfBlows']                      = 'Echange de coups';
                        self.effectlist['ImprovedExchange']                     = 'Echange de coups amélioré';
                        self.effectlist['Stunned']                                      = 'Etourdissement';
                        self.effectlist['Dazed']                                        = 'Hébété';     
                        self.effectlist['KnockedDown']                          = 'Renversé';
                        self.effectlist['Rooted']                                       = 'Rooted';
                        self.effectlist['Silenced']                             = 'Silenced';
                        self.effectlist['Disarmed']                             = 'Arme primaire : Désarmée';
                        self.effectlist['ControlledBurn']                       = 'Brûlure Contrôlée';
                        self.effectlist['GreatCleave']                          = 'Great Cleave';
                        self.effectlist['DeathStorm']                           = 'Death Storm';
                        self.effectlist['Fervor']                                       = "Ferveur du Champion (Ferveur tout court)";
                        self.effectlist['Ardor']                                        = "Ardeur";
                        self.effectlist['Glory']                                        = "Gloire";
                        
                -- GERMAN CLIENT
                elseif (settings.language == 3) then
                        self.effectlist['EnemyDefeatResponse']          = 'Erwiderung "Vernichtung des Gegners"';
                        self.effectlist['BlockingBlades']                       = 'Blockende Klingen';
                        self.effectlist['ArdentFlurry']                         = 'Leidenschaftlicher Wirbel';
                        self.effectlist['GloriousExchange']                     = 'Glorreicher Schlagabtausch';
                        self.effectlist['Flurry']                                       = 'Wirbel';
                        self.effectlist['ImprovedFlurry']                       = 'Verbesserung: Wirbel';
                        self.effectlist['ExchangeOfBlows']                      = 'Schlagabtausch';
                        self.effectlist['ImprovedExchange']                     = 'Verbesserung: Schlagabtausch';
                        self.effectlist['Stunned']                                      = 'Bewusstlos geschlagen';
                        self.effectlist['Dazed']                                        = 'Benommenheit';       
                        self.effectlist['KnockedDown']                          = 'Zu Boden geschlagen';
                        self.effectlist['Rooted']                                       = 'Angewurzelt';
                        self.effectlist['Silenced']                             = 'Silenced';
                        self.effectlist['Disarmed']                             = 'Primärwaffe: Entwaffnet';
                        self.effectlist['ControlledBurn']                       = 'Kontrolliertes Verbrennen';
                        self.effectlist['GreatCleave']                          = 'Great Cleave';
                        self.effectlist['DeathStorm']                           = 'Death Storm';
                        self.effectlist['Fervor']                                       = "Leidenschaft des Waffenmeisters";
                        self.effectlist['Ardor']                                        = "Eifer";
                        self.effectlist['Glory']                                        = "Ruhm";
                end
        end
        
        -- BUILD WINDOWS BARS SKILLS AND MULTIS --
    
    -- Build Windows
    self.windows["SelfBuffs"]   = SkillWindow("Self Buffs",                             1, 1, 9, 1,     self.settings["SelfBuffs"]      );
    self.windows["Defeat"]              = SkillWindow("Defeat Response",                10, 1, 3, 2,    self.settings["Defeat"]         );
    self.windows["Fervor:Util"] = SkillWindow("Fervor:Utility",                 1, 2, 3, 1,     self.settings["Fervor:Util"]  );
    self.windows["Conditional"] = SkillWindow("Conditional",                    4, 2, 2, 1,     self.settings["Conditional"]  );
    self.windows["Fervor:AOE"]  = SkillWindow("Fervor:AOE",                     1, 3, 4, 1,     self.settings["Fervor:AOE"]  );
    self.windows["Threat"]              = SkillWindow("Threat",                                 5, 3, 3, 1,     self.settings["Threat"] );
        self.windows["ClassItems"]      = SkillWindow("ClassItems",                     8, 3, 2, 1,     self.settings["ClassItems"]     );
        self.windows["Ranged"]          = SkillWindow("Ranged",                                 10, 3, 1, 1,    self.settings["Ranged"] );
        self.windows["Stunned"]         = SkillWindow("Stunned",                                11, 3, 2, 1,    self.settings["Stunned"]        );
        self.windows["Melee"]           = SkillWindow("Melee",                                  1, 4, 3, 1,     self.settings["Melee"]          );
    self.windows["Fervor:ST"]   = SkillWindow("Fervor:Single Target",   4, 4, 4, 1,     self.settings["Fervor:ST"]              );
    self.windows["Buffs"]               = SkillWindow("Buffs",                                  8, 4, 2, 1,     self.settings["Buffs"]          );
    self.windows["Stances"]             = SkillWindow("Stances",                                12, 4, 1, 1,    self.settings["Stances"]        );
    
    -- Build Bars
    self.bars["Melee"]                  = SkillBar(self.windows["Melee"],               1, 1, 3, 1, true, false);
    self.bars["Fervor:ST"]              = SkillBar(self.windows["Fervor:ST"],   1, 1, 4, 1, true, false);
    self.bars["Fervor:AOE"]             = SkillBar(self.windows["Fervor:AOE"],  1, 1, 4, 1, true, false);
    self.bars["Fervor:Util"]    = SkillBar(self.windows["Fervor:Util"], 1, 1, 3, 1, true, false);
    self.bars["Conditional"]    = SkillBar(self.windows["Conditional"], 1, 1, 2, 1, true, false);
    self.bars["Defeat"]                 = SkillBar(self.windows["Defeat"],              1, 1, 3, 2, true, true);
    self.bars["Buffs"]                  = SkillBar(self.windows["Buffs"],               1, 1, 2, 1, true, false);
    self.bars["SelfBuffs"]              = SkillBar(self.windows["SelfBuffs"],   1, 1, 9, 1, true, false);
    self.bars["Threat"]                 = SkillBar(self.windows["Threat"],              1, 1, 3, 1, true, false);
    self.bars["Stances"]                = SkillBar(self.windows["Stances"],     1, 1, 1, 1, true, true);
    self.bars["Stunned"]        = SkillBar(self.windows["Stunned"],     1, 1, 2, 1, true, false);
    self.bars["Ranged"]         = SkillBar(self.windows["Ranged"],              1, 1, 1, 1, true, false);
        self.bars["ClassItems"]         = SkillBar(self.windows["ClassItems"],  1, 1, 2, 1, true, false);
    

        -- Build Skills
    self.skills["WildAttack"]                   = SkillSlot(self.bars["Melee"],                 1, 1, true, 1, "0x70003DFC");
    self.skills["BladeWall"]                    = SkillSlot(self.bars["Melee"],                 2, 1, true, 1, "0x70003DFD");
        self.skills["SwiftStrike"]                      = SkillSlot(self.bars["Melee"],                 3, 1, true, 1, "0x7000300F");
    
    self.skills["SavageStrikes"]                = SkillSlot(self.bars["Fervor:ST"],     1, 1, true, { 2, 52 }, { "0x70003DFE", "0x7000F661" } );
    self.skills["BrutalStrikes"]                        = SkillSlot(self.bars["Fervor:ST"], 2, 1, true, 6, "0x70003E01");
    self.skills["RelentlessStrike"]             = SkillSlot(self.bars["Fervor:ST"],     3, 1, true, { 20, 62 }, { "0x70003E07", "0x7001F4B3" } );
    self.skills["FerociousStrikes"]             = SkillSlot(self.bars["Fervor:ST"],     4, 1, self.settings["Features"].ferocious, 41, "0x70002D8D");
        
    self.skills["BladeStorm"]                   = SkillSlot(self.bars["Fervor:AOE"],    1, 1, true, 10, "0x70003E03");
    self.skills["Cleave"]                               = SkillSlot(self.bars["Fervor:AOE"],    2, 1, true, { 16, 54 }, { "0x70003E05", "0x7000F660" } );
    self.skills["SoundTheAttack"]               = SkillSlot(self.bars["Fervor:AOE"],    3, 1, true, 34, "0x70003E0D");
    self.skills["RagingBlades"]                 = SkillSlot(self.bars["Fervor:AOE"],    4, 1, self.settings["Features"].raging, 41, "0x70002DA9");
    
    self.skills["BracingAttack"]                = SkillSlot(self.bars["Fervor:Util"],   3, 1, true, 14, "0x70003E04");
        self.skills["Clobber"]                          = SkillSlot(self.bars["Fervor:Util"],   1, 1, true, 32, "0x70003E0C");
    self.skills["Hamstring"]                    = SkillSlot(self.bars["Fervor:Util"],   2, 1, true, 36, "0x70003E0E" );
    
    self.skills["MercifulStrike"]               = SkillSlot(self.bars["Conditional"],   1, 1, true, 24, "0x70003E09");
    self.skills["FightingDirty"]                = SkillSlot(self.bars["Conditional"],   2, 1, true, 26, "0x70003E0A" );

    self.skills["SecondWind"]                   = SkillSlot(self.bars["Defeat"],                1, 1, false, 14, "0x7000D47A");
        self.skills["Heroics"]                          = SkillSlot(self.bars["Defeat"],                2, 1, false, { 40, 64 }, { "0x70009678", "0x70020DF3" } );
        self.skills["RedHaze"]                          = SkillSlot(self.bars["Defeat"],                3, 1, false, 50, "0x7000967D");
        
        self.skills["ArdentFlurry"]                     = SkillSlot(self.bars["Defeat"],                1, 2, false, 10, "0x7000D606");
        self.skills["GloriousExchange"]         = SkillSlot(self.bars["Defeat"],                2, 2, false, 30, "0x7000D626");
        self.skills["BlockingBlades"]           = SkillSlot(self.bars["Defeat"],                3, 2, false, 48, "0x70009679");
    
    self.skills["Flurry"]                               = SkillSlot(self.bars["Buffs"],                 1, 1, true, 4, "0x70003E00");
    self.skills["ExchangeOfBlows"]              = SkillSlot(self.bars["Buffs"],                 2, 1, true, 8, "0x70003E02");
        
    self.skills["BattleFrenzy"]                 = SkillSlot(self.bars["SelfBuffs"],     1, 1, true, 8, "0x70003043");
        self.skills["SuddenDefence"]            = SkillSlot(self.bars["SelfBuffs"],     2, 1, true, 18, "0x70003E06");
        self.skills["Sprint"]                           = SkillSlot(self.bars["SelfBuffs"],     3, 1, true, 28, "0x70003E0B");
        self.skills["DireNeed"]                         = SkillSlot(self.bars["SelfBuffs"],     4, 1, true, 30, "0x70003047");
    self.skills["FightOn"]                              = SkillSlot(self.bars["SelfBuffs"],     5, 1, self.settings["Features"].fighton, 41, "0x70002D9D");
        self.skills["FearNothing"]                      = SkillSlot(self.bars["SelfBuffs"],     6, 1, true, 46, "0x70021D27");
    self.skills["Adamant"]                              = SkillSlot(self.bars["SelfBuffs"],     7, 1, true, 56, "0x7000F70B");
    self.skills["GreatCleave"]                  = SkillSlot(self.bars["SelfBuffs"],     8, 1, true, 58, "0x7000F70C");
    self.skills["CBR"]                                  = SkillSlot(self.bars["SelfBuffs"],     9, 1, self.settings["Features"].cbr, 60, "0x7000F70A");
            
    self.skills["Challenge"]                    = SkillSlot(self.bars["Threat"],                1, 1, true, 22, "0x70003E08");
    self.skills["RisingIre"]                    = SkillSlot(self.bars["Threat"],                2, 1, true, 42, "0x70009E5C");
        self.skills["EbbingIre"]                        = SkillSlot(self.bars["Threat"],                3, 1, true, 44, "0x70009E5B");
        
    self.skills["Hedge"]                                = SkillSlot(self.bars["Stunned"],               1, 1, false, 38, "0x70003E0F");
    self.skills["BloodRage"]                    = SkillSlot(self.bars["Stunned"],               2, 1, false, 60, "0x7000F70E");
    
    self.skills["LetFly"]                               = SkillSlot(self.bars["Ranged"],                1, 1, true, 30, "0x70003E14");
        
        self.skills["CraftedHorn"]                      = ItemSlot(self.bars["ClassItems"],     1, 1, self.settings["Quickslots"].horn["active"], self.settings["Quickslots"].horn["type"], self.settings["Quickslots"].horn["data"]);
        self.skills["FervorPotions"]            = ItemSlot(self.bars["ClassItems"],     2, 1, self.settings["Quickslots"].fervorpot["active"], self.settings["Quickslots"].fervorpot["type"], self.settings["Quickslots"].fervorpot["data"]);
    
        -- Build Stance Slot
        self.multi["StanceSlot"]           = SkillMultiSlot(self.bars["Stances"], 1, 1, true);
        self.multi["StanceSlot"]:AddShortCut("Fervour",                          4, "0x70003DFF");
    self.multi["StanceSlot"]:AddShortCut("Ardour",                              10, "0x7000D46C");
    self.multi["StanceSlot"]:AddShortCut("Glory",                               30, "0x7000967C");
    if (self.settings["Features"].controlled) then self.multi["StanceSlot"]:AddShortCut("ControlledBurn",       45, "0x70002DB5"); end
    self.multi["StanceSlot"]:LevelCheck();
        
        -- SET COMBAT STATES
        self.skills["Hamstring"]:SetCombat(true, false);
        self.skills["SuddenDefence"]:SetCombat(true, false);
        
        -- CLASS SPECIFIC SETUP/DEFAULT CODE
        
        
        -- CLASS SPECIFIC EVENTS
        
        -- Stance Change Event
        AddCallback(vars.classattr, "StanceChanged", function(sender, args)
                KragenBars:StanceChange(vars.classattr:GetStance());
        end);
        
        -- Fervor Changed Event
        AddCallback(vars.classattr, "FervorChanged", function(sender, args)
                KragenBars:FervorChange(vars.classattr:GetFervor());
        end);
        
        
        -- INITIALIZE BARS
        self:InitBars();
        self:FervorChange(vars.classattr:GetFervor());
        self:CombatChange(vars.player:IsInCombat());
        
        
end

-- ADD EFFECT EVENT
function ChampionBars:AddEffect( effectIndex )
        local effect = vars.player:GetEffects():Get( effectIndex );
        
        -- Defeat Response
        if (effect:GetName() == self.effectlist["EnemyDefeatResponse"]) then
        self.bars["Defeat"]:SetState(true, effect:GetID());
                
                self.skills["SecondWind"]:SetActive( true );
                self.skills["Heroics"]:SetActive( true );
                self.skills["RedHaze"]:SetActive( true );
            self.skills["ArdentFlurry"]:SetActive( (self.stance == 2 or self.controlledburnflag) and not self.skills["ArdentFlurry"].state);
            self.skills["GloriousExchange"]:SetActive( (self.stance == 3 or self.controlledburnflag) and not self.skills["GloriousExchange"].state);
            self.skills["BlockingBlades"]:SetActive( (self.stance ~= 1) and not self.skills["BlockingBlades"].state);
        
        -- Blocking Blades
        elseif (effect:GetName() == self.effectlist["BlockingBlades"]) then
        self.skills["BlockingBlades"]:SetState(true, false, effect:GetID());

        -- Ardent Flurry
        elseif (effect:GetName() == self.effectlist["ArdentFlurry"]) then
                self.skills["ArdentFlurry"]:SetState(true, false, effect:GetID());

    -- Glorious Exchange
        elseif (effect:GetName() == self.effectlist["GloriousExchange"]) then
        self.skills["GloriousExchange"]:SetState(true, false, effect:GetID());
        
    -- Flurry
        elseif (effect:GetName() == self.effectlist["Flurry"] or effect:GetName() == self.effectlist["ImprovedFlurry"]) then
                self.skills["Flurry"]:SetState(true, false, effect:GetID());
            if (self.settings["Features"].buffwarning) then
                        self.skills["Flurry"]:StartTimer( effect:GetDuration() * .70, true );
                end
                
    -- Exchange
        elseif (effect:GetName() == self.effectlist["ExchangeOfBlows"] or effect:GetName() == self.effectlist["ImprovedExchange"]) then
            self.skills["ExchangeOfBlows"]:SetState(true, false, effect:GetID());
            if (self.settings["Features"].buffwarning) then
                        self.skills["ExchangeOfBlows"]:StartTimer( effect:GetDuration() * .80, true );
                end
            
        -- Stunned, Dazed, Knocked Down
        elseif (effect:GetName() == self.effectlist["Stunned"] or effect:GetName() == self.effectlist["Dazed"] or effect:GetName() == self.effectlist["KnockedDown"] or effect:GetName() == self.effectlist["Rooted"]) then
                self.skills["BloodRage"]:SetState(true, true, effect:GetID());

        -- Disarmed
        elseif (effect:GetName() == self.effectlist["Disarmed"]) then
                self.skills["Hedge"]:SetState(true, true, effect:GetID());
                
        -- Silenced
        elseif (effect:GetName() == self.effectlist["Silenced"]) then
                self.skills["Challenge"]:SetActive(false);

   -- Controlled Burn
        elseif (effect:GetName() == self.effectlist["ControlledBurn"]) then
                self.controlledburnflag = true;
                self.skills["ArdentFlurry"]:SetActive(not self.skills["ArdentFlurry"].state);
                self.skills["GloriousExchange"]:SetActive(not self.skills["GloriousExchange"].state);
                self.skills["BlockingBlades"]:SetActive(not self.skills["BlockingBlades"].state);
                self.skills["Flurry"]:SetActive(false);
                self.skills["ExchangeOfBlows"]:SetActive(false);
                self.skills["Flurry"].timer:Stop();
                self.skills["ExchangeOfBlows"].timer:Stop();
                self.bars["Defeat"]:SetState(self.bars["Defeat"].state, self.bars["Defeat"].state, self.bars["Defeat"].id);
                self.multi["StanceSlot"]:SetActive( false );
                
        -- Great Cleave
        elseif (effect:GetName() == self.effectlist["GreatCleave"]) then
                self.skills["GreatCleave"]:SetState(true, true, effect:GetID());
                self:FervorChange(vars.classattr:GetFervor());
        
        -- Deathstorm
        elseif (effect:GetName() == self.effectlist["DeathStorm"]) then
            self.bars["Fervor:AOE"]:SetState(true, effect:GetID());
                self:FervorChange(vars.classattr:GetFervor());
                
        -- Fear
        elseif (effect:GetCategory() == Turbine.Gameplay.EffectCategory.Fear ) then
                self.fear = self.fear + 1;
                if (self.settings["Features"].fearindicator) then
                        self.skills["FearNothing"]:SetColor("purple");
                end
        
    end
        
end

-- REMOVE EFFECT EVENT
function ChampionBars:RemoveEffect( effect )
    if (effect:GetName() == self.effectlist["EnemyDefeatResponse"]) then
        self.bars["Defeat"]:SetState(false, effect:GetID());

                if (not self.bars["Defeat"].state) then
                    self.skills["SecondWind"]:SetActive( false );
                        self.skills["Heroics"]:SetActive( false );
                        self.skills["RedHaze"]:SetActive( false );
                        self.skills["ArdentFlurry"]:SetActive( false );
                    self.skills["GloriousExchange"]:SetActive( false );
                    self.skills["BlockingBlades"]:SetActive( false );
                end
            
        -- Blocking Blades
        elseif (effect:GetName() == self.effectlist["BlockingBlades"]) then
        self.skills["BlockingBlades"]:SetState(false, self.bars["Defeat"].state, effect:GetID());
        
    -- Ardent Flurry
    elseif (effect:GetName() == self.effectlist["ArdentFlurry"]) then
        self.skills["ArdentFlurry"]:SetState(false, self.bars["Defeat"].state, effect:GetID());

        -- Glorious Exchange
    elseif (effect:GetName() == self.effectlist["GloriousExchange"]) then
        self.skills["GloriousExchange"]:SetState(false, self.bars["Defeat"].state, effect:GetID());
        
    -- Flurry
        elseif (effect:GetName() == self.effectlist["Flurry"] or effect:GetName() == self.effectlist["ImprovedFlurry"]) then
        self.skills["Flurry"]:SetState(false, true, effect:GetID());
        if (self.stance == 2 or self.controlledburnflag) then
                self.skills["Flurry"]:SetActive( false );
                end
                if (not self.skills["Flurry"].state) then
                        self.skills["Flurry"]:SetHover(false);
                end

        -- Exchange
        elseif (effect:GetName() == self.effectlist["ExchangeOfBlows"] or effect:GetName() == self.effectlist["ImprovedExchange"]) then
        self.skills["ExchangeOfBlows"]:SetState(false, true, effect:GetID());
        if (self.stance == 3 or self.controlledburnflag) then
                self.skills["ExchangeOfBlows"]:SetActive( false );
                end
                if (not self.skills["ExchangeOfBlows"].state) then
                        self.skills["ExchangeOfBlows"]:SetHover(false);
                end
        
    -- Stunned, Dazed or Knocked Down
        elseif (effect:GetName() == self.effectlist["Stunned"] or effect:GetName() == self.effectlist["Dazed"] or effect:GetName() == self.effectlist["KnockedDown"] or effect:GetName() == self.effectlist["Rooted"]) then
                self.skills["BloodRage"]:SetState(false, false, effect:GetID());

        -- Disarmed
        elseif (effect:GetName() == self.effectlist["Disarmed"]) then
        self.skills["Hedge"]:SetState(false, false, effect:GetID());
        
    -- Silenced
        elseif (effect:GetName() == self.effectlist["Silenced"]) then
                self.skills["Challenge"]:SetActive(true);
        
    -- Controlled Burn
        elseif (effect:GetName() == self.effectlist["ControlledBurn"]) then
                self.controlledburnflag = false;
                self:StanceChange(vars.classattr:GetStance());
                
        -- Great Cleave
        elseif (effect:GetName() == self.effectlist["GreatCleave"]) then
        self.skills["GreatCleave"]:SetState(false, true, effect:GetID());
        self:FervorChange(vars.classattr:GetFervor());
        
    -- Disarmed
        elseif (effect:GetName() == self.effectlist["DeathStorm"]) then
        self.bars["Fervor:AOE"]:SetState(false, effect:GetID());
        self:FervorChange(vars.classattr:GetFervor());
                
        -- Fear
        elseif (effect:GetCategory() == Turbine.Gameplay.EffectCategory.Fear ) then
                self.fear = self.fear - 1;
                if (self.fear == 0) then
                        self.skills["FearNothing"]:SetColor();
                end
        
        end

end

-- FERVOR CHANGED EVENT
function ChampionBars:FervorChange(fervor)
        if (fervor == 0) then
                self.skills["SavageStrikes"]:SetActive(false);
                self.skills["BrutalStrikes"]:SetActive(false);
                self.skills["RelentlessStrike"]:SetActive(false);
                self.skills["FerociousStrikes"]:SetActive(false);
                
                self.skills["Cleave"]:SetActive(self.bars["Fervor:AOE"].state);
                self.skills["BladeStorm"]:SetActive(self.bars["Fervor:AOE"].state);
                self.skills["RagingBlades"]:SetActive(self.bars["Fervor:AOE"].state and self.settings["Features"].raging);
                self.skills["SoundTheAttack"]:SetActive(self.bars["Fervor:AOE"].state);
                
                self.skills["Clobber"]:SetActive(false);
                self.skills["Hamstring"]:SetActive(false);
                self.skills["BracingAttack"]:SetActive(false);
                
                self.skills["SuddenDefence"]:SetActive(false);
                
                self.skills["RisingIre"]:SetActive(false);
                self.skills["EbbingIre"]:SetActive(false);
                
                self.skills["GreatCleave"]:SetActive(false);
        elseif (fervor == 1) then
                self.skills["SavageStrikes"]:SetActive(false);
                self.skills["BrutalStrikes"]:SetActive(false);
                self.skills["RelentlessStrike"]:SetActive(false);
                self.skills["FerociousStrikes"]:SetActive(false);
                
                self.skills["Cleave"]:SetActive(self.bars["Fervor:AOE"].state or self.skills["GreatCleave"].state);
                self.skills["BladeStorm"]:SetActive(self.bars["Fervor:AOE"].state);
                self.skills["RagingBlades"]:SetActive(self.bars["Fervor:AOE"].state and self.settings["Features"].raging);
                self.skills["SoundTheAttack"]:SetActive(self.bars["Fervor:AOE"].state);
                
                self.skills["Clobber"]:SetActive(true);
                self.skills["Hamstring"]:SetActive(true);
                self.skills["BracingAttack"]:SetActive(false);
                
                self.skills["SuddenDefence"]:SetActive(true);
                
                self.skills["RisingIre"]:SetActive(false);
                self.skills["EbbingIre"]:SetActive(false);
                
                self.skills["GreatCleave"]:SetActive(false);
        elseif (fervor == 2) then
                self.skills["SavageStrikes"]:SetActive(true);
                self.skills["BrutalStrikes"]:SetActive(false);
                self.skills["RelentlessStrike"]:SetActive(false);
                self.skills["FerociousStrikes"]:SetActive(false);
                
                self.skills["Cleave"]:SetActive(true);
                self.skills["BladeStorm"]:SetActive(self.bars["Fervor:AOE"].state or (self.skills["GreatCleave"].state and self.settings["Features"].eyeofthestorm));
                self.skills["RagingBlades"]:SetActive(self.bars["Fervor:AOE"].state and self.settings["Features"].raging);
                self.skills["SoundTheAttack"]:SetActive(self.bars["Fervor:AOE"].state);
                
                self.skills["Clobber"]:SetActive(true);
                self.skills["Hamstring"]:SetActive(true);
                self.skills["BracingAttack"]:SetActive(false);
                
                self.skills["SuddenDefence"]:SetActive(true);
                
                self.skills["RisingIre"]:SetActive(true);
                self.skills["EbbingIre"]:SetActive(false);
                
                self.skills["GreatCleave"]:SetActive(false);
        elseif (fervor == 3) then
                self.skills["SavageStrikes"]:SetActive(true);
                self.skills["BrutalStrikes"]:SetActive(true);
                self.skills["RelentlessStrike"]:SetActive(false);
                self.skills["FerociousStrikes"]:SetActive(false);
                
                self.skills["Cleave"]:SetActive(true);
                self.skills["BladeStorm"]:SetActive(self.settings["Features"].eyeofthestorm or self.bars["Fervor:AOE"].state or self.skills["GreatCleave"].state);
                self.skills["RagingBlades"]:SetActive(self.bars["Fervor:AOE"].state and self.settings["Features"].raging);
                self.skills["SoundTheAttack"]:SetActive(self.bars["Fervor:AOE"].state);
                
                self.skills["Clobber"]:SetActive(true);
                self.skills["Hamstring"]:SetActive(true);
                self.skills["BracingAttack"]:SetActive(true);
                
                self.skills["SuddenDefence"]:SetActive(true);
                
                self.skills["RisingIre"]:SetActive(true);
                self.skills["EbbingIre"]:SetActive(false);
                
                self.skills["GreatCleave"]:SetActive(false);
        elseif (fervor == 4) then
                self.skills["SavageStrikes"]:SetActive(true);
                self.skills["BrutalStrikes"]:SetActive(true);
                self.skills["RelentlessStrike"]:SetActive(true);
                self.skills["FerociousStrikes"]:SetActive(false);
                
                self.skills["Cleave"]:SetActive(true);
                self.skills["BladeStorm"]:SetActive(true);
                self.skills["RagingBlades"]:SetActive((self.bars["Fervor:AOE"].state or self.skills["GreatCleave"].state) and self.settings["Features"].raging);
                self.skills["SoundTheAttack"]:SetActive(self.bars["Fervor:AOE"].state or self.skills["GreatCleave"].state);
                
                self.skills["Clobber"]:SetActive(true);
                self.skills["Hamstring"]:SetActive(true);
                self.skills["BracingAttack"]:SetActive(true);
                
                self.skills["SuddenDefence"]:SetActive(true);
                
                self.skills["RisingIre"]:SetActive(true);
                self.skills["EbbingIre"]:SetActive(true);
                
                self.skills["GreatCleave"]:SetActive(false);
        elseif (fervor == 5) then
                self.skills["SavageStrikes"]:SetActive(true);
                self.skills["BrutalStrikes"]:SetActive(true);
                self.skills["RelentlessStrike"]:SetActive(true);
                self.skills["FerociousStrikes"]:SetActive(self.settings["Features"].ferocious);
                
                self.skills["Cleave"]:SetActive(true);
                self.skills["BladeStorm"]:SetActive(true);
                self.skills["RagingBlades"]:SetActive(self.settings["Features"].raging);
                self.skills["SoundTheAttack"]:SetActive(true);
                
                self.skills["Clobber"]:SetActive(true);
                self.skills["Hamstring"]:SetActive(true);
                self.skills["BracingAttack"]:SetActive(true);
                
                self.skills["SuddenDefence"]:SetActive(true);
                
                self.skills["RisingIre"]:SetActive(true);
                self.skills["EbbingIre"]:SetActive(true);
                
                self.skills["GreatCleave"]:SetActive(true);
        end

end

-- STANCE CHANGED EVENT
function ChampionBars:StanceChange(stance)
        self.stance = stance;
        
        if (stance == 1) then
                self.skills["Flurry"]:SetActive(not self.skills["Flurry"].state);
                self.skills["ExchangeOfBlows"]:SetActive(not self.skills["ExchangeOfBlows"].state);
        elseif (stance == 2) then
                self.skills["ArdentFlurry"]:SetActive(not self.skills["ArdentFlurry"].state and self.bars["Defeat"].state);
                self.skills["GloriousExchange"]:SetActive(false);
                self.skills["BlockingBlades"]:SetActive(not self.skills["BlockingBlades"].state and self.bars["Defeat"].state);
                self.skills["Flurry"]:SetActive(false);
                self.skills["ExchangeOfBlows"]:SetActive(not self.skills["ExchangeOfBlows"].state);
                self.skills["Flurry"].timer:Stop();
        elseif (stance == 3) then
                self.skills["ArdentFlurry"]:SetActive(false);
                self.skills["GloriousExchange"]:SetActive(not self.skills["GloriousExchange"].state and self.bars["Defeat"].state);
                self.skills["BlockingBlades"]:SetActive(not self.skills["BlockingBlades"].state and self.bars["Defeat"].state);
                self.skills["Flurry"]:SetActive(not self.skills["Flurry"].state);
                self.skills["ExchangeOfBlows"]:SetActive(false);
                self.skills["ExchangeOfBlows"].timer:Stop();
        elseif (stance == 0) then
                self.skills["ArdentFlurry"]:SetActive(self.controlledburnflag and self.bars["Defeat"].state and not self.skills["ArdentFlurry"].state);
                self.skills["GloriousExchange"]:SetActive(self.controlledburnflag and self.bars["Defeat"].state and not self.skills["GloriousExchange"].state);
                self.skills["BlockingBlades"]:SetActive(not self.skills["BlockingBlades"].state and self.bars["Defeat"].state);
                self.skills["Flurry"]:SetActive(not self.controlledburnflag and not self.skills["Flurry"].state);
                self.skills["ExchangeOfBlows"]:SetActive(not self.controlledburnflag and not self.skills["ExchangeOfBlows"].state);
        end
        
        -- PRIMARY STANCE SWITCHING
        if ( self.settings["Features"].stancepriority ) then
                if (stance == self.settings["Features"].primarystance) then
                        self.multi["StanceSlot"]:SetIndex(self.settings["Features"].secondarystance);
                else
                    self.multi["StanceSlot"]:SetIndex(self.settings["Features"].primarystance);
                end
        end
        
        -- HOVER/DISAPPEAR SWITCHING
        if (stance == 0) then
                self.multi["StanceSlot"]:SetHover( false );
                self.multi["StanceSlot"]:SetActive( true );
        else
        self.multi["StanceSlot"]:SetActive(self.settings["Features"].stanceactive ~= 3);
        self.multi["StanceSlot"]:SetHover(self.settings["Features"].stanceactive == 2);
        end
        
        if (self.controlledburnflag) then
                self.multi["StanceSlot"]:SetActive( false );
        end
end

-- DEFAULT SETTINGS
function ChampionBars:DefaultSettings()
        self.settings = { };

    self.settings["Melee"] =            {["active"] = true, ["x"] = 0, ["y"] = 0, ["rotate"] = 0 };
    self.settings["Fervor:ST"] =        {["active"] = true, ["x"] = 0, ["y"] = 0, ["rotate"] = 0 };
    self.settings["Fervor:AOE"] =       {["active"] = true, ["x"] = 0, ["y"] = 0, ["rotate"] = 0 };
    self.settings["Fervor:Util"] =      {["active"] = true, ["x"] = 0, ["y"] = 0, ["rotate"] = 0 };
    self.settings["Conditional"] =      {["active"] = true, ["x"] = 0, ["y"] = 0, ["rotate"] = 0 };
    self.settings["Defeat"] =           {["active"] = true, ["x"] = 0, ["y"] = 0, ["rotate"] = 0 };
    self.settings["Buffs"] =            {["active"] = true, ["x"] = 0, ["y"] = 0, ["rotate"] = 0 };
    self.settings["SelfBuffs"] =        {["active"] = true, ["x"] = 0, ["y"] = 0, ["rotate"] = 0 };
    self.settings["Threat"] =           {["active"] = true, ["x"] = 0, ["y"] = 0, ["rotate"] = 0 };
    self.settings["Stances"] =          {["active"] = true, ["x"] = 0, ["y"] = 0, ["rotate"] = 0 };
    self.settings["Stunned"] =          {["active"] = true, ["x"] = 0, ["y"] = 0, ["rotate"] = 0 };
    self.settings["Utility"] =          {["active"] = true, ["x"] = 0, ["y"] = 0, ["rotate"] = 0 };
    self.settings["Ranged"] =           {["active"] = true, ["x"] = 0, ["y"] = 0, ["rotate"] = 0 };
        self.settings["ClassItems"] =   {["active"] = true, ["x"] = 0, ["y"] = 0, ["rotate"] = 0 };

        self.settings["Features"] = { };
        self.settings["Features"].controlledburn = false;
        self.settings["Features"].ferocious = false;
        self.settings["Features"].raging = false;
        self.settings["Features"].fighton = false;
        self.settings["Features"].cbr = false;
        self.settings["Features"].eyeofthestorm = false;
        self.settings["Features"].buffwarning = true;
        self.settings["Features"].stanceactive = 2;
        self.settings["Features"].stancepriority = true;
        self.settings["Features"].fearindicator = true;
        self.settings["Features"].primarystance = 1;
        self.settings["Features"].secondarystance = 3;
        
        self.settings["Quickslots"] = { };
        self.settings["Quickslots"].horn = {active = false, type = 0, data = ""};
        self.settings["Quickslots"].fervorpot = {active = false, type = 0, data = ""};

end

-- UPDATE SETTINGS
function ChampionBars:UpdateSettings()
        if (settings.vers < 3.01) then
                
                if (self.settings["Features"].stancehover) then self.settings["Features"].stanceactive = 2; else if (self.settings["Features"].stancedisappear) then self.settings["Features"].stanceactive = 3; else self.settings["Features"].stanceactive = 1; end end
                
                self.settings["Features"].stancehover = nil;
                self.settings["Features"].stancedisappear = nil;
        end
        if (settings.vers < 3.20) then
                self.settings["ClassItems"] = {["active"] = true, ["x"] = 0, ["y"] = 0, ["rotate"] = 0 };
                self.settings["Quickslots"] = { };
                self.settings["Quickslots"].horn = {active = false, type = 0, data = ""};
                self.settings["Quickslots"].fervorpot = {active = false, type = 0, data = ""};
        end
        
        settings.vers = vars.vers;
end


-- DISPLAY SETUP WINDOW AND SET ALL CHECKBOXES COMBOBOXES SLIDERS AND QUICKSLOTS
function ChampionBars: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.combolangbox:SetSelection(settings.language);

        self.setupbb.checkboxbb1:SetText("Melee Skills");
        self.setupbb.checkboxbb1:SetChecked (self.settings["Melee"].active);
        self.setupbb.checkboxbb1:SetVisible(true);
        self.setupbb.checkboxbb2:SetText("Fervor: Single Target");
        self.setupbb.checkboxbb2:SetChecked (self.settings["Fervor:ST"].active);
        self.setupbb.checkboxbb2:SetVisible(true);
        self.setupbb.checkboxbb3:SetText("Fervor: AOE");
        self.setupbb.checkboxbb3:SetChecked (self.settings["Fervor:AOE"].active);
        self.setupbb.checkboxbb3:SetVisible(true);
        self.setupbb.checkboxbb4:SetText("Fervor: Utility");
        self.setupbb.checkboxbb4:SetChecked (self.settings["Fervor:Util"].active);
        self.setupbb.checkboxbb4:SetVisible(true);
    self.setupbb.checkboxbb5:SetText("Conditional");
        self.setupbb.checkboxbb5:SetChecked (self.settings["Conditional"].active);
        self.setupbb.checkboxbb5:SetVisible(true);
        self.setupbb.checkboxbb6:SetText("Defeat Response");
        self.setupbb.checkboxbb6:SetChecked (self.settings["Defeat"].active);
        self.setupbb.checkboxbb6:SetVisible(true);
        self.setupbb.checkboxbb7:SetText("Buffs");
        self.setupbb.checkboxbb7:SetChecked (self.settings["Buffs"].active);
        self.setupbb.checkboxbb7:SetVisible(true);
        self.setupbb.checkboxbb8:SetText("Self Buffs");
        self.setupbb.checkboxbb8:SetChecked (self.settings["SelfBuffs"].active);
        self.setupbb.checkboxbb8:SetVisible(true);
        self.setupbb.checkboxbb9:SetText("Threat");
        self.setupbb.checkboxbb9:SetChecked (self.settings["Threat"].active);
        self.setupbb.checkboxbb9:SetVisible(true);
        self.setupbb.checkboxbb10:SetText("Stances");
        self.setupbb.checkboxbb10:SetChecked (self.settings["Stances"].active);
        self.setupbb.checkboxbb10:SetVisible(true);
        self.setupbb.checkboxbb11:SetText("Stunned/Disarmed");
        self.setupbb.checkboxbb11:SetChecked (self.settings["Stunned"].active);
        self.setupbb.checkboxbb11:SetVisible(true);
        self.setupbb.checkboxbb12:SetText("Ranged");
        self.setupbb.checkboxbb12:SetChecked (self.settings["Ranged"].active);
        self.setupbb.checkboxbb12:SetVisible(true);
        self.setupbb.checkboxbb13:SetText("ClassItems");
        self.setupbb.checkboxbb13:SetChecked (self.settings["ClassItems"].active);
        self.setupbb.checkboxbb13:SetVisible(true);

        self.setupf.checkboxf1:SetText("Controlled Burn");
        self.setupf.checkboxf1:SetChecked (self.settings["Features"].controlled);
        self.setupf.checkboxf1:SetVisible(true);
        
        self.setupf.checkboxf2:SetText("Ferocious Strikes");
        self.setupf.checkboxf2:SetChecked (self.settings["Features"].ferocious);
        self.setupf.checkboxf2:SetVisible(true);
        
        self.setupf.checkboxf3:SetText("Raging Blades");
        self.setupf.checkboxf3:SetChecked (self.settings["Features"].raging);
        self.setupf.checkboxf3:SetVisible(true);
        
        self.setupf.checkboxf4:SetText("Fight On");
        self.setupf.checkboxf4:SetChecked (self.settings["Features"].fighton);
        self.setupf.checkboxf4:SetVisible(true);
        
        self.setupf.checkboxf5:SetText("CBR");
        self.setupf.checkboxf5:SetChecked (self.settings["Features"].cbr);
        self.setupf.checkboxf5:SetVisible(true);
        
        self.setupf.checkboxf6:SetText("Eye of the Storm");
        self.setupf.checkboxf6:SetChecked (self.settings["Features"].eyeofthestorm);
        self.setupf.checkboxf6:SetVisible(true);
        
        self.setupf.checkboxf10:SetText("Buff Early Warning");
        self.setupf.checkboxf10:SetChecked (self.settings["Features"].buffwarning);
        self.setupf.checkboxf10:SetVisible(true);
        
        self.setupf.checkboxf11:SetText("Stance Priority");
        self.setupf.checkboxf11:SetChecked (self.settings["Features"].stancepriority);
        self.setupf.checkboxf11:SetVisible(true);
        
        self.setupf.checkboxf12:SetText("Fear Indicator");
        self.setupf.checkboxf12:SetChecked (self.settings["Features"].fearindicator);
        self.setupf.checkboxf12:SetVisible(true);
        
        self.setupf.combo1box.listBox:ClearItems();
        self.setupf.combo1Label:SetText("Primary Stance");
        self.setupf.combo1Label:SetVisible(true);
        local combolist = {"Fervour", "Ardour", "Glory", "Controlled Burn"}
        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"].primarystance);
        
        
        self.setupf.combo2box.listBox:ClearItems();
        self.setupf.combo2Label:SetText("Secondary Stance");
        self.setupf.combo2Label:SetVisible(true);
        local combolist = {"Fervour", "Ardour", "Glory", "Controlled Burn"}
        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"].secondarystance);
    
    self.setupf.combo3box.listBox:ClearItems();
        self.setupf.combo3Label:SetText("Stance Active");
        self.setupf.combo3Label:SetVisible(true);
        local combolist = {"None", "Dim", "Hide"}
        for k,v in pairs(combolist) do
                self.setupf.combo3box:AddItem(v, k);
        end
        self.setupf.combo3box:SetVisible(true);
        self.setupf.combo3box:SetSelection(self.settings["Features"].stanceactive);
        
        pcall(function() self.setupqs.quickslot1:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].horn["type"], self.settings["Quickslots"].horn["data"] ) ); end);
        self.setupqs.quickslot1:SetVisible(true);
        self.setupqs.quickslot1cb:SetText("Crafted Horn");
        self.setupqs.quickslot1cb:SetChecked(self.settings["Quickslots"].horn["active"]);
        self.setupqs.quickslot1cb:SetVisible(true);
        
        pcall(function() self.setupqs.quickslot2:SetShortcut(Turbine.UI.Lotro.Shortcut( self.settings["Quickslots"].fervorpot["type"], self.settings["Quickslots"].fervorpot["data"] ) ); end);
        self.setupqs.quickslot2:SetVisible(true);
        self.setupqs.quickslot2cb:SetText("Fervor Potions");
        self.setupqs.quickslot2cb:SetChecked(self.settings["Quickslots"].fervorpot["active"]);
        self.setupqs.quickslot2cb:SetVisible(true);

end

-- SET ALL VARIABLES OFF OF SETUP WINDOW
function ChampionBars:SetupClosing()
        settings.opacity = self.setupbb.opacityslider:GetValue() / 100;
        settings.lockslots = self.setupbb.checkboxlock:IsChecked();
        settings.snaptogrid = self.setupbb.checkboxgrid:IsChecked();
        settings.language = self.setupbb.combolangbox:GetSelection();
        
        self.settings["Melee"].active = self.setupbb.checkboxbb1:IsChecked();
    self.settings["Fervor:ST"].active = self.setupbb.checkboxbb2:IsChecked();
    self.settings["Fervor:AOE"].active = self.setupbb.checkboxbb3:IsChecked();
    self.settings["Fervor:Util"].active = self.setupbb.checkboxbb4:IsChecked();
    self.settings["Conditional"].active = self.setupbb.checkboxbb5:IsChecked();
    self.settings["Defeat"].active = self.setupbb.checkboxbb6:IsChecked();
    self.settings["Buffs"].active = self.setupbb.checkboxbb7:IsChecked();
    self.settings["SelfBuffs"].active = self.setupbb.checkboxbb8:IsChecked();
    self.settings["Threat"].active = self.setupbb.checkboxbb9:IsChecked();
    self.settings["Stances"].active = self.setupbb.checkboxbb10:IsChecked();
    self.settings["Stunned"].active = self.setupbb.checkboxbb11:IsChecked();
    self.settings["Ranged"].active = self.setupbb.checkboxbb12:IsChecked();
        self.settings["ClassItems"].active = self.setupbb.checkboxbb13:IsChecked();

        self.settings["Features"].controlled = self.setupf.checkboxf1:IsChecked();
        self.settings["Features"].ferocious = self.setupf.checkboxf2:IsChecked();
        self.settings["Features"].raging = self.setupf.checkboxf3:IsChecked();
        self.settings["Features"].fighton = self.setupf.checkboxf4:IsChecked();
        self.settings["Features"].cbr = self.setupf.checkboxf5:IsChecked();
        self.settings["Features"].eyeofthestorm = self.setupf.checkboxf6:IsChecked();
    
        self.settings["Features"].buffwarning = self.setupf.checkboxf10:IsChecked();
    self.settings["Features"].stancepriority = self.setupf.checkboxf11:IsChecked();
    self.settings["Features"].fearindicator = self.setupf.checkboxf12:IsChecked();
    
        self.settings["Features"].primarystance = self.setupf.combo1box:GetSelection();
    self.settings["Features"].secondarystance = self.setupf.combo2box:GetSelection();
    self.settings["Features"].stanceactive = self.setupf.combo3box:GetSelection();
                
        self.settings["Quickslots"].horn = { active = self.setupqs.quickslot1cb:IsChecked(), type = self.setupqs.quickslot1:GetShortcut():GetType(), data = self.setupqs.quickslot1:GetShortcut():GetData() };
    self.settings["Quickslots"].fervorpot = { active = self.setupqs.quickslot2cb:IsChecked(), type = self.setupqs.quickslot2:GetShortcut():GetType(), data = self.setupqs.quickslot2:GetShortcut():GetData() };

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

end

-- REFRESH SKILLS AND BARS
function ChampionBars:Refresh()

        -- GENERIC REFRESH (Required for all classes)
        self:RefreshBars();
        
        -- REDEFINE EFFECTLIST IN CASE OF LANGUAGE CHANGE
        self.DefineEffectList();
        
        -- CLASS SPECIFIC REFRESH
        -- Setup Features
        self.skills["FerociousStrikes"]:SetActive(self.settings["Features"].ferocious);
        self.skills["RagingBlades"]:SetActive(self.settings["Features"].raging);
        self.skills["FightOn"]:SetActive(self.settings["Features"].fighton);
        self.skills["CBR"]:SetActive(self.settings["Features"].cbr);
        
        -- Setup Quickslots
        self.skills["CraftedHorn"]:SetQuickslot(self.settings["Quickslots"].horn["active"], self.settings["Quickslots"].horn["type"], self.settings["Quickslots"].horn["data"]);
        self.skills["FervorPotions"]:SetQuickslot(self.settings["Quickslots"].fervorpot["active"], self.settings["Quickslots"].fervorpot["type"], self.settings["Quickslots"].fervorpot["data"]);

        -- Rebuild Stance Slot (Multi)
        self.multi["StanceSlot"]:Clear();
        self.multi["StanceSlot"]:AddShortCut("Fervour",                          4, "0x70003DFF");
    self.multi["StanceSlot"]:AddShortCut("Ardour",                              10, "0x7000D46C");
    self.multi["StanceSlot"]:AddShortCut("Glory",                               30, "0x7000967C");
    if (self.settings["Features"].controlled) then self.multi["StanceSlot"]:AddShortCut("ControlledBurn",       45, "0x70002DB5"); end
    self.multi["StanceSlot"]:LevelCheck();
    
        -- Set Fear Indicator
    if (self.settings["Features"].fearindicator and self.fear > 0) then
                self.skills["FearNothing"]:SetColor("purple");
        else
                self.skills["FearNothing"]:SetColor();
        end
    
        -- Refresh States
    self:CombatChange(vars.player:IsInCombat());
        self:StanceChange(self.stance);
    self:FervorChange(vars.classattr:GetFervor());

        Turbine.Shell.WriteLine("KragenBars: Champion Bars refresh completed successfully.");

end

Go to most recent revision | Compare with Previous | Blame


All times are GMT -5. The time now is 03:17 AM.


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