重置每日挑战次数
This commit is contained in:
parent
c4972613cf
commit
ba7392307e
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user