public static void EditConfigItem(int id = 0) { if (id > 0) { crt_item = crt_config.GetItem(id); } else { switch (crt_config.name) { case CellWars_Editor.config_cell_name: crt_item = new config_cell_item(); config_cell_item config_cell_item = (config_cell_item)crt_item; config_cell_item.Clear(); config_cell_item.id = config_cell.data[config_cell.GetDataCount() - 1].id + 1; config_cell_item.hide_id = config_cell_item.id; config_cell_item.icon = config_cell_item.id; break; case CellWars_Editor.config_module_name: crt_item = new config_module_item(); config_module_item config_module_item = (config_module_item)crt_item; config_module_item.Clear(); config_module_item.id = config_module.data[config_module.GetDataCount() - 1].id + 1; break; } } }
public static void EditConfigItem(int id = 0) { if (id > 0) { crt_item = crt_config.GetItem(id); } else { switch (crt_config.name) { case CellWars_Editor.config_cell_name: crt_item = new config_cell_item(); config_cell_item config_cell_item = (config_cell_item)crt_item; config_cell_item.Clear(); config_cell_item.id = config_cell.data[config_cell.GetDataCount() - 1].id + 1; config_cell_item.hide_id = config_cell_item.id; config_cell_item.icon = config_cell_item.id; break; case CellWars_Editor.config_wall_name: crt_item = new config_wall_item(); config_wall_item config_wall_item = (config_wall_item)crt_item; config_wall_item.Clear(); config_wall_item.id = config_wall.data[config_wall.GetDataCount() - 1].id + 1; break; case CellWars_Editor.config_map_name: crt_item = new config_map_item(); config_map_item config_map_item = (config_map_item)crt_item; config_map_item.Clear(); config_map_item.id = config_map.data[config_map.GetDataCount() - 1].id + 1; config_map_item.name = "" + (config_map_item.id % 10000); config_map_item.icon = config_map_item.id; config_map_item.step = 20; config_map_item.pre_id = (config_map_item.id - 1); config_map_item.task = "10101|20,10102|21,10103|22,10104|23,10105|24"; config_map_item.build = 10000; config_map_item.fill = 10000; config_map_item.judge = "1000,2000,3000"; config_map_item.forbid_skill = "10106,10112,10108,10114,10110"; config_map_item.forbid_prop = ""; break; case CellWars_Editor.config_cover_name: crt_item = new config_cover_item(); config_cover_item config_cover_item = (config_cover_item)crt_item; config_cover_item.Clear(); config_cover_item.id = config_cover.data[config_cover.GetDataCount() - 1].id + 1; break; case CellWars_Editor.config_monster_name: crt_item = new config_monster_item(); config_monster_item config_monster_item = (config_monster_item)crt_item; config_monster_item.Clear(); config_monster_item.id = config_monster.data[config_monster.GetDataCount() - 1].id + 1; break; case CellWars_Editor.config_prop_name: crt_item = new config_prop_item(); config_prop_item config_prop_item = (config_prop_item)crt_item; config_prop_item.Clear(); config_prop_item.id = config_prop.data[config_prop.GetDataCount() - 1].id + 1; break; case CellWars_Editor.config_module_name: crt_item = new config_module_item(); config_module_item config_module_item = (config_module_item)crt_item; config_module_item.Clear(); config_module_item.id = config_module.data[config_module.GetDataCount() - 1].id + 1; break; case CellWars_Editor.config_guild_name: crt_item = new config_guild_item(); config_guild_item config_guild_item = (config_guild_item)crt_item; config_guild_item.Clear(); config_guild_item.id = config_guild.data[config_guild.GetDataCount() - 1].id + 1; break; case CellWars_Editor.config_chapter_name: crt_item = new config_chapter_item(); config_chapter_item config_chapter_item = (config_chapter_item)crt_item; config_chapter_item.Clear(); config_chapter_item.id = config_chapter.data[config_chapter.GetDataCount() - 1].id + 1; break; case CellWars_Editor.config_wealth_name: crt_item = new config_wealth_item(); config_wealth_item config_wealth_item = (config_wealth_item)crt_item; config_wealth_item.Clear(); config_wealth_item.id = config_wealth.data[config_wealth.GetDataCount() - 1].id + 1; break; case CellWars_Editor.config_skill_name: crt_item = new config_skill_item(); config_skill_item config_skill_item = (config_skill_item)crt_item; config_skill_item.Clear(); config_skill_item.id = config_skill.data[config_skill.GetDataCount() - 1].id + 1; break; case CellWars_Editor.config_sort_name: crt_item = new config_sort_item(); config_sort_item config_sort_item = (config_sort_item)crt_item; config_sort_item.Clear(); config_sort_item.id = config_sort.data[config_sort.GetDataCount() - 1].id + 1; break; } } }