From 2302635855b858496bf78208234bcc45e25c0966 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 11 Dec 2023 17:23:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=87=E5=AE=9A=E8=8B=B1=E9=9B=84=E6=BB=A1?= =?UTF-8?q?=E7=BA=A7=E4=B8=94=E5=85=B1=E9=B8=A3=E5=92=8C=E8=A7=89=E9=86=92?= =?UTF-8?q?=E5=8D=87=E8=87=B3=E6=9C=80=E9=AB=98=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 2 ++ modules/hero/api_awaken.go | 6 ++++-- modules/hero/api_talentlearn.go | 4 +++- modules/hero/model_hero.go | 3 +++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/comm/const.go b/comm/const.go index 91feceb93..d55930bc8 100644 --- a/comm/const.go +++ b/comm/const.go @@ -978,6 +978,8 @@ const ( Rtype241 TaskType = 241 //在任意商店累计购买x次商品 Rtype242 TaskType = 242 //辉月等级达到x级 + Rtype243 TaskType = 243 //指定英雄满级且共鸣和觉醒升至最高状态 + ) const ( MailLineEasy int32 = 1 // 简单 diff --git a/modules/hero/api_awaken.go b/modules/hero/api_awaken.go index 657f9defa..18023ba34 100644 --- a/modules/hero/api_awaken.go +++ b/modules/hero/api_awaken.go @@ -5,6 +5,7 @@ import ( "go_dreamfactory/pb" cfg "go_dreamfactory/sys/configure/structs" "go_dreamfactory/utils" + "strconv" ) // 参数校验 @@ -127,12 +128,13 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (e bManAwaken = true } tasks = append(tasks, comm.GetBuriedParam(comm.Rtype121, 1, cfg.Race)) - tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype37, _hero.HeroID, cfg.Color)) - _, err = this.module.configure.GetHeroAwakenConfig(_hero.HeroID, _hero.JuexingLv+1) if err != nil { // 达到满级觉醒 if _hero.Lv == this.module.configure.GetHeroMaxLv(_hero.Star) && bManAwaken { + tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype37, _hero.HeroID, cfg.Color)) tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype38, _hero.HeroID)) tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype36, _hero.HeroID, cfg.Color, cfg.Job, cfg.Race, _hero.JuexingLv)) + iHeroId, _ := strconv.Atoi(_hero.HeroID) + tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype243, _hero.HeroID, int32(iHeroId))) } } diff --git a/modules/hero/api_talentlearn.go b/modules/hero/api_talentlearn.go index 9fdfa458b..81bdf57c4 100644 --- a/modules/hero/api_talentlearn.go +++ b/modules/hero/api_talentlearn.go @@ -6,6 +6,7 @@ import ( "go_dreamfactory/pb" cfg "go_dreamfactory/sys/configure/structs" "go_dreamfactory/utils" + "strconv" ) // 参数校验 @@ -207,7 +208,8 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe if this.module.configure.GetHeroTalentMaxLv(heroObj.HeroID) == int32(len(talent.Talent)) { tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype37, heroObj.HeroID, cfg.Color)) tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype38, heroObj.HeroID)) - + iHeroId, _ := strconv.Atoi(heroObj.HeroID) + tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype243, heroObj.HeroID, int32(iHeroId))) } } } diff --git a/modules/hero/model_hero.go b/modules/hero/model_hero.go index 13236e2a9..e22cd8a24 100644 --- a/modules/hero/model_hero.go +++ b/modules/hero/model_hero.go @@ -13,6 +13,7 @@ import ( "math" "math/big" "reflect" + "strconv" "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" @@ -586,6 +587,8 @@ func (this *ModelHero) AddCardExp(session comm.IUserSession, hero *pb.DBHero, ex if this.module.configure.GetHeroTalentMaxLv(hero.HeroID) == _l { tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype37, hero.HeroID, cfg.Color)) tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype38, hero.HeroID)) + iHeroId, _ := strconv.Atoi(hero.HeroID) + tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype243, hero.HeroID, int32(iHeroId))) } } }