示例#1
0
        public Conversation(MpqFile file)
        {
            MpqFileStream stream = file.Open();

            this.Header           = new Header(stream);
            this.ConversationType = (ConversationTypes)stream.ReadValueS32();
            this.I0               = stream.ReadValueS32();
            this.I1               = stream.ReadValueS32();
            this.SNOQuest         = stream.ReadValueS32();
            this.I2               = stream.ReadValueS32();
            this.I3               = stream.ReadValueS32();
            this.SNOConvPiggyback = stream.ReadValueS32();
            this.SNOConvUnlock    = stream.ReadValueS32();
            this.I4               = stream.ReadValueS32();
            this.Unknown          = stream.ReadString(128, true);
            this.SNOPrimaryNpc    = stream.ReadValueS32();
            this.SNOAltNpc1       = stream.ReadValueS32();
            this.SNOAltNpc2       = stream.ReadValueS32();
            this.SNOAltNpc3       = stream.ReadValueS32();
            this.SNOAltNpc4       = stream.ReadValueS32();
            this.I5               = stream.ReadValueS32();

            stream.Position += (2 * 4);
            RootTreeNodes    = stream.ReadSerializedData <ConversationTreeNode>();

            this.Unknown2 = stream.ReadString(256, true);
            this.I6       = stream.ReadValueS32();

            stream.Position      += 12;
            CompiledScript        = Encoding.ASCII.GetString(stream.ReadSerializedByteArray());
            stream.Position      += 40;
            this.SNOBossEncounter = stream.ReadValueS32();
            stream.Close();
        }