예제 #1
0
        /// <summary>
        /// Game constructor
        /// </summary>
        /// <param name="championId">Champion ID associated with game</param>
        /// <param name="createDateLong">Date that end game data was recorded, specified as epoch milliseconds</param>
        /// <param name="fellowPlayersA">JArray of other players associated with the game</param>
        /// <param name="gameId">Game ID</param>
        /// <param name="gameModeString">Game mode as a string</param>
        /// <param name="gameTypeString">Game type as a string</param>
        /// <param name="invalid">Invalid flag</param>
        /// <param name="level">Level</param>
        /// <param name="ipEarned">IP earned</param>
        /// <param name="mapId">Map ID number</param>
        /// <param name="spell1Id">ID of first summoner spell</param>
        /// <param name="spell2Id">ID of second summoner spell</param>
        /// <param name="statisticsO">JArray of statistics associated with the game for this summoner</param>
        /// <param name="subTypeString">Game sub-type</param>
        /// <param name="teamId">Team ID associated with game</param>
        public Game(int championId,
                    long createDateLong,
                    JArray fellowPlayersA,
                    long gameId,
                    string gameModeString,
                    string gameTypeString,
                    bool invalid,
                    int ipEarned,
                    int level,
                    int mapId,
                    int spell1Id,
                    int spell2Id,
                    JObject statisticsO,
                    string subTypeString,
                    int teamIdInt)
        {
            fellowPlayers = new List <Player>();

            this.championId     = championId;
            this.createDateLong = createDateLong;
            createDate          = CreepScore.EpochToDateTime(createDateLong);
            LoadFellowPlayers(fellowPlayersA);
            this.gameId         = gameId;
            this.gameModeString = gameModeString;
            gameMode            = GameConstants.SetGameMode(gameModeString);
            this.gameTypeString = gameTypeString;
            gameType            = GameConstants.SetGameType(gameTypeString);
            this.invalid        = invalid;
            this.level          = level;
            this.ipEarned       = ipEarned;
            this.mapId          = mapId;
            map           = GameConstants.SetMap(mapId);
            this.spell1Id = spell1Id;
            this.spell2Id = spell2Id;
            spell1        = GameConstants.SetSpellType(spell1Id);
            spell2        = GameConstants.SetSpellType(spell2Id);
            LoadStatistics(statisticsO);
            this.subTypeString = subTypeString;
            subType            = GameConstants.SetSubType(subTypeString);
            this.teamIdInt     = teamIdInt;
            teamId             = GameConstants.SetTeamId(teamIdInt);
        }
예제 #2
0
        /// <summary>
        /// Game constructor
        /// </summary>
        /// <param name="championId">Champion ID associated with game</param>
        /// <param name="createDateLong">Date that end game data was recorded, specified as epoch milliseconds</param>
        /// <param name="fellowPlayersA">JArray of other players associated with the game</param>
        /// <param name="gameId">Game ID</param>
        /// <param name="gameModeString">Game mode as a string</param>
        /// <param name="gameTypeString">Game type as a string</param>
        /// <param name="invalid">Invalid flag</param>
        /// <param name="level">Level</param>
        /// <param name="ipEarned">IP earned</param>
        /// <param name="mapId">Map ID number</param>
        /// <param name="spell1Id">ID of first summoner spell</param>
        /// <param name="spell2Id">ID of second summoner spell</param>
        /// <param name="statisticsO">JArray of statistics associated with the game for this summoner</param>
        /// <param name="subTypeString">Game sub-type</param>
        /// <param name="teamId">Team ID associated with game</param>
        public Game(int championId,
            long createDateLong,
            JArray fellowPlayersA,
            long gameId,
            string gameModeString,
            string gameTypeString,
            bool invalid,
            int ipEarned,
            int level,
            int mapId,
            int spell1Id,
            int spell2Id,
            JObject statisticsO,
            string subTypeString,
            int teamIdInt)
        {
            fellowPlayers = new List<Player>();

            this.championId = championId;
            this.createDateLong = createDateLong;
            createDate = CreepScore.EpochToDateTime(createDateLong);
            LoadFellowPlayers(fellowPlayersA);
            this.gameId = gameId;
            this.gameModeString = gameModeString;
            gameMode = GameConstants.SetGameMode(gameModeString);
            this.gameTypeString = gameTypeString;
            gameType = GameConstants.SetGameType(gameTypeString);
            this.invalid = invalid;
            this.level = level;
            this.ipEarned = ipEarned;
            this.mapId = mapId;
            map = GameConstants.SetMap(mapId);
            this.spell1Id = spell1Id;
            this.spell2Id = spell2Id;
            spell1 = GameConstants.SetSpellType(spell1Id);
            spell2 = GameConstants.SetSpellType(spell2Id);
            LoadStatistics(statisticsO);
            this.subTypeString = subTypeString;
            subType = GameConstants.SetSubType(subTypeString);
            this.teamIdInt = teamIdInt;
            teamId = GameConstants.SetTeamId(teamIdInt);
        }
예제 #3
0
 public string ConvertSubType(GameConstants.SubType subType)
 {
     if (subType == GameConstants.SubType.Normal)
     {
         return("Summoner's Rift");
     }
     else if (subType == GameConstants.SubType.Coop)
     {
         return("Coop v AI Summoner's Rift");
     }
     else if (subType == GameConstants.SubType.RankedSolo5v5)
     {
         return("Ranked Solo 5 v 5");
     }
     else if (subType == GameConstants.SubType.RankedPremade3v3)
     {
         return("Ranked Premade 3 v 3");
     }
     else if (subType == GameConstants.SubType.RankedPremade5v5)
     {
         return("Ranked Premade 5 v 5");
     }
     else if (subType == GameConstants.SubType.DominionUnranked)
     {
         return("The Crystal Scar");
     }
     else if (subType == GameConstants.SubType.RankedTeam3v3)
     {
         return("Ranked Team 3 v 3");
     }
     else if (subType == GameConstants.SubType.RankedTeam5v5)
     {
         return("Ranked Team 5 v 5");
     }
     else if (subType == GameConstants.SubType.Normal3v3)
     {
         return("Twisted Treeline");
     }
     else if (subType == GameConstants.SubType.Coop3v3)
     {
         return("Coop v AI Twisted Treeline");
     }
     else if (subType == GameConstants.SubType.Cap5v5)
     {
         return("Team Builder");
     }
     else if (subType == GameConstants.SubType.Aram)
     {
         return("Howling Abyss");
     }
     else if (subType == GameConstants.SubType.OneForAll)
     {
         return("One For All");
     }
     else if (subType == GameConstants.SubType.Showdown1v1)
     {
         return("Showdown 1 v 1");
     }
     else if (subType == GameConstants.SubType.Showdown2v2)
     {
         return("Showdown 2 v 2");
     }
     else if (subType == GameConstants.SubType.Hexakill)
     {
         return("Summoners Rift Hexakill");
     }
     else if (subType == GameConstants.SubType.Urf)
     {
         return("Ultra Rapid Fire");
     }
     else if (subType == GameConstants.SubType.UrfCoop)
     {
         return("Ultra Rapid Fire Coop");
     }
     else if (subType == GameConstants.SubType.DoomBots)
     {
         return("Doom Bots of Doom");
     }
     else if (subType == GameConstants.SubType.Ascension)
     {
         return("Ascension");
     }
     else if (subType == GameConstants.SubType.TwistedTreelineHexakill)
     {
         return("Twisted Treeline Hexakill");
     }
     else if (subType == GameConstants.SubType.KingPoro)
     {
         return("King Poro");
     }
     else
     {
         return("None");
     }
 }