lotrointerface.com
Search Downloads

LoTROInterface SVN KragenBars

[/] [trunk/] [KragenPlugs/] [KragenBars/] [LoreBars.lua] - Rev 127

Compare with Previous | Blame | View Log

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

LoreBars = class( KragenPlugs.KragenBars.ClassBar );

function LoreBars:Constructor()

        KragenPlugs.KragenBars.ClassBar.Constructor( self );

    self.setuppets = self.setup.setuplmpets;
        
        -- CLASS SPECIFIC VARIABLES
        
        self.effectlist["CombatSummoning"]                              = Effect();
    
        
        -- DEFINE THE EFFECT LIST BASED ON CLIENT LANGUAGE
        self.DefineEffectList = function()
                -- ENGLISH CLIENT
                if (settings.language == 1) then
                        self.effectlist["CombatSummoning"]                              :SetName("Combat Summoning");
                elseif (settings.language == 2) then
                        self.effectlist["CombatSummoning"]                              :SetName("Combat Summoning");
                        Turbine.Shell.WriteLine("Some features may not function with the French Client.  If you would like to help with French effect names goto http://www.lotrointerface.com/downloads/info384-KragenBars.html");
                elseif (settings.language == 3) then
                        self.effectlist["CombatSummoning"]                              :SetName("Combat Summoning");
                        Turbine.Shell.WriteLine("Some features may not function with the German Client.  If you would like to help with German effect names goto http://www.lotrointerface.com/downloads/info384-KragenBars.html");
                end
        end
        
 
    -- BUILD WINDOWS BARS SKILLS AND MULTIS --
    
        -- Build Skills         SkillSlot( parent:SkillBar, x:int, y:int, active:Boolean, level:int, hexcode:String );
    self.skills["SignCommand"]                          = SkillSlot(self.bars["Debuffs"],               1, 1, true, { 1, 66 }, { "0x70003EBB", "0x70028B80" }); --Need Hex
    self.skills["Firelore"]                                     = SkillSlot(self.bars["Debuffs"],               2, 1, true, 12, "0x70003EBE");
    self.skills["Windlore"]                                     = SkillSlot(self.bars["Debuffs"],               3, 1, true, 12, "0x70003EBF");
    self.skills["Frostlore"]                            = SkillSlot(self.bars["Debuffs"],               4, 1, true, 40, "0x70024BE7");
    self.skills["AncientCraft"]                         = SkillSlot(self.bars["Debuffs"],               5, 1, true, 42, "0x7000B627");
    self.skills["DispelCorruption"]                     = SkillSlot(self.bars["Debuffs"],               6, 1, true, 52, "0x7000F7FE");
    self.skills["SignSeeAllEnds"]                       = SkillSlot(self.bars["Debuffs"],               7, 1, true, 58, "0x7000F801");
    
    self.skills["SignRighteousness"]            = SkillSlot(self.bars["BattleBuffs"],   1, 1, true, 24, "0x70003EBC");
    self.skills["SignVigilance"]                        = SkillSlot(self.bars["BattleBuffs"],   2, 1, true, 32, "0x70003EBD");
    self.skills["Airlore"]                                      = SkillSlot(self.bars["BattleBuffs"],   3, 1, true, { 44, 64 }, { "0x7000B8AC", "0x70020DF7" });
    
    self.skills["KnowledgeofCures"]                     = SkillSlot(self.bars["Cures"],                 1, 1, true, { 10, 62 }, { "0x70003132", "0x7001F45F" }); --Need Hex
    
    self.skills["BackfromtheBrink"]                     = SkillSlot(self.bars["Rez"],                   1, 1, true, 32, "0x7000BFC2");

    self.skills["BlindingFlash"]                        = SkillSlot(self.bars["CrowdControl"],  1, 1, true, 10, "0x70003152");
    self.skills["BaneFlare"]                            = SkillSlot(self.bars["CrowdControl"],  2, 1, true, 18, "0x7000B60D");
    self.skills["Herblore"]                                     = SkillSlot(self.bars["CrowdControl"],  3, 1, true, 36, "0x70003EC0");
    
    self.skills["BeaconofHope"]                         = SkillSlot(self.bars["Heal"],                  1, 1, true, 8, "0x70003123");
    self.skills["SharethePower"]                        = SkillSlot(self.bars["Heal"],                  2, 1, true, 22, "0x7000316B");
    
    self.skills["BurningEmbers"]                        = SkillSlot(self.bars["Damage"],                1, 1, true, { 1, 74 }, { "0x70003EB4", "0x70028CA1" });
    self.skills["TestofWill"]                           = SkillSlot(self.bars["Damage"],                2, 1, true, 6, "0x70003EB9");
    self.skills["GustofWind"]                           = SkillSlot(self.bars["Damage"],                3, 1, true, 8, "0x70003EB7");
    self.skills["CrackedEarth"]                         = SkillSlot(self.bars["Damage"],                4, 1, true, 14, "0x70003143");
    self.skills["LightoftheRisingDawn"]         = SkillSlot(self.bars["Damage"],                5, 1, true, 18, "0x70003EC2");
    self.skills["Stormlore"]                            = SkillSlot(self.bars["Damage"],                6, 1, true, 48, "0x7000B63C");
    self.skills["LightningStorm"]                       = SkillSlot(self.bars["Damage"],                7, 1, true, 50, "0x7000B726");
    self.skills["StickyGourd"]                          = SkillSlot(self.bars["Damage"],                8, 1, true, 60, "0x7000F74D");
    self.skills["MarchoftheEnts"]                       = SkillSlot(self.bars["Damage"],                9, 1, self.settings.traits["MarchoftheEnts"].active, 41, "0x70000FA7");

    self.skills["InnerFlame"]                           = SkillSlot(self.bars["Self"],                  1, 1, true, 4, "0x70003EB6");
    self.skills["WisdomoftheCouncil"]           = SkillSlot(self.bars["Self"],                  2, 1, true, 20, "0x7000314B");
    self.skills["CalltotheValar"]                       = SkillSlot(self.bars["Self"],                  3, 1, true, 34, "0x70003EC1");
    self.skills["CombatSummoning"]                      = SkillSlot(self.bars["Self"],                  4, 1, self.settings.traits["NatureFriend"].active, 58, "0x70024948");

    self.skills["KotLM"]                                        = SkillSlot(self.bars["KotLM"],                 1, 1, true, 20, "0x7000C588");
    
    self.skills["PowerofKnowledge"]                     = SkillSlot(self.bars["Power"],                 1, 1, true, 16, "0x70003116");
    
    self.skills["SignWizardsFire"]                      = SkillSlot(self.bars["DoTs"],                  1, 1, true, { 2, 54 }, { "0x7000F7FF", "0x70028B52" }); --Need Hex
 
    self.skills["Staffstrike"]                          = SkillSlot(self.bars["Melee"],                 1, 1, true, 1, "0x7000310D");
        self.skills["Staffsweep"]                               = SkillSlot(self.bars["Melee"],                 2, 1, true, { 28, 68 }, { "0x70024824", "0x70028B9A" }); --Need Hex

        self.skills["WardingKnowledge"]                 = SkillSlot(self.bars["StaticDebuffs"], 1, 1, true, { 26, 38, 40 }, { "0x7000B625", "0x7000B623", "0x7000B624" });
    self.skills["StickyTar"]                            = SkillSlot(self.bars["StaticDebuffs"], 2, 1, true, 46, "0x7000B62B");
        
        
    -- Build MultiSlots         SkillMultiSlot( parent:SkillBar, x:int, y:int, active:Boolean );
    --                                                  multi:AddShortCut(name:String, level:int, hex:String);
        self.multi["PetBuffsSlot"]              = SkillMultiSlot(self.bars["PetBuffs"], 1, 1, true);
        if (vars.playerlevel >= 72) then
                self.multi["PetBuffsSlot"]:AddShortCut("SignRage",      72, "0x70028C98"); --Need Hex
        else
                self.multi["PetBuffsSlot"]:AddShortCut("SignRage",      4, "0x70003139");
        end
    self.multi["PetBuffsSlot"]:AddShortCut("SignProtection",6, "0x7000312B");
    self.multi["PetBuffsSlot"]:LevelCheck();
        
    self.multi["PetFoodSlot"]           = ItemMultiSlot(self.bars["PetBuffs"], 2, 1, true);
        self.multi["PetFoodSlot"]:AddShortCut("Crumbs", self.settings.quickslots["Crumbs"]);
        self.multi["PetFoodSlot"]:AddShortCut("Oats",   self.settings.quickslots["Oats"]);
        self.multi["PetFoodSlot"]:AddShortCut("Meat",   self.settings.quickslots["Meat"]);
        self.multi["PetFoodSlot"]:AddShortCut("Water",  self.settings.quickslots["Water"]);
        
        
        self.multi["PetsSlot"]                                  = SkillMultiSlot(self.bars["Pets"], 1, 1, true);
    if (self.settings["Pets"].raven) then       self.multi["PetsSlot"]:AddShortCut("Ravenlore",                 2, "0x70003EB5", 1); end
    if (self.settings["Pets"].ravenb) then      self.multi["PetsSlot"]:AddShortCut("Bloodraven",                2, "0x70024A63", 1); end
    if (self.settings["Pets"].ravenm) then      self.multi["PetsSlot"]:AddShortCut("Mottledwingraven",  2, "0x70024A60", 1); end
    if (self.settings["Pets"].ravenf) then      self.multi["PetsSlot"]:AddShortCut("Frostraven",                2, "0x70024A62", 1); end
    if (self.settings["Pets"].ravens) then      self.multi["PetsSlot"]:AddShortCut("Stormraven",                2, "0x70024A5F", 1); end
    if (self.settings["Pets"].ravenw) then      self.multi["PetsSlot"]:AddShortCut("Weatheredraven",    2, "0x70024A5D", 1); end
    if (self.settings["Pets"].bear) then        self.multi["PetsSlot"]:AddShortCut("FriendofBears",             14, "0x70003EB8", 2); end
    if (self.settings["Pets"].bearb) then       self.multi["PetsSlot"]:AddShortCut("BlackBear",                 14, "0x70024A6E", 2); end
    if (self.settings["Pets"].bearp) then       self.multi["PetsSlot"]:AddShortCut("PolarBear",                 14, "0x70024A6C", 2); end
    if (self.settings["Pets"].bearwp) then      self.multi["PetsSlot"]:AddShortCut("WildpawBear",               14, "0x70024A65", 2); end
    if (self.settings["Pets"].beartc) then      self.multi["PetsSlot"]:AddShortCut("TundraBearCub",             14, "0x70024A69", 2); end
    if (self.settings["Pets"].bearbp) then      self.multi["PetsSlot"]:AddShortCut("BlackpawBear",              14, "0x70024A68", 2); end
    if (self.settings["Pets"].bearw) then       self.multi["PetsSlot"]:AddShortCut("WeatheredBear",             14, "0x70024A66", 2); end
    if (self.settings["Pets"].lynx) then        self.multi["PetsSlot"]:AddShortCut("Lynxspeech",                30, "0x7000B8D3", 3); end
    if (self.settings["Pets"].lynxs) then       self.multi["PetsSlot"]:AddShortCut("SpottedLynx",               30, "0x70024A73", 3); end
    if (self.settings["Pets"].lynxo) then       self.multi["PetsSlot"]:AddShortCut("OnyxLynx",                  30, "0x70024A7A", 3); end
    if (self.settings["Pets"].lynxt) then       self.multi["PetsSlot"]:AddShortCut("TundraLynx",                30, "0x70024A74", 3); end
    if (self.settings["Pets"].lynxg) then       self.multi["PetsSlot"]:AddShortCut("GreyLynx",                  30, "0x70024A75", 3); end
    if (self.settings["Pets"].lynxm) then       self.multi["PetsSlot"]:AddShortCut("MountainLynx",              30, "0x70024A79", 3); end
    if (self.settings["Pets"].eagle and self.settings.traits["EagleFriend"].active) then self.multi["PetsSlot"]:AddShortCut("Eaglefriend",              45, "0x70000FB2", 4); end
    if (self.settings["Pets"].eaglea and self.settings.traits["EagleFriend"].active) then self.multi["PetsSlot"]:AddShortCut("AshenEagle",              45, "0x70024A7E", 4); end
    if (self.settings["Pets"].eagles and self.settings.traits["EagleFriend"].active) then self.multi["PetsSlot"]:AddShortCut("SnowcrestEagle",  45, "0x70024A80", 4); end
    if (self.settings["Pets"].eaglee and self.settings.traits["EagleFriend"].active) then self.multi["PetsSlot"]:AddShortCut("EmberEagle",              45, "0x70024A84", 4); end
    if (self.settings["Pets"].eaglet and self.settings.traits["EagleFriend"].active) then self.multi["PetsSlot"]:AddShortCut("TundraEagle",             45, "0x70024A82", 4); end
    if (self.settings["Pets"].saber) then       self.multi["PetsSlot"]:AddShortCut("FriendofFelineHunters",     56, "0x7000F530", 5); end
    if (self.settings["Pets"].saberd) then      self.multi["PetsSlot"]:AddShortCut("DuskySabercat",             56, "0x70024A8D", 5); end
    if (self.settings["Pets"].sabersp) then self.multi["PetsSlot"]:AddShortCut("SpottedSabercat",       56, "0x70024A89", 5); end
    if (self.settings["Pets"].saberg) then      self.multi["PetsSlot"]:AddShortCut("GreySabercat",              56, "0x70024A8F", 5); end
    if (self.settings["Pets"].saberdw) then self.multi["PetsSlot"]:AddShortCut("DeepwoodSabercat",      56, "0x70024A8B", 5); end
    if (self.settings["Pets"].sabers) then      self.multi["PetsSlot"]:AddShortCut("StripedSabercat",   56, "0x70024A8A", 5); end
    if (self.settings["Pets"].sabero) then      self.multi["PetsSlot"]:AddShortCut("OnyxSabercat",              56, "0x70024A87", 5); end
    if (self.settings["Pets"].bog and self.settings.traits["NatureFriend"].active) then                 self.multi["PetsSlot"]:AddShortCut("Naturefriend",              58, "0x7000F54D", 6); end
    if (self.settings["Pets"].bogs and self.settings.traits["NatureFriend"].active) then        self.multi["PetsSlot"]:AddShortCut("SwampGuardian",             58, "0x70024A93", 6); end
    if (self.settings["Pets"].bogm and self.settings.traits["NatureFriend"].active) then        self.multi["PetsSlot"]:AddShortCut("MountainGuardian",  58, "0x70024A95", 6); end
    if (self.settings["Pets"].bogt and self.settings.traits["NatureFriend"].active) then        self.multi["PetsSlot"]:AddShortCut("TundraGuardian",    58, "0x70024A91", 6); end
    if (self.settings["Pets"].spirit) then      self.multi["PetsSlot"]:AddShortCut("CommunewithNature", 70, "0x7002A706", 7); end --Need Hex
        self.multi["PetsSlot"]:LevelCheck();
        
        -- SET COMBAT STATES
        self.multi["PetsSlot"]:SetCombat(false, true);
        self.multi["PetFoodSlot"]:SetCombat(false, true);
        self.skills["BackfromtheBrink"]:SetCombat(false, true);
        
        -- CLASS SPECIFIC SETUP/DEFAULT CODE

        
    -- EVENTS;
        
        
         -- INITIALIZE BARS
        self:InitBars();
        self:CombatChange(vars.player:IsInCombat());

end


-- ADD EFFECT EVENT
function LoreBars:AddEffect( effectIndex )
        local effect = vars.player:GetEffects():Get( effectIndex );
        local name = effect:GetName();
        local id = effect:GetID();

        if (effect:GetName() == self.effectlist["CombatSummoning"]:GetName()) then
        if (self.effectlist["CombatSummoning"]:SetState(true, id)) then
                        self.multi["PetsSlot"]:SetCombat(true, true);
                        self.multi["PetsSlot"]:SetActive(true);
                end
                
    end
end


-- REMOVE EFFECT EVENT
function LoreBars:RemoveEffect( effect )
        local name = effect:GetName();
        local id = effect:GetID();

        if (effect:GetName() == self.effectlist["CombatSummoning"]:GetName()) then
                if (not self.effectlist["CombatSummoning"]:SetState(false, id)) then
                        self.multi["PetsSlot"]:SetActive(true);
                        self.multi["PetsSlot"]:SetCombat(false, true);
                end
        
        end
end


-- DEFAULT SETTINGS
function LoreBars:DefaultSettings()
        self.settings = { preconf = { }, userconf = { }, traits = { }, features = { }, defaults = { }, quickslots = { } };

        self.settings.userconf["Debuffs"]                       = { id = 1,     name = "Debuffs",                       defpos = {1,1},         size={7,1}, pos = {0,0}, combat = {true,true}, active = true };
        self.settings.userconf["BattleBuffs"]           = { id = 2,     name = "Battle Buffs",          defpos = {8,1},         size={3,1}, pos = {0,0}, combat = {true,true}, active = true };
    self.settings.userconf["Cures"]                     = { id = 3,     name = "Cures",                         defpos = {11,1},        size={1,1}, pos = {0,0}, combat = {true,true}, active = true };
        self.settings.userconf["Pets"]                          = { id = 4,     name = "Pets",                          defpos = {8,4},         size={1,1}, pos = {0,0}, combat = {true,true}, active = true }; 
        self.settings.userconf["Rez"]                           = { id = 5,     name = "Rez",                           defpos = {12,1},        size={1,1}, pos = {0,0}, combat = {true,true}, active = true };
        self.settings.userconf["CrowdControl"]          = { id = 6,     name = "Crowd Control",         defpos = {1,3},         size={3,1}, pos = {0,0}, combat = {true,true}, active = true };
        self.settings.userconf["Heal"]                          = { id = 7,     name = "Heal",                          defpos = {4,3},         size={2,1}, pos = {0,0}, combat = {true,true}, active = true };
        self.settings.userconf["Damage"]                        = { id = 8,     name = "Damage",                        defpos = {1,2},         size={9,1}, pos = {0,0}, combat = {true,true}, active = true };
        self.settings.userconf["Self"]                          = { id = 9,     name = "Self",                          defpos = {6,3},         size={4,1}, pos = {0,0}, combat = {true,true}, active = true };
        self.settings.userconf["KotLM"]                         = { id = 10,    name = "KotLM",                         defpos = {10,3},        size={1,1}, pos = {0,0}, combat = {true,true}, active = true };
        self.settings.userconf["Power"]                         = { id = 11,    name = "Power",                         defpos = {11,3},        size={1,1}, pos = {0,0}, combat = {true,true}, active = true };
        self.settings.userconf["DoTs"]                          = { id = 12,    name = "DoTs",                          defpos = {1,4},         size={1,1}, pos = {0,0}, combat = {true,true}, active = true };
        self.settings.userconf["PetBuffs"]                      = { id = 13,    name = "Pet Buffs",             defpos = {9,4},         size={2,1}, pos = {0,0}, combat = {true,true}, active = true };
        self.settings.userconf["Melee"]                         = { id = 14,    name = "Melee",                         defpos = {4,4},         size={2,1}, pos = {0,0}, combat = {true,true}, active = true }; 
        self.settings.userconf["StaticDebuffs"]         = { id = 15,    name = "Static Debuffs",        defpos = {6,4},         size={2,1}, pos = {0,0}, combat = {true,true}, active = true }; 

        self.settings.traits["MarchoftheEnts"]          = { id = 1, name = "March of the Ents", active = false };
        self.settings.traits["NatureFriend"]            = { id = 2, name = "Nature-friend", active = false };
        self.settings.traits["EagleFriend"]             = { id = 3, name = "Eagle-friend", active = false };
        
        self.settings.quickslots["Crumbs"]              = {id = 1, name = "Bag of Crumbs", active = false, type = 0, data = ""};
        self.settings.quickslots["Oats"]                = {id = 2, name = "Pot of Honey and Oats",active = false, type = 0, data = ""};
        self.settings.quickslots["Meat"]                = {id = 3, name = "Cut of Meat", active = false, type = 0, data = ""};
        self.settings.quickslots["Water"]               = {id = 4, name = "Bowl of Water", active = false, type = 0, data = ""};

        self.settings["Pets"] = { };
        self.settings["Pets"].raven = true;
        self.settings["Pets"].ravenb = false;
        self.settings["Pets"].ravenm = false;
        self.settings["Pets"].ravenf = false;
        self.settings["Pets"].ravens = false;
        self.settings["Pets"].ravenw = false;
        self.settings["Pets"].bear = true;
        self.settings["Pets"].bearb = false;
        self.settings["Pets"].bearp = false;
        self.settings["Pets"].bearwp = false;
        self.settings["Pets"].beartc = false;
        self.settings["Pets"].bearbp = false;
        self.settings["Pets"].bearw = false;
        self.settings["Pets"].lynx = true;
        self.settings["Pets"].lynxs = false;
        self.settings["Pets"].lynxo = false;
        self.settings["Pets"].lynxt = false;
        self.settings["Pets"].lynxg = false;
        self.settings["Pets"].lynxm = false;
        self.settings["Pets"].bog = false;
        self.settings["Pets"].bogs = false;
        self.settings["Pets"].bogm = false;
        self.settings["Pets"].bogt = false;
        self.settings["Pets"].eagle = false;
        self.settings["Pets"].eaglea = false;
        self.settings["Pets"].eagles = false;
        self.settings["Pets"].eaglee = false;
        self.settings["Pets"].eaglet = false;
        self.settings["Pets"].saber = true;
        self.settings["Pets"].saberd = false;
        self.settings["Pets"].sabersp = false;
        self.settings["Pets"].saberg = false;
        self.settings["Pets"].saberdw = false;
        self.settings["Pets"].sabers = false;
        self.settings["Pets"].sabero = false;
        self.settings["Pets"].spirit = true;
        
end


-- UPDATE SETTINGS
function LoreBars:UpdateSettings()
        if(settings.vers < 3.20) then
                self.settings["Quickslots"] = { };
                self.settings["Quickslots"].crumbs = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
                self.settings["Quickslots"].oats = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
                self.settings["Quickslots"].meat = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
                self.settings["Quickslots"].water = { active = false, type = Turbine.UI.Lotro.ShortcutType.Undefined, data = "" };
        end

        if (settings.vers < 4.00) then
                local oldclassinfo = self.settings;
                self:DefaultSettings();
                for k,v in pairs(oldclassinfo) do
                        if (k ~= "Damage" and k ~= "Quickslots" and k ~= "Pets" and k ~= "AncientWisdom") then
                                if (self.settings.preconf[k] == nil) then
                                        if (self.settings.userconf[k] ~= nil) then
                                                self.settings.userconf[k].pos = { v.x, v.y };
                                                self.settings.userconf[k].combat = { true, true };
                                                self.settings.userconf[k].active = v.active;
                                        end
                                else
                                        self.settings.preconf[k].pos = { v.x, v.y };
                                        self.settings.preconf[k].combat = { true, true };
                                        self.settings.preconf[k].active = v.active;
                                end
                        elseif (k == "Damage") then
                                for key, value in pairs(v) do
                                        if (key == 'ents') then
                                                self.settings.traits["MarchoftheEnts"].active = value;
                                        end
                                end
                        elseif (k == "Pets") then
                                for key, value in pairs(v) do
                                        if (key ~= 'bogtrait' or key ~= 'eagletrait') then
                                                self.settings.Pets[key] = value;
                                        end
                                end
                        elseif (k == "Quickslots") then
                                for key, value in pairs(v) do
                                        if (key == 'crumbs') then
                                                self.settings.quickslots["Crumbs"].active = value.active;
                                                self.settings.quickslots["Crumbs"].type = value.type;
                                                self.settings.quickslots["Crumbs"].data = value.data;
                                        elseif (key == 'oats') then
                                                self.settings.quickslots["Oats"].active = value.active;
                                                self.settings.quickslots["Oats"].type = value.type;
                                                self.settings.quickslots["Oats"].data = value.data;
                                        elseif (key == 'meat') then
                                                self.settings.quickslots["Meat"].active = value.active;
                                                self.settings.quickslots["Meat"].type = value.type;
                                                self.settings.quickslots["Meat"].data = value.data;
                                        elseif (key == 'water') then
                                                self.settings.quickslots["Water"].active = value.active;
                                                self.settings.quickslots["Water"].type = value.type;
                                                self.settings.quickslots["Water"].data = value.data;
                                        end
                                end
                        end
                end
        end
        
        if (settings.vers < 5.00) then
                settings.skilldata["SignWizardsFire"] = settings.skilldata["SignWizardry"];
                settings.skilldata["SignWizardry"] = nil;
                settings.skilldata["KnowledgeofCures"] = settings.skilldata["Leechcraft"];
                settings.skilldata["Leechcraft"] = nil;
                settings.skilldata["TendtheSick"] = nil;
                settings.skilldata["AncientKnowledgeofCures"] = nil;
                settings.skilldata["AncientWisdom"] = nil;
                settings.skilldata["WardingKnowledge"] = { };
                settings.skilldata["WardingKnowledge"].parent = settings.multidata["WardingSlot"].parent;
                settings.skilldata["WardingKnowledge"].pos = settings.multidata["WardingSlot"].pos;
                settings.multidata["WardingSlot"] = nil;
                if (self.settings.userconf["Pets"] ~= nil) then
                        self.settings.userconf["Pets"].id = 4;
                end
                self.settings["Pets"].spirit = true;

        end
        
        settings.vers = vars.vers;

end


-- DISPLAY SETUP WINDOW AND SET ALL CHECKBOXES COMBOBOXES SLIDERS AND QUICKSLOTS
function LoreBars:SetupPets()
        self.setup.buttons[5]:SetVisible(true);
        self.setuppets.checkboxlmr1:SetChecked(self.settings["Pets"].raven);
        self.setuppets.checkboxlmr2:SetChecked(self.settings["Pets"].ravenb);
        self.setuppets.checkboxlmr3:SetChecked(self.settings["Pets"].ravenm);
        self.setuppets.checkboxlmr4:SetChecked(self.settings["Pets"].ravenf);
        self.setuppets.checkboxlmr5:SetChecked(self.settings["Pets"].ravens);
        self.setuppets.checkboxlmr6:SetChecked(self.settings["Pets"].ravenw);
        self.setuppets.checkboxlmb1:SetChecked(self.settings["Pets"].bear);
        self.setuppets.checkboxlmb2:SetChecked(self.settings["Pets"].bearb);
        self.setuppets.checkboxlmb3:SetChecked(self.settings["Pets"].bearp);
        self.setuppets.checkboxlmb4:SetChecked(self.settings["Pets"].bearwp);
        self.setuppets.checkboxlmb5:SetChecked(self.settings["Pets"].beartc);
        self.setuppets.checkboxlmb6:SetChecked(self.settings["Pets"].bearbp);
        self.setuppets.checkboxlmb7:SetChecked(self.settings["Pets"].bearw);
        self.setuppets.checkboxlml1:SetChecked(self.settings["Pets"].lynx);
        self.setuppets.checkboxlml2:SetChecked(self.settings["Pets"].lynxs);
        self.setuppets.checkboxlml3:SetChecked(self.settings["Pets"].lynxo);
        self.setuppets.checkboxlml4:SetChecked(self.settings["Pets"].lynxt);
        self.setuppets.checkboxlml5:SetChecked(self.settings["Pets"].lynxg);
        self.setuppets.checkboxlml6:SetChecked(self.settings["Pets"].lynxm);
        self.setuppets.checkboxlmbg1:SetChecked(self.settings["Pets"].bog);
        self.setuppets.checkboxlmbg2:SetChecked(self.settings["Pets"].bogs);
        self.setuppets.checkboxlmbg3:SetChecked(self.settings["Pets"].bogm);
        self.setuppets.checkboxlmbg4:SetChecked(self.settings["Pets"].bogt);
        self.setuppets.checkboxlme1:SetChecked(self.settings["Pets"].eagle);
        self.setuppets.checkboxlme2:SetChecked(self.settings["Pets"].eaglea);
        self.setuppets.checkboxlme3:SetChecked(self.settings["Pets"].eagles);
        self.setuppets.checkboxlme4:SetChecked(self.settings["Pets"].eaglee);
        self.setuppets.checkboxlme5:SetChecked(self.settings["Pets"].eaglet);
        self.setuppets.checkboxlms1:SetChecked(self.settings["Pets"].saber);
        self.setuppets.checkboxlms2:SetChecked(self.settings["Pets"].saberd);
        self.setuppets.checkboxlms3:SetChecked(self.settings["Pets"].sabersp);
        self.setuppets.checkboxlms4:SetChecked(self.settings["Pets"].saberg);
        self.setuppets.checkboxlms5:SetChecked(self.settings["Pets"].saberdw);
        self.setuppets.checkboxlms6:SetChecked(self.settings["Pets"].sabers);
        self.setuppets.checkboxlms7:SetChecked(self.settings["Pets"].sabero);
        self.setuppets.checkboxlmsp1:SetChecked(self.settings["Pets"].spirit);
        
end


-- SET ALL VARIABLES OFF OF SETUP WINDOW
function LoreBars:SetupPetsClosing()
        self.settings["Pets"].raven = self.setuppets.checkboxlmr1:IsChecked();
        self.settings["Pets"].ravenb = self.setuppets.checkboxlmr2:IsChecked();
        self.settings["Pets"].ravenm = self.setuppets.checkboxlmr3:IsChecked();
        self.settings["Pets"].ravenf = self.setuppets.checkboxlmr4:IsChecked();
        self.settings["Pets"].ravens = self.setuppets.checkboxlmr5:IsChecked();
        self.settings["Pets"].ravenw = self.setuppets.checkboxlmr6:IsChecked();
        self.settings["Pets"].bear = self.setuppets.checkboxlmb1:IsChecked();
        self.settings["Pets"].bearb = self.setuppets.checkboxlmb2:IsChecked();
        self.settings["Pets"].bearp = self.setuppets.checkboxlmb3:IsChecked();
        self.settings["Pets"].bearwp = self.setuppets.checkboxlmb4:IsChecked();
        self.settings["Pets"].beartc = self.setuppets.checkboxlmb5:IsChecked();
        self.settings["Pets"].bearbp = self.setuppets.checkboxlmb6:IsChecked();
        self.settings["Pets"].bearw = self.setuppets.checkboxlmb7:IsChecked();
        self.settings["Pets"].lynx = self.setuppets.checkboxlml1:IsChecked();
        self.settings["Pets"].lynxs = self.setuppets.checkboxlml2:IsChecked();
        self.settings["Pets"].lynxo = self.setuppets.checkboxlml3:IsChecked();
        self.settings["Pets"].lynxt = self.setuppets.checkboxlml4:IsChecked();
        self.settings["Pets"].lynxg = self.setuppets.checkboxlml5:IsChecked();
        self.settings["Pets"].lynxm = self.setuppets.checkboxlml6:IsChecked();
        self.settings["Pets"].bog = self.setuppets.checkboxlmbg1:IsChecked();
        self.settings["Pets"].bogs = self.setuppets.checkboxlmbg2:IsChecked();
        self.settings["Pets"].bogm = self.setuppets.checkboxlmbg3:IsChecked();
        self.settings["Pets"].bogt = self.setuppets.checkboxlmbg4:IsChecked();
        self.settings["Pets"].eagle = self.setuppets.checkboxlme1:IsChecked();
        self.settings["Pets"].eaglea = self.setuppets.checkboxlme2:IsChecked();
        self.settings["Pets"].eagles = self.setuppets.checkboxlme3:IsChecked();
        self.settings["Pets"].eaglee = self.setuppets.checkboxlme4:IsChecked();
        self.settings["Pets"].eaglet = self.setuppets.checkboxlme5:IsChecked();
        self.settings["Pets"].saber = self.setuppets.checkboxlms1:IsChecked();
        self.settings["Pets"].saberd = self.setuppets.checkboxlms2:IsChecked();
        self.settings["Pets"].sabersp = self.setuppets.checkboxlms3:IsChecked();
        self.settings["Pets"].saberg = self.setuppets.checkboxlms4:IsChecked();
        self.settings["Pets"].saberdw = self.setuppets.checkboxlms5:IsChecked();
        self.settings["Pets"].sabers = self.setuppets.checkboxlms6:IsChecked();
        self.settings["Pets"].sabero = self.setuppets.checkboxlms7:IsChecked();
        self.settings["Pets"].spirit = self.setuppets.checkboxlmsp1:IsChecked();

end


-- REFRESH SKILLS AND BARS
function LoreBars: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["MarchoftheEnts"]:SetActive(self.settings.traits["MarchoftheEnts"].active);

        -- Build Multi Slots
        self.multi["PetBuffsSlot"]:Clear();
        if (vars.playerlevel >= 72) then
                self.multi["PetBuffsSlot"]:AddShortCut("SignRage",      72, "0x70028C98"); --Need Hex
        else
                self.multi["PetBuffsSlot"]:AddShortCut("SignRage",      4, "0x70003139");
        end
    self.multi["PetBuffsSlot"]:AddShortCut("SignProtection",6, "0x7000312B");
    self.multi["PetBuffsSlot"]:LevelCheck();
        
        self.multi["PetFoodSlot"]:Clear();
        self.multi["PetFoodSlot"]:AddShortCut("Crumbs", self.settings.quickslots["Crumbs"]);
        self.multi["PetFoodSlot"]:AddShortCut("Oats",   self.settings.quickslots["Oats"]);
        self.multi["PetFoodSlot"]:AddShortCut("Meat",   self.settings.quickslots["Meat"]);
        self.multi["PetFoodSlot"]:AddShortCut("Water",  self.settings.quickslots["Water"]);
    self.multi["PetFoodSlot"]:Refresh(true);
        
        self.multi["PetsSlot"]:Clear();
    if (self.settings["Pets"].raven) then       self.multi["PetsSlot"]:AddShortCut("Ravenlore",                 2, "0x70003EB5", 1); end
    if (self.settings["Pets"].ravenb) then      self.multi["PetsSlot"]:AddShortCut("Bloodraven",                2, "0x70024A63", 1); end
    if (self.settings["Pets"].ravenm) then      self.multi["PetsSlot"]:AddShortCut("Mottledwingraven",  2, "0x70024A60", 1); end
    if (self.settings["Pets"].ravenf) then      self.multi["PetsSlot"]:AddShortCut("Frostraven",                2, "0x70024A62", 1); end
    if (self.settings["Pets"].ravens) then      self.multi["PetsSlot"]:AddShortCut("Stormraven",                2, "0x70024A5F", 1); end
    if (self.settings["Pets"].ravenw) then      self.multi["PetsSlot"]:AddShortCut("Weatheredraven",    2, "0x70024A5D", 1); end
    if (self.settings["Pets"].bear) then        self.multi["PetsSlot"]:AddShortCut("FriendofBears",             14, "0x70003EB8", 2); end
    if (self.settings["Pets"].bearb) then       self.multi["PetsSlot"]:AddShortCut("BlackBear",                 14, "0x70024A6E", 2); end
    if (self.settings["Pets"].bearp) then       self.multi["PetsSlot"]:AddShortCut("PolarBear",                 14, "0x70024A6C", 2); end
    if (self.settings["Pets"].bearwp) then      self.multi["PetsSlot"]:AddShortCut("WildpawBear",               14, "0x70024A65", 2); end
    if (self.settings["Pets"].beartc) then      self.multi["PetsSlot"]:AddShortCut("TundraBearCub",             14, "0x70024A69", 2); end
    if (self.settings["Pets"].bearbp) then      self.multi["PetsSlot"]:AddShortCut("BlackpawBear",              14, "0x70024A68", 2); end
    if (self.settings["Pets"].bearw) then       self.multi["PetsSlot"]:AddShortCut("WeatheredBear",             14, "0x70024A66", 2); end
    if (self.settings["Pets"].lynx) then        self.multi["PetsSlot"]:AddShortCut("Lynxspeech",                30, "0x7000B8D3", 3); end
    if (self.settings["Pets"].lynxs) then       self.multi["PetsSlot"]:AddShortCut("SpottedLynx",               30, "0x70024A73", 3); end
    if (self.settings["Pets"].lynxo) then       self.multi["PetsSlot"]:AddShortCut("OnyxLynx",                  30, "0x70024A7A", 3); end
    if (self.settings["Pets"].lynxt) then       self.multi["PetsSlot"]:AddShortCut("TundraLynx",                30, "0x70024A74", 3); end
    if (self.settings["Pets"].lynxg) then       self.multi["PetsSlot"]:AddShortCut("GreyLynx",                  30, "0x70024A75", 3); end
    if (self.settings["Pets"].lynxm) then       self.multi["PetsSlot"]:AddShortCut("MountainLynx",              30, "0x70024A79", 3); end
    if (self.settings["Pets"].eagle and self.settings.traits["EagleFriend"].active) then self.multi["PetsSlot"]:AddShortCut("Eaglefriend",              45, "0x70000FB2", 4); end
    if (self.settings["Pets"].eaglea and self.settings.traits["EagleFriend"].active) then self.multi["PetsSlot"]:AddShortCut("AshenEagle",              45, "0x70024A7E", 4); end
    if (self.settings["Pets"].eagles and self.settings.traits["EagleFriend"].active) then self.multi["PetsSlot"]:AddShortCut("SnowcrestEagle",  45, "0x70024A80", 4); end
    if (self.settings["Pets"].eaglee and self.settings.traits["EagleFriend"].active) then self.multi["PetsSlot"]:AddShortCut("EmberEagle",              45, "0x70024A84", 4); end
    if (self.settings["Pets"].eaglet and self.settings.traits["EagleFriend"].active) then self.multi["PetsSlot"]:AddShortCut("TundraEagle",             45, "0x70024A82", 4); end
    if (self.settings["Pets"].saber) then       self.multi["PetsSlot"]:AddShortCut("FriendofFelineHunters",     56, "0x7000F530", 5); end
    if (self.settings["Pets"].saberd) then      self.multi["PetsSlot"]:AddShortCut("DuskySabercat",             56, "0x70024A8D", 5); end
    if (self.settings["Pets"].sabersp) then self.multi["PetsSlot"]:AddShortCut("SpottedSabercat",       56, "0x70024A89", 5); end
    if (self.settings["Pets"].saberg) then      self.multi["PetsSlot"]:AddShortCut("GreySabercat",              56, "0x70024A8F", 5); end
    if (self.settings["Pets"].saberdw) then self.multi["PetsSlot"]:AddShortCut("DeepwoodSabercat",      56, "0x70024A8B", 5); end
    if (self.settings["Pets"].sabers) then      self.multi["PetsSlot"]:AddShortCut("StripedSabercat",   56, "0x70024A8A", 5); end
    if (self.settings["Pets"].sabero) then      self.multi["PetsSlot"]:AddShortCut("OnyxSabercat",              56, "0x70024A87", 5); end
    if (self.settings["Pets"].bog and self.settings.traits["NatureFriend"].active) then                 self.multi["PetsSlot"]:AddShortCut("Naturefriend",              58, "0x7000F54D", 6); end
    if (self.settings["Pets"].bogs and self.settings.traits["NatureFriend"].active) then        self.multi["PetsSlot"]:AddShortCut("SwampGuardian",             58, "0x70024A93", 6); end
    if (self.settings["Pets"].bogm and self.settings.traits["NatureFriend"].active) then        self.multi["PetsSlot"]:AddShortCut("MountainGuardian",  58, "0x70024A95", 6); end
    if (self.settings["Pets"].bogt and self.settings.traits["NatureFriend"].active) then        self.multi["PetsSlot"]:AddShortCut("TundraGuardian",    58, "0x70024A91", 6); end
    if (self.settings["Pets"].spirit) then      self.multi["PetsSlot"]:AddShortCut("CommunewithNature", 70, "0x7002A706", 7); end --Need Hex
    self.multi["PetsSlot"]:LevelCheck();

    -- Refresh States
    self:CombatChange(vars.player:IsInCombat());

end

Compare with Previous | Blame


All times are GMT -5. The time now is 07:50 PM.


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