Exemple #1
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(),
     };
 }
Exemple #2
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();
        }
Exemple #3
0
 public void ReadFromStream(MStreamReader sr)
 {
     Mods = (Mod)sr.ReadUInt32();
 }
 public void ReadFromStream(MStreamReader sr)
 {
     Protocol = sr.ReadUInt32();
 }