更新校验

This commit is contained in:
wh_zcy 2022-12-26 18:30:59 +08:00
parent 589f438106
commit 575e3736d5
2 changed files with 8 additions and 3 deletions

View File

@ -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)

View File

@ -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