public override void Parse(GameBitBuffer buffer) { Field0 = buffer.ReadInt(32); SNOAppearance = buffer.ReadInt(32); SNOPhysMesh = buffer.ReadInt(32); AABBBounds = new AABB(); AABBBounds.Parse(buffer); AABBMarkerSetBounds = new AABB(); AABBMarkerSetBounds.Parse(buffer); Field5 = new NavMeshDef(); Field5.Parse(buffer); serExclusions = new SerializeData(); serExclusions.Parse(buffer); //still checking variablearrays this.Exclusions = new List<int>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _Exclusions.Count; loop12++) { _Exclusions[loop12] = buffer.ReadInt(0); } serInclusions = new SerializeData(); serInclusions.Parse(buffer); //still checking variablearrays this.Inclusions = new List<int>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _Inclusions.Count; loop12++) { _Inclusions[loop12] = buffer.ReadInt(0); } serMarkerSets = new SerializeData(); serMarkerSets.Parse(buffer); //still checking variablearrays this.MarkerSets = new List<int>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _MarkerSets.Count; loop12++) { _MarkerSets[loop12] = buffer.ReadInt(0); } Field12 = new LookLink(); Field12.Parse(buffer); Field13 = buffer.ReadInt(32); serMsgTriggeredEvents = new SerializeData(); serMsgTriggeredEvents.Parse(buffer); //still checking variablearrays this.MsgTriggeredEvents = new List<MsgTriggeredEvent>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _MsgTriggeredEvents.Count; loop12++) { _MsgTriggeredEvents[loop12] = new MsgTriggeredEvent(); _MsgTriggeredEvents[loop12].Parse(buffer); } tNavZoneDef = new NavZoneDefinition(); tNavZoneDef.Parse(buffer); }
public void FileRead(MpqFileStream stream, long offset) { stream.Position = offset + 12; Field0 = stream.ReadValueS32(); stream.Position = offset + 776; SNOAppearance = stream.ReadValueS32(); stream.Position = offset + 780; SNOPhysMesh = stream.ReadValueS32(); stream.Position = offset + 16; AABBBounds = new AABB(); AABBBounds.FileRead(stream, stream.Position); stream.Position = offset + 40; AABBMarkerSetBounds = new AABB(); AABBMarkerSetBounds.FileRead(stream, stream.Position); stream.Position = offset + 64; Field5 = new NavMeshDef(); Field5.FileRead(stream, stream.Position); stream.Position = offset + 360; serExclusions = new SerializeData(); serExclusions.FileRead(stream, stream.Position); stream.Position = offset + 368; //still checking variablearrays Exclusions = new List<int>(); for(int i = 0; i < (int)(serExclusions.Field1 / 4); i++) { stream.Position = serExclusions.Field0 + 16 + (4*i) ; int temp12_Exclusions; temp12_Exclusions = stream.ReadValueS32(); _Exclusions.Add(temp12_Exclusions); } stream.Position = offset + 424; serInclusions = new SerializeData(); serInclusions.FileRead(stream, stream.Position); stream.Position = offset + 432; //still checking variablearrays Inclusions = new List<int>(); for(int i = 0; i < (int)(serInclusions.Field1 / 4); i++) { stream.Position = serInclusions.Field0 + 16 + (4*i) ; int temp12_Inclusions; temp12_Inclusions = stream.ReadValueS32(); _Inclusions.Add(temp12_Inclusions); } stream.Position = offset + 488; serMarkerSets = new SerializeData(); serMarkerSets.FileRead(stream, stream.Position); stream.Position = offset + 496; //still checking variablearrays MarkerSets = new List<int>(); for(int i = 0; i < (int)(serMarkerSets.Field1 / 4); i++) { stream.Position = serMarkerSets.Field0 + 16 + (4*i) ; int temp12_MarkerSets; temp12_MarkerSets = stream.ReadValueS32(); _MarkerSets.Add(temp12_MarkerSets); } stream.Position = offset + 552; Field12 = new LookLink(); Field12.FileRead(stream, stream.Position); stream.Position = offset + 624; Field13 = stream.ReadValueS32(); stream.Position = offset + 616; serMsgTriggeredEvents = new SerializeData(); serMsgTriggeredEvents.FileRead(stream, stream.Position); stream.Position = offset + 632; //still checking variablearrays MsgTriggeredEvents = new List<MsgTriggeredEvent>(); for(int i = 0; i < (int)(serMsgTriggeredEvents.Field1 / 412); i++) { stream.Position = serMsgTriggeredEvents.Field0 + 16 + (412*i) ; MsgTriggeredEvent temp12_MsgTriggeredEvents; temp12_MsgTriggeredEvents = new MsgTriggeredEvent(); temp12_MsgTriggeredEvents.FileRead(stream, stream.Position); _MsgTriggeredEvents.Add(temp12_MsgTriggeredEvents); } stream.Position = offset + 640; tNavZoneDef = new NavZoneDefinition(); tNavZoneDef.FileRead(stream, stream.Position); }