优化体力代码
This commit is contained in:
parent
fe22b55d46
commit
32e2027622
@ -578,9 +578,10 @@ func (this *User) change(session comm.IUserSession, attrs map[string]int32) (atn
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
change.Ps += add
|
user.Ps += add
|
||||||
userEx.ConsumPs += -add
|
userEx.ConsumPs += -add
|
||||||
this.recoverUserPs(user)
|
this.recoverUserPs(user)
|
||||||
|
change.Ps = user.Ps
|
||||||
go this.ModuleUiGame.HDPSTodayConsum(session.GetUserId(), userEx.ConsumPs)
|
go this.ModuleUiGame.HDPSTodayConsum(session.GetUserId(), userEx.ConsumPs)
|
||||||
} else {
|
} else {
|
||||||
if change.Ps+add > ggd.PsUl {
|
if change.Ps+add > ggd.PsUl {
|
||||||
@ -1259,6 +1260,7 @@ func (this *User) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (red
|
|||||||
total, t := this.recoverUserPs(user)
|
total, t := this.recoverUserPs(user)
|
||||||
reddot[comm.Reddot30100] = &pb.ReddotItem{
|
reddot[comm.Reddot30100] = &pb.ReddotItem{
|
||||||
Rid: int32(comm.Reddot30100),
|
Rid: int32(comm.Reddot30100),
|
||||||
|
Activated: true,
|
||||||
Nextchanagetime: t,
|
Nextchanagetime: t,
|
||||||
Progress: user.Ps,
|
Progress: user.Ps,
|
||||||
Total: total,
|
Total: total,
|
||||||
|
Loading…
Reference in New Issue
Block a user