上传竞技场npc cd代码
This commit is contained in:
parent
716d9585a4
commit
7413511ab5
@ -8,7 +8,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
// 参数校验
|
||||
func (this *apiComp) PlotRewardCheck(session comm.IUserSession, req *pb.ArenaPlotRewardReq) (errdata *pb.ErrorData) {
|
||||
if req.Pid == 0 || req.Report == nil {
|
||||
errdata = &pb.ErrorData{
|
||||
@ -19,7 +19,7 @@ func (this *apiComp) PlotRewardCheck(session comm.IUserSession, req *pb.ArenaPlo
|
||||
return
|
||||
}
|
||||
|
||||
///领取战斗奖励
|
||||
// /领取战斗奖励
|
||||
func (this *apiComp) PlotReward(session comm.IUserSession, req *pb.ArenaPlotRewardReq) (errdata *pb.ErrorData) {
|
||||
var (
|
||||
npc *cfg.GameArenaChallengeNpcData
|
||||
@ -66,7 +66,7 @@ func (this *apiComp) PlotReward(session comm.IUserSession, req *pb.ArenaPlotRewa
|
||||
if len(npc.MonsterformatId) > int(info.Npc[req.Pid].Index+1) {
|
||||
info.Npc[req.Pid].Index++
|
||||
}
|
||||
info.Npc[req.Pid].Cd = configure.Now().Add(time.Minute * time.Duration(npc.ReviveCd)).Unix()
|
||||
info.Npc[req.Pid].Cd = configure.Now().Add(time.Hour * time.Duration(npc.ReviveCd)).Unix()
|
||||
if err = this.module.modelArena.Change(info.Uid, map[string]interface{}{
|
||||
"npc": info.Npc,
|
||||
}); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user