diff --git a/SuiseiBot.Export/Properties/AssemblyInfo.cs b/SuiseiBot.Export/Properties/AssemblyInfo.cs index 219e2dd..bd132d9 100644 --- a/SuiseiBot.Export/Properties/AssemblyInfo.cs +++ b/SuiseiBot.Export/Properties/AssemblyInfo.cs @@ -9,8 +9,8 @@ [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("SuiseiBot.Export")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2020")] +[assembly: AssemblyProduct("SuiseiBot")] +[assembly: AssemblyCopyright("Copyright © SuiseiKawaii 2020")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 //通过使用 "*",如下所示: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.1.0")] -[assembly: AssemblyFileVersion("1.0.1.0")] +[assembly: AssemblyVersion("0.2.2.0923")] +[assembly: AssemblyFileVersion("0.2.2.0923")] diff --git a/SuiseiBot/PCRGuildManager/GuildBattleManager.cs b/SuiseiBot/PCRGuildManager/GuildBattleManager.cs index b0e57aa..fcf29b5 100644 --- a/SuiseiBot/PCRGuildManager/GuildBattleManager.cs +++ b/SuiseiBot/PCRGuildManager/GuildBattleManager.cs @@ -182,7 +182,7 @@ public void GuildBattleResponse() //指令分发 //显示出刀表 case PCRGuildCmdType.ShowAttackList: - if(!ZeroArgsCheck() || !MemberCheck() || !InBattleCheck()) return; + if(!MemberCheck() || !InBattleCheck()) return; ShowAttackList(); break; @@ -831,6 +831,7 @@ private void SL(bool cleanSL = false) { //仅能管理员执行 需要额外参数 //判断今天是否使用过SL + #region 参数检查 long memberUid; @@ -860,6 +861,7 @@ private void SL(bool cleanSL = false) return; } #endregion + if (member.SL >= Utils.GetUpdateStamp()) { if (!GuildBattleDB.SetMemberSL(memberUid, true)) @@ -922,15 +924,16 @@ private void LeaveTree() { #region 参数检查 long memberUid; - switch (Utils.CheckForLength(CommandArgs,0)) + switch (Utils.CheckForLength(CommandArgs,1)) { case LenType.Legitimate: //正常 - memberUid = SenderQQ.Id; - break; - case LenType.Extra: //管理员撤销 memberUid = GetUidInMsg(); if (memberUid == -1) return; break; + case LenType.Extra: + QQGroup.SendGroupMessage(CQApi.CQCode_At(SenderQQ.Id), + "有多余参数"); + return; default: QQGroup.SendGroupMessage(CQApi.CQCode_At(SenderQQ.Id), "发生未知错误,请联系机器人管理员"); @@ -1204,7 +1207,37 @@ private void ShowAllAttackList() /// private void ShowAttackList() { - List todayAttacksList = GuildBattleDB.GetTodayAttacks(SenderQQ.Id); + #region 参数检查 + long memberUid; + switch (Utils.CheckForLength(CommandArgs,0)) + { + case LenType.Legitimate: //正常 + memberUid = SenderQQ.Id; + break; + case LenType.Extra: //管理员查询 + if(!IsAdmin()) return;//检查权限 + memberUid = GetUidInMsg(); + if (memberUid == -1) return; + break; + default: + QQGroup.SendGroupMessage(CQApi.CQCode_At(SenderQQ.Id), + "发生未知错误,请联系机器人管理员"); + ConsoleLog.Error("Unknown error","LenType"); + return; + } + + ConsoleLog.Debug("get Uid", memberUid); + + //查找成员信息 + MemberInfo member = GuildBattleDB.GetMemberInfo(memberUid); + if (member == null) + { + DBMsgUtils.DatabaseFailedTips(GBEventArgs); + return; + } + #endregion + + List todayAttacksList = GuildBattleDB.GetTodayAttacks(memberUid); //首先检查是否记录为空 if (todayAttacksList == null) { @@ -1213,8 +1246,9 @@ private void ShowAttackList() } if (todayAttacksList.Count == 0) { - QQGroup.SendGroupMessage(CQApi.CQCode_At(SenderQQ.Id), - "你今天还没出刀呢!"); + QQGroup.SendGroupMessage(IsAdmin() ? "成员" : "", + CQApi.CQCode_At(SenderQQ.Id), + IsAdmin() ? "今天还没出刀呢!" : "你今天还没出刀呢!"); return; } //构造群消息文本 @@ -1476,7 +1510,7 @@ private long GetUidInMsg() const string ROUND_CODE = "ABCDEFGHIJKLNMOPQRSTUVWXYZ"; private string GetBossCode(int round, int order) { - return $"{ROUND_CODE[round - 1]}{order}"; + return round > 26 ? $"{round} - {order}" : $"{ROUND_CODE[round - 1]}{order}"; } #endregion } diff --git a/SuiseiBot/Properties/AssemblyInfo.cs b/SuiseiBot/Properties/AssemblyInfo.cs index 3f6745b..0072d2d 100644 --- a/SuiseiBot/Properties/AssemblyInfo.cs +++ b/SuiseiBot/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //通过使用 "*",如下所示: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("0.2.2.0923")] +[assembly: AssemblyFileVersion("0.2.2.0923")]