public override void Parse(GameBitBuffer buffer) { Field0 = buffer.ReadInt(32); Field1 = buffer.ReadInt(32); Field2 = buffer.ReadInt(32); Field3 = buffer.ReadInt(32); Field4 = buffer.ReadInt(32); SnoPower = buffer.ReadInt(32); serEffects = new SerializeData(); serEffects.Parse(buffer); //still checking variablearrays this.EffectItems = new List<EffectItem>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _EffectItems.Count; loop12++) { _EffectItems[loop12] = new EffectItem(); _EffectItems[loop12].Parse(buffer); } }
public void FileRead(MpqFileStream stream, long offset) { stream.Position = offset + 12; Field0 = stream.ReadValueS32(); stream.Position = offset + 40; Field1 = stream.ReadValueS32(); stream.Position = offset + 32; Field2 = stream.ReadValueS32(); stream.Position = offset + 36; Field3 = stream.ReadValueS32(); stream.Position = offset + 24; Field4 = stream.ReadValueS32(); stream.Position = offset + 44; SnoPower = stream.ReadValueS32(); stream.Position = offset + 16; serEffects = new SerializeData(); serEffects.FileRead(stream, stream.Position); stream.Position = offset + 28; //still checking variablearrays EffectItems = new List<EffectItem>(); for(int i = 0; i < (int)(serEffects.Field1 / 480); i++) { stream.Position = serEffects.Field0 + 16 + (480*i) ; EffectItem temp12_EffectItems; temp12_EffectItems = new EffectItem(); temp12_EffectItems.FileRead(stream, stream.Position); _EffectItems.Add(temp12_EffectItems); } }