Пример #1
0
        // Token: 0x06001B2F RID: 6959 RVA: 0x00073EB0 File Offset: 0x000720B0
        private static int GuessUnlockableSortScore(UnlockableDef unlockableDef)
        {
            int num    = 0;
            int num2   = num + 200;
            int num3   = num2 + 200;
            int num4   = num3 + 200;
            int result = num4 + 200;

            if (unlockableDef == null)
            {
                return(10000);
            }
            string name = unlockableDef.name;
            int    i    = 0;

            while (i < SurvivorCatalog.idealSurvivorOrder.Length)
            {
                SurvivorIndex survivorIndex = SurvivorCatalog.idealSurvivorOrder[i];
                if (name.Contains(survivorIndex.ToString()))
                {
                    if (SurvivorCatalog.GetSurvivorDef(survivorIndex).unlockableName == name)
                    {
                        return(num3 + i * 10);
                    }
                    int num5 = num4 + i * 10;
                    if (name.Contains("Skin"))
                    {
                        num5++;
                    }
                    return(num5);
                }
                else
                {
                    i++;
                }
            }
            ItemDef itemDef = ItemCatalog.allItems.Select(new Func <ItemIndex, ItemDef>(ItemCatalog.GetItemDef)).FirstOrDefault((ItemDef v) => v.unlockableName == unlockableDef.name);

            if (itemDef != null)
            {
                return((int)(num + itemDef.tier));
            }
            EquipmentDef equipmentDef = EquipmentCatalog.allEquipment.Select(new Func <EquipmentIndex, EquipmentDef>(EquipmentCatalog.GetEquipmentDef)).FirstOrDefault((EquipmentDef v) => v.unlockableName == unlockableDef.name);

            if (equipmentDef == null)
            {
                return(result);
            }
            if (equipmentDef.isBoss)
            {
                return(num2 + 1);
            }
            if (equipmentDef.isLunar)
            {
                return(num2 - 1);
            }
            return(num2);
        }
Пример #2
0
 // Token: 0x06001ADA RID: 6874 RVA: 0x00071C73 File Offset: 0x0006FE73
 private static void RegisterSurvivor(SurvivorIndex survivorIndex, SurvivorDef survivorDef)
 {
     if (survivorIndex < SurvivorIndex.Count)
     {
         survivorDef.name = survivorIndex.ToString();
     }
     survivorDef.survivorIndex = survivorIndex;
     SurvivorCatalog.survivorDefs[(int)survivorIndex] = survivorDef;
 }