Example #1
0
        public StatsUpdateList PullSurvivorStats(StatsUpdateList iList, bool iGatherFromAllPlayers)
        {
            iList.Clear();
            RunReport runReport = RunReport.Generate(Run.instance, GameResultType.Unknown);
            List <RunReport.PlayerInfo> playerInfoList = new List <RunReport.PlayerInfo> {
            };
            DateTime now   = DateTime.Now;
            TimeSpan delta = now - timeStart;

            for (int i = 0; i < runReport.playerInfoCount; i++)
            {
                if ((iGatherFromAllPlayers) ||
                    (runReport.GetPlayerInfo(i).isLocalPlayer))
                {
                    RunReport.PlayerInfo playerInfo = runReport.GetPlayerInfo(i);
                    ulong totalDamageDealt          = playerInfo.statSheet.GetStatValueULong(StatDef.totalDamageDealt) +
                                                      playerInfo.statSheet.GetStatValueULong(StatDef.totalMinionDamageDealt);


                    // The server doesn't have access to playerInfo.networkUser.userName, playerInfo.name, or playerInfo.networkUser.GetNetworkPlayerName().GetResolvedName();

                    string nameIdentifier = playerInfo.bodyName;

                    StatsUpdate update = new StatsUpdate(i + 1,
                                                         nameIdentifier,
                                                         delta,
                                                         totalDamageDealt,
                                                         playerInfo.statSheet.GetStatValueULong(StatDef.totalKills));
                    iList.Add(update);
                }
            }

            return(iList);
        }
Example #2
0
        public StatsUpdateList PullSurvivorStats(StatsUpdateList iList, bool iGatherFromAllPlayers)
        {
            iList.Clear();

            DateTime now  = DateTime.Now;
            DateTime then = DateTime.Now;

            TimeSpan span = now - then;

            foreach (StatsUpdate update in statsList.statsUpdateList)
            {
                StatsUpdate newUpdate = new StatsUpdate(update.player, update.identity, span, update.damageDealt, update.totalKills);
                iList.Add(newUpdate);
            }
            return(iList);
        }
Example #3
0
 public void Add(StatsUpdate update)
 {
     statsUpdateList.Add(update);
 }