上传竞技场奖励领取错误问题

This commit is contained in:
liwei1dao 2024-02-02 11:01:11 +08:00
parent d6a510c993
commit 57b2c280e5
2 changed files with 16 additions and 0 deletions

View File

@ -65,6 +65,18 @@ func (this *apiComp) TaskReceive(session comm.IUserSession, req *pb.ArenaTaskRec
}
return
}
if err = this.module.modelArena.Change(session.GetUserId(), map[string]interface{}{
"tasks": info.Tasks,
}); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
session.SendMsg(string(this.module.GetType()), "taskreceive", &pb.ArenaTaskReceiveResp{Tid: req.Tid, Award: atno})
return
}

View File

@ -781,6 +781,10 @@ func (this *User) change(session comm.IUserSession, attrs map[string]int32) (atn
change.Consumemoney += add
default:
err = errors.New(fmt.Sprintf("%s no supported", attr))
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Message: err.Error(),
}
return
}
atno = append(atno, temp)