diff --git a/modules/plunder/api_getlist.go b/modules/plunder/api_getlist.go index 62149e640..2d55a7358 100644 --- a/modules/plunder/api_getlist.go +++ b/modules/plunder/api_getlist.go @@ -4,6 +4,7 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/pb" "go_dreamfactory/sys/configure" + "go_dreamfactory/utils" ) func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.PlunderGetListReq) (errdata *pb.ErrorData) { @@ -67,6 +68,15 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.PlunderGetListRe update["line"] = list.Line } } + // 每日重置次数 + if !utils.IsToday(list.Ctime) { //不是同一天 可以重置数据 + list.Ctime = configure.Now().Unix() + list.Pvpcount = 0 + list.Count = 0 + update["pvpcount"] = list.Pvpcount + update["count"] = list.Count + update["ctime"] = list.Ctime + } if len(update) > 0 { this.module.modelPlunder.changePlunderData(session.GetUserId(), update) }