上传pve消耗挑战券
This commit is contained in:
parent
9b3edaaec2
commit
825889c867
@ -50,7 +50,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge
|
||||
cd = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
|
||||
this.module.modelArena.recoverTicket(red)
|
||||
if red.Ticket > 0 {
|
||||
red.Ticket--
|
||||
if red.Lastrtickettime == 0 {
|
||||
|
@ -56,6 +56,16 @@ func (this *apiComp) Plot(session comm.IUserSession, req *pb.ArenaPlotReq) (code
|
||||
cd = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
this.module.modelArena.recoverTicket(info)
|
||||
if info.Ticket > 0 {
|
||||
info.Ticket--
|
||||
if info.Lastrtickettime == 0 {
|
||||
info.Lastrtickettime = time.Now().Unix()
|
||||
}
|
||||
} else {
|
||||
code = pb.ErrorCode_ArenaTicketNotEnough
|
||||
return
|
||||
}
|
||||
if info.Npc[req.Pid] != nil {
|
||||
ndata := info.Npc[req.Pid]
|
||||
if !time.Now().After(time.Unix(ndata.Cd, 0)) { //已经过了cd时间
|
||||
|
Loading…
Reference in New Issue
Block a user