Esempio n. 1
0
 public static void SortWithPriorityList(List <SortableEquipment> list, List <EquipmentSortMethod> priorityList)
 {
     list.Sort((SortableEquipment a, SortableEquipment b) => ArmorySortUtils.SortWithList(a, b, priorityList));
 }
Esempio n. 2
0
        public static int SortWithList(SortableEquipment a, SortableEquipment b, List <EquipmentSortMethod> sortingPriority)
        {
            Dictionary <EquipmentSortMethod, ArmorySortUtils.SortEquipmentDelegate> dictionary = ArmorySortUtils.CreateSortDictionary();
            int i     = 0;
            int count = sortingPriority.Count;

            while (i < count)
            {
                ArmorySortUtils.SortEquipmentDelegate sortEquipmentDelegate = dictionary[sortingPriority[i]];
                int num = sortEquipmentDelegate(a, b);
                if (num != 0)
                {
                    return(num);
                }
                i++;
            }
            return(0);
        }
Esempio n. 3
0
 public unsafe static long $Invoke11(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(ArmorySortUtils.SortWithList((SortableEquipment)GCHandledObjects.GCHandleToObject(*args), (SortableEquipment)GCHandledObjects.GCHandleToObject(args[1]), (List <EquipmentSortMethod>)GCHandledObjects.GCHandleToObject(args[2]))));
 }
Esempio n. 4
0
 public unsafe static long $Invoke12(long instance, long *args)
 {
     ArmorySortUtils.SortWithPriorityList((List <SortableEquipment>)GCHandledObjects.GCHandleToObject(*args), (List <EquipmentSortMethod>)GCHandledObjects.GCHandleToObject(args[1]));
     return(-1L);
 }
Esempio n. 5
0
 public unsafe static long $Invoke10(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(ArmorySortUtils.SortByUnlockedEquipment((SortableEquipment)GCHandledObjects.GCHandleToObject(*args), (SortableEquipment)GCHandledObjects.GCHandleToObject(args[1]))));
 }
Esempio n. 6
0
 public unsafe static long $Invoke7(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(ArmorySortUtils.SortByIncrementingEmptyIndex((SortableEquipment)GCHandledObjects.GCHandleToObject(*args), (SortableEquipment)GCHandledObjects.GCHandleToObject(args[1]))));
 }
Esempio n. 7
0
 public unsafe static long $Invoke2(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(ArmorySortUtils.SortAlphabetically((SortableEquipment)GCHandledObjects.GCHandleToObject(*args), (SortableEquipment)GCHandledObjects.GCHandleToObject(args[1]))));
 }
Esempio n. 8
0
 public unsafe static long $Invoke1(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(ArmorySortUtils.RemoveWrapper((List <SortableEquipment>)GCHandledObjects.GCHandleToObject(*args))));
 }
Esempio n. 9
0
 public unsafe static long $Invoke0(long instance, long *args)
 {
     return(GCHandledObjects.ObjectToGCHandle(ArmorySortUtils.CreateSortDictionary()));
 }