update
This commit is contained in:
parent
001c93b3a0
commit
0d8d2e2775
@ -980,11 +980,17 @@ func (this *User) RecoverUserPsStart(session comm.IUserSession) (recoverTime int
|
||||
} else {
|
||||
add = yu
|
||||
changed = total
|
||||
if u.LastRecoverPsSec != 0 {
|
||||
u.LastRecoverPsSec += int64(yu * re)
|
||||
if u.LastRecoverPsSec > time.Now().Unix() {
|
||||
u.LastRecoverPsSec = time.Now().Unix()
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
add = 0
|
||||
}
|
||||
u.LastRecoverPsSec = time.Now().Unix()
|
||||
//u.LastRecoverPsSec = time.Now().Unix()
|
||||
update := map[string]interface{}{}
|
||||
if add > 0 {
|
||||
u.Ps += add
|
||||
@ -993,7 +999,6 @@ func (this *User) RecoverUserPsStart(session comm.IUserSession) (recoverTime int
|
||||
}
|
||||
if err := this.modelUser.Change(u.Uid, update); err == nil {
|
||||
if changed > 0 {
|
||||
|
||||
this.reddot.PushReddot(session, &pb.ReddotItem{
|
||||
Rid: int32(comm.Reddot30100),
|
||||
Nextchanagetime: u.LastRecoverPsSec + int64(re),
|
||||
@ -1001,7 +1006,6 @@ func (this *User) RecoverUserPsStart(session comm.IUserSession) (recoverTime int
|
||||
session.Push()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
recoverTime = u.LastRecoverPsSec + int64(re)
|
||||
return recoverTime
|
||||
|
Loading…
Reference in New Issue
Block a user