public override void Read(GDFileReader file) { type = file.ReadInt(); if (type == 0) { skill = GDString.Read(file); isItemSkill = file.ReadByte(); item = GDString.Read(file); equipLocation = file.ReadInt(); } else if (type == 4) { item = GDString.Read(file); bitmapUp = GDString.Read(file); bitmapDown = GDString.Read(file); label = GDWString.Read(file); } }
public void Read(GDFileReader file) { var headerVersion = file.ReadInt(); if (headerVersion != 1 && headerVersion != 2) // Header version. Must be 2. { throw new Exception("Invalid header version."); } Name = GDWString.Read(file); Sex = file.ReadByte(); Tag = GDString.Read(file); Level = file.ReadInt(); Hardcore = file.ReadByte(); if (headerVersion == 2) { file.ReadByte(); //expansion status } }