领奖配置读取
This commit is contained in:
parent
4f7ba73222
commit
5e63f509b1
@ -693,12 +693,7 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession) (code pb.ErrorCode) {
|
||||
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)
|
||||
if err != nil {
|
||||
@ -714,14 +709,12 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession) (code pb.ErrorCode) {
|
||||
hero.Lv = maxLv
|
||||
hero.Star = maxStar
|
||||
hero.JuexingLv = int32(maxJux)
|
||||
hero.ResonateNum = maxGongm
|
||||
hero.SameCount = 1
|
||||
this.modelHero.PropertyCompute(hero) // 重新计算属性
|
||||
_heroMap := map[string]interface{}{
|
||||
"lv": hero.Lv,
|
||||
"star": hero.Star,
|
||||
"juexingLv": hero.JuexingLv,
|
||||
"resonateNum": hero.ResonateNum,
|
||||
"isOverlying": false,
|
||||
"sameCount": 1,
|
||||
"normalSkill": hero.NormalSkill,
|
||||
|
@ -3,7 +3,6 @@ package mline
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
|
||||
"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) {
|
||||
var (
|
||||
curChapter *pb.DBMline // 当前章节信息
|
||||
stageConf *cfg.GameMainStageData
|
||||
update map[string]interface{}
|
||||
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 {
|
||||
return
|
||||
}
|
||||
if stageConf = this.module.configure.GetMainStageConf(req.CId); stageConf == nil { // 配置文件校验
|
||||
code = pb.ErrorCode_MainlineNotFindChapter
|
||||
return
|
||||
}
|
||||
mLineConf := this.module.configure.GetMainChapterConf(stageConf.Chapterid)
|
||||
|
||||
mLineConf := this.module.configure.GetMainChapterConf(req.CId)
|
||||
if mLineConf == nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
return
|
||||
}
|
||||
list, _ := this.module.modelMline.getMainlineList(session.GetUserId())
|
||||
for _, v := range list {
|
||||
if stageConf.Chapterid == v.ChapterId {
|
||||
if req.CId == v.ChapterId {
|
||||
curChapter = v
|
||||
break
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user