From 94a4737609f1aa907518eda4303a3e2ff864ab63 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Tue, 27 Aug 2024 17:36:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=94=E8=B5=9B=E5=9C=BA=E6=88=BF=E9=97=B4?= =?UTF-8?q?=E6=8E=92=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/tournament.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/worldsrv/tournament.go b/worldsrv/tournament.go index 8519cf2..2bc7ec4 100644 --- a/worldsrv/tournament.go +++ b/worldsrv/tournament.go @@ -966,6 +966,25 @@ func (this *Tournament) GetRank(sortId int64, snid int32) int32 { } if round <= 1 { + d := tm.TmPlayer[snid] + if d != nil { + return int32(d.seq) + } + if useRobot { + n := 0 + for _, v := range tm.TmPlayer { + n = v.seq - 1 + break + } + for k, v := range tm.robotGrades[0] { + if v.copySnid == snid { + if k < n { + return int32(k) + } + return int32(k + 2) + } + } + } return 0 } else { if useRobot {