public static Replay ReadFromReader(CustomReader r, bool readScoreId = false) { Replay replay = new Replay { GameMode = (GameMode)r.ReadByte(), OsuVersion = r.ReadInt32(), BeatmapHash = r.ReadString(), PlayerName = r.ReadString(), ReplayHash = r.ReadString(), Count300 = r.ReadUInt16(), Count100 = r.ReadUInt16(), Count50 = r.ReadUInt16(), CountGeki = r.ReadUInt16(), CountKatu = r.ReadUInt16(), CountMiss = r.ReadUInt16(), Score = r.ReadInt32(), Combo = r.ReadUInt16(), FullCombo = r.ReadBoolean(), Mods = (Mods)r.ReadInt32(), LifeGraph = r.ReadString(), TimePlayed = r.ReadDateTime(), ReplayData = r.ReadBytes(), ScoreId = readScoreId ? r.ReadInt64() : -1 }; return(replay); }