From d46f52050da17dbb476e1db179cec685c6ae9e9b Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 29 Jan 2024 15:39:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=B8=8D=E5=90=8C=E9=9A=BE?= =?UTF-8?q?=E5=BA=A6=E7=9A=84=E4=BD=BF=E7=94=A8=E5=BC=82=E5=8C=96=E7=BB=84?= =?UTF-8?q?=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 2 ++ modules/integral/api_challengeover.go | 33 ++++++++++++++++++++++++++- modules/integral/comp_configure.go | 5 ++-- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/comm/const.go b/comm/const.go index efa5cbc21..aea37cc69 100644 --- a/comm/const.go +++ b/comm/const.go @@ -1017,6 +1017,8 @@ const ( Rtype254 TaskType = 254 //通关积分BOSS难度{0} Rtype255 TaskType = 255 //积分BOSS进行{0}场战斗 Rtype256 TaskType = 256 //积分BOSS{0}难度获得{1}及以上评级 + Rtype259 TaskType = 259 //积分BOSS{0}难度,使用异化组合{1}通关挑战 + ) const ( MailLineEasy int32 = 1 // 简单 diff --git a/modules/integral/api_challengeover.go b/modules/integral/api_challengeover.go index e4599f161..9aeeff795 100644 --- a/modules/integral/api_challengeover.go +++ b/modules/integral/api_challengeover.go @@ -4,6 +4,7 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/pb" cfg "go_dreamfactory/sys/configure/structs" + "strconv" ) //参数校验 @@ -168,8 +169,38 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.IntegralCh tasks = append(tasks, comm.GetBuriedParam(comm.Rtype254, 1, req.Nandu)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype255, 1)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype256, req.Nandu, req.Report.Grade)) - go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { + var skillgroup int32 + // 异化埋点数据校验 + if c, e := this.module.configure.GetIntegralBUffSkillGroup(); e == nil { + for _, v := range c { + if mp, e := this.module.configure.GetIntegralBUff(v); e == nil { + bFound := false + for _, v := range mp { + bFound := false + for _, v1 := range req.Report.Info.Buffer { + if v1 == v { + bFound = true + break + } + } + if !bFound { + skillgroup = 0 + break + } + } + if bFound { + skillgroup = v + break + } + } + } + } + if skillgroup != 0 { // 统计型任务 来统计积分boss难度对应的异化值 + tasks = append(tasks, comm.GetBuriedParam2(comm.Rtype259, strconv.Itoa(int(req.Nandu)), skillgroup)) + } + + go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { this.module.ModuleBuried.TriggerBuried(session, tasks...) }) return diff --git a/modules/integral/comp_configure.go b/modules/integral/comp_configure.go index ddd3e82f1..631cfcb03 100644 --- a/modules/integral/comp_configure.go +++ b/modules/integral/comp_configure.go @@ -237,16 +237,15 @@ func (this *configureComp) GetIntegralAchieveByKey(id int32) (result *cfg.GameIn return } -func (this *configureComp) GetIntegralBUff(group int32) (mp map[int32]struct{}, err error) { +func (this *configureComp) GetIntegralBUff(group int32) (szSkillId []int32, err error) { var ( v interface{} ) - mp = make(map[int32]struct{}, 0) if v, err = this.GetConfigure(game_integralbuffgroup); err == nil { if configure, ok := v.(*cfg.GameIntegralBuffGroup); ok { if result := configure.Get(group); result != nil { for _, v := range result.Skillid { - mp[v] = struct{}{} + szSkillId = append(szSkillId, v) } return }