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, });
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)); }
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); }
internal static void Reset() { Class=null; Character=new CharacterCache(); Combat=new CombatCache(); Target=new TargetHandler(); NavigationCache=new Navigation(); Stats=new BotStatistics(); shuttingDownBot=false; }
public decimal TestBotSpeed(int botId) { BotInfo botInfo; return(BotStatistics.TryGetValue(botId, out botInfo) ? botInfo.Speed : 0); }