From 6d7545c8c7a41fda2c9016bafcd3d7dba24a888b Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Tue, 3 Jan 2023 16:03:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=9D=E5=A7=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/user/api_create.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/user/api_create.go b/modules/user/api_create.go index dae16099b..d75a98849 100644 --- a/modules/user/api_create.go +++ b/modules/user/api_create.go @@ -49,11 +49,19 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (c return } + //初始体力 + var ps int32 + gpd := this.module.configure.GetPlayerlvConf(self.Lv) + if gpd != nil { + ps = gpd.PsCeiling + } + update := map[string]interface{}{ "name": req.NickName, //设置昵称 "created": true, //创角标识 "figure": req.Figure, //设置形象 "gender": req.Gender, //设置性别 + "ps": ps, //设置初始体力 } globalConf := this.module.globalConf