public static List <string> GetComposition(string equipID) { GetEquipListByLastEquip getEquipListByLastEquip = new GetEquipListByLastEquip(true, 3, null); BattleEquipTools_Travers.TraverseEquipTree(equipID, getEquipListByLastEquip, 0); return(getEquipListByLastEquip.Result as List <string>); }
public static List <string> GetComposition(string equipID, List <ItemInfo> givenList) { GetCompositEquipPossess getCompositEquipPossess = new GetCompositEquipPossess(equipID, givenList, 3); BattleEquipTools_Travers.TraverseEquipTree(equipID, getCompositEquipPossess, 0); return(getCompositEquipPossess.Result as List <string>); }
private static void TraverseEquipTree(string equipID, ITraversCallback Del, int depth = 0) { if (Del != null && Del.TraversingCallback != null) { SysBattleItemsVo sysBattleItemsVo; if (BattleEquipTools_config.GetBattleItemVo(equipID, out sysBattleItemsVo)) { if (Del.TraversingCallback(sysBattleItemsVo, depth)) { string[] array = sysBattleItemsVo.consumption.Split(new char[] { ',' }); if (array.Length != 0 && !(sysBattleItemsVo.consumption == "[]")) { for (int i = 0; i < array.Length; i++) { BattleEquipTools_Travers.TraverseEquipTree(array[i], Del, depth + 1); } } } } } }