Пример #1
0
        public static List <ItemDynData> GetDynItemList(List <ItemInfo> list)
        {
            ItemListToDynItemList itemListToDynItemList = new ItemListToDynItemList();

            BattleEquipTools_Travers.TraverseList <ItemInfo>(list, itemListToDynItemList);
            return(itemListToDynItemList.Result as List <ItemDynData>);
        }
Пример #2
0
        public static List <ItemInfo> GetItemList(List <ItemDynData> list)
        {
            DynItemListToItemList dynItemListToItemList = new DynItemListToItemList();

            BattleEquipTools_Travers.TraverseList <ItemDynData>(list, dynItemListToItemList);
            List <ItemInfo> list2 = dynItemListToItemList.Result as List <ItemInfo>;

            return(list2 ?? new List <ItemInfo>());
        }
Пример #3
0
        public static List <string> GetItemListString(List <ItemInfo> list)
        {
            ItemListToIDList itemListToIDList = new ItemListToIDList();

            BattleEquipTools_Travers.TraverseList <ItemInfo>(list, itemListToIDList);
            List <string> list2 = itemListToIDList.Result as List <string>;

            return(list2 ?? new List <string>());
        }
Пример #4
0
        public static List <ItemInfo> CloneItemsList(List <ItemInfo> list)
        {
            CloneItemList cloneItemList = new CloneItemList();

            BattleEquipTools_Travers.TraverseList <ItemInfo>(list, cloneItemList);
            List <ItemInfo> list2 = cloneItemList.Result as List <ItemInfo>;

            return(list2 ?? new List <ItemInfo>());
        }
Пример #5
0
        public static bool GetItem_first_most(List <ItemInfo> list, string target, out ItemInfo item, out int index)
        {
            item  = null;
            index = -1;
            FindItem_first_most findItem_first_most = new FindItem_first_most(target);

            BattleEquipTools_Travers.TraverseList <ItemInfo>(list, findItem_first_most);
            index = (int)findItem_first_most.Result;
            if (index >= 0 && index < list.Count)
            {
                item = list[index];
            }
            return(item != null && index != -1);
        }
Пример #6
0
        public static bool GetItem_first(List <ItemInfo> list, string target, out ItemInfo item, out int index)
        {
            item = null;
            FindItem findItem = new FindItem(target, true);

            BattleEquipTools_Travers.TraverseList <ItemInfo>(list, findItem);
            object[]        array = findItem.Result as object[];
            List <ItemInfo> list2 = array[1] as List <ItemInfo>;

            index = (int)array[0];
            if (list2 != null && list2.Count > 0)
            {
                item = list2[0];
            }
            return(item != null);
        }