public override void Parse(GameBitBuffer buffer) { Field0 = buffer.ReadInt(32); Field1 = buffer.ReadInt(32); LineID = buffer.ReadInt(32); Speaker1 = buffer.ReadInt(32); Speaker2 = buffer.ReadInt(32); AnimationTag = buffer.ReadInt(32); ConvLocalDisplayTimes = new ConvLocaleDisplayTimes[18]; for(int i = 0;i < _ConvLocalDisplayTimes.Length;i++) { _ConvLocalDisplayTimes[i] = new ConvLocaleDisplayTimes(); _ConvLocalDisplayTimes[i].Parse(buffer); } serComment = new SerializeData(); serComment.Parse(buffer); throw new Exception("DT_CSTRING in network packets not implemented."); Field9 = buffer.ReadInt(4) + (-1); Field10 = buffer.ReadInt(4) + (-1); Field11 = buffer.ReadInt(32); serTrueNodes = new SerializeData(); serTrueNodes.Parse(buffer); //still checking variablearrays this.TrueNodes = new List<ConversationTreeNode>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _TrueNodes.Count; loop12++) { _TrueNodes[loop12] = new ConversationTreeNode(); _TrueNodes[loop12].Parse(buffer); } serFalseNodes = new SerializeData(); serFalseNodes.Parse(buffer); //still checking variablearrays this.FalseNodes = new List<ConversationTreeNode>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _FalseNodes.Count; loop12++) { _FalseNodes[loop12] = new ConversationTreeNode(); _FalseNodes[loop12].Parse(buffer); } serChildNodes = new SerializeData(); serChildNodes.Parse(buffer); //still checking variablearrays this.ChildNodes = new List<ConversationTreeNode>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _ChildNodes.Count; loop12++) { _ChildNodes[loop12] = new ConversationTreeNode(); _ChildNodes[loop12].Parse(buffer); } }
public void FileRead(MpqFileStream stream, long offset) { stream.Position = offset + 0; Field0 = stream.ReadValueS32(); stream.Position = offset + 4; Field1 = stream.ReadValueS32(); stream.Position = offset + 8; LineID = stream.ReadValueS32(); stream.Position = offset + 20; Speaker1 = stream.ReadValueS32(); stream.Position = offset + 24; Speaker2 = stream.ReadValueS32(); stream.Position = offset + 28; AnimationTag = stream.ReadValueS32(); stream.Position = offset + 32; ConvLocalDisplayTimes = new ConvLocaleDisplayTimes[18]; for(int loop12=0; loop12 < 18; loop12++ ) { ConvLocaleDisplayTimes temp12_ConvLocalDisplayTimes; temp12_ConvLocalDisplayTimes = new ConvLocaleDisplayTimes(); temp12_ConvLocalDisplayTimes.FileRead(stream, stream.Position); _ConvLocalDisplayTimes[loop12] = temp12_ConvLocalDisplayTimes; } stream.Position = offset + 760; serComment = new SerializeData(); serComment.FileRead(stream, stream.Position); stream.Position = offset + 752; //still checking cstrings stream.Position = serComment.Field0 + 16; Comment = stream.ReadString((uint)serComment.Field1); stream.Position = offset + 12; _Field9 = stream.ReadValueS32(); stream.Position = offset + 16; _Field10 = stream.ReadValueS32(); stream.Position = offset + 768; Field11 = stream.ReadValueS32(); stream.Position = offset + 784; serTrueNodes = new SerializeData(); serTrueNodes.FileRead(stream, stream.Position); stream.Position = offset + 776; //still checking variablearrays TrueNodes = new List<ConversationTreeNode>(); for(int i = 0; i < (int)(serTrueNodes.Field1 / 824); i++) { stream.Position = serTrueNodes.Field0 + 16 + (824*i) ; ConversationTreeNode temp12_TrueNodes; temp12_TrueNodes = new ConversationTreeNode(); temp12_TrueNodes.FileRead(stream, stream.Position); _TrueNodes.Add(temp12_TrueNodes); } stream.Position = offset + 800; serFalseNodes = new SerializeData(); serFalseNodes.FileRead(stream, stream.Position); stream.Position = offset + 792; //still checking variablearrays FalseNodes = new List<ConversationTreeNode>(); for(int i = 0; i < (int)(serFalseNodes.Field1 / 824); i++) { stream.Position = serFalseNodes.Field0 + 16 + (824*i) ; ConversationTreeNode temp12_FalseNodes; temp12_FalseNodes = new ConversationTreeNode(); temp12_FalseNodes.FileRead(stream, stream.Position); _FalseNodes.Add(temp12_FalseNodes); } stream.Position = offset + 816; serChildNodes = new SerializeData(); serChildNodes.FileRead(stream, stream.Position); stream.Position = offset + 808; //still checking variablearrays ChildNodes = new List<ConversationTreeNode>(); for(int i = 0; i < (int)(serChildNodes.Field1 / 824); i++) { stream.Position = serChildNodes.Field0 + 16 + (824*i) ; ConversationTreeNode temp12_ChildNodes; temp12_ChildNodes = new ConversationTreeNode(); temp12_ChildNodes.FileRead(stream, stream.Position); _ChildNodes.Add(temp12_ChildNodes); } }