コード例 #1
0
        public static void Load()
        {
            try
            {
                Directory.CreateDirectory(Main.SavePath + Path.DirectorySeparatorChar + Dir);

                jsonSkillList = new JsonNodeList();
                //disable Load for Now

                /*
                 * if (File.Exists(cPath))
                 * {
                 *  using (StreamReader reader = new StreamReader(cPath))
                 *  {
                 *
                 *      jsonSkillList = JsonConvert.DeserializeObject<JsonNodeList>(reader.ReadToEnd());
                 *  }
                 * }
                 */
                Save();
            }
            catch (SystemException e)
            {
                AnotherRpgMod.Instance.Logger.Error(e.ToString());
            }
        }
コード例 #2
0
 public static void Init()
 {
     try
     {
         cPath         = (Main.SavePath + Path.DirectorySeparatorChar + Dir + Path.DirectorySeparatorChar + Name);
         jsonSkillList = new JsonNodeList();
         Load();
     }
     catch (SystemException e)
     {
         AnotherRpgMod.Instance.Logger.Error(e.ToString());
     }
 }
コード例 #3
0
        public static void Load()
        {
            try {
                Directory.CreateDirectory(Main.SavePath + Path.DirectorySeparatorChar + Dir);
                cPath         = (Main.SavePath + Path.DirectorySeparatorChar + Dir + Path.DirectorySeparatorChar + Name);
                jsonSkillList = new JsonNodeList();

                if (File.Exists(cPath))
                {
                    using (StreamReader reader = new StreamReader(cPath))
                    {
                        if (Config.gpConfig.UseCustomSkillTree)
                        {
                            jsonSkillList = JsonConvert.DeserializeObject <JsonNodeList>(reader.ReadToEnd());
                        }
                    }
                }
                Save();
            }
            catch (SystemException e)
            {
                AnotherRpgMod.Instance.Logger.Error(e.ToString());
            }
        }