领奖配置读取

This commit is contained in:
meixiongfeng 2023-01-14 19:00:30 +08:00
parent 4f7ba73222
commit 5e63f509b1
2 changed files with 4 additions and 16 deletions

View File

@ -693,12 +693,7 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession) (code pb.ErrorCode) {
break break
} }
} }
var maxGongm int32
conf := this.configure.GetHeroResonanceConfig(cid, v.Star)
if conf != nil {
maxGongm = int32(conf.Maxnum)
}
this.modelHero.moduleHero.Debugf("%d", maxStar, maxLv, maxJux, maxGongm)
// 开始创建英雄 // 开始创建英雄
hero, err := this.modelHero.createOneHero(session.GetUserId(), v.Hid) hero, err := this.modelHero.createOneHero(session.GetUserId(), v.Hid)
if err != nil { if err != nil {
@ -714,14 +709,12 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession) (code pb.ErrorCode) {
hero.Lv = maxLv hero.Lv = maxLv
hero.Star = maxStar hero.Star = maxStar
hero.JuexingLv = int32(maxJux) hero.JuexingLv = int32(maxJux)
hero.ResonateNum = maxGongm
hero.SameCount = 1 hero.SameCount = 1
this.modelHero.PropertyCompute(hero) // 重新计算属性 this.modelHero.PropertyCompute(hero) // 重新计算属性
_heroMap := map[string]interface{}{ _heroMap := map[string]interface{}{
"lv": hero.Lv, "lv": hero.Lv,
"star": hero.Star, "star": hero.Star,
"juexingLv": hero.JuexingLv, "juexingLv": hero.JuexingLv,
"resonateNum": hero.ResonateNum,
"isOverlying": false, "isOverlying": false,
"sameCount": 1, "sameCount": 1,
"normalSkill": hero.NormalSkill, "normalSkill": hero.NormalSkill,

View File

@ -3,7 +3,6 @@ package mline
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
) )
@ -20,7 +19,6 @@ func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.MlineGetR
func (this *apiComp) GetReward(session comm.IUserSession, req *pb.MlineGetRewardReq) (code pb.ErrorCode, data proto.Message) { func (this *apiComp) GetReward(session comm.IUserSession, req *pb.MlineGetRewardReq) (code pb.ErrorCode, data proto.Message) {
var ( var (
curChapter *pb.DBMline // 当前章节信息 curChapter *pb.DBMline // 当前章节信息
stageConf *cfg.GameMainStageData
update map[string]interface{} update map[string]interface{}
rsp *pb.MlineGetRewardResp rsp *pb.MlineGetRewardResp
) )
@ -28,18 +26,15 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.MlineGetReward
if code = this.GetRewardCheck(session, req); code != pb.ErrorCode_Success { if code = this.GetRewardCheck(session, req); code != pb.ErrorCode_Success {
return return
} }
if stageConf = this.module.configure.GetMainStageConf(req.CId); stageConf == nil { // 配置文件校验
code = pb.ErrorCode_MainlineNotFindChapter mLineConf := this.module.configure.GetMainChapterConf(req.CId)
return
}
mLineConf := this.module.configure.GetMainChapterConf(stageConf.Chapterid)
if mLineConf == nil { if mLineConf == nil {
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
return return
} }
list, _ := this.module.modelMline.getMainlineList(session.GetUserId()) list, _ := this.module.modelMline.getMainlineList(session.GetUserId())
for _, v := range list { for _, v := range list {
if stageConf.Chapterid == v.ChapterId { if req.CId == v.ChapterId {
curChapter = v curChapter = v
break break
} }