public static void CreateBuffConfigfile() { TBuffjsonhelper mem = new TBuffjsonhelper(); mem.List = BuffList.getNewBuffList(); string json = JsonConvert.SerializeObject(mem, Formatting.Indented); File.WriteAllText(BuffListPath, json.ToString()); }
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()); }
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); }