From 275ee9e1b1aa362e147da6c72b503da7f1ab71c4 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 18 May 2023 17:39:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E4=BB=BB=E5=8A=A1=E5=9F=8B=E7=82=B9?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 5 +++++ modules/equipment/api_equip.go | 1 + modules/items/modelitems.go | 4 ++++ modules/pagoda/api_challengeover.go | 2 +- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/comm/const.go b/comm/const.go index b8f5a66a2..ced8917a6 100644 --- a/comm/const.go +++ b/comm/const.go @@ -633,6 +633,11 @@ const ( Rtype159 TaskType = 159 //主线第X章关卡全部达到三星 Rtype160 TaskType = 160 //主线总星数达到X星 Rtype161 TaskType = 161 //在自动战斗过程中完成另一场战斗 + + Rtype168 TaskType = 168 //完成功夫大师挑战塔第X层 + Rtype169 TaskType = 169 //触发指定套装的套装效果 + Rtype170 TaskType = 170 //获得指定材料X个 + ) const ( diff --git a/modules/equipment/api_equip.go b/modules/equipment/api_equip.go index 532ebb4fe..5f86b930f 100644 --- a/modules/equipment/api_equip.go +++ b/modules/equipment/api_equip.go @@ -180,6 +180,7 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) if hero.SuiteId != 0 { tasks = append(tasks, comm.GettaskParam(comm.Rtype49, 1, hero.Suite1Star, hero.Suite1Lv)) tasks = append(tasks, comm.GettaskParam(comm.Rtype98, 1, hero.Suite1Lv)) + tasks = append(tasks, comm.GettaskParam(comm.Rtype169, hero.SuiteId)) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype49, 1, hero.Suite1Star, hero.Suite1Lv) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype98, 1, hero.Suite1Lv) } diff --git a/modules/items/modelitems.go b/modules/items/modelitems.go index ce0ff9b87..55d76eb8c 100644 --- a/modules/items/modelitems.go +++ b/modules/items/modelitems.go @@ -9,6 +9,7 @@ import ( "go_dreamfactory/sys/configure" cfg "go_dreamfactory/sys/configure/structs" "go_dreamfactory/sys/db" + "go_dreamfactory/utils" "math" "time" @@ -293,6 +294,9 @@ func (this *ModelItemsComp) AddItemsToUserPack(uId string, items map[string]int3 return } change = append(change, add...) + // + go this.module.ModuleRtask.TriggerTask(uId, comm.GettaskParam(comm.Rtype170, utils.ToInt32(k), v)) + } if len(del) > 0 { if err = this.DeleteUserPack(uId, del...); err != nil { diff --git a/modules/pagoda/api_challengeover.go b/modules/pagoda/api_challengeover.go index 01e8f7f6b..a1635f208 100644 --- a/modules/pagoda/api_challengeover.go +++ b/modules/pagoda/api_challengeover.go @@ -144,6 +144,6 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal return } // 任务相关 - this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype58, 1), comm.GettaskParam(comm.Rtype59, pagoda.PagodaId)) + go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype168, conf.Tab, pagoda.Data[conf.Tab])) return }