示例#1
0
        }                                    // DT_TIME

        public TriggerEvent(MpqFileStream stream)
        {
            I0 = stream.ReadValueS32();
            TriggerConditions = new TriggerConditions(stream);
            I1                  = stream.ReadValueS32();
            SNOHandle           = new SNOHandle(stream);
            I2                  = stream.ReadValueS32();
            I3                  = stream.ReadValueS32();
            RuneType            = stream.ReadValueS32();
            UseRuneType         = stream.ReadValueS32();
            HardPointLinks      = new HardPointLink[2];
            HardPointLinks[0]   = new HardPointLink(stream);
            HardPointLinks[1]   = new HardPointLink(stream);
            this.LookLink       = stream.ReadString(64, true);
            this.ConstraintLink = stream.ReadString(64, true);
            I4                  = stream.ReadValueS32();
            F0                  = stream.ReadValueF32();
            I5                  = stream.ReadValueS32();
            I6                  = stream.ReadValueS32();
            I7                  = stream.ReadValueS32();
            I8                  = stream.ReadValueS32();
            I9                  = stream.ReadValueS32();
            F1                  = stream.ReadValueF32();
            F2                  = stream.ReadValueF32();
            I10                 = stream.ReadValueS32();
            F3                  = stream.ReadValueF32();
            I11                 = stream.ReadValueS32();
            Velocity            = stream.ReadValueF32();
            I12                 = stream.ReadValueS32();
            Ticks1              = stream.ReadValueS32();
            Color1              = new RGBAColor(stream);
            I14                 = stream.ReadValueS32();
            Color2              = new RGBAColor(stream);
            I15                 = stream.ReadValueS32();
        }
示例#2
0
 public void Read(MpqFileStream stream)
 {
     CharArray1 = stream.ReadString(256, true);
     CharArray2 = stream.ReadString(512, true);
     I0         = stream.ReadValueS32();
     I1         = stream.ReadValueS32();
 }
示例#3
0
 public GizmoLocSpawnType(MpqFileStream stream)
 {
     stream.Position += 8;
     this.SpawnEntry  = stream.ReadSerializedData <GizmoLocSpawnEntry>();
     this.Description = stream.ReadString(80, true);
     this.Comment     = stream.ReadString(256, true);
 }
示例#4
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();
        }
示例#5
0
 public void Read(MpqFileStream stream)
 {
     this.Color = new RGBAColor[2];
     for (int i = 0; i < 2; i++)
     {
         this.Color[i] = new RGBAColor(stream);
     }
     this.String1 = stream.ReadString(64, true);
     this.I0      = stream.ReadValueS32();
     this.S0      = stream.ReadString(64, true);
 }
示例#6
0
 public void Read(MpqFileStream stream)
 {
     ConditionType = (QuestStepFailureConditionType)stream.ReadValueS32();
     I2            = stream.ReadValueS32();
     I3            = stream.ReadValueS32();
     SNOName1      = new SNOHandle(stream);
     SNOName2      = new SNOHandle(stream);
     GBID1         = stream.ReadValueS32();
     GBID2         = stream.ReadValueS32();
     Unknown1      = stream.ReadString(256, true);
     Unknown2      = stream.ReadString(256, true);
 }
示例#7
0
 public void Read(MpqFileStream stream)
 {
     this.I0                    = stream.ReadValueS32();
     this.AnimName              = stream.ReadString(65, true);
     stream.Position           += 3;
     this.Velocity              = stream.ReadValueF32();
     this.F0                    = stream.ReadValueF32();
     this.F1                    = stream.ReadValueF32();
     this.F2                    = stream.ReadValueF32();
     this.F3                    = stream.ReadValueF32();
     this.Time1                 = stream.ReadValueS32();
     this.Time2                 = stream.ReadValueS32();
     this.I1                    = stream.ReadValueS32();
     this.F4                    = stream.ReadValueF32();
     this.F5                    = stream.ReadValueF32();
     this.F6                    = stream.ReadValueF32();
     this.F7                    = stream.ReadValueF32();
     this.BoneNameCount         = stream.ReadValueS32();
     this.BoneNames             = stream.ReadSerializedData <BoneName>();
     stream.Position           += 12;
     this.KeyframePosCount      = stream.ReadValueS32();
     this.TranslationCurves     = stream.ReadSerializedData <TranslationCurve>();
     stream.Position           += 12;
     this.RotationCurves        = stream.ReadSerializedData <RotationCurve>();
     stream.Position           += 8;
     this.ScaleCurves           = stream.ReadSerializedData <ScaleCurve>();
     stream.Position           += 8;
     this.F8                    = stream.ReadValueF32();
     this.F9                    = stream.ReadValueF32();
     this.F10                   = stream.ReadValueF32();
     this.F11                   = stream.ReadValueF32();
     this.V0                    = new Vector3D(stream);
     this.V1                    = new Vector3D(stream);
     this.V2                    = new Vector3D(stream);
     this.V3                    = new Vector3D(stream);
     this.F12                   = stream.ReadValueF32();
     this.KeyedAttachments      = stream.ReadSerializedData <KeyframedAttachment>();
     this.KeyedAttachmentsCount = stream.ReadValueS32();
     stream.Position           += 8;
     this.KeyframePosList       = stream.ReadSerializedData <Vector3D>();
     stream.Position           += 8;
     this.NonlinearOffset       = stream.ReadSerializedData <Vector3D>();
     stream.Position           += 8;
     this.Velocity3D            = new VelocityVector3D(stream);
     this.Link                  = new HardPointLink(stream);
     this.S0                    = stream.ReadString(256, true);
     this.S1                    = stream.ReadString(256, true);
     stream.Position           += 8;
 }
示例#8
0
            public NavMeshDef(MpqFileStream stream)
            {
                this.SquaresCountX      = stream.ReadValueS32();
                this.SquaresCountY      = stream.ReadValueS32();
                this.Int0               = stream.ReadValueS32();
                this.NavMeshSquareCount = stream.ReadValueS32();
                this.Float0             = stream.ReadValueF32();
                this.Squares            = stream.ReadSerializedData <NavMeshSquare>();

                if (SquaresCountX < 64 && SquaresCountY < 64)
                {
                    WalkGrid = new byte[64, 64];
                }
                else if (SquaresCountX < 128 && SquaresCountY < 128)
                {
                    WalkGrid = new byte[128, 128]; //96*96
                }
                else if (SquaresCountX > 128 || SquaresCountY > 128)
                {
                    WalkGrid = new byte[256, 256];
                }


                // Loop thru each NavmeshSquare in the array, and fills the grid
                for (int i = 0; i < NavMeshSquareCount; i++)
                {
                    WalkGrid[i % SquaresCountY, i / SquaresCountY] = (byte)(Squares[i].Flags & Scene.NavCellFlags.AllowWalk);
                    // Set the grid to 0x1 if its walkable, left as 0 if not. - DarkLotus
                }

                stream.Position += (3 * 4);
                this.Filename    = stream.ReadString(256, true);
            }
示例#9
0
 public void Read(MpqFileStream stream)
 {
     I0             = stream.ReadValueS32();
     ObjectiveType  = (QuestStepObjectiveType)stream.ReadValueS32();
     I2             = stream.ReadValueS32();
     CounterTarget  = stream.ReadValueS32();
     SNOName1       = new SNOHandle(stream);
     SNOName2       = new SNOHandle(stream);
     GBID1          = stream.ReadValueS32();
     GBID2          = stream.ReadValueS32();
     Group1Name     = stream.ReadString(256, true);
     Unknown2       = stream.ReadString(256, true);
     I4             = stream.ReadValueS32();
     I5             = stream.ReadValueS32();
     GBIDItemToShow = stream.ReadValueS32();
 }
示例#10
0
文件: World.cs 项目: martin26/NullD
 public void Read(MpqFileStream stream)
 {
     this.Name        = stream.ReadString(128, true);
     CommandType      = stream.ReadValueS32();
     this.TagMap      = stream.ReadSerializedItem <TagMap>();
     stream.Position += (3 * 4);
 }
示例#11
0
 public void Read(MpqFileStream stream)
 {
     this.I0 = stream.ReadValueS32();
     // Maybe this should stay a Char Array instead of a string. - DarkLotus
     this.Name = stream.ReadString(64, true);
     this.TriggeredEvent.Read(stream);
 }
示例#12
0
 public void Read(MpqFileStream stream)
 {
     this.I0 = stream.ReadValueS32();
     this.I1 = stream.ReadValueS32();
     this.I2 = stream.ReadValueS32();
     this.I3 = stream.ReadValueS32();
     this.S0 = stream.ReadString(128, true);
 }
示例#13
0
 public void Read(MpqFileStream stream)
 {
     this.SNOBannerShape = stream.ReadValueS32();
     this.SNOBannerBase  = stream.ReadValueS32();
     this.SNOBannerPole  = stream.ReadValueS32();
     this.I3             = stream.ReadValueS32();
     this.S0             = stream.ReadString(128, true);
 }
示例#14
0
 public void Read(MpqFileStream stream)
 {
     SNOConv          = stream.ReadValueS32();
     I0               = stream.ReadValueS32();
     I1               = stream.ReadValueS32();
     I2               = stream.ReadValueS32();
     GbidItem         = stream.ReadValueS32();
     Noname1          = stream.ReadString(128, true);
     Noname2          = stream.ReadString(128, true);
     SNOQuestCurrent  = stream.ReadValueS32();
     I3               = stream.ReadValueS32();
     SNOQuestAssigned = stream.ReadValueS32();
     SNOQuestActive   = stream.ReadValueS32();
     SNOQuestComplete = stream.ReadValueS32();
     SNOQuestRange    = stream.ReadValueS32();
     SNOLevelArea     = stream.ReadValueS32();
 }
示例#15
0
文件: World.cs 项目: martin26/NullD
 public void Read(MpqFileStream stream)
 {
     this.Name        = stream.ReadString(128, true);
     LabelCondition   = new LabelCondition(stream);
     Int0             = stream.ReadValueS32();
     LabelCount       = stream.ReadValueS32();
     stream.Position += (2 * 4);
     this.Entries     = stream.ReadSerializedData <LabelEntry>();
 }
示例#16
0
文件: World.cs 项目: martin26/NullD
        public void Read(MpqFileStream stream)
        {
            this.Name           = stream.ReadString(128, true);
            this.ClusterId      = stream.ReadValueS32();
            this.GroupCount     = stream.ReadValueS32();
            stream.Position    += (2 * 4);
            this.SubSceneGroups = stream.ReadSerializedData <SubSceneGroup>();

            this.Default = new SubSceneGroup(stream);
        }
示例#17
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 += (2 * 4);
            SerializableDataPointer compiledScriptPointer = stream.GetSerializedDataPointer();

            stream.Position      += 44; // these bytes are unaccounted for in the xml
            this.SNOBossEncounter = stream.ReadValueS32();

            // reading compiled script, placed it here so i dont have to move the offset around
            CompiledScript  = new byte[compiledScriptPointer.Size];
            stream.Position = compiledScriptPointer.Offset + 16;
            stream.Read(CompiledScript, 0, compiledScriptPointer.Size);

            stream.Close();
        }
示例#18
0
 public void Read(MpqFileStream stream)
 {
     this.Name             = stream.ReadString(128, true);
     this.Type             = (MarkerType)stream.ReadValueS32();
     this.PRTransform      = new PRTransform(stream);
     this.SNOHandle        = new SNOHandle(stream);
     this.TagMap           = stream.ReadSerializedItem <TagMap>();
     stream.Position      += 8;
     this.MarkerLinksCount = stream.ReadValueS32();
     this.MarkerLinks      = stream.ReadSerializedData <MarkerLink>();
     stream.Position      += (3 * 4);
 }
示例#19
0
 public void Read(MpqFileStream stream)
 {
     this.Description = stream.ReadString(64, true);
     this.I0          = stream.ReadValueS32();
     this.I1          = new int[4];
     for (int i = 0; i < 4; i++)
     {
         this.I1[i] = stream.ReadValueS32();
     }
     this.SpawnGroupsCount = stream.ReadValueS32();
     stream.Position      += 8;
     this.SpawnGroup       = stream.ReadSerializedData <LevelAreaSpawnGroup>();
 }
示例#20
0
        public void Read(MpqFileStream stream)
        {
            Name = stream.ReadString(64, true);
            ID   = stream.ReadValueS32();
            I1   = stream.ReadValueS32();

            for (int i = 0; i < I2.Length; i++)
            {
                I2[i] = stream.ReadValueS32();
            }

            Enum1 = (Enum1)stream.ReadValueS32();

            for (int i = 0; i < SNORewardRecipe.Length; i++)
            {
                SNORewardRecipe[i] = stream.ReadValueS32();
            }

            SNORewardTreasureClass = stream.ReadValueS32();
            I3    = stream.ReadValueS32();
            I4    = stream.ReadValueS32();
            Enum2 = (Enum1)stream.ReadValueS32();

            for (int i = 0; i < SNOReplayRewardRecipe.Length; i++)
            {
                SNOReplayRewardRecipe[i] = stream.ReadValueS32();
            }

            SNOReplayRewardTreasureClass = stream.ReadValueS32();
            I5 = stream.ReadValueS32();
            I6 = stream.ReadValueS32();
            SNOPowerGranted = stream.ReadValueS32();

            for (int i = 0; i < SNOWaypointLevelAreas.Length; i++)
            {
                SNOWaypointLevelAreas[i] = stream.ReadValueS32();
            }

            stream.Position += 4;      // unnacounted for in the xml

            stream.Position  += 8;
            StepObjectiveSets = stream.ReadSerializedData <QuestStepObjectiveSet>();

            stream.Position       += 8;
            StepBonusObjectiveSets = stream.ReadSerializedData <QuestStepBonusObjectiveSet>();

            stream.Position         += 8;
            StepFailureConditionSets = stream.ReadSerializedData <QuestStepFailureConditionSet>();
        }
示例#21
0
        public void Read(MpqFileStream stream)
        {
            this.Name        = stream.ReadString(128, true);
            this.Type        = (MarkerType)stream.ReadValueS32();
            this.PRTransform = new PRTransform(stream);
            this.SNOHandle   = new SNOHandle(stream);

            this.TagMap = stream.ReadSerializedItem <TagMap>();

            // Un sure about these 3 ints, 010template isnt the same as snodata.xml - DarkLotus
            // IntTagMap && Int2 are always 0 for beta. leave it here only because xml does not match either -farmy
            this.IntTagMap = stream.ReadValueS32();
            Int1           = stream.ReadValueS32();
            var int2 = stream.ReadValueS32();

            this.MarkerLinks = stream.ReadSerializedData <MarkerLink>();
            stream.Position += (3 * 4);
        }
示例#22
0
        /// <summary>
        /// Reads a serialized string.
        /// </summary>
        /// <param name="stream">The MPQFileStream to read from.</param>
        /// <returns>Read string.</returns>
        public static string ReadSerializedString(this MpqFileStream stream)
        {
            int offset = stream.ReadValueS32(); // ofset for serialized data.
            int size   = stream.ReadValueS32(); // size of serialized data.

            var @string = string.Empty;

            if (size <= 0)
            {
                return(@string);
            }

            var oldPos = stream.Position;

            stream.Position = offset + 16; // offset is relative to actual sno data start, so add that 16 bytes file header to get actual position. /raist

            @string         = stream.ReadString((uint)size, true);
            stream.Position = oldPos;

            return(@string);
        }
示例#23
0
 public void Read(MpqFileStream stream)
 {
     Unknown = stream.ReadString(64, true);
     ID      = stream.ReadValueS32();
     I2      = stream.ReadValueS32();
 }
示例#24
0
文件: Actor.cs 项目: DZilli/mooege
 public WeightedLook(MpqFileStream stream)
 {
     this.LookLink = stream.ReadString(64, true);
     Int0          = stream.ReadValueS32();
 }
示例#25
0
 public void Read(MpqFileStream stream)
 {
     this.Name = stream.ReadString(64, true);
 }
示例#26
0
 public void Read(MpqFileStream stream)
 {
     this.UHash = stream.ReadValueS32();
     this.S0    = stream.ReadString(32, true);
     this.F0    = stream.ReadValueF32();
 }
示例#27
0
 public PlayerFlagSubcondition(MpqFileStream stream)
 {
     this.S0 = stream.ReadString(128, true);
 }
示例#28
0
 public void Read(MpqFileStream stream)
 {
     this.String1 = stream.ReadString(128, true);
     this.String2 = stream.ReadString(128, true);
 }
示例#29
0
 public HardPointLink(MpqFileStream stream)
 {
     this.Name = stream.ReadString(64, true);
     I0        = stream.ReadValueS32();
 }