// Token: 0x0600289D RID: 10397 RVA: 0x0012FC60 File Offset: 0x0012DE60 public static bool smethod_16 <T>(T gparam_0, List <T> list_0, bool bool_0 = true) where T : GClass16 { int num = GClass16.smethod_9 <T>(gparam_0, list_0.ToArray()); if (num != -1) { if (bool_0 && gparam_0.GetType() == typeof(GClass19)) { GClass19 gclass = GClass16.smethod_12 <T>(gparam_0.GetType(), num, list_0) as GClass19; GClass19 gclass2 = GClass16.smethod_14 <T>(gparam_0.GetType(), num, list_0) as GClass19; if (GClass16.smethod_1(gclass, null)) { gclass.gclass19_1 = gclass2; } if (GClass16.smethod_1(gclass2, null)) { gclass2.gclass19_0 = gclass; } } list_0.RemoveAt(num); return(true); } return(false); }
// Token: 0x0600289C RID: 10396 RVA: 0x0012F97C File Offset: 0x0012DB7C public static int smethod_15 <T>(T gparam_0, List <T> list_0) where T : GClass16 { int num = -1; if (list_0.Count > 0) { if (GClass16.smethod_2(list_0[list_0.Count - 1], gparam_0)) { num = list_0.Count; list_0.Insert(num, gparam_0); } else { num = GClass16.smethod_6 <T>(gparam_0, list_0.ToArray()); if (num != -1) { if (GClass16.smethod_0(list_0[num], gparam_0) && gparam_0.Int32_1 == list_0[num].Int32_1) { list_0[num] = gparam_0; } else { if (GClass16.smethod_3(gparam_0, list_0[num])) { num++; } list_0.Insert(num, gparam_0); } } } } if (num == -1) { list_0.Add(gparam_0); num = list_0.Count - 1; } if (gparam_0.Int32_1 == 4) { GClass19 gclass = list_0[num] as GClass19; GClass19 gclass2 = GClass16.smethod_12 <T>(typeof(GClass19), num, list_0) as GClass19; GClass19 gclass3 = GClass16.smethod_14 <T>(typeof(GClass19), num, list_0) as GClass19; gclass.gclass19_0 = gclass2; if (GClass16.smethod_1(gclass2, null)) { gclass2.gclass19_1 = gclass; } gclass.gclass19_1 = gclass3; if (GClass16.smethod_1(gclass3, null)) { gclass3.gclass19_0 = gclass; } GClass19.GEnum15 genum = gclass.genum15_0; gclass2 = gclass.gclass19_0; gclass3 = gclass.gclass19_1; GClass19 gclass16_ = null; bool flag = false; while (GClass16.smethod_1(gclass2, null)) { if (gclass2.uint_0 != gclass.uint_0) { break; } if (gclass2.genum13_0 == GClass19.GEnum13.OPEN) { gclass16_ = gclass2; } else { flag = true; } genum |= gclass2.genum15_0; gclass2 = gclass2.gclass19_0; } while (GClass16.smethod_1(gclass3, null)) { if (gclass3.uint_0 != gclass.uint_0) { break; } if (gclass3.genum13_0 == GClass19.GEnum13.OPEN) { gclass16_ = gclass3; } else { flag = true; } genum |= gclass3.genum15_0; gclass3 = gclass3.gclass19_1; } if ((gclass.genum13_0 == GClass19.GEnum13.OPEN || !GClass16.smethod_1(gclass16_, null)) && (gclass.genum13_0 != GClass19.GEnum13.OPEN || !flag)) { gclass.genum15_0 = genum; gclass2 = gclass.gclass19_0; gclass3 = gclass.gclass19_1; while (GClass16.smethod_1(gclass2, null)) { if (gclass2.uint_0 != gclass.uint_0) { break; } if (gclass2.genum15_0 != genum) { Debug.Log(string.Format("Not match flags previous {0} {1}", num, gparam_0.GetType())); } gclass2.genum15_0 = genum; gclass2 = gclass2.gclass19_0; } while (GClass16.smethod_1(gclass3, null)) { if (gclass3.uint_0 != gclass.uint_0) { break; } if (gclass3.genum15_0 != genum) { Debug.Log(string.Format("Not match flags next {0} {1}", num, gparam_0.GetType())); } gclass3.genum15_0 = genum; gclass3 = gclass3.gclass19_1; } } } return(num); }