修复竞技场 初始化没有匹配定位数据
This commit is contained in:
parent
2e66805b3a
commit
2c7d5c6919
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user