秘境埋点
This commit is contained in:
parent
28990fea5e
commit
bbf46cbf98
@ -167,5 +167,14 @@ func (this *apiComp) EnterLevel(session comm.IUserSession, req *pb.StonehengeEnt
|
||||
Hero: stone.Hero,
|
||||
Room: stone.Rooms,
|
||||
})
|
||||
|
||||
var szTask []*pb.BuriedParam
|
||||
for _, v := range szEvent { // 首次触发指定ID的事件
|
||||
if c, e := this.module.configure.GetStoneEventDataById(v); e != nil {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype223, c.EventType, 1))
|
||||
}
|
||||
}
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
return
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
||||
eventConf *cfg.GameStoneEventData
|
||||
reward []*pb.UserAtno
|
||||
curbuff int32
|
||||
newbuff int32 // 新获得的buff
|
||||
)
|
||||
update = make(map[string]interface{})
|
||||
if errdata = this.EventCheck(session, req); errdata != nil {
|
||||
@ -96,15 +97,17 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
||||
if lenSelect == 0 || lenSelect <= pos {
|
||||
return
|
||||
}
|
||||
buffid := stone.Rooms.Selectbuff[pos]
|
||||
newbuff = stone.Rooms.Selectbuff[pos]
|
||||
// 加入收藏
|
||||
if conf, err := this.module.configure.GetStoneBuffDataById(buffid); err == nil {
|
||||
stone.Userbuff[buffid] = 1
|
||||
if conf, err := this.module.configure.GetStoneBuffDataById(newbuff); err == nil {
|
||||
stone.Userbuff[newbuff] = 1
|
||||
stone.Rooms.Selectbuff = []int32{}
|
||||
update["userbuff"] = stone.Userbuff
|
||||
this.module.modelStonehengeBook.addStonehengeBook(session.GetUserId(), conf.Type, conf.SkillId)
|
||||
stone.Selectcount++ // 记录三选一的次数
|
||||
} else {
|
||||
newbuff = 0
|
||||
}
|
||||
stone.Selectcount++ // 记录三选一的次数
|
||||
|
||||
} else { // 参数错误
|
||||
errdata = &pb.ErrorData{
|
||||
@ -410,5 +413,71 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
||||
Userbuff: stone.Userbuff,
|
||||
Curbuff: curbuff,
|
||||
})
|
||||
|
||||
// 埋点处理
|
||||
var szTask []*pb.BuriedParam
|
||||
for k := range stone.Rooms.Eventid { // 首次触发指定ID的事件
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype215, k))
|
||||
}
|
||||
//上阵英雄都为指定职业
|
||||
if eventConf.EventType == EventType14 || eventConf.EventType == EventType28 { // 必须是战斗类型才可以触发
|
||||
var job int32
|
||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||
if h, err := this.module.ModuleTools.GetHeroConfig(v.HeroID); err != nil {
|
||||
if job == 0 {
|
||||
job = h.Job
|
||||
}
|
||||
if job != h.Job {
|
||||
job = 0
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if job != 0 { // 上阵英雄都为指定职业
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype216, job, stone.StageID)) //上阵英雄都为指定职业,击败石阵秘境中指定关卡的首领
|
||||
}
|
||||
for _, v := range stone.Webuff {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype217, v, stone.StageID))
|
||||
}
|
||||
for _, v := range stone.Enemybuff {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype217, v, stone.StageID))
|
||||
}
|
||||
// Rtype218 统计类型
|
||||
var buffType map[int32]int32
|
||||
buffType = make(map[int32]int32, 0)
|
||||
for _, v := range stone.Webuff {
|
||||
if conf, err := this.module.configure.GetStoneBuffDataById(v); err != nil {
|
||||
buffType[conf.Type]++
|
||||
}
|
||||
|
||||
}
|
||||
for _, v := range stone.Enemybuff {
|
||||
if conf, err := this.module.configure.GetStoneBuffDataById(v); err != nil {
|
||||
buffType[conf.Type]++
|
||||
}
|
||||
}
|
||||
for k, v := range buffType {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype218, k, v, stone.StageID)) //携带指定类型、≥指定数量的buff,击败石阵秘境中指定关卡的首领
|
||||
}
|
||||
// 累计击败石阵秘境任意关卡的首领N次
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype219, stone.StageID))
|
||||
|
||||
//击败指定关卡的首领时,背包中指定道具数量≥指定数量
|
||||
//this.module.ModuleItems.CleanItems()
|
||||
}
|
||||
|
||||
// 强化商店
|
||||
if eventConf.EventType == EventType29 {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype220, 1)) // 强化buff 埋点
|
||||
}
|
||||
// 累计获得指定类型buff
|
||||
if eventConf.EventType == EventType25 {
|
||||
if newbuff != 0 {
|
||||
if conf, err := this.module.configure.GetStoneBuffDataById(newbuff); err == nil {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype221, conf.Type, 1)) //累计获得N个指定类型的buff
|
||||
}
|
||||
}
|
||||
}
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
return
|
||||
}
|
||||
|
@ -163,5 +163,15 @@ func (this *apiComp) GotoRoom(session comm.IUserSession, req *pb.StonehengeGotoR
|
||||
Room: stone.Rooms,
|
||||
Portal: req.Portal,
|
||||
})
|
||||
|
||||
// 埋点
|
||||
var szTask []*pb.BuriedParam
|
||||
for _, v := range szEvent { // 首次触发指定ID的事件
|
||||
if c, e := this.module.configure.GetStoneEventDataById(v); e != nil {
|
||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype223, c.EventType, 1))
|
||||
}
|
||||
}
|
||||
|
||||
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user