Exemplo n.º 1
0
            public static AiInfo ReadFrom(PrimitiveReader reader)
            {
                AiInfo info = new AiInfo();

                info.Unknown = reader.ReadUInt16();
                ushort stringsCount = reader.ReadUInt16();

                System.Diagnostics.Debugger.Break();
                info.Unknown2 = reader.ReadUInt32();
                List <string> resources = new List <string>(stringsCount);

                for (int i = 0; i < stringsCount; i++)
                {
                    resources.Add(Utils.ReadUInt32LengthPrefixedString(reader));
                }
                info.Resources = resources;
                info.Unknown3  = reader.ReadBytes(6);
                AiData[] data = new AiData[8];
                for (int i = 0; i < data.Length; i++)
                {
                    data[i] = AiData.ReadFrom(reader);
                }
                info.Data = data;

                info.Unknown4 = reader.ReadBytes(104);
                AiTimer[] timers = new AiTimer[8];
                for (int i = 0; i < timers.Length; i++)
                {
                    timers[i] = AiTimer.ReadFrom(reader);
                }
                info.Timers      = timers;
                info.SharedGoals = reader.ReadUInt32Array(256);
                info.Unknown5    = reader.ReadUInt32Array(1024);
                return(info);
            }
Exemplo n.º 2
0
            public static AiTimer ReadFrom(PrimitiveReader reader)
            {
                AiTimer timer = new AiTimer();

                timer.Timers = reader.ReadUInt32Array(10);
                return(timer);
            }