public CreatureData(System.IO.BinaryReader reader) { type = (CreatureType)reader.ReadInt32(); level = reader.ReadInt32(); baseAttributeData = new BaseAttributeData(reader, true); derivedAttributeData = new DerivedAttributeData(reader, true); soul = reader.ReadInt32(); combat = reader.ReadInt32(); magic = reader.ReadInt32(); stealth = reader.ReadInt32(); for (var i = 0; i < attackData.Length; i++) { attackData[i] = new AttackData(reader); } gold = reader.ReadInt32(); }
public NpcRecordData(BinaryReader reader, int size) { if (size == 52) { level = reader.ReadInt16(); attributes = reader.ReadBytes(8); skills = reader.ReadBytes(27); reputation = reader.ReadByte(); derivedAttributeData = new DerivedAttributeData(reader); disposition = reader.ReadByte(); factionID = reader.ReadByte(); rank = reader.ReadByte(); unknown1 = reader.ReadByte(); gold = reader.ReadInt32(); unknown2 = 0; unknown3 = 0; } else { level = reader.ReadInt16(); disposition = reader.ReadByte(); factionID = reader.ReadByte(); rank = reader.ReadByte(); unknown1 = reader.ReadByte(); unknown2 = reader.ReadByte(); unknown3 = reader.ReadByte(); gold = reader.ReadInt32(); derivedAttributeData = new DerivedAttributeData(); skills = new byte[27]; attributes = new byte[8]; reputation = 0; // Should auto-calc attributes here //attributes = new Attributes(); //skills = classId.ClassData.CalculateSkills(); } }