Exemplo n.º 1
0
        public Globals(MpqFile file)
        {
            var stream = file.Open();
            this.Header = new Header(stream);
            stream.Position += 8;
            this.ServerData = stream.ReadSerializedData<GlobalServerData>();

            stream.Position += 4;
            this.I0 = stream.ReadValueS32(); //32
            stream.Position += 12;
            this.StartLocationNames = new Dictionary<int, FileFormats.StartLocationName>();
            foreach (var startLocation in stream.ReadSerializedData<StartLocationName>())
                StartLocationNames.Add(startLocation.I0, startLocation);

            this.F0 = stream.ReadValueF32(); //56
            this.F1 = stream.ReadValueF32(); //60
            this.F2 = stream.ReadValueF32(); //64
            this.F3 = stream.ReadValueF32(); //68

            Colors = new RGBAColor[400]; //72
            for (int i = 0; i < 400; i++)
                Colors[i] = new RGBAColor(stream);

            this.I1 = stream.ReadValueS32(); //1672
            this.F4 = stream.ReadValueF32(); //1676
            this.I2 = stream.ReadValueS32(); //1680
            this.F5 = stream.ReadValueF32(); //1684
            this.F6 = stream.ReadValueF32(); //1688
            this.I3 = stream.ReadValueS32(); //1692
            this.I4 = stream.ReadValueS32(); //1696
            this.F7 = stream.ReadValueF32(); //1700
            this.F8 = stream.ReadValueF32(); //1704
            this.F9 = stream.ReadValueF32(); //1708
            this.I5 = stream.ReadValueS32(); //1712
            this.I6 = new int[4]; //1716
            for (int i = 0; i < 4; i++)
                this.I6[i] = stream.ReadValueS32();
            stream.Position += 4;
            this.BannerParams = new BannerParams(stream); //1736
            this.I7 = stream.ReadValueS32(); //1968
            this.I8 = stream.ReadValueS32(); //1972
            this.I9 = stream.ReadValueS32(); //1976
            this.I10 = stream.ReadValueS32(); //1980
            this.F10 = stream.ReadValueF32(); //1984
            this.F11 = stream.ReadValueF32(); //1988
            this.F12 = stream.ReadValueF32(); //1992
            this.F13 = stream.ReadValueF32(); //1996
            this.F14 = stream.ReadValueF32(); //2000
            this.F15 = stream.ReadValueF32(); //2004
            this.F16 = stream.ReadValueF32(); //2008
            this.F17 = stream.ReadValueF32(); //2012
            stream.Close();
        }
Exemplo n.º 2
0
 public override void Parse(GameBitBuffer buffer)
 {
     Field0 = buffer.ReadInt(32);
     Field1 = buffer.ReadInt(32);
     Field2 = buffer.ReadInt(32);
     Field3 = new Vector3D();
     Field3.Parse(buffer);
     Field4 = new Vector3D();
     Field4.Parse(buffer);
     Field5 = buffer.ReadFloat32();
     Field6 = buffer.ReadFloat32();
     Field7 = buffer.ReadInt(32);
     Field8 = new RGBAColor();
     Field8.Parse(buffer);
     Field9 = buffer.ReadCharArray(128);
 }
Exemplo n.º 3
0
 public Globals(MpqFile file)
 {
     var stream = file.Open();
     this.Header = new Header(stream);
     this.TuningParams = new DifficultyTuningParams[4];
     for (int i = 0; i < 4; i++)
         this.TuningParams[i] = new DifficultyTuningParams(stream);
     this.F0 = stream.ReadValueF32(); //124
     this.F1 = stream.ReadValueF32(); //128
     this.F2 = stream.ReadValueF32(); //132
     this.I0 = stream.ReadValueS32(); //136
     stream.Position += 12;
     this.ActorGroup = stream.ReadSerializedData<ActorGroup>(); //144
     stream.Position += 12;
     this.I1 = stream.ReadValueS32(); //160
     this.StartLocationNames = stream.ReadSerializedData<StartLocationName>(); //168
     stream.Position += 8;
     this.ScriptGlobalVars = stream.ReadSerializedData<GlobalScriptVariable>();  //184
     this.F3 = stream.ReadValueF32(); //200
     this.F4 = stream.ReadValueF32(); //204
     this.F5 = stream.ReadValueF32(); //208
     this.F6 = stream.ReadValueF32(); //212
     this.F7 = stream.ReadValueF32(); //216
     Colors = new RGBAColor[400]; //220
     for (int i = 0; i < 400; i++)
         Colors[i] = new RGBAColor(stream);
     this.I2 = stream.ReadValueS32(); //1820
     this.I3 = stream.ReadValueS32(); //1824
     this.I4 = stream.ReadValueS32(); //1828
     this.I5 = stream.ReadValueS32(); //1832
     this.F8 = stream.ReadValueF32(); //1836
     this.F9 = stream.ReadValueF32(); //1840
     this.I6 = stream.ReadValueS32(); //1844
     this.F10 = stream.ReadValueF32(); //1848
     this.F11 = stream.ReadValueF32(); //1852
     this.F12 = stream.ReadValueF32(); //1856
     this.F13 = stream.ReadValueF32(); //1860
     this.F14 = stream.ReadValueF32(); //1864
     this.F15 = stream.ReadValueF32(); //1868
     this.F16 = stream.ReadValueF32(); //1872
     this.I7 = stream.ReadValueS32(); //1876
     this.I8 = stream.ReadValueS32(); //1880
     this.F17 = stream.ReadValueF32(); //1884
     this.F18 = stream.ReadValueF32(); //1888
     this.F19 = stream.ReadValueF32(); //1892
     this.F20 = stream.ReadValueF32(); //1896
     this.F21 = stream.ReadValueF32(); //1900
     this.I9 = stream.ReadValueS32(); //1904
     this.I10 = new int[4]; //1908
     for (int i = 0; i < 4; i++)
         this.I10[i] = stream.ReadValueS32();
     stream.Position += 4;
     this.BannerParams = new BannerParams(stream); //1928
     this.I11 = stream.ReadValueS32(); //2120
     this.I12 = stream.ReadValueS32(); //2124
     this.I13 = stream.ReadValueS32(); //2128
     this.I14 = stream.ReadValueS32(); //2132
     this.I15 = stream.ReadValueS32(); //2136
     this.F22 = stream.ReadValueF32(); //2140
     this.F23 = stream.ReadValueF32(); //2144
     this.F24 = stream.ReadValueF32(); //2148
     this.F25 = stream.ReadValueF32(); //2152
     this.F26 = stream.ReadValueF32(); //2156
     stream.Close();
 }
Exemplo n.º 4
0
        public int I15 { get; private set; } // DT_TIME

        public TriggerEvent(MpqFileStream stream)
        {
            I0 = stream.ReadValueS32();
            TriggerConditions = new TriggerConditions(stream);
            I1 = stream.ReadValueS32();
            SnoName = new SNOName(stream);
            I2 = stream.ReadValueS32();
            I3 = stream.ReadValueS32();
            RuneType = stream.ReadValueS32();
            UseRuneType = stream.ReadValueS32();
            HardPointLinks = new HardPointLink[2];
            HardPointLinks[0] = new HardPointLink(stream);
            HardPointLinks[1] = new HardPointLink(stream);
            this.LookLink = stream.ReadString(64, true);
            this.ConstraintLink = stream.ReadString(64, true);
            I4 = stream.ReadValueS32();
            F0 = stream.ReadValueF32();
            I5 = stream.ReadValueS32();
            I6 = stream.ReadValueS32();
            I7 = stream.ReadValueS32();
            I8 = stream.ReadValueS32();
            I9 = stream.ReadValueS32();
            F1 = stream.ReadValueF32();
            F2 = stream.ReadValueF32();
            I10 = stream.ReadValueS32();
            F3 = stream.ReadValueF32();
            I11 = stream.ReadValueS32();
            Velocity = stream.ReadValueF32();
            I12 = stream.ReadValueS32();
            Ticks1 = stream.ReadValueS32();
            Color1 = new RGBAColor(stream);
            I14 = stream.ReadValueS32();
            Color2 = new RGBAColor(stream);
            I15 = stream.ReadValueS32();
        }
Exemplo n.º 5
0
        public Globals(MpqFile file)
        {
            var stream = file.Open();
            this.Header = new Header(stream);
            this.TuningParams = new DifficultyTuningParams[4];
            for (int i = 0; i < 4; i++)
                this.TuningParams[i] = new DifficultyTuningParams(stream);
            this.F0 = stream.ReadValueF32(); //140
            this.F1 = stream.ReadValueF32(); //144
            this.F2 = stream.ReadValueF32(); //148
            this.I0 = stream.ReadValueS32(); //152
            stream.Position += 12;

            this.ActorGroup = new Dictionary<int, FileFormats.ActorGroup>();
            foreach(var group in stream.ReadSerializedData<ActorGroup>()) //166
                this.ActorGroup.Add(group.UHash, group);
           

            this.I1 = stream.ReadValueS32(); //176
            stream.Position += 12;

            this.StartLocationNames = new Dictionary<int, FileFormats.StartLocationName>();
            foreach (var startLocation in stream.ReadSerializedData<StartLocationName>())  //168
                StartLocationNames.Add(startLocation.I0, startLocation);

            stream.Position += 8;
            this.ScriptGlobalVars = stream.ReadSerializedData<GlobalScriptVariable>();  //208
            this.F3 = stream.ReadValueF32(); //216
            this.F4 = stream.ReadValueF32(); //220
            this.F5 = stream.ReadValueF32(); //224
            this.F6 = stream.ReadValueF32(); //228
            this.F7 = stream.ReadValueF32(); //232
            this.F33 = stream.ReadValueF32(); //236
            this.F34 = stream.ReadValueF32(); //240
            Colors = new RGBAColor[400]; //244
            for (int i = 0; i < 400; i++)
                Colors[i] = new RGBAColor(stream);
            this.I2 = stream.ReadValueS32(); //1844
            this.I3 = stream.ReadValueS32(); //1848
            this.I4 = stream.ReadValueS32(); //1852
            this.I5 = stream.ReadValueS32(); //1856
            this.F8 = stream.ReadValueF32(); //1860
            this.F9 = stream.ReadValueF32(); //1864
            this.I6 = stream.ReadValueS32(); //1868
            this.F10 = stream.ReadValueF32(); //1872
            this.F11 = stream.ReadValueF32(); //1876
            this.F12 = stream.ReadValueF32(); //1880
            this.F13 = stream.ReadValueF32(); //1884
            this.F14 = stream.ReadValueF32(); //1888
            this.F15 = stream.ReadValueF32(); //1892
            this.F16 = stream.ReadValueF32(); //1896
            this.I7 = stream.ReadValueS32(); //1900
            this.I8 = stream.ReadValueS32(); //1904
            this.F17 = stream.ReadValueF32(); //1908
            this.F18 = stream.ReadValueF32(); //1912
            this.F19 = stream.ReadValueF32(); //1916
            this.F20 = stream.ReadValueF32(); //1920
            this.F21 = stream.ReadValueF32(); //1924
            this.I9 = stream.ReadValueS32(); //1928
            this.I10 = new int[4]; //1932
            for (int i = 0; i < 4; i++)
                this.I10[i] = stream.ReadValueS32();
            stream.Position += 4;
            this.BannerParams = new BannerParams(stream); //1952
            this.I11 = stream.ReadValueS32(); //2184
            this.I12 = stream.ReadValueS32(); //2188
            this.I13 = stream.ReadValueS32(); //2192
            this.I14 = stream.ReadValueS32(); //2196
            this.I15 = stream.ReadValueS32(); //2200
            this.F22 = stream.ReadValueF32(); //2204
            this.F23 = stream.ReadValueF32(); //2208
            this.F24 = stream.ReadValueF32(); //2212
            this.F25 = stream.ReadValueF32(); //2216
            this.F26 = stream.ReadValueF32(); //2220
            this.F27 = stream.ReadValueF32(); //2224
            this.F28 = stream.ReadValueF32(); //2228
            this.F29 = stream.ReadValueF32(); //2232
            this.F30 = stream.ReadValueF32(); //2236
            this.F31 = stream.ReadValueF32(); //2240
            this.F32 = stream.ReadValueF32(); //2244
            stream.Close();
        }