From 575e3736d5f2ef9e1799a804f90f68f8ff4d8bcc Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Mon, 26 Dec 2022 18:30:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/rtask/verifyHandle.go | 9 +++++++-- modules/user/api_create.go | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/rtask/verifyHandle.go b/modules/rtask/verifyHandle.go index 5148c949a..0c8af4086 100644 --- a/modules/rtask/verifyHandle.go +++ b/modules/rtask/verifyHandle.go @@ -189,7 +189,11 @@ func (this *ModelRtask) verifyRtype5(uid string, cfg *cfg.GameRdtaskCondiData) ( } if ml, y := m.(comm.IHero); y { - var hero *pb.DBHero + var ( + hero *pb.DBHero + heroId string + ) + for _, v := range ml.GetHeroList(uid) { if cast.ToString(cfg.Data1) == v.HeroID { hero = v @@ -199,13 +203,14 @@ func (this *ModelRtask) verifyRtype5(uid string, cfg *cfg.GameRdtaskCondiData) ( var count int32 if hero != nil { + heroId = hero.HeroID for _, v := range hero.EquipID { if v != "" { count++ } } } - if ok, err = soEqual(hero.HeroID, cast.ToString(cfg.Data1)); !ok { + if ok, err = soEqual(heroId, cast.ToString(cfg.Data1)); !ok { return } return soGreatEqual(count, cfg.Data2) diff --git a/modules/user/api_create.go b/modules/user/api_create.go index 552a7bd93..dae16099b 100644 --- a/modules/user/api_create.go +++ b/modules/user/api_create.go @@ -99,7 +99,7 @@ func (this *apiComp) Create(session comm.IUserSession, req *pb.UserCreateReq) (c } //初始化用户设置 - this.module.modelSetting.InitSetting(session.GetUserId()) + // this.module.modelSetting.InitSetting(session.GetUserId()) if err := session.SendMsg(string(this.module.GetType()), UserSubTypeCreate, &pb.UserCreateResp{IsSucc: true}); err != nil { code = pb.ErrorCode_SystemError