主线任务统计

This commit is contained in:
meixiongfeng 2022-11-23 16:58:15 +08:00
parent 487f2007f5
commit 7e7ef7d1b4
7 changed files with 25 additions and 20 deletions

View File

@ -224,6 +224,8 @@ type (
IPagoda interface { IPagoda interface {
ModifyPagodaFloor(session IUserSession, level int32) (code pb.ErrorCode) ModifyPagodaFloor(session IUserSession, level int32) (code pb.ErrorCode)
CheckUserBasePagodaInfo(uid string) (data *pb.DBPagodaRecord) // 查询玩家最佳通关记录 CheckUserBasePagodaInfo(uid string) (data *pb.DBPagodaRecord) // 查询玩家最佳通关记录
// Check Rtype84 Rtype85 Rtype86
CheckPagodaMaxFloor(uid string, pagodaType int32) int32 // 查询塔通关难度type 1 表示普通塔 2 赛季塔 CheckPagodaMaxFloor(uid string, pagodaType int32) int32 // 查询塔通关难度type 1 表示普通塔 2 赛季塔
///红点 ///红点
IReddot IReddot

View File

@ -30,6 +30,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.GourmetGetListRe
this.module.modelGourmet.CalculationGourmet(session.GetUserId(), _gourmet) this.module.modelGourmet.CalculationGourmet(session.GetUserId(), _gourmet)
session.SendMsg(string(this.module.GetType()), GourmetGetListResp, &pb.GourmetGetListResp{Data: _gourmet}) session.SendMsg(string(this.module.GetType()), GourmetGetListResp, &pb.GourmetGetListResp{Data: _gourmet})
// 任务统计
this.module.ModuleRtask.SendToRtask(session, comm.Rtype136, _gourmet.TotalTime) this.module.ModuleRtask.SendToRtask(session, comm.Rtype136, _gourmet.TotalTime)
return return
} }

View File

@ -89,7 +89,6 @@ func (this *modelMail) MailGetMailAttachmentState(objId string) (*pb.DBMailData,
err := this.DB.FindOne(comm.TableMail, bson.M{"_id": objId}).Decode(&nd) err := this.DB.FindOne(comm.TableMail, bson.M{"_id": objId}).Decode(&nd)
return nd, err return nd, err
//return !nd.Reward && len(nd.GetItems()) > 0 && nd.Uid == uid
} }
// 更新领取附件状态 // 更新领取附件状态

View File

@ -113,5 +113,8 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh
} }
session.SendMsg(string(this.module.GetType()), MainlineChallengeOverResp, &pb.MainlineChallengeOverResp{Data: mainline}) session.SendMsg(string(this.module.GetType()), MainlineChallengeOverResp, &pb.MainlineChallengeOverResp{Data: mainline})
// 主线任务统计 Rtype60
this.module.ModuleRtask.SendToRtask(session, comm.Rtype60, 1)
this.module.ModuleRtask.SendToRtask(session, comm.Rtype61, int32(req.MainlineId))
return return
} }

View File

@ -71,6 +71,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
if code != pb.ErrorCode_Success { if code != pb.ErrorCode_Success {
return return
} }
costTime = req.Report.Costtime
// 加经验 // 加经验
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 { if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
for _, v := range req.Report.Info.Redflist[0].Team { for _, v := range req.Report.Info.Redflist[0].Team {
@ -93,23 +94,9 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
} else { } else {
this.module.Errorf("no found userdata uid:%s", session.GetUserId()) this.module.Errorf("no found userdata uid:%s", session.GetUserId())
} }
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
sz := make([]*pb.LineUp, 5)
for i, v := range req.Report.Info.Redflist[0].Team {
if v != nil {
sz[i] = &pb.LineUp{
Cid: v.HeroID,
Star: v.Star,
Lv: v.Lv,
}
}
}
if req.Report != nil {
costTime = req.Report.Costtime
}
this.module.modulerank.SetNormalPagodaRankList("pagodaRank", pagoda.PagodaId<<8+costTime, session.GetUserId()) //this.module.modulerank.SetNormalPagodaRankList("pagodaRank", pagoda.PagodaId<<16-costTime, session.GetUserId())
}
// 普通塔通关了 // 普通塔通关了
Nomalcfg := this.module.configure.GetPagodaConfigData(comm.PagodaType, pagoda.PagodaId+1) Nomalcfg := this.module.configure.GetPagodaConfigData(comm.PagodaType, pagoda.PagodaId+1)
if Nomalcfg == nil { if Nomalcfg == nil {

View File

@ -119,7 +119,6 @@ func (this *Pagoda) CleanSeasonPagodaData() (code pb.ErrorCode) {
log.Errorf("delete failed") log.Errorf("delete failed")
} }
} }
return return
} }
@ -192,6 +191,8 @@ func (this *Pagoda) CheckPoint6(uid string) bool {
func (this *Pagoda) Rpc_ModuleSeasonPagodaReward(ctx context.Context, args *pb.EmptyReq, reply *pb.EmptyResp) { func (this *Pagoda) Rpc_ModuleSeasonPagodaReward(ctx context.Context, args *pb.EmptyReq, reply *pb.EmptyResp) {
this.Debug("Rpc_ModuleSeasonPagodaReward", log.Fields{"args": args.String()}) this.Debug("Rpc_ModuleSeasonPagodaReward", log.Fields{"args": args.String()})
this.modulerank.seasonSettlement() this.modulerank.seasonSettlement()
// 清除战令信息
this.CleanPassCheck()
} }
func (this *Pagoda) CheckPoint7(uid string) bool { func (this *Pagoda) CheckPoint7(uid string) bool {
@ -225,3 +226,16 @@ func (this *Pagoda) CheckPagodaMaxFloor(uid string, pagodaType int32) int32 {
} }
return 0 return 0
} }
func (this *Pagoda) CleanPassCheck() (code pb.ErrorCode) {
list, _ := this.modelSeasonPagoda.getSeasonPagodaList("")
if list.Id == "" {
code = pb.ErrorCode_PagodaConditionErr // 领取条件没达到
return
}
if list.PagodaId <= list.PassCheckID { // 层数校验
code = pb.ErrorCode_PagodaConditionErr // 领取条件没达到
return
}
return
}

View File

@ -98,7 +98,6 @@ func (this *Privilege) CreatePrivilegeCard(session comm.IUserSession, cId string
code = pb.ErrorCode_PayRenewTimeErr code = pb.ErrorCode_PayRenewTimeErr
return return
} }
} }
if err = this.modelPrivilege.Change(session.GetUserId(), map[string]interface{}{ if err = this.modelPrivilege.Change(session.GetUserId(), map[string]interface{}{
"eTime": v.ETime, "eTime": v.ETime,