protected void ReadCodexEntry(BioCodexEntry entry) { if (entry == null) { throw new ArgumentNullException(nameof(entry)); } //entry.Id = ReadInt32(); entry.InstanceVersion = ReadInt32(); entry.Title = ReadInt32(); entry.Description = ReadInt32(); entry.TextureIndex = ReadInt32(); entry.Priority = ReadInt32(); entry.CodexSound = entry.InstanceVersion == 4 ? ReadInt32() : 0; }
protected void WriteCodexEntry(BioCodexEntry entry) { if (entry == null) { throw new ArgumentNullException(nameof(entry)); } //Write(entry.Id); Write(entry.InstanceVersion); Write(entry.Title); Write(entry.Description); Write(entry.TextureIndex); Write(entry.Priority); if (entry.InstanceVersion == 4) { Write(entry.CodexSound); } }