/// <summary>
 /// MatchHistorySummary constructor
 /// </summary>
 /// <param name="assists">Number of assists</param>
 /// <param name="dateLong">Date of match specified as epoch milliseconds</param>
 /// <param name="deaths">Number of deaths</param>
 /// <param name="gameId">Game ID</param>
 /// <param name="gameModeString">Game mode represented as a string</param>
 /// <param name="invalid">Is invalid?</param>
 /// <param name="kills">Number of kills</param>
 /// <param name="mapId">Map ID as a number</param>
 /// <param name="opposingTeamKills">Opposing team kills</param>
 /// <param name="opposingTeamName">Opposing team name</param>
 /// <param name="win">If the team won or not</param>
 public MatchHistorySummary(int assists,
                            long dateLong,
                            int deaths,
                            long gameId,
                            string gameModeString,
                            bool invalid,
                            int kills,
                            int mapId,
                            int opposingTeamKills,
                            string opposingTeamName,
                            bool win)
 {
     this.assists        = assists;
     this.dateLong       = dateLong;
     date                = CreepScore.EpochToDateTime(dateLong);
     this.deaths         = deaths;
     this.gameId         = gameId;
     this.gameModeString = gameModeString;
     gameMode            = GameConstants.SetGameMode(gameModeString);
     this.invalid        = invalid;
     this.kills          = kills;
     this.mapId          = mapId;
     map = GameConstants.SetMap(mapId);
     this.opposingTeamKills = opposingTeamKills;
     this.opposingTeamName  = opposingTeamName;
     this.win = win;
 }
Example #2
0
 public MatchSummaryAdvanced(long mapId,
                             long matchCreation,
                             long matchDuration,
                             long matchId,
                             string matchMode,
                             string matchType,
                             string matchVersion,
                             JArray participantIdentitiesA,
                             JArray participantsA,
                             string queueType,
                             string region,
                             string season)
 {
     this.mapId         = mapId;
     this.matchCreation = matchCreation;
     this.matchDuration = matchDuration;
     this.matchId       = matchId;
     this.matchMode     = GameConstants.SetGameMode(matchMode);
     this.matchType     = GameConstants.SetGameType(matchType);
     this.matchVersion  = matchVersion;
     if (participantIdentitiesA != null)
     {
         this.participantIdentities = LoadParticipantIdentites(participantIdentitiesA);
     }
     if (participantsA != null)
     {
         this.participants = LoadParticipants(participantsA);
     }
     this.queueType = AdvancedMatchHistoryConstants.SetQueueType(queueType);
     this.region    = region;
     this.season    = AdvancedMatchHistoryConstants.SetSeason(season);
 }
Example #3
0
 /// <summary>
 /// CurrentGameInfo constructor
 /// </summary>
 /// <param name="bannedChampionsA"></param>
 /// <param name="gameId"></param>
 /// <param name="gameLength"></param>
 /// <param name="gameMode"></param>
 /// <param name="gameQueueConfigId"></param>
 /// <param name="gameStartTime"></param>
 /// <param name="gameType"></param>
 /// <param name="mapId"></param>
 /// <param name="observersO"></param>
 /// <param name="participantsA"></param>
 /// <param name="platformId"></param>
 public CurrentGameInfoLive(JArray bannedChampionsA,
                            long gameId,
                            long gameLength,
                            string gameMode,
                            long gameQueueConfigId,
                            long gameStartTime,
                            string gameType,
                            long mapId,
                            JObject observersO,
                            JArray participantsA,
                            string platformId)
 {
     this.bannedChampions       = HelperMethods.LoadBans(bannedChampionsA);
     this.gameId                = gameId;
     this.gameLengthLong        = gameLength;
     this.gameLength            = TimeSpan.FromSeconds(gameLength);
     this.gameModeString        = gameMode;
     this.gameMode              = GameConstants.SetGameMode(gameMode);
     this.gameQueueConfigIdLong = gameQueueConfigId;
     this.gameQueueConfigId     = AdvancedMatchHistoryConstants.SetQueueType(gameQueueConfigId);
     this.gameStartTimeLong     = gameStartTime;
     this.gameStartTime         = CreepScore.EpochToDateTime(gameStartTime);
     this.gameTypeString        = gameType;
     this.gameType              = GameConstants.SetGameType(gameType);
     this.mapIdLong             = mapId;
     this.mapId        = GameConstants.SetMap((int)mapId);
     this.observers    = LoadObservers(observersO);
     this.participants = LoadParticipants(participantsA);
     this.platformId   = platformId;
 }
Example #4
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);
        }
 public MatchDetailAdvanced(long mapId,
                            long matchCreation,
                            long matchDuration,
                            long matchId,
                            string matchMode,
                            string matchType,
                            string matchVersion,
                            JArray participantIdentitiesA,
                            JArray participantsA,
                            string queueType,
                            string region,
                            string season,
                            JArray teamsA,
                            JObject timelineO)
 {
     this.mapId         = mapId;
     this.matchCreation = matchCreation;
     this.matchDuration = matchDuration;
     this.matchId       = matchId;
     this.matchMode     = GameConstants.SetGameMode(matchMode);
     this.matchType     = GameConstants.SetGameType(matchType);
     this.matchVersion  = matchVersion;
     if (participantIdentitiesA != null)
     {
         this.participantIdentities = LoadParticipantIdentites(participantIdentitiesA);
     }
     if (participantsA != null)
     {
         this.participants = LoadParticipants(participantsA);
     }
     this.queueType = AdvancedMatchHistoryConstants.SetQueueType(queueType);
     this.region    = region;
     this.season    = AdvancedMatchHistoryConstants.SetSeason(season);
     if (teamsA != null)
     {
         this.teams = LoadTeams(teamsA);
     }
     if (timelineO != null)
     {
         this.timeline = LoadTimeline(timelineO);
     }
 }
Example #6
0
 public string ConvertGameMode(GameConstants.GameMode gameMode)
 {
     if (gameMode == GameConstants.GameMode.Classic)
     {
         return("Classic");
     }
     else if (gameMode == GameConstants.GameMode.Dominion)
     {
         return("Dominion");
     }
     else if (gameMode == GameConstants.GameMode.Aram)
     {
         return("ARAM");
     }
     else if (gameMode == GameConstants.GameMode.Tutorial)
     {
         return("Tutorial");
     }
     else if (gameMode == GameConstants.GameMode.OneForAll)
     {
         return("One For All");
     }
     else if (gameMode == GameConstants.GameMode.FirstBlood)
     {
         return("Showdown");
     }
     else if (gameMode == GameConstants.GameMode.Ascension)
     {
         return("Ascension");
     }
     else if (gameMode == GameConstants.GameMode.KingPoro)
     {
         return("King Poro");
     }
     else
     {
         return("None");
     }
 }
Example #7
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);
        }
 public MatchDetailAdvanced(long mapId,
     long matchCreation,
     long matchDuration,
     long matchId,
     string matchMode,
     string matchType,
     string matchVersion,
     JArray participantIdentitiesA,
     JArray participantsA,
     string queueType,
     string region,
     string season,
     JArray teamsA,
     JObject timelineO)
 {
     this.mapId = mapId;
     this.matchCreation = matchCreation;
     this.matchDuration = matchDuration;
     this.matchId = matchId;
     this.matchMode = GameConstants.SetGameMode(matchMode);
     this.matchType = GameConstants.SetGameType(matchType);
     this.matchVersion = matchVersion;
     if (participantIdentitiesA != null)
     {
         this.participantIdentities = LoadParticipantIdentites(participantIdentitiesA);
     }
     if (participantsA != null)
     {
         this.participants = LoadParticipants(participantsA);
     }
     this.queueType = AdvancedMatchHistoryConstants.SetQueueType(queueType);
     this.region = region;
     this.season = AdvancedMatchHistoryConstants.SetSeason(season);
     if (teamsA != null)
     {
         this.teams = LoadTeams(teamsA);
     }
     if (timelineO != null)
     {
         this.timeline = LoadTimeline(timelineO);
     }
 }
 /// <summary>
 /// CurrentGameInfo constructor
 /// </summary>
 /// <param name="bannedChampionsA"></param>
 /// <param name="gameId"></param>
 /// <param name="gameLength"></param>
 /// <param name="gameMode"></param>
 /// <param name="gameQueueConfigId"></param>
 /// <param name="gameStartTime"></param>
 /// <param name="gameType"></param>
 /// <param name="mapId"></param>
 /// <param name="observersO"></param>
 /// <param name="participantsA"></param>
 /// <param name="platformId"></param>
 public CurrentGameInfoLive(JArray bannedChampionsA,
     long gameId,
     long gameLength,
     string gameMode,
     long gameQueueConfigId,
     long gameStartTime,
     string gameType,
     long mapId,
     JObject observersO,
     JArray participantsA,
     string platformId)
 {
     this.bannedChampions = HelperMethods.LoadBans(bannedChampionsA);
     this.gameId = gameId;
     this.gameLengthLong = gameLength;
     this.gameLength = TimeSpan.FromSeconds(gameLength);
     this.gameModeString = gameMode;
     this.gameMode = GameConstants.SetGameMode(gameMode);
     this.gameQueueConfigIdLong = gameQueueConfigId;
     this.gameQueueConfigId = AdvancedMatchHistoryConstants.SetQueueType(gameQueueConfigId);
     this.gameStartTimeLong = gameStartTime;
     this.gameStartTime = CreepScore.EpochToDateTime(gameStartTime);
     this.gameTypeString = gameType;
     this.gameType = GameConstants.SetGameType(gameType);
     this.mapIdLong = mapId;
     this.mapId = GameConstants.SetMap((int)mapId);
     this.observers = LoadObservers(observersO);
     this.participants = LoadParticipants(participantsA);
     this.platformId = platformId;
 }
 public MatchSummaryAdvanced(long mapId,
     long matchCreation,
     long matchDuration,
     long matchId,
     string matchMode,
     string matchType,
     string matchVersion,
     JArray participantIdentitiesA,
     JArray participantsA,
     string queueType,
     string region,
     string season)
 {
     this.mapId = mapId;
     this.matchCreation = matchCreation;
     this.matchDuration = matchDuration;
     this.matchId = matchId;
     this.matchMode = GameConstants.SetGameMode(matchMode);
     this.matchType = GameConstants.SetGameType(matchType);
     this.matchVersion = matchVersion;
     if (participantIdentitiesA != null)
     {
         this.participantIdentities = LoadParticipantIdentites(participantIdentitiesA);
     }
     if (participantsA != null)
     {
         this.participants = LoadParticipants(participantsA);
     }
     this.queueType = AdvancedMatchHistoryConstants.SetQueueType(queueType);
     this.region = region;
     this.season = AdvancedMatchHistoryConstants.SetSeason(season);
 }
Example #11
0
 /// <summary>
 /// MatchHistorySummary constructor
 /// </summary>
 /// <param name="assists">Number of assists</param>
 /// <param name="dateLong">Date of match specified as epoch milliseconds</param>
 /// <param name="deaths">Number of deaths</param>
 /// <param name="gameId">Game ID</param>
 /// <param name="gameModeString">Game mode represented as a string</param>
 /// <param name="invalid">Is invalid?</param>
 /// <param name="kills">Number of kills</param>
 /// <param name="mapId">Map ID as a number</param>
 /// <param name="opposingTeamKills">Opposing team kills</param>
 /// <param name="opposingTeamName">Opposing team name</param>
 /// <param name="win">If the team won or not</param>
 public MatchHistorySummary(int assists,
     long dateLong,
     int deaths,
     long gameId,
     string gameModeString,
     bool invalid,
     int kills,
     int mapId,
     int opposingTeamKills,
     string opposingTeamName,
     bool win)
 {
     this.assists = assists;
     this.dateLong = dateLong;
     date = CreepScore.EpochToDateTime(dateLong);
     this.deaths = deaths;
     this.gameId = gameId;
     this.gameModeString = gameModeString;
     gameMode = GameConstants.SetGameMode(gameModeString);
     this.invalid = invalid;
     this.kills = kills;
     this.mapId = mapId;
     map = GameConstants.SetMap(mapId);
     this.opposingTeamKills = opposingTeamKills;
     this.opposingTeamName = opposingTeamName;
     this.win = win;
 }