예제 #1
0
 /// <summary>
 /// Intializes the game lobby with a 'BattleBall'/'SnowStorm' mode.
 /// </summary>
 /// <param name="Room">The minimum amount of points that a virtual user requires to start/join a game here.</param>
 /// <param name="isBattleBall">Indicates if this gamelobby hosts 'BattleBall' games. If false, then 'SnowStorm' games are hosted.</param>
 /// <param name="rankTitle">The title of the rank for players that are playing in this lobby. The matching minimum and maximum amounts for game points are loaded.</param>
 internal gameLobby(virtualRoom Room, bool isBattleBall, string rankTitle)
 {
     this.Room         = Room;
     this.Rank         = rankManager.getGameRank(isBattleBall, rankTitle);
     this.isBattleBall = isBattleBall;
     if (isBattleBall)
     {
         string[] Powerups = DB.runReadUnsafe("SELECT bb_allowedpowerups FROM games_lobbies WHERE id = '" + Room.roomID + "'").Split(',');
         this.allowedPowerups = new int[Powerups.Length];
         for (int i = 0; i < Powerups.Length; i++)
         {
             this.allowedPowerups[i] = int.Parse(Powerups[i]);
         }
     }
 }
예제 #2
0
 /// <summary>
 /// Intializes the game lobby with a 'BattleBall'/'SnowStorm' mode.
 /// </summary>
 /// <param name="Room">The minimum amount of points that a virtual user requires to start/join a game here.</param>
 /// <param name="isBattleBall">Indicates if this gamelobby hosts 'BattleBall' games. If false, then 'SnowStorm' games are hosted.</param>
 /// <param name="rankTitle">The title of the rank for players that are playing in this lobby. The matching minimum and maximum amounts for game points are loaded.</param>
 /// <param name="roomID">The ID of the room that the user is currently in.</param>
 internal gameLobby(virtualRoom Room, bool isBattleBall, string rankTitle)
 {
     this.Room         = Room;
     this.Rank         = rankManager.getGameRank(isBattleBall, rankTitle);
     this.isBattleBall = isBattleBall;
     if (isBattleBall)
     {
         string[] Powerups;
         using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
         {
             Powerups = dbClient.getString("SELECT bb_allowedpowerups FROM games_lobbies WHERE id = '" + Room.roomID + "'").Split(',');
         }
         this.allowedPowerups = new int[Powerups.Length];
         for (int i = 0; i < Powerups.Length; i++)
         {
             this.allowedPowerups[i] = int.Parse(Powerups[i]);
         }
     }
 }