Skip to content

Commit

Permalink
Add limit to amounts of teams when arranging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Metric-Void committed May 25, 2020
1 parent 3b65064 commit 836579d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Native.Core/Export/CQEventExport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private static int Initialize (int authCode)
// 反射获取 AppData 实例
Type appDataType = typeof (AppData);
// 注册一个 CQApi 实例
AppInfo appInfo = new AppInfo ("com.metricv.pcrguild", 1, 9, "公主焊接工会战排刀器", "1.0.1", 1, "MetricVoid", "使用概率分布和背包问题 收集数据来排刀", authCode);
AppInfo appInfo = new AppInfo ("com.metricv.pcrguild", 1, 9, "公主焊接工会战排刀器", "1.0.2", 1, "MetricVoid", "使用概率分布和背包问题 收集数据来排刀", authCode);
appDataType.GetRuntimeProperty ("CQApi").GetSetMethod (true).Invoke (null, new object[] { new CQApi (appInfo) });
AppData.UnityContainer.RegisterInstance<CQApi> ("com.metricv.pcrguild", AppData.CQApi);
// 向容器注册一个 CQLog 实例
Expand Down
2 changes: 1 addition & 1 deletion Native.Core/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"ret": 1,
"apiver": 9,
"name": "公主焊接工会战排刀器",
"version": "1.0.1",
"version": "1.0.2",
"version_id": 1,
"author": "MetricVoid",
"description": "使用概率分布和背包问题 收集数据来排刀",
Expand Down
8 changes: 6 additions & 2 deletions com.metricv.pcrguild.Core/MessageDigestor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,11 @@ private void proc_getOptimalSol(ref StringBuilder sb, String cmd, long fromQQ, l
}

sb.AppendLine($"整合后有{teamedDamages.Keys.Count}个队伍");

if(teamedDamages.Keys.Count>90) {
sb.AppendLine("啊 这队伍数量太多了(最多90个)");
sb.AppendLine("请各位先删除掉不参战的队伍(使用指令“队伍列表”查看登记的队伍,“查询 周目=xxx BOSS=xx” 查看记录,然后“删除 队伍=<队伍名>” 删掉不用的队伍)");
return;
}
// Find Gaussian for each team.
Dictionary<String, Double> predictedDamages = new Dictionary<string, double>();
foreach(KeyValuePair<String, List<int>> e in teamedDamages) {
Expand Down Expand Up @@ -526,7 +530,7 @@ private String replyRaw(String head, String cmd, long fromQQ, long fromGroup) {
sb.AppendLine(head);
if (cmd == "版本") {
sb.AppendLine("行会战计算器 by MetricVoid");
sb.AppendLine("ver. 1.0.0 - ALPHA");
sb.AppendLine("ver. 1.0.2 - ALPHA");
sb.AppendLine("使用 行会战#帮助 查看帮助");
} else if (rx_addRecord.IsMatch(cmd)) {
proc_addRecord(ref sb, cmd, fromQQ, fromGroup);
Expand Down

0 comments on commit 836579d

Please sign in to comment.