From 64e0db9f9637c795751256783f51071ba6d53ae1 Mon Sep 17 00:00:00 2001 From: lixiangwuxian Date: Sun, 4 May 2025 00:22:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20ssPlusN=20=E5=87=BD?= =?UTF-8?q?=E6=95=B0=E4=B8=AD=E7=9A=84=E6=8E=92=E5=90=8D=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=8C=E7=A1=AE=E4=BF=9D=E7=9B=AE=E6=A0=87?= =?UTF-8?q?=E6=8E=92=E5=90=8D=E4=B8=BA=201=20=E6=97=B6=E7=9A=84=E5=A4=84?= =?UTF-8?q?=E7=90=86=E6=9B=B4=E5=8A=A0=E5=87=86=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/beatleader/beatleader.go | 2 +- handler/scoresaber/score.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/handler/beatleader/beatleader.go b/handler/beatleader/beatleader.go index 18522d8..c17e4b8 100644 --- a/handler/beatleader/beatleader.go +++ b/handler/beatleader/beatleader.go @@ -114,7 +114,7 @@ func blPlus(msg model.Message) (reply *model.Reply) { //寻找leaderboard中排名为userInfo.CountryRank-N的玩家 var targetPlayer beatleader.PlayerDataLite targetRank := userInfo.CountryRank - N - if targetRank < 0 { + if targetRank <= 0 { targetRank = 1 } if len(leaderboard) == 0 { diff --git a/handler/scoresaber/score.go b/handler/scoresaber/score.go index 929c1a8..d9d5ac7 100644 --- a/handler/scoresaber/score.go +++ b/handler/scoresaber/score.go @@ -112,7 +112,7 @@ func ssPlusN(msg model.Message) (reply *model.Reply) { //寻找leaderboard中排名为userInfo.CountryRank-N的玩家 var targetPlayer scoresaber.PlayerData targetRank := userInfo.CountryRank - N - if targetRank < 0 { + if targetRank <= 0 { targetRank = 1 } if len(leaderboard.Players) == 0 {