Esempio n. 1
0
 /// <summary>
 /// TeamMemberInfo constructor
 /// </summary>
 /// <param name="inviteDateLong">Date invited to the team specified as epoch milliseconds</param>
 /// <param name="joinDateLong">Date joined the team specified as epoch milliseconds.
 /// This can be null if the player has not joined the team yet.</param>
 /// <param name="playerId">Player ID</param>
 /// <param name="status">Player status</param>
 public TeamMemberInfo(long inviteDateLong, long?joinDateLong, long playerId, string status)
 {
     this.inviteDateLong = inviteDateLong;
     inviteDate          = CreepScore.EpochToDateTime(inviteDateLong);
     this.joinDateLong   = joinDateLong;
     if (joinDateLong != null)
     {
         joinDate = CreepScore.EpochToDateTime((long)joinDateLong);
     }
     this.playerId = playerId;
     this.status   = status;
 }
Esempio n. 2
0
 /// <summary>
 /// Team constructor
 /// </summary>
 /// <param name="createDateLong">Date when team was created specified as epoch milliseconds</param>
 /// <param name="lastGameDateLong">Date of last game specified as epoch milliseconds</param>
 /// <param name="lastJoinDateLong">Date when summoner last joined the team specified as epoch milliseconds</param>
 /// <param name="lastJoinedRankedTeamQueueDateLong">Date when this team last joined queue specified as epoch milliseconds</param>
 /// <param name="matchHistoryA">JArray of match history summaries</param>
 /// <param name="modifyDateLong">Date this team was last modified specified as epoch milliseconds</param>
 /// <param name="name">Name of the team</param>
 /// <param name="rosterO">JObject representing the team roster</param>
 /// <param name="secondLastJoinDateLong">Second to last summoner join date specified as epoch milliseconds</param>
 /// <param name="status">Team status</param>
 /// <param name="tag">Team tag</param>
 /// <param name="teamIdO">JObject representing the team ID</param>
 /// <param name="teamStatDetailsA">JArray representing the team stat details</param>
 /// <param name="thirdLastJoinDateLong">Third to last summoner join date specified as epoch milliseconds</param>
 public Team(long createDateLong,
             string fullId,
             long?lastGameDateLong,
             long lastJoinDateLong,
             long lastJoinedRankedTeamQueueDateLong,
             JArray matchHistoryA,
             long modifyDateLong,
             string name,
             JObject rosterO,
             long?secondLastJoinDateLong,
             string status,
             string tag,
             JArray teamStatDetailsA,
             long?thirdLastJoinDateLong)
 {
     teamStatDetails       = new List <TeamStatDetail>();
     matchHistory          = new List <MatchHistorySummary>();
     this.createDateLong   = createDateLong;
     createDate            = CreepScore.EpochToDateTime(createDateLong);
     this.fullId           = fullId;
     this.lastGameDateLong = lastGameDateLong;
     if (lastGameDateLong != null)
     {
         lastGameDate = CreepScore.EpochToDateTime((long)lastGameDateLong);
     }
     this.lastJoinDateLong = lastJoinDateLong;
     lastJoinDate          = CreepScore.EpochToDateTime(lastJoinDateLong);
     this.lastJoinedRankedTeamQueueDateLong = lastJoinedRankedTeamQueueDateLong;
     lastJoinedRankedTeamQueueDate          = CreepScore.EpochToDateTime(lastJoinedRankedTeamQueueDateLong);
     if (matchHistoryA != null)
     {
         LoadMatchHistory(matchHistoryA);
     }
     this.modifyDateLong = modifyDateLong;
     modifyDate          = CreepScore.EpochToDateTime(modifyDateLong);
     this.name           = name;
     LoadRoster(rosterO);
     this.secondLastJoinDateLong = secondLastJoinDateLong;
     if (secondLastJoinDateLong != null)
     {
         secondLastJoinDate = CreepScore.EpochToDateTime((long)secondLastJoinDateLong);
     }
     this.status = status;
     this.tag    = tag;
     LoadTeamStatDetails(teamStatDetailsA);
     this.thirdLastJoinDateLong = thirdLastJoinDateLong;
     if (thirdLastJoinDateLong != null)
     {
         thirdLastJoinDate = CreepScore.EpochToDateTime((long)thirdLastJoinDateLong);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// PlayerStatsSummary constructor
 /// </summary>
 /// <param name="aggregatedStatsO">JArray of aggregated stats</param>
 /// <param name="losses">Number of losses for this queue type. Returned only for ranked queue types only. Always 0 for normal queues</param>
 /// <param name="modifyDateLong">Date stats were last modified specified as epoch milliseconds</param>
 /// <param name="playerStatSummaryTypeString">Player stats summary type as a string</param>
 /// <param name="wins">Number of wins for this queue type</param>
 /// <param name="season">The season that this day represents</param>
 public PlayerStatsSummary(JObject aggregatedStatsO,
                           int?losses,
                           long modifyDateLong,
                           string playerStatSummaryTypeString,
                           int wins)
 {
     LoadAggregatedStats(aggregatedStatsO);
     this.losses         = losses;
     this.modifyDateLong = modifyDateLong;
     modifyDate          = CreepScore.EpochToDateTime(modifyDateLong);
     this.playerStatSummaryTypeString = playerStatSummaryTypeString;
     playerStatSummaryType            = GameConstants.SetPlayerStatSummaryType(playerStatSummaryTypeString);
     this.wins = wins;
 }
Esempio n. 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);
        }
Esempio n. 5
0
 public MatchReferenceAdvanced(long champion,
                               string lane,
                               long matchId,
                               string platformId,
                               string queue,
                               string role,
                               string season,
                               long timestamp)
 {
     this.champion      = champion;
     this.laneString    = lane;
     this.lane          = AdvancedMatchHistoryConstants.SetLane(lane);
     this.matchId       = matchId;
     this.platformId    = platformId;
     this.queueString   = queue;
     this.queue         = GameConstants.SetQueue(queue);
     this.roleString    = role;
     this.role          = AdvancedMatchHistoryConstants.SetRole(role);
     this.seasonString  = season;
     this.season        = AdvancedMatchHistoryConstants.SetSeason(season);
     this.timestampLong = timestamp;
     this.timestamp     = CreepScore.EpochToDateTime(timestamp);
 }
Esempio n. 6
0
 public void SetRevisionDate(long date)
 {
     revisionDateLong = date;
     revisionDate     = CreepScore.EpochToDateTime(date);
 }