From 5e63f509b1dd29255718885407b104917bacd962 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Sat, 14 Jan 2023 19:00:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=86=E5=A5=96=E9=85=8D=E7=BD=AE=E8=AF=BB?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/module.go | 9 +-------- modules/mline/api_getReward.go | 11 +++-------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/modules/hero/module.go b/modules/hero/module.go index f4d708b36..a3513fb30 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -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, diff --git a/modules/mline/api_getReward.go b/modules/mline/api_getReward.go index 4c52029e3..d6cc7fe2c 100644 --- a/modules/mline/api_getReward.go +++ b/modules/mline/api_getReward.go @@ -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 }