Beispiel #1
0
 public void ReadFromStream(MStreamReader sr)
 {
     Msg = new MessageStruct
     {
         Username      = sr.ReadString(),
         Message       = sr.ReadString(),
         ChannelTarget = sr.ReadString(),
         SenderId      = sr.ReadInt32()
     };
 }
Beispiel #2
0
 public void ReadFromStream(MStreamReader sr)
 {
     Status = new UserStatus
     {
         Status          = (Status)sr.ReadByte(),
         StatusText      = sr.ReadString(),
         BeatmapChecksum = sr.ReadString(),
         CurrentMods     = (Mod)sr.ReadUInt32(),
         Playmode        = (PlayMode)sr.ReadByte(),
         BeatmapId       = sr.ReadUInt32(),
     };
 }
Beispiel #3
0
 public void ReadFromStream(MStreamReader sr)
 {
     BeatmapId        = sr.ReadInt32();
     ParentSetId      = sr.ReadInt32();
     DiffName         = sr.ReadString();
     FileMd5          = sr.ReadString();
     Mode             = (PlayMode)sr.ReadSByte();
     Bpm              = sr.ReadInt32();
     Ar               = sr.ReadSingle();
     Od               = sr.ReadSingle();
     Cs               = sr.ReadSingle();
     Hp               = sr.ReadSingle();
     TotalLength      = sr.ReadInt32();
     Playcount        = sr.ReadInt32();
     Passcount        = sr.ReadInt32();
     MaxCombo         = sr.ReadInt64();
     DifficultyRating = sr.ReadDouble();
 }
Beispiel #4
0
        public void ReadFromStream(MStreamReader sr)
        {
            MatchId     = sr.ReadInt16();
            InProgress  = sr.ReadBoolean();
            MatchType   = (MatchType)sr.ReadByte();
            ActiveMods  = (Mod)sr.ReadUInt32();
            Name        = sr.ReadString();
            Password    = sr.ReadString();
            BeatmapName = sr.ReadString();
            BeatmapId   = sr.ReadInt32();
            BeatmapMd5  = sr.ReadString();

            for (var i = 0; i < MaxPlayers; i++)
            {
                Slots[i].Status = (MultiSlotStatus)sr.ReadByte();
            }

            for (var i = 0; i < MaxPlayers; i++)
            {
                Slots[i].Team = (MultiSlotTeam)sr.ReadByte();
            }

            for (var i = 0; i < MaxPlayers; i++)
            {
                Slots[i].UserId = (Slots[i].Status & (MultiSlotStatus)124) > 0 ? sr.ReadInt32() : -1;
            }

            HostId       = sr.ReadInt32();
            PlayMode     = (PlayMode)sr.ReadByte();
            ScoringType  = (ScoringType)sr.ReadByte();
            TeamType     = (TeamType)sr.ReadByte();
            SpecialModes = (MatchSpecialModes)sr.ReadByte();

            if (SpecialModes == MatchSpecialModes.Freemods)
            {
                for (var i = 0; i < MaxPlayers; i++)
                {
                    Slots[i].Mods = (Mod)sr.ReadUInt32();
                }
            }

            Seed = sr.ReadInt32();
        }
Beispiel #5
0
        public void ReadFromStream(MStreamReader sr)
        {
            var c = sr.ReadInt32();

            for (var i = 0; i < c; i++)
            {
                FileNames.Add(sr.ReadString());
            }

            c = sr.ReadInt32();
            for (var i = 0; i < c; i++)
            {
                Ids.Add(sr.ReadInt32());
            }
        }
Beispiel #6
0
        public void ReadFromStream(MStreamReader sr)
        {
            SetId = sr.ReadInt32();

            var count = sr.ReadInt32();

            ChildrenBeatmaps = new List <ChildrenBeatmap>();
            for (var i = 0; i < count; i++)
            {
                ChildrenBeatmaps.Add(sr.ReadData <ChildrenBeatmap>());
            }

            RankedStatus = (BeatmapSetOnlineStatus)sr.ReadSByte();

            if (DateTime.TryParse(sr.ReadString(), out var res))
            {
                ApprovedDate = res;
            }

            if (DateTime.TryParse(sr.ReadString(), out res))
            {
                LastUpdate = res;
            }

            if (DateTime.TryParse(sr.ReadString(), out res))
            {
                LastChecked = res;
            }

            Artist     = sr.ReadString();
            Title      = sr.ReadString();
            Creator    = sr.ReadString();
            Source     = sr.ReadString();
            Tags       = sr.ReadString();
            HasVideo   = sr.ReadBoolean();
            Genre      = (Genre)sr.ReadSByte();
            Language   = (Language)sr.ReadSByte();
            Favourites = sr.ReadInt64();
            Disabled   = sr.ReadBoolean();
        }
Beispiel #7
0
 public void ReadFromStream(MStreamReader sr)
 {
     ChannelName = sr.ReadString();
 }
Beispiel #8
0
 public void ReadFromStream(MStreamReader sr)
 {
     MatchId  = sr.ReadInt32();
     Password = sr.ReadString();
 }