Esempio n. 1
0
        public MatchMakerBattle(ZkLobbyServer server, MatchMaker.ProposedBattle bat) : base(server, null)
        {
            IsMatchMakerBattle = true;
            EngineVersion      = server.Engine;
            ModName            = server.Game;
            FounderName        = "MatchMaker #" + BattleID;
            Title      = "MatchMaker " + BattleID;
            Mode       = bat.QueueType.Mode;
            MaxPlayers = bat.Size;
            Prototype  = bat;

            foreach (var pe in bat.Players)
            {
                Users[pe.Name] = new UserBattleStatus(pe.Name, pe.LobbyUser, GenerateClientScriptPassword(pe.Name));
            }

            if (ModOptions == null)
            {
                ModOptions = new Dictionary <string, string>();
            }

            // hacky way to send some extra start setup data
            if (bat.QueueType.Mode != AutohostMode.GameChickens)
            {
                ModOptions["mutespec"] = "mute";
            }
            ModOptions["MatchMakerType"] = bat.QueueType.Name;

            ValidateAndFillDetails();
        }
Esempio n. 2
0
        public MatchMakerBattle(ZkLobbyServer server, MatchMaker.ProposedBattle bat, string mapname) : base(server, null)
        {
            ApplicableRating   = RatingCategory.MatchMaking;
            IsMatchMakerBattle = true;
            EngineVersion      = server.Engine;
            ModName            = server.Game;
            FounderName        = "MatchMaker #" + BattleID;
            Title      = "MatchMaker " + BattleID;
            Mode       = bat.QueueType.Mode;
            MaxPlayers = bat.Size;
            Prototype  = bat;
            MapName    = mapname;

            foreach (var pe in bat.Players)
            {
                Users[pe.Name] = new UserBattleStatus(pe.Name, pe.LobbyUser, GenerateClientScriptPassword(pe.Name));
            }

            if (ModOptions == null)
            {
                ModOptions = new Dictionary <string, string>();
            }

            // proper way to send some extra start setup data
            if (bat.QueueType.Mode != AutohostMode.GameChickens)
            {
                SetCompetitiveModoptions();
            }
            ModOptions["MatchMakerType"] = bat.QueueType.Name;

            ValidateAndFillDetails();
        }
        public MatchMakerBattle(ZkLobbyServer server, MatchMaker.ProposedBattle bat) : base(server, null)
        {
            IsMatchMakerBattle = true;
            EngineVersion = server.Engine;
            ModName = server.Game;
            FounderName = "MatchMaker #" + BattleID;
            Title = "MatchMaker " + BattleID;
            Mode = bat.QueueType.Mode;
            MaxPlayers = bat.Size;
            Prototype = bat;

            foreach (var pe in bat.Players) Users[pe.Name] = new UserBattleStatus(pe.Name, pe.LobbyUser, Guid.NewGuid().ToString());

            ValidateAndFillDetails();
        }