Exemplo n.º 1
0
        // Token: 0x060026C7 RID: 9927 RVA: 0x0008AE80 File Offset: 0x00089080
        private static uint?smethod_8(Class177 district, Class464 cog, uint cogsRemaining)
        {
            if (!Struct40.dictionary_0.ContainsKey(district))
            {
                return(null);
            }
            Dictionary <Class464, Dictionary <uint, uint> > dictionary = Struct40.dictionary_0[district];

            if (!dictionary.ContainsKey(cog))
            {
                return(null);
            }
            Dictionary <uint, uint> dictionary2 = dictionary[cog];

            if (!dictionary2.ContainsKey(cogsRemaining))
            {
                return(null);
            }
            uint num = dictionary2[cogsRemaining];

            if (!Struct40.dictionary_1.ContainsKey(district))
            {
                return(null);
            }
            Dictionary <uint, uint> dictionary3 = Struct40.dictionary_1[district];

            if (!dictionary3.ContainsKey(cogsRemaining))
            {
                return(null);
            }
            return(new uint?(dictionary3[cogsRemaining] - num));
        }
Exemplo n.º 2
0
        // Token: 0x060026C6 RID: 9926 RVA: 0x0008ADC8 File Offset: 0x00088FC8
        private static uint?smethod_7(Class177 district, Class464 cog, uint cogsRemaining)
        {
            uint?num;

            if (Struct40.dictionary_1.ContainsKey(district))
            {
                if (Struct40.dictionary_1[district].ContainsKey(cogsRemaining))
                {
                    num = new uint?(Struct40.dictionary_1[district][cogsRemaining]);
                    uint?num2 = Struct40.smethod_8(district, cog, cogsRemaining);
                    if (num2 != null)
                    {
                        num -= num2.Value;
                    }
                }
                else if (!Struct40.smethod_9(Struct40.dictionary_1[district], cogsRemaining, out num))
                {
                    num = null;
                }
            }
            else
            {
                num = null;
            }
            return(num);
        }
Exemplo n.º 3
0
 // Token: 0x06001DEF RID: 7663 RVA: 0x0000B583 File Offset: 0x00009783
 public Struct26(Enum97 msgType, Class464 cog, uint cogsRemaining, bool skelecog)
 {
     this.enum97_0   = msgType;
     this.class464_0 = cog;
     this.uint_0     = cogsRemaining;
     this.bool_0     = skelecog;
     this.dateTime_0 = DateTime.Now;
 }
Exemplo n.º 4
0
        // Token: 0x060026C4 RID: 9924 RVA: 0x0008ACA8 File Offset: 0x00088EA8
        private static uint smethod_5(Class177 district, uint cogsRemaining, Class464 cog)
        {
            uint        num  = 0U;
            List <uint> list = Struct40.dictionary_2[district][cog][cogsRemaining];

            foreach (uint num2 in list)
            {
                num += num2;
            }
            num /= (uint)list.Count;
            return(num);
        }
Exemplo n.º 5
0
    private static bool smethod_6(Class581 A_0, Paragraph A_1)
    {
        int      num    = 0;
        bool     flag   = false;
        Class394 class2 = A_0.imethod_1();

        if (A_0.vmethod_1() && !smethod_5(A_0))
        {
            Class9 class3 = Class402.smethod_0(A_0, MarkupLevel.Inline);
            A_0.method_3(class3);
            while (class2.method_9(class3.method_22()))
            {
                flag = smethod_6(A_0, A_1);
            }
            A_0.method_5(DocumentObjectType.CustomXml);
            return(flag);
        }
        string str = class2.method_1();

        if (str != null)
        {
            if (str == BookmarkStart.b("嘥砧堩", num))
            {
                return(Class924.smethod_0(A_0, A_1.Format, A_1.BreakCharacterFormat));
            }
            if (str != BookmarkStart.b("䨥䄧天堫縭䈯", num))
            {
                if ((str == BookmarkStart.b("嘥䴧堩䄫紭䐯匱䘳䈵", num)) || (str == BookmarkStart.b("嘥䴧堩䄫欭帯嘱", num)))
                {
                    Class464.smethod_1(A_0);
                    return(flag);
                }
                if (str == BookmarkStart.b("䜥䘧䐩䌫娭儯䘱崳夵嘷", num))
                {
                    Class519.smethod_1(A_0, A_1);
                    return(flag);
                }
            }
            else
            {
                Class924.smethod_7(A_0, A_1.Format);
                return(flag);
            }
        }
        Class464.smethod_1(A_0);
        return(flag);
    }
Exemplo n.º 6
0
 // Token: 0x060026CD RID: 9933 RVA: 0x0008B65C File Offset: 0x0008985C
 private Struct40(Class464 cog, uint cogsRemaining, bool skelecog, DateTime startTime, uint?estimatedDuration)
 {
     if (cog == null)
     {
         throw new ArgumentNullException("cog");
     }
     this.class464_0 = cog;
     this.uint_0     = cogsRemaining;
     this.bool_0     = skelecog;
     this.dateTime_0 = startTime;
     this.nullable_1 = estimatedDuration;
     if (estimatedDuration != null)
     {
         this.nullable_0 = new DateTime?(startTime + new TimeSpan(0, 0, (int)estimatedDuration.Value));
         return;
     }
     this.nullable_0 = null;
 }
Exemplo n.º 7
0
 // Token: 0x060026C0 RID: 9920 RVA: 0x0008A9F4 File Offset: 0x00088BF4
 public static void smethod_1(Class177 district, Class464 cog, uint cogsRemaining, bool skelecog, DateTime startTime, out uint?estimatedDuration, out DateTime actualStartTime)
 {
     lock (Struct40.object_0)
     {
         if (Struct40.dictionary_3.ContainsKey(district))
         {
             if (Struct40.dictionary_3[district].class464_0 == cog)
             {
                 actualStartTime   = Struct40.dictionary_3[district].dateTime_0;
                 estimatedDuration = Struct40.dictionary_3[district].nullable_1;
                 return;
             }
             Struct40.smethod_0(district, Struct40.dictionary_3[district], null);
         }
         Struct40 value = new Struct40(cog, cogsRemaining, skelecog, startTime.ToUniversalTime(), estimatedDuration = Struct40.smethod_7(district, cog, cogsRemaining));
         actualStartTime = value.dateTime_0;
         Struct40.dictionary_3.Add(district, value);
     }
 }
Exemplo n.º 8
0
    internal static void smethod_0(Class581 A_0)
    {
        Class394 class2 = A_0.imethod_1();

        A_0.Interface50.imethod_0();
        Field field = smethod_1(class2.method_12(BookmarkStart.b("嬱娳䔵䰷䠹", 12), ""), A_0.Interface50.imethod_0());

        field.ParseFieldCode(field.Code);
        FieldType type = field.Type;

        A_0.method_9(field);
        class2.method_54().Push(field);
        if (!(field is MergeField))
        {
            FieldMark mark = new FieldMark(A_0.Interface50.imethod_0(), FieldMarkType.FieldSeparator);
            field.Separator = mark;
            A_0.method_9(mark);
        }
        Class464.smethod_0(A_0);
        if (!(field is MergeField))
        {
            ParagraphBase lastChild = A_0.method_13().LastChild as ParagraphBase;
            if ((lastChild != null) && !lastChild.CharacterFormat.HasDeleteRevision)
            {
                CharacterFormat format1 = (CharacterFormat)lastChild.CharacterFormat.Clone();
            }
            else
            {
                new CharacterFormat(A_0.Interface50.imethod_0());
            }
            FieldMark mark2 = new FieldMark(A_0.Interface50.imethod_0(), FieldMarkType.FieldEnd);
            A_0.method_9(mark2);
            field.End = mark2;
        }
        if ((class2.method_54().Count > 0) && (class2.method_54().Peek() == field))
        {
            class2.method_54().Pop();
        }
    }
Exemplo n.º 9
0
    internal static void smethod_0(Class581 A_0)
    {
        int      num    = 0x10;
        string   str    = "";
        string   str2   = "";
        Class394 class2 = A_0.imethod_1();

        while (class2.method_19())
        {
            string str3 = class2.method_1();
            if (str3 != null)
            {
                if (str3 != BookmarkStart.b("刵崷䤹䠻", num))
                {
                    if (str3 != BookmarkStart.b("吵圷唹圻匽ℿぁ⽃", num))
                    {
                        if (!(str3 == BookmarkStart.b("䈵夷䠹嬻嬽㐿", num)))
                        {
                            if (str3 == BookmarkStart.b("䔵嬷䠹夻嬽⸿ᙁⵃ㙅", num))
                            {
                                class2.method_3();
                            }
                        }
                        else
                        {
                            class2.method_3();
                        }
                    }
                    else
                    {
                        str2 = class2.method_3();
                    }
                }
                else
                {
                    str = class2.method_3();
                }
            }
        }
        DocumentObject lastChild = A_0.method_13().LastChild;
        Field          field     = new Field(A_0.Interface50.imethod_0())
        {
            Type = FieldType.FieldHyperlink
        };
        Hyperlink hyperlink = new Hyperlink(field)
        {
            Type         = HyperlinkType.Bookmark,
            BookmarkName = str2
        };

        if (!string.IsNullOrEmpty(str))
        {
            field.m_fieldValue = BookmarkStart.b("ᐵ", num) + str.Replace(BookmarkStart.b("樵", num), BookmarkStart.b("樵搷", num)) + BookmarkStart.b("ᐵ", num);
            field.Code         = BookmarkStart.b("縵愷樹礻氽ిୁ੃൅桇", num) + field.m_fieldValue;
        }
        Class464.smethod_0(A_0);
        int index = (A_0.method_13() as Paragraph).ChildObjects.IndexOf(lastChild);

        (A_0.method_13() as Paragraph).ChildObjects.Insert(index + 1, field);
        index = (A_0.method_13() as Paragraph).ChildObjects.IndexOf(field);
        FieldMark entity = new FieldMark(A_0.Interface50.imethod_0(), FieldMarkType.FieldSeparator);

        (A_0.method_13() as Paragraph).ChildObjects.Insert(index + 1, entity);
        field.Separator = entity;
        FieldMark mark2 = new FieldMark(A_0.Interface50.imethod_0(), FieldMarkType.FieldEnd);

        A_0.method_11(A_0.method_13(), mark2, A_0.method_13().LastChild);
        field.End = mark2;
    }
 public abstract void Visit(Class464 c);
 public override void Visit(Class464 c) { }
Exemplo n.º 12
0
        // Token: 0x060026C3 RID: 9923 RVA: 0x0008AB9C File Offset: 0x00088D9C
        private static void smethod_4(Class177 district, uint cogsRemaining, Class464 cog, out List <uint> timesCollection, out Dictionary <uint, uint> invasionTime, out Dictionary <uint, uint> invasionTimes)
        {
            Dictionary <Class464, Dictionary <uint, uint> > dictionary;

            if (Struct40.dictionary_0.ContainsKey(district))
            {
                dictionary = Struct40.dictionary_0[district];
            }
            else
            {
                Struct40.dictionary_0.Add(district, dictionary = new Dictionary <Class464, Dictionary <uint, uint> >());
            }
            if (dictionary.ContainsKey(cog))
            {
                invasionTime = dictionary[cog];
            }
            else
            {
                Dictionary <Class464, Dictionary <uint, uint> > dictionary2 = dictionary;
                Dictionary <uint, uint> value;
                invasionTime = (value = new Dictionary <uint, uint>());
                dictionary2.Add(cog, value);
            }
            if (Struct40.dictionary_1.ContainsKey(district))
            {
                invasionTimes = Struct40.dictionary_1[district];
            }
            else
            {
                Dictionary <Class177, Dictionary <uint, uint> > dictionary3 = Struct40.dictionary_1;
                Dictionary <uint, uint> value2;
                invasionTimes = (value2 = new Dictionary <uint, uint>());
                dictionary3.Add(district, value2);
            }
            Dictionary <Class464, Dictionary <uint, List <uint> > > dictionary4;

            if (Struct40.dictionary_2.ContainsKey(district))
            {
                dictionary4 = Struct40.dictionary_2[district];
            }
            else
            {
                Struct40.dictionary_2.Add(district, dictionary4 = new Dictionary <Class464, Dictionary <uint, List <uint> > >());
            }
            Dictionary <uint, List <uint> > dictionary5;

            if (dictionary4.ContainsKey(cog))
            {
                dictionary5 = dictionary4[cog];
            }
            else
            {
                dictionary4.Add(cog, dictionary5 = new Dictionary <uint, List <uint> >());
            }
            if (dictionary5.ContainsKey(cogsRemaining))
            {
                timesCollection = dictionary5[cogsRemaining];
                return;
            }
            Dictionary <uint, List <uint> > dictionary6 = dictionary5;
            List <uint> value3;

            timesCollection = (value3 = new List <uint>());
            dictionary6.Add(cogsRemaining, value3);
        }
Exemplo n.º 13
0
 // Token: 0x060026CC RID: 9932 RVA: 0x0008B31C File Offset: 0x0008951C
 public static void smethod_13(Stream stream)
 {
     lock (Struct40.object_0)
     {
         Struct40.smethod_11();
         try
         {
             using (Stream3 stream2 = new Stream3(stream))
             {
                 using (BinaryReader binaryReader = new BinaryReader(stream2))
                 {
                     byte[] array = binaryReader.ReadBytes(Struct40.byte_0.Length);
                     if (!array.smethod_9(Struct40.byte_0))
                     {
                         throw new InvalidFileType(Struct40.byte_0, array);
                     }
                     int num = binaryReader.ReadInt32();
                     for (int i = 0; i < num; i++)
                     {
                         Class177 @class = Class177.smethod_0(binaryReader.ReadUInt32());
                         int      num2   = binaryReader.ReadInt32();
                         Dictionary <Class464, Dictionary <uint, uint> > dictionary;
                         if (Struct40.dictionary_0.ContainsKey(@class))
                         {
                             dictionary = Struct40.dictionary_0[@class];
                         }
                         else
                         {
                             Struct40.dictionary_0.Add(@class, dictionary = new Dictionary <Class464, Dictionary <uint, uint> >());
                         }
                         Dictionary <Class464, Dictionary <uint, List <uint> > > dictionary2;
                         if (Struct40.dictionary_2.ContainsKey(@class))
                         {
                             dictionary2 = Struct40.dictionary_2[@class];
                         }
                         else
                         {
                             Struct40.dictionary_2.Add(@class, dictionary2 = new Dictionary <Class464, Dictionary <uint, List <uint> > >());
                         }
                         Dictionary <uint, uint> dictionary3;
                         if (Struct40.dictionary_1.ContainsKey(@class))
                         {
                             dictionary3 = Struct40.dictionary_1[@class];
                         }
                         else
                         {
                             Struct40.dictionary_1.Add(@class, dictionary3 = new Dictionary <uint, uint>());
                         }
                         for (int j = 0; j < num2; j++)
                         {
                             Class464 key  = Class464.Cogs[binaryReader.ReadString()];
                             int      num3 = binaryReader.ReadInt32();
                             Dictionary <uint, uint> dictionary4;
                             if (dictionary.ContainsKey(key))
                             {
                                 dictionary4 = dictionary[key];
                             }
                             else
                             {
                                 dictionary.Add(key, dictionary4 = new Dictionary <uint, uint>());
                             }
                             Dictionary <uint, List <uint> > dictionary5;
                             if (dictionary2.ContainsKey(key))
                             {
                                 dictionary5 = dictionary2[key];
                             }
                             else
                             {
                                 dictionary2.Add(key, dictionary5 = new Dictionary <uint, List <uint> >());
                             }
                             for (int k = 0; k < num3; k++)
                             {
                                 uint        key2 = binaryReader.ReadUInt32();
                                 int         num4 = binaryReader.ReadInt32();
                                 List <uint> list;
                                 if (dictionary5.ContainsKey(key2))
                                 {
                                     list = dictionary5[key2];
                                 }
                                 else
                                 {
                                     dictionary5.Add(key2, list = new List <uint>());
                                 }
                                 uint num5 = 0U;
                                 for (int l = 0; l < num4; l++)
                                 {
                                     uint num6 = binaryReader.ReadUInt32();
                                     list.Add(num6);
                                     num5 += num6;
                                 }
                                 num5 /= (uint)num4;
                                 dictionary4.Add(key2, num5);
                             }
                             foreach (uint num7 in dictionary5.Keys)
                             {
                                 if (dictionary3.ContainsKey(num7))
                                 {
                                     dictionary3[num7] = Struct40.smethod_6(@class, num7);
                                 }
                                 else
                                 {
                                     dictionary3.Add(num7, Struct40.smethod_6(@class, num7));
                                 }
                             }
                         }
                     }
                 }
             }
         }
         catch
         {
             Struct40.smethod_11();
             throw;
         }
     }
 }