public override void Parse(GameBitBuffer buffer) { ColFlags = new ActorCollisionFlags(); ColFlags.Parse(buffer); Field1 = buffer.ReadInt(32); Cylinder = new AxialCylinder(); Cylinder.Parse(buffer); AABB = new AABB(); AABB.Parse(buffer); Field4 = buffer.ReadFloat32(); }
public override void Parse(GameBitBuffer buffer) { Field0 = buffer.ReadInt(32); Type = buffer.ReadInt(4); ApperanceSNO = buffer.ReadInt(32); PhysMeshSNO = buffer.ReadInt(32); Cylinder = new AxialCylinder(); Cylinder.Parse(buffer); Sphere = new Sphere(); Sphere.Parse(buffer); AABBBounds = new AABB(); AABBBounds.Parse(buffer); serTagMap = new SerializeData(); serTagMap.Parse(buffer); TagMap = new DT_TAGMAP(); TagMap.Parse(buffer); AnimSetSNO = buffer.ReadInt(32); MonsterSNO = buffer.ReadInt(32); Field11 = buffer.ReadInt(32); serMsgTriggeredEvents = new SerializeData(); serMsgTriggeredEvents.Parse(buffer); //still checking variablearrays this.MsgTriggeredEvents = new List<MsgTriggeredEvent>( buffer.ReadInt(0) ); for(int loop12 = 0; loop12 < _MsgTriggeredEvents.Count; loop12++) { _MsgTriggeredEvents[loop12] = new MsgTriggeredEvent(); _MsgTriggeredEvents[loop12].Parse(buffer); } V0 = new Vector3D(); V0.Parse(buffer); Looks = new WeightedLook[8]; for(int i = 0;i < _Looks.Length;i++) { _Looks[i] = new WeightedLook(); _Looks[i].Parse(buffer); } PhysicsSNO = buffer.ReadInt(32); Field17 = buffer.ReadInt(32); Field18 = buffer.ReadInt(32); Field19 = buffer.ReadFloat32(); Field20 = buffer.ReadFloat32(); Field21 = buffer.ReadFloat32(); ActorCollisionData = new ActorCollisionData(); ActorCollisionData.Parse(buffer); InventoryImages = new InventoryImages[5]; for(int i = 0;i < _InventoryImages.Length;i++) { _InventoryImages[i] = new InventoryImages(); _InventoryImages[i].Parse(buffer); } Field24 = buffer.ReadInt(32); serVOCastingNotes = new SerializeData(); serVOCastingNotes.Parse(buffer); throw new Exception("DT_CSTRING in network packets not implemented."); serVORole = new SerializeData(); serVORole.Parse(buffer); throw new Exception("DT_CSTRING in network packets not implemented."); }
public void FileRead(MpqFileStream stream, long offset) { stream.Position = offset + 0; ColFlags = new ActorCollisionFlags(); ColFlags.FileRead(stream, stream.Position); stream.Position = offset + 16; Field1 = stream.ReadValueS32(); stream.Position = offset + 20; Cylinder = new AxialCylinder(); Cylinder.FileRead(stream, stream.Position); stream.Position = offset + 40; AABB = new AABB(); AABB.FileRead(stream, stream.Position); stream.Position = offset + 64; Field4 = stream.ReadValueF32(); }
public void FileRead(MpqFileStream stream, long offset) { stream.Position = offset + 12; Field0 = stream.ReadValueS32(); stream.Position = offset + 16; _Type = stream.ReadValueS32(); stream.Position = offset + 20; ApperanceSNO = stream.ReadValueS32(); stream.Position = offset + 24; PhysMeshSNO = stream.ReadValueS32(); stream.Position = offset + 28; Cylinder = new AxialCylinder(); Cylinder.FileRead(stream, stream.Position); stream.Position = offset + 48; Sphere = new Sphere(); Sphere.FileRead(stream, stream.Position); stream.Position = offset + 64; AABBBounds = new AABB(); AABBBounds.FileRead(stream, stream.Position); stream.Position = offset + 88; serTagMap = new SerializeData(); serTagMap.FileRead(stream, stream.Position); stream.Position = offset + 96; // TagMap: type DT_TAGMAP hasnt a deserializer implemented throw new Exception("some fields arent going to be decoded."); stream.Position = offset + 104; AnimSetSNO = stream.ReadValueS32(); stream.Position = offset + 108; MonsterSNO = stream.ReadValueS32(); stream.Position = offset + 120; Field11 = stream.ReadValueS32(); stream.Position = offset + 112; serMsgTriggeredEvents = new SerializeData(); serMsgTriggeredEvents.FileRead(stream, stream.Position); stream.Position = offset + 128; //still checking variablearrays MsgTriggeredEvents = new List<MsgTriggeredEvent>(); for(int i = 0; i < (int)(serMsgTriggeredEvents.Field1 / 412); i++) { stream.Position = serMsgTriggeredEvents.Field0 + 16 + (412*i) ; MsgTriggeredEvent temp12_MsgTriggeredEvents; temp12_MsgTriggeredEvents = new MsgTriggeredEvent(); temp12_MsgTriggeredEvents.FileRead(stream, stream.Position); _MsgTriggeredEvents.Add(temp12_MsgTriggeredEvents); } stream.Position = offset + 136; V0 = new Vector3D(); V0.FileRead(stream, stream.Position); stream.Position = offset + 148; Looks = new WeightedLook[8]; for(int loop12=0; loop12 < 8; loop12++ ) { WeightedLook temp12_Looks; temp12_Looks = new WeightedLook(); temp12_Looks.FileRead(stream, stream.Position); _Looks[loop12] = temp12_Looks; } stream.Position = offset + 692; PhysicsSNO = stream.ReadValueS32(); stream.Position = offset + 696; Field17 = stream.ReadValueS32(); stream.Position = offset + 700; Field18 = stream.ReadValueS32(); stream.Position = offset + 704; Field19 = stream.ReadValueF32(); stream.Position = offset + 708; Field20 = stream.ReadValueF32(); stream.Position = offset + 712; Field21 = stream.ReadValueF32(); stream.Position = offset + 716; ActorCollisionData = new ActorCollisionData(); ActorCollisionData.FileRead(stream, stream.Position); stream.Position = offset + 784; InventoryImages = new InventoryImages[5]; for(int loop12=0; loop12 < 5; loop12++ ) { InventoryImages temp12_InventoryImages; temp12_InventoryImages = new InventoryImages(); temp12_InventoryImages.FileRead(stream, stream.Position); _InventoryImages[loop12] = temp12_InventoryImages; } stream.Position = offset + 824; Field24 = stream.ReadValueS32(); stream.Position = offset + 840; serVOCastingNotes = new SerializeData(); serVOCastingNotes.FileRead(stream, stream.Position); stream.Position = offset + 832; //still checking cstrings stream.Position = serVOCastingNotes.Field0 + 16; VOCastingNotes = stream.ReadString((uint)serVOCastingNotes.Field1); stream.Position = offset + 856; serVORole = new SerializeData(); serVORole.FileRead(stream, stream.Position); stream.Position = offset + 848; //still checking cstrings stream.Position = serVORole.Field0 + 16; VORole = stream.ReadString((uint)serVORole.Field1); }