updateps
This commit is contained in:
parent
f359fd0629
commit
5b0e69c440
@ -536,23 +536,13 @@ func (this *User) change(session comm.IUserSession, attr string, add int32) (cha
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//体力消耗,增加玩家经验
|
} else {
|
||||||
// exp := int32(math.Abs(float64(add))) * ggd.FightPs
|
change.Ps += add
|
||||||
// user.Exp += int64(exp)
|
if change.Ps > ggd.PsUl {
|
||||||
}
|
change.Ps = ggd.PsUl
|
||||||
|
|
||||||
if change.Ps >= ggd.PsUl {
|
|
||||||
errdata = &pb.ErrorData{
|
|
||||||
Code: pb.ErrorCode_UserVitLimit,
|
|
||||||
Title: pb.ErrorCode_UserVitLimit.ToString(),
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return
|
|
||||||
}
|
|
||||||
change.Ps += add
|
|
||||||
if change.Ps > ggd.PsUl {
|
|
||||||
change.Ps = ggd.PsUl
|
|
||||||
}
|
|
||||||
case comm.Talent1:
|
case comm.Talent1:
|
||||||
if add < 0 {
|
if add < 0 {
|
||||||
if user.Talent1+add < 0 {
|
if user.Talent1+add < 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user