上传竞技场npc需求

This commit is contained in:
liwei1dao 2023-10-11 17:46:50 +08:00
parent cc710d851f
commit d41378285e

View File

@ -3,9 +3,7 @@ package arena
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
"time"
)
// 参数校验
@ -47,17 +45,17 @@ func (this *apiComp) Plot(session comm.IUserSession, req *pb.ArenaPlotReq) (errd
return
}
if info.Npc[req.Pid] != nil {
ndata := info.Npc[req.Pid]
if !configure.Now().After(time.Unix(ndata.Cd, 0)) { //已经过了cd时间
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ArenaTicketNpcInCd,
Title: pb.ErrorCode_ArenaTicketNpcInCd.ToString(),
}
return
}
index = ndata.Index
}
// if info.Npc[req.Pid] != nil {
// ndata := info.Npc[req.Pid]
// if !configure.Now().After(time.Unix(ndata.Cd, 0)) { //已经过了cd时间
// errdata = &pb.ErrorData{
// Code: pb.ErrorCode_ArenaTicketNpcInCd,
// Title: pb.ErrorCode_ArenaTicketNpcInCd.ToString(),
// }
// return
// }
// index = ndata.Index
// }
if errdata, record = this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
Rulesid: npc.BattleReadyID,
Ptype: pb.PlayType_arena,