Пример #1
0
        public bMatch(MatchTypes matchType, MatchScoringTypes matchScoringType, MatchTeamTypes matchTeamType, PlayModes playMode, string gameName,
                      string gamePassword, int initialSlotCount, string beatmapName, string beatmapChecksum, int beatmapId, Mods activeMods, int hostId,
                      MultiSpecialModes specialModes = MultiSpecialModes.None, int seed = 0)
        {
            this.matchType        = matchType;
            this.playMode         = playMode;
            this.matchScoringType = matchScoringType;
            this.matchTeamType    = matchTeamType;
            this.gameName         = gameName;
            this.gamePassword     = gamePassword;
            this.beatmapName      = beatmapName;
            this.beatmapChecksum  = beatmapChecksum;
            this.beatmapId        = beatmapId;
            this.activeMods       = activeMods;
            this.hostId           = hostId;
            this.specialModes     = specialModes;
            this.Seed             = seed;

            SendPassword = true;

            for (int i = 0; i < MAX_PLAYERS; i++)
            {
                slotStatus[i] = i < initialSlotCount ? SlotStatus.Open : SlotStatus.Locked;
                slotId[i]     = -1;
            }

            if (gameName.Length > 50)
            {
                gameName = gameName.Remove(50);
            }
        }
Пример #2
0
 public bMatchData(MatchTypes matchType, MatchScoringTypes matchScoringType,
                   MatchTeamTypes matchTeamType, PlayModes playMode, string gameName, string gamePassword, int maxSlots,
                   string beatmapName, string beatmapChecksum, int beatmapId, Mods activeMods, int hostId, MultiSpecialModes multiSpecialMode,
                   int Seed)
 {
     this.matchType        = matchType;
     this.playMode         = playMode;
     this.matchScoringType = matchScoringType;
     this.matchTeamType    = matchTeamType;
     this.gameName         = gameName;
     this.gamePassword     = gamePassword;
     this.beatmapName      = beatmapName;
     this.beatmapChecksum  = beatmapChecksum;
     this.beatmapId        = beatmapId;
     this.activeMods       = activeMods;
     this.hostId           = hostId;
     this.specialModes     = multiSpecialMode;
     this.Seed             = Seed;
     this.SendPassword     = true;
     for (var i = 0; i < MaxRoomPlayers; i++)
     {
         slotStatus[i] = ((i < maxSlots) ? SlotStatus.Open : SlotStatus.Locked);
         slotId[i]     = -1;
     }
     if (gameName.Length > 50)
     {
         this.gameName = gameName.Remove(50);
     }
 }
Пример #3
0
        public bMatch(SerializationReader sr)
        {
            SendPassword = false;

            matchId         = sr.ReadUInt16();
            inProgress      = sr.ReadBoolean();
            matchType       = (MatchTypes)sr.ReadByte();
            activeMods      = (Mods)sr.ReadUInt32();
            gameName        = sr.ReadString();
            gamePassword    = sr.ReadString();
            beatmapName     = sr.ReadString();
            beatmapId       = sr.ReadInt32();
            beatmapChecksum = sr.ReadString();

            for (int i = 0; i < MAX_PLAYERS; i++)
            {
                slotStatus[i] = (SlotStatus)sr.ReadByte();
            }

            for (int i = 0; i < MAX_PLAYERS; i++)
            {
                slotTeam[i] = (SlotTeams)sr.ReadByte();
            }

            for (int i = 0; i < MAX_PLAYERS; i++)
            {
                slotId[i] = (slotStatus[i] & SlotStatus.HasPlayer) > 0 ? sr.ReadInt32() : -1;
            }

            hostId = sr.ReadInt32();

            playMode = (PlayModes)sr.ReadByte();

            matchScoringType = (MatchScoringTypes)sr.ReadByte();
            matchTeamType    = (MatchTeamTypes)sr.ReadByte();

            specialModes = (MultiSpecialModes)sr.ReadByte();

            if (gameName.Length > 50)
            {
                gameName = gameName.Remove(50);
            }

            if ((specialModes & MultiSpecialModes.FreeMod) > 0)
            {
                for (int i = 0; i < MAX_PLAYERS; i++)
                {
                    slotMods[i] = (Mods)sr.ReadInt32();
                }
            }
            Seed = sr.ReadInt32();
        }
Пример #4
0
 public bMatchData(SerializationReader reader)
 {
     SendPassword    = false;
     matchId         = reader.ReadUInt16();
     inProgress      = reader.ReadBoolean();
     matchType       = (MatchTypes)reader.ReadByte();
     activeMods      = (Mods)reader.ReadUInt32();
     gameName        = reader.ReadString();
     gamePassword    = reader.ReadString();
     beatmapName     = reader.ReadString();
     beatmapId       = reader.ReadInt32();
     beatmapChecksum = reader.ReadString();
     for (var i = 0; i < MaxRoomPlayers; i++)
     {
         slotStatus[i] = (SlotStatus)reader.ReadByte();
     }
     for (var j = 0; j < MaxRoomPlayers; j++)
     {
         slotTeam[j] = (SlotTeams)reader.ReadByte();
     }
     for (var k = 0; k < MaxRoomPlayers; k++)
     {
         slotId[k] = (((slotStatus[k] & SlotStatus.Occupied) > (SlotStatus)0)
             ? reader.ReadInt32()
             : -1);
     }
     hostId           = reader.ReadInt32();
     playMode         = (PlayModes)reader.ReadByte();
     matchScoringType = (MatchScoringTypes)reader.ReadByte();
     matchTeamType    = (MatchTeamTypes)reader.ReadByte();
     specialModes     = (MultiSpecialModes)reader.ReadByte();
     if (gameName.Length > 50)
     {
         gameName = gameName.Remove(50);
     }
     if ((specialModes & MultiSpecialModes.FreeMod) > MultiSpecialModes.None)
     {
         for (var l = 0; l < MaxRoomPlayers; l++)
         {
             slotMods[l] = (Mods)reader.ReadInt32();
         }
     }
     Seed = reader.ReadInt32();
 }
Пример #5
0
 internal ClientSideMatch(MatchTypes matchType, MatchScoringTypes matchScoringType, MatchTeamTypes matchTeamType,
                          PlayModes playMode, string gameName, string gamePassword, int initialSlotCount,
                          string beatmapName, string beatmapChecksum, int beatmapId, Mods activeMods, int hostId, MultiSpecialModes specialModes, int seed)
     : base(
         matchType, matchScoringType, matchTeamType, playMode, gameName, gamePassword, initialSlotCount,
         beatmapName, beatmapChecksum, beatmapId, activeMods, hostId, specialModes, seed)
 {
     SendPassword = true;
 }
Пример #6
0
 // Token: 0x06000DFF RID: 3583
 // RVA: 0x0004D394 File Offset: 0x0004B594
 public bMatch(Class32 class32_0)
 {
     this.SendPassword = false;
     this.matchId = (int)class32_0.ReadUInt16();
     this.inProgress = class32_0.ReadBoolean();
     this.matchType = (MatchTypes)class32_0.ReadByte();
     this.activeMods = (Mods)class32_0.ReadUInt32();
     this.gameName = class32_0.ReadString();
     this.gamePassword = class32_0.ReadString();
     this.beatmapName = class32_0.ReadString();
     this.beatmapId = class32_0.ReadInt32();
     this.beatmapChecksum = class32_0.ReadString();
     for (int i = 0; i < bMatch.smethod_0(); i++)
     {
         this.slotStatus[i] = (SlotStatus)class32_0.ReadByte();
     }
     for (int j = 0; j < bMatch.smethod_0(); j++)
     {
         this.slotTeam[j] = (SlotTeams)class32_0.ReadByte();
     }
     for (int k = 0; k < bMatch.smethod_0(); k++)
     {
         this.slotId[k] = (((this.slotStatus[k] & SlotStatus.flag_7) > (SlotStatus)0) ? class32_0.ReadInt32() : -1);
     }
     this.hostId = class32_0.ReadInt32();
     this.playMode = (PlayModes)class32_0.ReadByte();
     this.matchScoringType = (MatchScoringTypes)class32_0.ReadByte();
     this.matchTeamType = (MatchTeamTypes)class32_0.ReadByte();
     this.specialModes = (MultiSpecialModes)class32_0.ReadByte();
     if (this.gameName.Length > 50)
     {
         this.gameName = this.gameName.Remove(50);
     }
     if ((this.specialModes & MultiSpecialModes.FreeMod) > MultiSpecialModes.None)
     {
         for (int l = 0; l < bMatch.smethod_0(); l++)
         {
             this.slotMods[l] = (Mods)class32_0.ReadInt32();
         }
     }
     this.Seed = class32_0.ReadInt32();
 }
Пример #7
0
 // Token: 0x06000DFE RID: 3582
 // RVA: 0x0004D28C File Offset: 0x0004B48C
 public bMatch(MatchTypes matchTypes_0, MatchScoringTypes matchScoringTypes_0, MatchTeamTypes matchTeamTypes_0, PlayModes playModes_0, string string_0, string string_1, int int_0, string string_2, string string_3, int int_1, Mods mods_0, int int_2, MultiSpecialModes multiSpecialModes_0, int int_3)
 {
     this.matchType = matchTypes_0;
     this.playMode = playModes_0;
     this.matchScoringType = matchScoringTypes_0;
     this.matchTeamType = matchTeamTypes_0;
     this.gameName = string_0;
     this.gamePassword = string_1;
     this.beatmapName = string_2;
     this.beatmapChecksum = string_3;
     this.beatmapId = int_1;
     this.activeMods = mods_0;
     this.hostId = int_2;
     this.specialModes = multiSpecialModes_0;
     this.Seed = int_3;
     this.SendPassword = true;
     for (int i = 0; i < bMatch.smethod_0(); i++)
     {
         this.slotStatus[i] = ((i < int_0) ? SlotStatus.flag_0 : SlotStatus.flag_1);
         this.slotId[i] = -1;
     }
     if (string_0.Length > 50)
     {
         string_0 = string_0.Remove(50);
     }
 }