统计不同难度的使用异化组合

This commit is contained in:
meixiongfeng 2024-01-29 15:39:22 +08:00
parent 87fdd69542
commit d46f52050d
3 changed files with 36 additions and 4 deletions

View File

@ -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 // 简单

View File

@ -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

View File

@ -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
}