diff --git a/comm/const.go b/comm/const.go index 08b982b5c..94b0e5e8a 100644 --- a/comm/const.go +++ b/comm/const.go @@ -980,6 +980,8 @@ const ( Rtype243 TaskType = 243 //指定英雄满级且共鸣和觉醒升至最高状态 Rtype245 TaskType = 245 //招募到X品质X阵营的守护者X个 + Rtype246 TaskType = 246 //在一次十连内获得X个以上的Y品质的守护者 (紫色以上) + Rtype247 TaskType = 247 //完成X品质的武馆派遣Y个 ) const ( MailLineEasy int32 = 1 // 简单 diff --git a/modules/activity/module.go b/modules/activity/module.go index 7a77573d9..bd8e9f137 100644 --- a/modules/activity/module.go +++ b/modules/activity/module.go @@ -350,7 +350,7 @@ func (this *Activity) GetHdData(session comm.IUserSession, oids []string) (resul 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", 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", 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{} if err := this.modelhdList.DB.FindOne(core.SqlTable(this.modelhdList.TableName), bson.M{"_id": v}).Decode(hd); err != nil { 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 } @@ -404,12 +400,8 @@ func (this *Activity) Rpc_ActivityStart(ctx context.Context, args *pb.RPCGeneral this.Debug("Rpc_ActivityStart", 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{} if err := this.modelhdList.DB.FindOne(core.SqlTable(this.modelhdList.TableName), bson.M{"_id": v}).Decode(hd); err == nil { 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 } diff --git a/modules/dispatch/api_do.go b/modules/dispatch/api_do.go index 3686d02ed..319f69c61 100644 --- a/modules/dispatch/api_do.go +++ b/modules/dispatch/api_do.go @@ -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) { + var ( + tasks []*pb.BuriedParam + ) if errdata = this.DoCheck(session, req); errdata != nil { 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) { - 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) // 消耗资源 }) return diff --git a/modules/hero/module.go b/modules/hero/module.go index 58f1df067..0fecb1e95 100644 --- a/modules/hero/module.go +++ b/modules/hero/module.go @@ -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) { // 任务统计 var ( - tasks []*pb.BuriedParam + tasks []*pb.BuriedParam + colorCount int32 ) if drawtype == comm.DrawCardType0 { //普通招募 @@ -521,6 +522,7 @@ func (this *Hero) SendTaskMsg(session comm.IUserSession, szStar []int32, drawCou for k := range sz { tasks = append(tasks, comm.GetBuriedParam(comm.Rtype17, 1, k)) } + } tasks = append(tasks, comm.GetBuriedParam(comm.Rtype14, 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 { if conf, e := this.configure.GetHeroConfig(v); e != nil { 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)) go this.AsynHandleSession(session.Clone(), func(session comm.IUserSession) { this.ModuleBuried.TriggerBuried(session, tasks...)