Beispiel #1
0
    // Token: 0x06002895 RID: 10389 RVA: 0x0012F7A8 File Offset: 0x0012D9A8
    public static T[] smethod_8 <T>(uint uint_1, T[] gparam_0) where T : GClass16
    {
        int num = GClass16.smethod_7 <T>(uint_1, gparam_0);

        if (num != -1 && gparam_0[num].uint_0 == uint_1)
        {
            int i = num;
            int j = num;
            while (i > 0)
            {
                if (gparam_0[num].uint_0 != gparam_0[i - 1].uint_0)
                {
                    break;
                }
                i--;
            }
            while (j < gparam_0.Length - 1)
            {
                if (gparam_0[num].uint_0 != gparam_0[j + 1].uint_0)
                {
                    break;
                }
                j++;
            }
            int num2  = j - i + 1;
            T[] array = new T[num2];
            Array.Copy(gparam_0, i, array, 0, num2);
            return(array);
        }
        return(new T[0]);
    }
Beispiel #2
0
    // Token: 0x06002897 RID: 10391 RVA: 0x0012F8A4 File Offset: 0x0012DAA4
    public static int smethod_10 <T>(uint uint_1, T[] gparam_0) where T : GClass16
    {
        int num = GClass16.smethod_7 <T>(uint_1, gparam_0);

        if (num != -1 && gparam_0[num].uint_0 != uint_1)
        {
            num = -1;
        }
        return(num);
    }
Beispiel #3
0
 // Token: 0x0600289F RID: 10399 RVA: 0x0012FD34 File Offset: 0x0012DF34
 public static void smethod_18 <T>(T[] gparam_0, uint uint_1, uint uint_2, out int int_1, out int int_2) where T : GClass16
 {
     int_1 = 0;
     int_2 = 0;
     if (uint_1 <= uint_2 && gparam_0.Length >= 1)
     {
         int num  = GClass16.smethod_7 <T>(uint_1, gparam_0);
         int num2 = GClass16.smethod_7 <T>(uint_2, gparam_0);
         if (num != -1)
         {
             if (num2 != -1)
             {
                 while (num < gparam_0.Length && gparam_0[num].uint_0 < uint_1)
                 {
                     num++;
                 }
                 if (num > gparam_0.Length - 1)
                 {
                     return;
                 }
                 while (num - 1 >= 0 && gparam_0[num - 1].uint_0 >= uint_1)
                 {
                     num--;
                 }
                 while (num2 >= 0 && gparam_0[num2].uint_0 > uint_2)
                 {
                     num2--;
                 }
                 if (num2 < 0)
                 {
                     return;
                 }
                 while (num2 + 1 < gparam_0.Length && gparam_0[num2 + 1].uint_0 <= uint_2)
                 {
                     num2++;
                 }
                 if (num > num2)
                 {
                     return;
                 }
                 int_1 = num;
                 int_2 = num2 - num + 1;
                 return;
             }
         }
         return;
     }
 }