This commit is contained in:
liwei 2023-07-13 16:04:12 +08:00
commit 8dd12dd6d3
5 changed files with 22 additions and 21 deletions

View File

@ -313,7 +313,7 @@ type (
IPagoda interface {
ModifyPagodaFloor(session IUserSession, d1 int32, d2 int32) (errdata *pb.ErrorData)
CheckUserBasePagodaInfo(uid string) (data *pb.DBPagodaRecord) // 查询玩家最佳通关记录
CheckCompletePagoda(uid string) (bComplete bool) // 校验是否通关普通塔
// Check Rtype84 Rtype85 Rtype86
CheckPagodaMaxFloor(uid string, pagodaType int32) int32 // 查询塔通关难度type 1 表示普通塔 2 赛季塔
///红点

View File

@ -108,16 +108,6 @@ func (this *apiComp) ChallengeRace(session comm.IUserSession, req *pb.PagodaChal
}
}
// 校验条件
if conf.Unlock != 1 {
if !this.mline.CheckCommpleteStage(session.GetUserId(), conf.Unlock) {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_PagodaUnlock,
Title: pb.ErrorCode_PagodaUnlock.ToString(),
}
return
}
}
errdata, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
Ptype: pb.PlayType_pagoda,
Title: "",

View File

@ -95,16 +95,7 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda
return
}
}
// 校验条件
if conf.Unlock != 1 {
if !this.mline.CheckCommpleteStage(session.GetUserId(), conf.Unlock) {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_PagodaUnlock,
Title: pb.ErrorCode_PagodaUnlock.ToString(),
}
return
}
}
// 校验通过
errdata, isWin = this.module.battle.CheckBattleReport(session, req.Report)
if errdata != nil {

View File

@ -204,3 +204,12 @@ func (this *Pagoda) GetSeasonData() (endSeasonTime int64) {
return endSeasonTime
}
func (this *Pagoda) CheckCompletePagoda(uid string) (bComplete bool) {
if list, err := this.modelPagoda.getPagodaList(uid); err != nil {
return list.Complete
}
return false
}

View File

@ -111,6 +111,17 @@ func (this *ModelSys) validCond(uid string, condData *cfg.GameOpencondData) stri
return ""
}
}
case 5:
module, err := this.service.GetModule(comm.ModulePagoda)
if err != nil {
this.moduleSys.Debugln(err)
return ""
}
if v, ok := module.(comm.IPagoda); ok {
if !v.CheckCompletePagoda(uid) {
return ""
}
}
}
}
return condData.Id