public static List <string> GetRItems(List <string> recommendList, string newItem, List <ItemInfo> possessItems) { List <string> itemListString = BattleEquipTools_Travers.GetItemListString(possessItems); List <string> list = new List <string>(recommendList); if (list != null && !string.IsNullOrEmpty(newItem)) { List <string> composition = BattleEquipTools_Travers.GetComposition(newItem); while (list != null && list.Count != 0) { if (!(list[0] == newItem) && !composition.Contains(list[0]) && !itemListString.Contains(list[0])) { break; } list.RemoveAt(0); } } return(list); }
public static List <string> GetHeroItemsString(Units unit) { List <ItemDynData> heroItems = BattleEquipTools_op.GetHeroItems(unit); return(BattleEquipTools_Travers.GetItemListString(heroItems)); }