上传埋点信息

This commit is contained in:
meixiongfeng 2023-12-12 18:59:41 +08:00
parent 6828f035aa
commit 7e1c0cdb51
4 changed files with 26 additions and 15 deletions

View File

@ -980,6 +980,8 @@ const (
Rtype243 TaskType = 243 //指定英雄满级且共鸣和觉醒升至最高状态 Rtype243 TaskType = 243 //指定英雄满级且共鸣和觉醒升至最高状态
Rtype245 TaskType = 245 //招募到X品质X阵营的守护者X个 Rtype245 TaskType = 245 //招募到X品质X阵营的守护者X个
Rtype246 TaskType = 246 //在一次十连内获得X个以上的Y品质的守护者 (紫色以上)
Rtype247 TaskType = 247 //完成X品质的武馆派遣Y个
) )
const ( const (
MailLineEasy int32 = 1 // 简单 MailLineEasy int32 = 1 // 简单

View File

@ -350,7 +350,7 @@ func (this *Activity) GetHdData(session comm.IUserSession, oids []string) (resul
return return
} }
func (this *Activity) Rpc_Activity(ctx context.Context, req *pb.RPCGeneralReqA1, reply *pb.EmptyResp) (err error) { func (this *Activity) Rpc_Activity(ctx context.Context, req *pb.RPCGeneralReqA1, reply *pb.RPCGeneralReqA1) (err error) {
this.Debug("Rpc_Activity", this.Debug("Rpc_Activity",
log.Field{Key: "args", Value: req.Param1}, log.Field{Key: "args", Value: req.Param1},
) )
@ -363,12 +363,8 @@ func (this *Activity) Rpc_ActivityOver(ctx context.Context, args *pb.RPCGeneralR
this.Debug("Rpc_ActivityOver", this.Debug("Rpc_ActivityOver",
log.Field{Key: "args", Value: args.String()}, log.Field{Key: "args", Value: args.String()},
) )
var (
szOverActivity []string
)
szOverActivity = args.Param2
for _, v := range szOverActivity { for _, v := range args.Param2 {
hd := &pb.DBHuodong{} hd := &pb.DBHuodong{}
if err := this.modelhdList.DB.FindOne(core.SqlTable(this.modelhdList.TableName), bson.M{"_id": v}).Decode(hd); err != nil { if err := this.modelhdList.DB.FindOne(core.SqlTable(this.modelhdList.TableName), bson.M{"_id": v}).Decode(hd); err != nil {
switch hd.Itype { switch hd.Itype {
@ -394,7 +390,7 @@ func (this *Activity) Rpc_ActivityOver(ctx context.Context, args *pb.RPCGeneralR
} }
} }
this.Debug("szOverActivity", log.Field{Key: "args", Value: szOverActivity}) this.Debug("szOverActivity", log.Field{Key: "args", Value: args.Param2})
return return
} }
@ -404,12 +400,8 @@ func (this *Activity) Rpc_ActivityStart(ctx context.Context, args *pb.RPCGeneral
this.Debug("Rpc_ActivityStart", this.Debug("Rpc_ActivityStart",
log.Field{Key: "args", Value: args.String()}, log.Field{Key: "args", Value: args.String()},
) )
var (
szOverActivity []string
)
szOverActivity = args.Param2
for _, v := range szOverActivity { for _, v := range args.Param2 {
hd := &pb.DBHuodong{} hd := &pb.DBHuodong{}
if err := this.modelhdList.DB.FindOne(core.SqlTable(this.modelhdList.TableName), bson.M{"_id": v}).Decode(hd); err == nil { if err := this.modelhdList.DB.FindOne(core.SqlTable(this.modelhdList.TableName), bson.M{"_id": v}).Decode(hd); err == nil {
switch hd.Itype { switch hd.Itype {
@ -435,7 +427,7 @@ func (this *Activity) Rpc_ActivityStart(ctx context.Context, args *pb.RPCGeneral
} }
} }
this.Debug("szOverActivity", log.Field{Key: "args", Value: szOverActivity}) this.Debug("szOverActivity", log.Field{Key: "args", Value: args.Param2})
return return
} }

View File

@ -32,6 +32,9 @@ func (a *apiComp) DoCheck(session comm.IUserSession, req *pb.DispatchDoReq) (err
} }
func (this *apiComp) Do(session comm.IUserSession, req *pb.DispatchDoReq) (errdata *pb.ErrorData) { func (this *apiComp) Do(session comm.IUserSession, req *pb.DispatchDoReq) (errdata *pb.ErrorData) {
var (
tasks []*pb.BuriedParam
)
if errdata = this.DoCheck(session, req); errdata != nil { if errdata = this.DoCheck(session, req); errdata != nil {
return return
} }
@ -112,7 +115,13 @@ func (this *apiComp) Do(session comm.IUserSession, req *pb.DispatchDoReq) (errda
}) })
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, comm.GetBuriedParam(comm.Rtype186, 1)) for _, v := range req.HeroIds {
if c, e := this.module.configure.GetHeroConfig(v); e == nil {
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype247, c.Color, 1))
}
}
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype186, 1))
this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "DispatchDoReq", ticketAtn) // 消耗资源 this.module.WriteUserLog(session.GetUserId(), comm.GMResDelType, "DispatchDoReq", ticketAtn) // 消耗资源
}) })
return return

View File

@ -509,7 +509,8 @@ func (this *Hero) GetAllMaxHero(session comm.IUserSession, bTalent bool) (errdat
func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCount int32, drawtype int32, szCards []string) { func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCount int32, drawtype int32, szCards []string) {
// 任务统计 // 任务统计
var ( var (
tasks []*pb.BuriedParam tasks []*pb.BuriedParam
colorCount int32
) )
if drawtype == comm.DrawCardType0 { //普通招募 if drawtype == comm.DrawCardType0 { //普通招募
@ -521,6 +522,7 @@ func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCou
for k := range sz { for k := range sz {
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype17, 1, k)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype17, 1, k))
} }
} }
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype14, drawCount)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype14, drawCount))
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype18, drawCount)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype18, drawCount))
@ -546,8 +548,14 @@ func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCou
for _, v := range szCards { for _, v := range szCards {
if conf, e := this.configure.GetHeroConfig(v); e != nil { if conf, e := this.configure.GetHeroConfig(v); e != nil {
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype245, conf.Color, conf.Race, 1)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype245, conf.Color, conf.Race, 1))
if conf.Color >= 3 { // 紫色以上
colorCount++
}
} }
} }
if colorCount > 0 {
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype246, colorCount))
}
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype89, drawCount)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype89, drawCount))
go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.ModuleBuried.TriggerBuried(session, tasks...) this.ModuleBuried.TriggerBuried(session, tasks...)