This commit is contained in:
meixiongfeng 2024-02-06 21:59:46 +08:00
parent 04975072bb
commit a19e485d8d

View File

@ -32,7 +32,6 @@ func (this *apiComp) ChallengeCycleOver(session comm.IUserSession, req *pb.Pagod
res []*cfg.Gameatn
changExp map[string]int32
costTime int32 // 耗时
new bool // 是否首次挑战
fresh bool // 刷新记录
)
changExp = make(map[string]int32, 0)
@ -116,7 +115,7 @@ func (this *apiComp) ChallengeCycleOver(session comm.IUserSession, req *pb.Pagod
Leadpos: Leadpos,
Line: szLine,
}
if new {
if conf.Floors == 1 { // 写数据
db := &pb.DBCyclePagodaRecord{
Id: primitive.NewObjectID().Hex(),
@ -136,9 +135,10 @@ func (this *apiComp) ChallengeCycleOver(session comm.IUserSession, req *pb.Pagod
this.module.modelCyclePagoda.addCrossPagodaCycle(session.GetUserId(), db)
}
res = append(res, conf.KeyReward...) // 首通奖励
}
// 校验是否刷新记录
if fresh || new {
if fresh {
this.module.modelCyclePagoda.getCrossPagodaCycleList(session.GetUserId())
this.module.modelCyclePagoda.SetCyclePagodaRankList(score, session.GetUserId())
mapData["data"] = list.Data
user, err := this.module.ModuleUser.GetUser(session.GetUserId())