记录costTime

This commit is contained in:
meixiongfeng 2023-04-13 19:22:39 +08:00
parent 5cac675495
commit 9f4b865c7c
3 changed files with 14 additions and 1 deletions

View File

@ -131,6 +131,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
Lv: userinfo.Lv,
Leadpos: leadpos,
Line: szLine,
CostTime: req.Report.Costtime,
}
costTime = newData.CostTime
// 数据写到跨服中

View File

@ -54,6 +54,14 @@ func (this *apiComp) RankList(session comm.IUserSession, req *pb.PagodaRankListR
}
}
}
} else {
uids := this.module.friend.GetFriendList(session.GetUserId())
for _, id := range uids {
rankData := this.module.modulerank.getPagodaRankListByFloorid(id, 0)
if rankData != nil {
szRank = append(szRank, rankData)
}
}
}
session.SendMsg(string(this.module.GetType()), PagodaRankListResp, &pb.PagodaRankListResp{Ranks: szRank})

View File

@ -27,6 +27,7 @@ type Pagoda struct {
battle comm.IBattle
service base.IRPCXService
mail comm.Imail
friend comm.IFriend
}
func NewModule() core.IModule {
@ -82,7 +83,10 @@ func (this *Pagoda) Start() (err error) {
return
}
this.mail = module.(comm.Imail)
if module, err = this.service.GetModule(comm.ModuleFriend); err != nil {
return
}
this.friend = module.(comm.IFriend)
//this.service.RegisterFunctionName(string(comm.Rpc_ModuleSeasonPagodaReward), this.Rpc_ModuleSeasonPagodaReward)
return
}