Exemplo n.º 1
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;
 }
Exemplo n.º 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);
 }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
0
 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);
     }
 }
Exemplo n.º 5
0
 public string ConvertGameType(GameConstants.GameType gameType)
 {
     if (gameType == GameConstants.GameType.Custom)
     {
         return("Custom Game");
     }
     else if (gameType == GameConstants.GameType.Matched)
     {
         return("Matched Game");
     }
     else if (gameType == GameConstants.GameType.CoOp)
     {
         return("Coop v AI Game");
     }
     else if (gameType == GameConstants.GameType.Tutorial)
     {
         return("Tutorial Game");
     }
     else
     {
         return("None");
     }
 }
Exemplo n.º 6
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);
        }
Exemplo n.º 7
0
 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);
     }
 }
Exemplo n.º 8
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;
 }
Exemplo n.º 9
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);
 }