コード例 #1
0
        public long GetStatistic(PlayerMobile pm, Func <PvPProfileHistoryEntry, long> fetch)
        {
            if (pm == null || fetch == null)
            {
                return(0);
            }

            return(Teams.Aggregate(0L, (v, t) => v + GetStatistic(t, pm, fetch)));
        }
コード例 #2
0
 public TeamManager GetWinningTeam()
 {
     return(Teams.Aggregate(
                (bestSoFar, next) =>
     {
         if (bestSoFar == null || bestSoFar.Score == next.Score)
         {
             return null;
         }
         return next.Score > bestSoFar.Score ? next : bestSoFar;
     }));
 }
コード例 #3
0
 public int GetCurrentCapacity()
 {
     return(Teams.Aggregate(0, (v, t) => v + t.Count));
 }
コード例 #4
0
 public int GetMaxCapacity()
 {
     return(Teams.Aggregate(0, (v, t) => v + t.MaxCapacity));
 }