上传添加体力错误修复
This commit is contained in:
parent
f9865c390b
commit
cfe814687e
@ -112,7 +112,10 @@ func (this *apiComp) LevelPass(session comm.IUserSession, req *pb.MainlineLevelP
|
||||
}
|
||||
aeward = append(aeward, atno...)
|
||||
}
|
||||
userExp, _ = this.module.ModuleUser.ConsumePsAddExp(session, consumPs)
|
||||
consumPs = info.Ps[req.Level]
|
||||
if userExp, errdata = this.module.ModuleUser.ConsumePsAddExp(session, consumPs); errdata != nil {
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "levelpass", &pb.MainlineLevelPassResp{
|
||||
Level: req.Level,
|
||||
Star: star,
|
||||
|
@ -1213,8 +1213,9 @@ func (this *User) AddPer(session comm.IUserSession, pers map[string]int32, bPush
|
||||
func (this *User) ConsumePsAddExp(session comm.IUserSession, ps int32) (addExp int32, errdata *pb.ErrorData) {
|
||||
if ps <= 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||
Message: "ConsumePsAddExp ps is zero",
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user