Esempio n. 1
0
        public static AIProfiles Load()
        {
            AIProfiles aIProfiles = new AIProfiles();

            if (!Directory.Exists(AIProfiles.PATH))
            {
                throw new AISettingsException("Directory does not exist", -1);
            }
            if (File.Exists(AIProfiles.FILE_PATH))
            {
                string value = File.ReadAllText(AIProfiles.FILE_PATH);
                Dictionary <string, object> dictionary = JsonConvert.DeserializeObject <Dictionary <string, object> >(value);
                try
                {
                    aIProfiles.ST_Delay = Convert.ToInt32(dictionary["ST_Delay"]);
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.ST_ReconnectInterruptEnable = (bool)dictionary["ST_ReconnectInterruptEnable"];
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.ST_ReconnectInterruptInterval = Convert.ToInt32(dictionary["ST_ReconnectInterruptInterval"]);
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.ST_EnableHotTimeProfile = (bool)dictionary["ST_EnableHotTimeProfile"];
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.ST_EnableAutoProfile = (bool)dictionary["ST_EnableAutoProfile"];
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.ST_EnableAutoShutdown = (bool)dictionary["ST_EnableAutoShutdown"];
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.AD_Pause100 = (bool)dictionary["AD_Pause100"];
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.AD_NoHeroUp = (bool)dictionary["AD_NoHeroUp"];
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.ST_EnableTelegram = (bool)dictionary["ST_EnableTelegram"];
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.ST_EnableTelegramMsg1 = (bool)dictionary["ST_EnableTelegramMsg1"];
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.ST_TelegramWarnBoost = (bool)dictionary["ST_TelegramWarnBoost"];
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.ST_TelegramWarnHT = (bool)dictionary["ST_TelegramWarnHT"];
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.ST_HotTimeProfile = (string)dictionary["ST_HotTimeProfile"];
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.ST_BlueStacksForceActive = (bool)dictionary["ST_BlueStacksForceActive"];
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.ST_TelegramToken = ((dictionary["ST_TelegramToken"] == null) ? null : dictionary["ST_TelegramToken"].ToString());
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.ST_LDTitle = ((dictionary["ST_LDTitle"] == null) ? "LDPlayer" : dictionary["ST_LDTitle"].ToString());
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.ST_TelegramChatID = ((dictionary["ST_TelegramChatID"] == null) ? null : dictionary["ST_TelegramChatID"].ToString());
                }
                catch (Exception)
                { }
                try
                {
                    aIProfiles.ST_ForegroundMode = (bool)dictionary["ST_ForegroundMode"];
                }
                catch (Exception)
                { }
            }
            string text = null;

            string[] files = Directory.GetFiles(AIProfiles.PATH);
            for (int i = 0; i < files.Length; i++)
            {
                string text2 = files[i];
                if (text2.EndsWith(AIProfiles.FILE_EXTENSION) && !(text2 == AIProfiles.FILE_PATH))
                {
                    text2.Substring(text2.IndexOf('\\') + 1);
                    AISettings value2 = AISettings.Load(text2);
                    aIProfiles.Settings.Add(text2, value2);
                    if (string.IsNullOrEmpty(text))
                    {
                        text = text2;
                    }
                }
            }
            if (aIProfiles.Settings.Count <= 0)
            {
                throw new AISettingsException("No profile available", -1);
            }
            aIProfiles.CurrentKey = text;
            return(aIProfiles);
        }
Esempio n. 2
0
 public static AISettings Load(string filePath)
 {
     if (File.Exists(filePath))
     {
         string value = File.ReadAllText(filePath);
         Dictionary <string, object> dictionary = JsonConvert.DeserializeObject <Dictionary <string, object> >(value);
         AISettings aISettings = new AISettings();
         try
         {
             aISettings.SM_CollectRaid = (bool)dictionary["SM_CollectRaid"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.SM_CollectTartarus = (bool)dictionary["SM_CollectTartarus"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.SM_Enable = (bool)dictionary["SM_Enable"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_Enable = (bool)dictionary["PU_Enable"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_enableActive1 = (bool)dictionary["PU_enableActive1"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_enableActive2 = (bool)dictionary["PU_enableActive2"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_enableActive3 = (bool)dictionary["PU_enableActive3"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_1Star = (bool)dictionary["PU_1Star"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_2Star = (bool)dictionary["PU_2Star"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_3Star = (bool)dictionary["PU_3Star"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_4Star = (bool)dictionary["PU_4Star"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_1OnlyLv30 = (bool)dictionary["PU_1OnlyLv30"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_2OnlyLv30 = (bool)dictionary["PU_2OnlyLv30"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_3OnlyLv30 = (bool)dictionary["PU_3OnlyLv30"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_4OnlyLv30 = (bool)dictionary["PU_4OnlyLv30"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_1MOnlyLv30 = (bool)dictionary["PU_1MOnlyLv30"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_2MOnlyLv30 = (bool)dictionary["PU_2MOnlyLv30"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_3MOnlyLv30 = (bool)dictionary["PU_3MOnlyLv30"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_4MOnlyLv30 = (bool)dictionary["PU_4MOnlyLv30"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.BF_Enable = (bool)dictionary["BF_Enable"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.BF_EnableActivate1 = (bool)dictionary["BF_EnableActivate1"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.BF_EnableActivate2 = (bool)dictionary["BF_EnableActivate2"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.BF_OnlyLv30 = (bool)dictionary["BF_OnlyLv30"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_Active1 = Convert.ToInt32(dictionary["PU_Active1"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.BF_Active2 = Convert.ToInt32(dictionary["BF_Active2"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.BF_Rank = Convert.ToInt32(dictionary["BF_Rank"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_1Material = Convert.ToInt32(dictionary["PU_1Material"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_1Condition = Convert.ToInt32(dictionary["PU_1Condition"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_2Condition = Convert.ToInt32(dictionary["PU_2Condition"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_3Condition = Convert.ToInt32(dictionary["PU_3Condition"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_1Order = Convert.ToInt32(dictionary["PU_1Order"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_2Order = Convert.ToInt32(dictionary["PU_2Order"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_3Order = Convert.ToInt32(dictionary["PU_3Order"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_2Material = Convert.ToInt32(dictionary["PU_2Material"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_3Material = Convert.ToInt32(dictionary["PU_3Material"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.PU_4Material = Convert.ToInt32(dictionary["PU_4Material"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.CS_EnableActive1 = (bool)dictionary["CS_EnableActive1"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.CS_Enable1 = Convert.ToInt32(dictionary["CS_Enable1"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.SM_CollectTower = (bool)dictionary["SM_CollectTower"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Enable = (bool)dictionary["AD_Enable"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_HottimeEnable = (bool)dictionary["AD_HottimeEnable"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_EnableLimit = (bool)dictionary["AD_EnableLimit"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Limit = Convert.ToInt32(dictionary["AD_Limit"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Difficulty = (Difficulty)Convert.ToInt32(dictionary["AD_Difficulty"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Difficulty2nd = (Difficulty)Convert.ToInt32(dictionary["AD_Difficulty2nd"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_World = (World)Convert.ToInt32(dictionary["AD_World"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Stage = Convert.ToInt32(dictionary["AD_Stage"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_WorldSequence = ((dictionary["AD_WorldSequence"] == null) ? null : ((JArray)dictionary["AD_WorldSequence"]).ToObject <int[]>());
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_StageSequence = ((dictionary["AD_StageSequence"] == null) ? null : ((JArray)dictionary["AD_StageSequence"]).ToObject <int[]>());
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_AmountSequence = ((dictionary["AD_AmountSequence"] == null) ? null : ((JArray)dictionary["AD_AmountSequence"]).ToObject <int[]>());
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_BoostSequence = ((dictionary["AD_BoostSequence"] == null) ? null : ((JArray)dictionary["AD_BoostSequence"]).ToObject <int[]>());
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Continuous = (bool)dictionary["AD_Continuous"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Team = (Team)Convert.ToInt32(dictionary["AD_Team"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD2_Team = (Team)Convert.ToInt32(dictionary["AD2_Team"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_StopOnFullHeroes = (bool)dictionary["AD_StopOnFullHeroes"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_StopOnFullItems = (bool)dictionary["AD_StopOnFullItems"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_CheckSlot = (bool)dictionary["AD_CheckSlot"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_UseFriend = (bool)dictionary["AD_UseFriend"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_BootMode = (bool)dictionary["AD_BootMode"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_BoostAsgar = (bool)dictionary["AD_BoostAsgar"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_BoostModeSequence = (bool)dictionary["AD_BoostModeSequence"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_BoostAllMap = (bool)dictionary["AD_BoostAllMap"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_CheckingHeroes = (bool)dictionary["AD_CheckingHeroes"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.GB_WaitForKeys = (bool)dictionary["GB_WaitForKeys"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AR_Enable = (bool)dictionary["AR_Enable"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AR_EnableLimit = (bool)dictionary["AR_EnableLimit"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AR_Limit = Convert.ToInt32(dictionary["AR_Limit"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AR_UseRuby = (bool)dictionary["AR_UseRuby"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AR_UseRubyAmount = Convert.ToInt32(dictionary["AR_UseRubyAmount"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AR_Mastery = (Mastery)Convert.ToInt32(dictionary["AR_Mastery"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AR_LimitArena = (bool)dictionary["AR_LimitArena"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AR_LimitScore = Convert.ToInt32(dictionary["AR_LimitScore"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellHeroes = (bool)dictionary["RS_SellHeroes"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellHeroStars = Convert.ToInt32(dictionary["RS_SellHeroStars"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellHeroAmount = Convert.ToInt32(dictionary["RS_SellHeroAmount"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellHeroAll = (bool)dictionary["RS_SellHeroAll"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellItems = (bool)dictionary["RS_SellItems"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellItemStars = Convert.ToInt32(dictionary["RS_SellItemStars"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellItemAmount = Convert.ToInt32(dictionary["RS_SellItemAmount"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellItemAll = (bool)dictionary["RS_SellItemAll"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_InboxHonors = (bool)dictionary["RS_InboxHonors"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_InboxKeys = (bool)dictionary["RS_InboxKeys"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_InboxGold = (bool)dictionary["RS_InboxGold"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_InboxRubies = (bool)dictionary["RS_InboxRubies"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_InboxTickets = (bool)dictionary["RS_InboxTickets"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_CollectLuckyChest = (bool)dictionary["RS_CollectLuckyChest"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_CollectLuckyBox = (bool)dictionary["RS_CollectLuckyBox"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_CollectInbox = (bool)dictionary["RS_CollectInbox"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_EnableCINoRuby = (bool)dictionary["RS_EnableCINoRuby"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_CIOnlyHonor = (bool)dictionary["RS_CIOnlyHonor"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_CIOnlyKey = (bool)dictionary["RS_CIOnlyKey"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_CIOnlyCurrency = (bool)dictionary["RS_CIOnlyCurrency"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_CIOnlyTicket = (bool)dictionary["RS_CIOnlyTicket"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_EnableCI = (bool)dictionary["RS_EnableCI"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_CollectInboxActive = Convert.ToInt32(dictionary["RS_CollectInboxActive"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_BuyKeyHonors = (bool)dictionary["RS_BuyKeyHonors"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellGoldOre = (bool)dictionary["RS_SellGoldOre"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_BuyKeyHonorsType = (BuyKeyHonorsType)Convert.ToInt32(dictionary["RS_BuyKeyHonorsType"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_BuyKeyHonorsAmount = Convert.ToInt32(dictionary["RS_BuyKeyHonorsAmount"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_BuyKeyRubies = (bool)dictionary["RS_BuyKeyRubies"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_BuyKeyRubiesType = (BuyKeyRubiesType)Convert.ToInt32(dictionary["RS_BuyKeyRubiesType"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_BuyKeyRubiesAmount = Convert.ToInt32(dictionary["RS_BuyKeyRubiesAmount"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Profile1 = (string)dictionary["AD_Profile1"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Profile2 = (string)dictionary["AD_Profile2"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Profile3 = (string)dictionary["AD_Profile3"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_EnableProfile1 = (bool)dictionary["AD_EnableProfile1"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_EnableProfile2 = (bool)dictionary["AD_EnableProfile2"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_EnableProfile3 = (bool)dictionary["AD_EnableProfile3"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_NoChangeMode = (bool)dictionary["AD_NoChangeMode"];
         }
         catch (Exception)
         { }
         return(aISettings);
     }
     throw new AISettingsException("Settings file not found", -1);
 }
Esempio n. 3
0
 public AIProfiles(AISettings initSettings) : this()
 {
     CurrentKey = AIProfiles.PATH + "\\Default" + AIProfiles.FILE_EXTENSION;
     Settings.Add(CurrentKey, initSettings);
 }
Esempio n. 4
0
 public static AISettings Load(string filePath)
 {
     if (File.Exists(filePath))
     {
         string value = File.ReadAllText(filePath);
         Dictionary <string, object> dictionary = JsonConvert.DeserializeObject <Dictionary <string, object> >(value);
         AISettings aISettings = new AISettings();
         try
         {
             aISettings.AD_Enable = (bool)dictionary["AD_Enable"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_EnableLimit = (bool)dictionary["AD_EnableLimit"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Limit = Convert.ToInt32(dictionary["AD_Limit"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Difficulty = (Difficulty)Convert.ToInt32(dictionary["AD_Difficulty"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_World = (World)Convert.ToInt32(dictionary["AD_World"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Stage = Convert.ToInt32(dictionary["AD_Stage"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_WorldSequence = ((dictionary["AD_WorldSequence"] == null) ? null : ((JArray)dictionary["AD_WorldSequence"]).ToObject <int[]>());
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_StageSequence = ((dictionary["AD_StageSequence"] == null) ? null : ((JArray)dictionary["AD_StageSequence"]).ToObject <int[]>());
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_AmountSequence = ((dictionary["AD_AmountSequence"] == null) ? null : ((JArray)dictionary["AD_AmountSequence"]).ToObject <int[]>());
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Continuous = (bool)dictionary["AD_Continuous"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Team = (Team)Convert.ToInt32(dictionary["AD_Team"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Formation = (Formation)Convert.ToInt32(dictionary["AD_Formation"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_HeroManagePositions = ((dictionary["AD_HeroManagePositions"] == null) ? null : ((JArray)dictionary["AD_HeroManagePositions"]).ToObject <int[]>());
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_ElementHeroesOnly = (bool)dictionary["AD_ElementHeroesOnly"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Mastery = (Mastery)Convert.ToInt32(dictionary["AD_Mastery"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_SkillType = (SkillType)Convert.ToInt32(dictionary["AD_SkillType"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_StopOnFullHeroes = (bool)dictionary["AD_StopOnFullHeroes"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Wave1Skills = ((dictionary["AD_Wave1Skills"] == null) ? null : ((JArray)dictionary["AD_Wave1Skills"]).ToObject <int[]>());
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Wave2Skills = ((dictionary["AD_Wave2Skills"] == null) ? null : ((JArray)dictionary["AD_Wave2Skills"]).ToObject <int[]>());
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Wave3Skills = ((dictionary["AD_Wave3Skills"] == null) ? null : ((JArray)dictionary["AD_Wave3Skills"]).ToObject <int[]>());
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Wave1Loop = (bool)dictionary["AD_Wave1Loop"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Wave2Loop = (bool)dictionary["AD_Wave2Loop"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AD_Wave3Loop = (bool)dictionary["AD_Wave3Loop"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.GB_WaitForKeys = (bool)dictionary["GB_WaitForKeys"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.GC_Enable = (bool)dictionary["GC_Enable"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.GC_EnableLimit = (bool)dictionary["GC_EnableLimit"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.GC_Limit = Convert.ToInt32(dictionary["GC_Limit"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.GC_Team = (Team)Convert.ToInt32(dictionary["GC_Team"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.GC_Formation = (Formation)Convert.ToInt32(dictionary["GC_Formation"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.GC_Mastery = (Mastery)Convert.ToInt32(dictionary["GC_Mastery"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.GC_SkillType = (SkillType)Convert.ToInt32(dictionary["GC_SkillType"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.GC_Wave1Skills = ((dictionary["GC_Wave1Skills"] == null) ? null : ((JArray)dictionary["GC_Wave1Skills"]).ToObject <int[]>());
         }
         catch (Exception)
         { }
         try
         {
             aISettings.GC_Wave2Skills = ((dictionary["GC_Wave2Skills"] == null) ? null : ((JArray)dictionary["GC_Wave2Skills"]).ToObject <int[]>());
         }
         catch (Exception)
         { }
         try
         {
             aISettings.GC_Wave1Loop = (bool)dictionary["GC_Wave1Loop"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.GC_Wave2Loop = (bool)dictionary["GC_Wave2Loop"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AR_Enable = (bool)dictionary["AR_Enable"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AR_EnableLimit = (bool)dictionary["AR_EnableLimit"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AR_Limit = Convert.ToInt32(dictionary["AR_Limit"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AR_UseRuby = (bool)dictionary["AR_UseRuby"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AR_UseRubyAmount = Convert.ToInt32(dictionary["AR_UseRubyAmount"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.AR_Mastery = (Mastery)Convert.ToInt32(dictionary["AR_Mastery"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RD_Enable = (bool)dictionary["RD_Enable"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RD_EnableLimit = (bool)dictionary["RD_EnableLimit"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RD_Limit = Convert.ToInt32(dictionary["RD_Limit"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RD_EnableDragonLimit = (bool)dictionary["RD_EnableDragonLimit"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RD_DragonLimit = (int)dictionary["RD_DragonLimit"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RD_SkillType = (SkillType)Convert.ToInt32(dictionary["RD_SkillType"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RD_Team1Skills = ((dictionary["RD_Team1Skills"] == null) ? null : ((JArray)dictionary["RD_Team1Skills"]).ToObject <int[]>());
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RD_Team2Skills = ((dictionary["RD_Team2Skills"] == null) ? null : ((JArray)dictionary["RD_Team2Skills"]).ToObject <int[]>());
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RD_Team1Loop = (bool)dictionary["RD_Team1Loop"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RD_Team2Loop = (bool)dictionary["RD_Team2Loop"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellHeroes = (bool)dictionary["RS_SellHeroes"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellHeroStars = Convert.ToInt32(dictionary["RS_SellHeroStars"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellHeroAmount = Convert.ToInt32(dictionary["RS_SellHeroAmount"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellHeroAll = (bool)dictionary["RS_SellHeroAll"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellItems = (bool)dictionary["RS_SellItems"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellItemStars = Convert.ToInt32(dictionary["RS_SellItemStars"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellItemAmount = Convert.ToInt32(dictionary["RS_SellItemAmount"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SellItemAll = (bool)dictionary["RS_SellItemAll"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_InboxHonors = (bool)dictionary["RS_InboxHonors"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_InboxKeys = (bool)dictionary["RS_InboxKeys"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_InboxGold = (bool)dictionary["RS_InboxGold"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_InboxRubies = (bool)dictionary["RS_InboxRubies"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_InboxTickets = (bool)dictionary["RS_InboxTickets"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_CollectLuckyChest = (bool)dictionary["RS_CollectLuckyChest"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_CollectLuckyBox = (bool)dictionary["RS_CollectLuckyBox"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SpecialQuestsDaily = (bool)dictionary["RS_SpecialQuestsDaily"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SpecialQuestsWeekly = (bool)dictionary["RS_SpecialQuestsWeekly"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SpecialQuestsMonthly = (bool)dictionary["RS_SpecialQuestsMonthly"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_QuestsBattle = (bool)dictionary["RS_QuestsBattle"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_QuestsHero = (bool)dictionary["RS_QuestsHero"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_QuestsItem = (bool)dictionary["RS_QuestsItem"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_QuestsSocial = (bool)dictionary["RS_QuestsSocial"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SendHonorsFacebook = (bool)dictionary["RS_SendHonorsFacebook"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_SendHonorsInGame = (bool)dictionary["RS_SendHonorsInGame"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_BuyKeyHonors = (bool)dictionary["RS_BuyKeyHonors"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_BuyKeyHonorsType = (BuyKeyHonorsType)Convert.ToInt32(dictionary["RS_BuyKeyHonorsType"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_BuyKeyHonorsAmount = Convert.ToInt32(dictionary["RS_BuyKeyHonorsAmount"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_BuyKeyRubies = (bool)dictionary["RS_BuyKeyRubies"];
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_BuyKeyRubiesType = (BuyKeyRubiesType)Convert.ToInt32(dictionary["RS_BuyKeyRubiesType"]);
         }
         catch (Exception)
         { }
         try
         {
             aISettings.RS_BuyKeyRubiesAmount = Convert.ToInt32(dictionary["RS_BuyKeyRubiesAmount"]);
         }
         catch (Exception)
         { }
         return(aISettings);
     }
     throw new AISettingsException("Settings file not found", -1);
 }