public static void SortWithPriorityList(List <SortableEquipment> list, List <EquipmentSortMethod> priorityList) { list.Sort((SortableEquipment a, SortableEquipment b) => ArmorySortUtils.SortWithList(a, b, priorityList)); }
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); }
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])))); }
public unsafe static long $Invoke12(long instance, long *args) { ArmorySortUtils.SortWithPriorityList((List <SortableEquipment>)GCHandledObjects.GCHandleToObject(*args), (List <EquipmentSortMethod>)GCHandledObjects.GCHandleToObject(args[1])); return(-1L); }
public unsafe static long $Invoke10(long instance, long *args) { return(GCHandledObjects.ObjectToGCHandle(ArmorySortUtils.SortByUnlockedEquipment((SortableEquipment)GCHandledObjects.GCHandleToObject(*args), (SortableEquipment)GCHandledObjects.GCHandleToObject(args[1])))); }
public unsafe static long $Invoke7(long instance, long *args) { return(GCHandledObjects.ObjectToGCHandle(ArmorySortUtils.SortByIncrementingEmptyIndex((SortableEquipment)GCHandledObjects.GCHandleToObject(*args), (SortableEquipment)GCHandledObjects.GCHandleToObject(args[1])))); }
public unsafe static long $Invoke2(long instance, long *args) { return(GCHandledObjects.ObjectToGCHandle(ArmorySortUtils.SortAlphabetically((SortableEquipment)GCHandledObjects.GCHandleToObject(*args), (SortableEquipment)GCHandledObjects.GCHandleToObject(args[1])))); }
public unsafe static long $Invoke1(long instance, long *args) { return(GCHandledObjects.ObjectToGCHandle(ArmorySortUtils.RemoveWrapper((List <SortableEquipment>)GCHandledObjects.GCHandleToObject(*args)))); }
public unsafe static long $Invoke0(long instance, long *args) { return(GCHandledObjects.ObjectToGCHandle(ArmorySortUtils.CreateSortDictionary())); }