public void ReadFromFile(BinaryReader reader) { unk0 = reader.ReadInt32(); uint count1 = reader.ReadUInt32(); uint count2 = reader.ReadUInt32(); unk1 = reader.ReadInt32(); DamageZones = new HumanDamageZoneItem[count1]; for (int i = 0; i < DamageZones.Length; i++) { HumanDamageZoneItem NewItem = new HumanDamageZoneItem(); NewItem.ItemID = reader.ReadUInt32(); NewItem.StunGroupOffset = reader.ReadUInt32(); NewItem.StunGroupLength0 = reader.ReadUInt32(); NewItem.StunGroupLength1 = reader.ReadUInt32(); NewItem.DamageZoneName = StringHelpers.ReadStringBuffer(reader, 32).Trim('\0'); NewItem.Health = reader.ReadInt32(); NewItem.DamageMultiplexBody = reader.ReadSingle(); NewItem.ArmorBodyVal = reader.ReadSingle(); NewItem.SneakDmgBodyMult = reader.ReadSingle(); NewItem.SneakDmgLowerBodyMult = reader.ReadSingle(); NewItem.DamageMultiplexHead = reader.ReadSingle(); NewItem.ArmorHeadVal = reader.ReadSingle(); NewItem.SneakDmgHeadMult = reader.ReadSingle(); NewItem.ArmorHandsVal = reader.ReadSingle(); NewItem.SneakDmgHandsMult = reader.ReadSingle(); NewItem.DamageMultiplexLegs = reader.ReadSingle(); NewItem.ArmorLegsVal = reader.ReadSingle(); NewItem.SneakDmgLegsMult = reader.ReadSingle(); NewItem.DamageMultiplexHands = reader.ReadSingle(); NewItem.EachHitStunHealthLevelThreshold = reader.ReadSingle(); NewItem.SingleHitStunHealthThreshold = reader.ReadSingle(); NewItem.WeaponImpactGroupName = XBinHashName.ConstructAndReadFromFile(reader); DamageZones[i] = NewItem; } for (int i = 0; i < DamageZones.Length; i++) { HumanDamageZoneItem DamageZone = DamageZones[i]; DamageZone.StunGroups = new StunGroup[DamageZone.StunGroupLength0]; for (int x = 0; x < DamageZone.StunGroupLength0; x++) { StunGroup NewGroup = new StunGroup(); NewGroup.BodyListOffset = reader.ReadUInt32(); NewGroup.BodyListOffsetLength0 = reader.ReadUInt32(); NewGroup.BodyListOffsetLength1 = reader.ReadUInt32(); NewGroup.DamageToStun = reader.ReadSingle(); NewGroup.DamageTimeWindow = reader.ReadSingle(); DamageZone.StunGroups[x] = NewGroup; } for (int x = 0; x < DamageZone.StunGroupLength0; x++) { StunGroup Group = DamageZone.StunGroups[x]; Group.BodyPartList = new EBodyPartType[Group.BodyListOffsetLength0]; for (int z = 0; z < Group.BodyPartList.Length; z++) { Group.BodyPartList[z] = (EBodyPartType)reader.ReadUInt32(); } } } }
public HumanDamageZoneItem() { StunGroups = new StunGroup[0]; WeaponImpactGroupName = new XBinHashName(); }