From 2c7d5c6919ee9224799e60b5a5845e21db4b10c5 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 23 May 2023 11:18:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AB=9E=E6=8A=80=E5=9C=BA?= =?UTF-8?q?=20=E5=88=9D=E5=A7=8B=E5=8C=96=E6=B2=A1=E6=9C=89=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E5=AE=9A=E4=BD=8D=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/arena/api_info.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/arena/api_info.go b/modules/arena/api_info.go index 2faeae416..cfe634583 100644 --- a/modules/arena/api_info.go +++ b/modules/arena/api_info.go @@ -6,6 +6,7 @@ import ( "go_dreamfactory/pb" cfg "go_dreamfactory/sys/configure/structs" "go_dreamfactory/sys/db" + "math/rand" "time" ) @@ -61,6 +62,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.ArenaInfoReq) (code code = pb.ErrorCode_ConfigNoFound return } + info.Loc = []float64{float64(info.Dan), float64(rand.Int31n(100)) / 1000.0} if err = this.module.modelArena.Add(session.GetUserId(), info); err != nil { this.module.Errorln(err) }