コード例 #1
0
 public void FileRead(MpqFileStream stream, long offset)
 {
     stream.Position = offset + 0;
     Field0 = stream.ReadValueS32();
     stream.Position = offset + 4;
     Field1 = stream.ReadValueS32();
     stream.Position = offset + 16;
     serStepObjectiveSets = new SerializeData();
     serStepObjectiveSets.FileRead(stream, stream.Position);
     stream.Position = offset + 8;
     //still checking variablearrays
     StepObjectiveSets = new List<QuestStepObjectiveSet>();
     for(int i = 0; i < (int)(serStepObjectiveSets.Field1 / 24); i++)
     {
     stream.Position = serStepObjectiveSets.Field0 + 16 + (24*i) ;
         QuestStepObjectiveSet temp12_StepObjectiveSets;
         temp12_StepObjectiveSets = new QuestStepObjectiveSet();
         temp12_StepObjectiveSets.FileRead(stream, stream.Position);
         _StepObjectiveSets.Add(temp12_StepObjectiveSets);
     }
     stream.Position = offset + 32;
     serStepFailureConditionSets = new SerializeData();
     serStepFailureConditionSets.FileRead(stream, stream.Position);
     stream.Position = offset + 24;
     //still checking variablearrays
     StepFailureConditionSets = new List<QuestStepFailureConditionSet>();
     for(int i = 0; i < (int)(serStepFailureConditionSets.Field1 / 16); i++)
     {
     stream.Position = serStepFailureConditionSets.Field0 + 16 + (16*i) ;
         QuestStepFailureConditionSet temp12_StepFailureConditionSets;
         temp12_StepFailureConditionSets = new QuestStepFailureConditionSet();
         temp12_StepFailureConditionSets.FileRead(stream, stream.Position);
         _StepFailureConditionSets.Add(temp12_StepFailureConditionSets);
     }
 }
コード例 #2
0
 public void FileRead(MpqFileStream stream, long offset)
 {
     stream.Position = offset + 0;
     Name = stream.ReadString(64);
     stream.Position = offset + 64;
     ID = stream.ReadValueS32();
     stream.Position = offset + 88;
     _Field2 = stream.ReadValueS32();
     stream.Position = offset + 92;
     SNORewardRecipe = new int[5];
     for(int loop12=0; loop12 < 5; loop12++ )
     {
         int temp12_SNORewardRecipe;
         temp12_SNORewardRecipe = stream.ReadValueS32();
         _SNORewardRecipe[loop12] = temp12_SNORewardRecipe;
     }
     stream.Position = offset + 112;
     SNORewardTreasureClass = stream.ReadValueS32();
     stream.Position = offset + 72;
     Field5 = new int[4];
     for(int loop12=0; loop12 < 4; loop12++ )
     {
         int temp12_Field5;
         temp12_Field5 = stream.ReadValueS32();
         _Field5[loop12] = temp12_Field5;
     }
     stream.Position = offset + 116;
     Field6 = stream.ReadValueS32();
     stream.Position = offset + 120;
     Field7 = stream.ReadValueS32();
     stream.Position = offset + 124;
     _Field8 = stream.ReadValueS32();
     stream.Position = offset + 128;
     SNOReplayRewardRecipe = new int[5];
     for(int loop12=0; loop12 < 5; loop12++ )
     {
         int temp12_SNOReplayRewardRecipe;
         temp12_SNOReplayRewardRecipe = stream.ReadValueS32();
         _SNOReplayRewardRecipe[loop12] = temp12_SNOReplayRewardRecipe;
     }
     stream.Position = offset + 148;
     SNOReplayRewardTreasureClass = stream.ReadValueS32();
     stream.Position = offset + 152;
     Field11 = stream.ReadValueS32();
     stream.Position = offset + 156;
     Field12 = stream.ReadValueS32();
     stream.Position = offset + 184;
     serStepObjectiveSets = new SerializeData();
     serStepObjectiveSets.FileRead(stream, stream.Position);
     stream.Position = offset + 176;
     //still checking variablearrays
     StepObjectiveSets = new List<QuestStepObjectiveSet>();
     for(int i = 0; i < (int)(serStepObjectiveSets.Field1 / 24); i++)
     {
     stream.Position = serStepObjectiveSets.Field0 + 16 + (24*i) ;
         QuestStepObjectiveSet temp12_StepObjectiveSets;
         temp12_StepObjectiveSets = new QuestStepObjectiveSet();
         temp12_StepObjectiveSets.FileRead(stream, stream.Position);
         _StepObjectiveSets.Add(temp12_StepObjectiveSets);
     }
     stream.Position = offset + 200;
     serStepBonusObjectiveSets = new SerializeData();
     serStepBonusObjectiveSets.FileRead(stream, stream.Position);
     stream.Position = offset + 192;
     //still checking variablearrays
     StepBonusObjectiveSets = new List<QuestStepBonusObjectiveSet>();
     for(int i = 0; i < (int)(serStepBonusObjectiveSets.Field1 / 56); i++)
     {
     stream.Position = serStepBonusObjectiveSets.Field0 + 16 + (56*i) ;
         QuestStepBonusObjectiveSet temp12_StepBonusObjectiveSets;
         temp12_StepBonusObjectiveSets = new QuestStepBonusObjectiveSet();
         temp12_StepBonusObjectiveSets.FileRead(stream, stream.Position);
         _StepBonusObjectiveSets.Add(temp12_StepBonusObjectiveSets);
     }
     stream.Position = offset + 216;
     serStepFailureConditionSets = new SerializeData();
     serStepFailureConditionSets.FileRead(stream, stream.Position);
     stream.Position = offset + 208;
     //still checking variablearrays
     StepFailureConditionSets = new List<QuestStepFailureConditionSet>();
     for(int i = 0; i < (int)(serStepFailureConditionSets.Field1 / 16); i++)
     {
     stream.Position = serStepFailureConditionSets.Field0 + 16 + (16*i) ;
         QuestStepFailureConditionSet temp12_StepFailureConditionSets;
         temp12_StepFailureConditionSets = new QuestStepFailureConditionSet();
         temp12_StepFailureConditionSets.FileRead(stream, stream.Position);
         _StepFailureConditionSets.Add(temp12_StepFailureConditionSets);
     }
     stream.Position = offset + 68;
     Field19 = stream.ReadValueS32();
     stream.Position = offset + 160;
     SNOPowerGranted = stream.ReadValueS32();
     stream.Position = offset + 164;
     SNOWaypointLevelAreas = new int[2];
     for(int loop12=0; loop12 < 2; loop12++ )
     {
         int temp12_SNOWaypointLevelAreas;
         temp12_SNOWaypointLevelAreas = stream.ReadValueS32();
         _SNOWaypointLevelAreas[loop12] = temp12_SNOWaypointLevelAreas;
     }
 }