예제 #1
0
 static public string RenderForUI(this BotStatistics statistics) =>
 null == statistics ? null :
 string.Join(Environment.NewLine,
             new[]
 {
     "started at: " + statistics?.StartTimeCal.ToLongTimeString(),
     "bot step count: " + statistics?.BotStepCount,
     "---- reports read ----",
     "report.summary: " + statistics?.ReportSummaryReadCount +
     ", report.detail: " + statistics?.ReportDetailReadCount,
     "attacks sent: " + statistics?.AttackSentCount,
 });
예제 #2
0
파일: Server.cs 프로젝트: e2tox/topbit
        public bool LogBotSubmit(Bot bot, string work)
        {
            BotInfo botInfo;

            if (!BotStatistics.TryGetValue(bot.Id, out botInfo))
            {
                botInfo = new BotInfo(bot);
                lock (BotStatistics)
                {
                    BotStatistics[bot.Id] = botInfo;
                }
            }
            return(botInfo.SubmitWork(work));
        }
예제 #3
0
파일: Server.cs 프로젝트: e2tox/topbit
        public void LogBotWork(Bot bot, string work)
        {
            BotInfo botInfo;

            if (!BotStatistics.TryGetValue(bot.Id, out botInfo))
            {
                botInfo = new BotInfo(bot);
                lock (BotStatistics)
                {
                    BotStatistics[bot.Id] = botInfo;
                }
            }
            Work w = Work.Parse(work);

            botInfo.RequestWork(work, w.PreviousHash);
        }
예제 #4
0
파일: Bot.cs 프로젝트: NEVEROYATNII/Funky
 internal static void Reset()
 {
     Class=null;
              Character=new CharacterCache();
              Combat=new CombatCache();
              Target=new TargetHandler();
              NavigationCache=new Navigation();
              Stats=new BotStatistics();
              shuttingDownBot=false;
 }
예제 #5
0
파일: Server.cs 프로젝트: e2tox/topbit
        public decimal TestBotSpeed(int botId)
        {
            BotInfo botInfo;

            return(BotStatistics.TryGetValue(botId, out botInfo) ? botInfo.Speed : 0);
        }