protected override Variant _formatConfig(Variant conf) { SvrItemConfig.instance = this; bool flag = conf.ContainsKey("forge_att_lvl"); if (flag) { Variant variant = new Variant(); foreach (Variant current in conf["forge_att_lvl"]._arr) { variant[current["name"]] = current; } conf["forge_att_lvl"] = variant; } bool flag2 = conf.ContainsKey("itm_merge_grp"); if (flag2) { Variant variant2 = new Variant(); foreach (Variant current2 in conf["itm_merge_grp"]._arr) { variant2[current2["id"]._int] = current2; } conf["itm_merge_grp"] = variant2; } bool flag3 = conf.ContainsKey("uitem"); if (flag3) { conf["uitem"] = conf["uitem"].convertToDct("id"); } bool flag4 = conf.ContainsKey("item"); if (flag4) { conf["item"] = conf["item"].convertToDct("id"); } bool flag5 = conf.ContainsKey("equip"); if (flag5) { conf["equip"] = conf["equip"].convertToDct("id"); } bool flag6 = conf.ContainsKey("stone"); if (flag6) { conf["stone"] = conf["stone"].convertToDct("id"); } bool flag7 = conf.ContainsKey("ex_att_grp"); if (flag7) { conf["ex_att_grp"] = conf["ex_att_grp"].convertToDct("id"); } return(conf); }
override protected Variant _formatConfig(Variant conf) { instance = this; //add by tangchunguang 2015/07/13 begin if (conf.ContainsKey("forge_att_lvl")) { Variant conf_forge_att_lvl = new Variant(); foreach (Variant v in conf["forge_att_lvl"]._arr) { conf_forge_att_lvl[v["name"]] = v; } conf["forge_att_lvl"] = conf_forge_att_lvl; } //add by tangchunguang 2015/07/13 end //add by tangchunguang 2015/07/21 begin if (conf.ContainsKey("itm_merge_grp")) { Variant conf_itm_merge_grp = new Variant(); foreach (Variant v in conf["itm_merge_grp"]._arr) { conf_itm_merge_grp[v["id"]._int] = v; } conf["itm_merge_grp"] = conf_itm_merge_grp; } if (conf.ContainsKey("uitem")) { conf["uitem"] = conf["uitem"].convertToDct("id"); } if (conf.ContainsKey("item")) { conf["item"] = conf["item"].convertToDct("id"); } if (conf.ContainsKey("equip")) { conf["equip"] = conf["equip"].convertToDct("id"); } if (conf.ContainsKey("stone")) { conf["stone"] = conf["stone"].convertToDct("id"); } if (conf.ContainsKey("ex_att_grp")) { conf["ex_att_grp"] = conf["ex_att_grp"].convertToDct("id"); } //add by tangchunguang 2015/07/21 end return(conf); }