예제 #1
0
        public static void CreateBuffConfigfile()
        {
            TBuffjsonhelper mem = new TBuffjsonhelper();

            mem.List = BuffList.getNewBuffList();
            string json = JsonConvert.SerializeObject(mem, Formatting.Indented);

            File.WriteAllText(BuffListPath, json.ToString());
        }
예제 #2
0
        public static void OverwriteBuffConfig(List <TBuff> Bufflist)
        {
            TBuffjsonhelper mem = new TBuffjsonhelper();

            mem.List = Bufflist;
            string json = JsonConvert.SerializeObject(mem, Formatting.Indented);

            File.WriteAllText(BuffListPath, json.ToString());
        }
예제 #3
0
        public static List <TBuff> getBuffConfig()
        {
            List <TBuff>    mem  = new List <TBuff>();
            JObject         o1   = JObject.Parse(File.ReadAllText(BuffListPath));
            TBuffjsonhelper read = o1.ToObject <TBuffjsonhelper>();

            mem = read.List;
            return(mem);
        }