public Quest(MpqFile file) { MpqFileStream stream = file.Open(); Header = new Header(stream); QuestType = (QuestType)stream.ReadValueS32(); NumberOfSteps = stream.ReadValueS32(); NumberOfCompletionSteps = stream.ReadValueS32(); I2 = stream.ReadValueS32(); I3 = stream.ReadValueS32(); I4 = stream.ReadValueS32(); I5 = stream.ReadValueS32(); QuestUnassignedStep = new QuestUnassignedStep(stream); stream.Position += 8; QuestSteps = stream.ReadSerializedData<QuestStep>(); stream.Position += 8; QuestCompletionSteps = stream.ReadSerializedData<QuestCompletionStep>(); LevelRange1 = new QuestLevelRange(stream); LevelRange2 = new QuestLevelRange(stream); LevelRange3 = new QuestLevelRange(stream); LevelRange4 = new QuestLevelRange(stream); stream.Close(); }
public ConversationList(MpqFile file) { MpqFileStream stream = file.Open(); this.Header = new Header(stream); stream.Position += (12); ConversationListEntries = stream.ReadSerializedData<ConversationListEntry>(); stream.Close(); }
public int BitField1 { get; private set; } // 25 bits - better this this would be an uint public Actor(MpqFile file) { var stream = file.Open(); Header = new Header(stream); this.Int0 = stream.ReadValueS32(); this.Type = (ActorType)stream.ReadValueS32(); this.ApperanceSNO = stream.ReadValueS32(); this.PhysMeshSNO = stream.ReadValueS32(); this.Cylinder = new AxialCylinder(stream); this.Sphere = new Sphere(stream); this.AABBBounds = new AABB(stream); this.TagMap = stream.ReadSerializedItem<TagMap>(); stream.Position += (2 * 4); this.AnimSetSNO = stream.ReadValueS32(); this.MonsterSNO = stream.ReadValueS32(); MsgTriggeredEvents = stream.ReadSerializedData<MsgTriggeredEvent>(); this.Int1 = stream.ReadValueS32(); stream.Position += (3 * 4); this.V0 = new Vector3D(stream.ReadValueF32(), stream.ReadValueF32(), stream.ReadValueF32()); this.Looks = new WeightedLook[8]; for (int i = 0; i < 8; i++) { this.Looks[i] = new WeightedLook(stream); } this.PhysicsSNO = stream.ReadValueS32(); this.Int2 = stream.ReadValueS32(); this.Int3 = stream.ReadValueS32(); this.Float0 = stream.ReadValueF32(); this.Float1 = stream.ReadValueF32(); this.Float2 = stream.ReadValueF32(); this.ActorCollisionData = new ActorCollisionData(stream); this.InventoryImages = new int[10]; //Was 5*8/4 - Darklotus for (int i = 0; i < 10; i++) { this.InventoryImages[i] = stream.ReadValueS32(); } this.Int4 = stream.ReadValueS32(); stream.Position += 4; BitField0 = stream.ReadValueS32(); CastingNotes = stream.ReadSerializedString(); VoiceOverRole = stream.ReadSerializedString(); // Updated based on BoyC's 010 template and Moack's work. Think we just about read all data from actor now.- DarkLotus stream.Close(); }
public Actor(MpqFile file) { var stream = file.Open(); Header = new Header(stream); this.Int0 = stream.ReadValueS32(); this.Type = (ActorType)stream.ReadValueS32(); this.ApperanceSNO = stream.ReadValueS32(); this.PhysMeshSNO = stream.ReadValueS32(); this.Cylinder = new AxialCylinder(stream); this.Sphere = new Sphere(stream); this.AABBBounds = new AABB(stream); var tagmap = stream.GetSerializedDataPointer(); // we need to read tagmap. /raist. stream.Position += (2*4); this.AnimSetSNO = stream.ReadValueS32(); this.MonsterSNO = stream.ReadValueS32(); var msgTriggeredEvents = stream.GetSerializedDataPointer(); this.Int1 = stream.ReadValueS32(); stream.Position += (3*4); this.V0 = new Vector3D(stream.ReadValueF32(), stream.ReadValueF32(), stream.ReadValueF32()); this.Looks = new WeightedLook[8]; for (int i = 0; i < 8; i++) { this.Looks[i] = new WeightedLook(stream); } this.PhysicsSNO = stream.ReadValueS32(); this.Int2 = stream.ReadValueS32(); this.Int3 = stream.ReadValueS32(); this.Float0 = stream.ReadValueF32(); this.Float1 = stream.ReadValueF32(); this.Float2 = stream.ReadValueF32(); this.ActorCollisionData = new int[17]; // Was 68/4 - Darklotus for (int i = 0; i < 17; i++) { this.ActorCollisionData[i] = stream.ReadValueS32(); } this.InventoryImages = new int[10]; //Was 5*8/4 - Darklotus for (int i = 0; i < 10; i++) { this.InventoryImages[i] = stream.ReadValueS32(); } // Updated based on BoyC's 010editoer template, looks like some data at the end still isnt parsed - Darklotus stream.Close(); }
public Lore(MpqFile file) { var stream = file.Open(); this.Header = new Header(stream); this.SNO = stream.ReadValueS32(); this.i0 = stream.ReadValueS32(); this.i1 = stream.ReadValueS32(); this.i2 = stream.ReadValueS32(); this.snoConversation = stream.ReadValueS32(); this.i3 = stream.ReadValueS32(); stream.Close(); }
public Power(MpqFile file) { var stream = file.Open(); this.Header = new Header(stream); this.chararray1 = stream.ReadString(64, true); stream.Position += 4; // pad 1 //Powerdef = new PowerDef(stream); i0 = stream.ReadValueS32(); i1 = stream.ReadValueS32(); this.chararray2 = stream.ReadString(256, true); i2 = stream.ReadValueS32(); ScriptFormulaDetails = stream.ReadSerializedItem<ScriptFormulaDetails>(); snoQuestMetaData = stream.ReadValueS32(); stream.Close(); }
public Monster(MpqFile file) { var stream = file.Open(); this.Header = new Header(stream); stream.Position = 0x20; this.ActorSNO = stream.ReadValueS32(); stream.Position = 0x28; this.type = stream.ReadValueS32(); this.Race = stream.ReadValueS32(); this.Size = stream.ReadValueS32(); stream.Position = 0x54; this.Level.Normal = stream.ReadValueS32(); this.Level.Nightmare = stream.ReadValueS32(); this.Level.Hell = stream.ReadValueS32(); this.Level.Inferno = stream.ReadValueS32(); // 145 floats follow this according to chuanhsing, not sure what they are for - DarkLotus stream.Close(); }