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 override void Parse(GameBitBuffer buffer) { ConversationType = buffer.ReadInt(4); Field1 = buffer.ReadInt(32); Field2 = buffer.ReadInt(32); SNOQuest = buffer.ReadInt(32); Field4 = buffer.ReadInt(32); Field5 = buffer.ReadInt(32); SNOConvPiggyback = buffer.ReadInt(32); SNOConvUnlock = buffer.ReadInt(32); Field8 = buffer.ReadInt(32); Unknown = buffer.ReadCharArray(128); SNOPrimaryNpc = buffer.ReadInt(32); SNOAltNpc1 = buffer.ReadInt(32); SNOAltNpc2 = buffer.ReadInt(32); SNOAltNpc3 = buffer.ReadInt(32); SNOAltNpc4 = buffer.ReadInt(32); Field15 = buffer.ReadInt(32); serRootTreeNodes = new SerializeData(); serRootTreeNodes.Parse(buffer); //still checking variablearrays this.RootTreeNodes = new List<ConversationTreeNode>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _RootTreeNodes.Count; loop12++) { _RootTreeNodes[loop12] = new ConversationTreeNode(); _RootTreeNodes[loop12].Parse(buffer); } Unknown2 = buffer.ReadCharArray(256); Field19 = buffer.ReadInt(32); serCompiledScript = new SerializeData(); serCompiledScript.Parse(buffer); //still checking variablearrays this.CompiledScript = new List<byte>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _CompiledScript.Count; loop12++) { _CompiledScript[loop12] = (byte)buffer.ReadInt(0); } SNOBossEncounter = buffer.ReadInt(32); }
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); } }
public void FileRead(MpqFileStream stream, long offset) { stream.Position = offset + 12; _ConversationType = stream.ReadValueS32(); stream.Position = offset + 16; Field1 = stream.ReadValueS32(); stream.Position = offset + 20; Field2 = stream.ReadValueS32(); stream.Position = offset + 24; SNOQuest = stream.ReadValueS32(); stream.Position = offset + 28; Field4 = stream.ReadValueS32(); stream.Position = offset + 32; Field5 = stream.ReadValueS32(); stream.Position = offset + 36; SNOConvPiggyback = stream.ReadValueS32(); stream.Position = offset + 40; SNOConvUnlock = stream.ReadValueS32(); stream.Position = offset + 44; Field8 = stream.ReadValueS32(); stream.Position = offset + 48; Unknown = stream.ReadString(128); stream.Position = offset + 176; SNOPrimaryNpc = stream.ReadValueS32(); stream.Position = offset + 180; SNOAltNpc1 = stream.ReadValueS32(); stream.Position = offset + 184; SNOAltNpc2 = stream.ReadValueS32(); stream.Position = offset + 188; SNOAltNpc3 = stream.ReadValueS32(); stream.Position = offset + 192; SNOAltNpc4 = stream.ReadValueS32(); stream.Position = offset + 196; Field15 = stream.ReadValueS32(); stream.Position = offset + 208; serRootTreeNodes = new SerializeData(); serRootTreeNodes.FileRead(stream, stream.Position); stream.Position = offset + 200; //still checking variablearrays RootTreeNodes = new List<ConversationTreeNode>(); for(int i = 0; i < (int)(serRootTreeNodes.Field1 / 824); i++) { stream.Position = serRootTreeNodes.Field0 + 16 + (824*i) ; ConversationTreeNode temp12_RootTreeNodes; temp12_RootTreeNodes = new ConversationTreeNode(); temp12_RootTreeNodes.FileRead(stream, stream.Position); _RootTreeNodes.Add(temp12_RootTreeNodes); } stream.Position = offset + 216; Unknown2 = stream.ReadString(256); stream.Position = offset + 472; Field19 = stream.ReadValueS32(); stream.Position = offset + 488; serCompiledScript = new SerializeData(); serCompiledScript.FileRead(stream, stream.Position); stream.Position = offset + 480; //still checking variablearrays CompiledScript = new List<byte>(); for(int i = 0; i < (int)(serCompiledScript.Field1 / 1); i++) { stream.Position = serCompiledScript.Field0 + 16 + (1*i) ; byte temp12_CompiledScript; temp12_CompiledScript = (byte)stream.ReadByte(); _CompiledScript.Add(temp12_CompiledScript); } stream.Position = offset + 536; SNOBossEncounter = stream.ReadValueS32(); }