上传任务埋点代码处理

This commit is contained in:
liwei1dao 2023-05-24 22:29:48 +08:00
parent 9f0ad2ed8c
commit c759dfae0b
4 changed files with 15 additions and 10 deletions

View File

@ -25,8 +25,9 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq)
equipments []*pb.DB_Equipment equipments []*pb.DB_Equipment
updatequipment []*pb.DB_Equipment updatequipment []*pb.DB_Equipment
equipNum int32 equipNum int32
equipStr map[int32]int32 = make(map[int32]int32) // equipStr map[int32]int32 = make(map[int32]int32)
// equipLv map[int32]int32 = make(map[int32]int32) // equipLv map[int32]int32 = make(map[int32]int32)
minstr int32 = 9999
minlv int32 = 9999 minlv int32 = 9999
hero *pb.DBHero hero *pb.DBHero
suite1Str, suite1Lv, suite2Str, suite2Lv int32 = math.MaxInt32, math.MaxInt32, math.MaxInt32, math.MaxInt32 suite1Str, suite1Lv, suite2Str, suite2Lv int32 = math.MaxInt32, math.MaxInt32, math.MaxInt32, math.MaxInt32
@ -66,7 +67,11 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq)
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
return return
} }
equipStr[confs[i].Star]++ if minstr > confs[i].Star {
minlv = confs[i].Star
}
// equipStr[confs[i].Star]++
if i < 4 { if i < 4 {
if confs[i].Star < suite1Str { if confs[i].Star < suite1Str {
@ -173,10 +178,11 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq)
} }
tasks = append(tasks, comm.GettaskParam(comm.Rtype5, equipNum, utils.ToInt32(hero.HeroID))) tasks = append(tasks, comm.GettaskParam(comm.Rtype5, equipNum, utils.ToInt32(hero.HeroID)))
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype5, utils.ToInt32(hero.HeroID), equipNum) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype5, utils.ToInt32(hero.HeroID), equipNum)
for k, v := range equipStr { // for k, v := range equipStr {
tasks = append(tasks, comm.GettaskParam(comm.Rtype41, 1, v, k)) // tasks = append(tasks, comm.GettaskParam(comm.Rtype41, 1, v, k))
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype41, utils.ToInt32(hero.HeroID), v, k) // // this.module.ModuleRtask.SendToRtask(session, comm.Rtype41, utils.ToInt32(hero.HeroID), v, k)
} // }
tasks = append(tasks, comm.GettaskParam(comm.Rtype41, 1, equipNum, minstr))
tasks = append(tasks, comm.GettaskParam(comm.Rtype42, 1, equipNum, minlv)) tasks = append(tasks, comm.GettaskParam(comm.Rtype42, 1, equipNum, minlv))
// for k, v := range equipLv { // for k, v := range equipLv {
// tasks = append(tasks, comm.GettaskParam(comm.Rtype42, 1, v, k)) // tasks = append(tasks, comm.GettaskParam(comm.Rtype42, 1, v, k))

View File

@ -588,7 +588,7 @@ func (this *ModelHero) AddCardExp(session comm.IUserSession, hero *pb.DBHero, ex
szTask = append(szTask, comm.GettaskParam(comm.Rtype4, hero.Lv, utils.ToInt32(hero.HeroID))) szTask = append(szTask, comm.GettaskParam(comm.Rtype4, hero.Lv, utils.ToInt32(hero.HeroID)))
szTask = append(szTask, comm.GettaskParam(comm.Rtype23, 1, hero.Star, hero.Lv)) szTask = append(szTask, comm.GettaskParam(comm.Rtype23, 1, hero.Star, hero.Lv))
szTask = append(szTask, comm.GettaskParam(comm.Rtype24, 1)) szTask = append(szTask, comm.GettaskParam(comm.Rtype24, 1))
szTask = append(szTask, comm.GettaskParam(comm.Rtype29, 1, hero.Lv, utils.ToInt32(hero.HeroID))) // szTask = append(szTask, comm.GettaskParam(comm.Rtype29, 1, hero.Lv, utils.ToInt32(hero.HeroID)))
if cfg := this.moduleHero.configure.GetHeroConfig(hero.HeroID); cfg != nil { if cfg := this.moduleHero.configure.GetHeroConfig(hero.HeroID); cfg != nil {
szTask = append(szTask, comm.GettaskParam(comm.Rtype32, 1, cfg.Color, hero.Lv)) szTask = append(szTask, comm.GettaskParam(comm.Rtype32, 1, cfg.Color, hero.Lv))

View File

@ -4,7 +4,6 @@ import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
"go_dreamfactory/utils"
) )
//参数校验 //参数校验
@ -61,7 +60,7 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq)
//随机任务 //随机任务
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype21, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype21, 1)
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype22, utils.ToInt32(sale.Prize[0].T)) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype22, utils.ToInt32(sale.Prize[0].T))
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype21, 1), comm.GettaskParam(comm.Rtype22, utils.ToInt32(sale.Prize[0].T))) // go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype21, 1), comm.GettaskParam(comm.Rtype22, utils.ToInt32(sale.Prize[0].T)))
case 4: //自选宝箱 case 4: //自选宝箱
if prop = this.module.configure.GetDropData(itemcf.BoxId); prop == nil { if prop = this.module.configure.GetDropData(itemcf.BoxId); prop == nil {

View File

@ -185,7 +185,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MlineChall
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype60, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype60, 1)
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype61, int32(req.StageId)) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype61, int32(req.StageId))
tasks = append(tasks, comm.GettaskParam(comm.Rtype60, 1)) tasks = append(tasks, comm.GettaskParam(comm.Rtype60, 1))
tasks = append(tasks, comm.GettaskParam(comm.Rtype61, int32(req.StageId))) tasks = append(tasks, comm.GettaskParam(comm.Rtype61, 1, int32(req.StageId)))
var ( var (
ChapterStar int32 ChapterStar int32
bAll3Star bool bAll3Star bool