/// <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;
 }
示例#2
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;
 }
示例#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);
        }
示例#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);
        }
 /// <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;
 }
示例#6
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;
 }