道具不足详细日志

This commit is contained in:
meixiongfeng 2022-07-18 10:40:40 +08:00
parent 3db2d0dc46
commit 8d7e6fca4e
2 changed files with 3 additions and 0 deletions

View File

@ -33,6 +33,7 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c
if code != pb.ErrorCode_Success { if code != pb.ErrorCode_Success {
return return
} }
AwakenConfig, err1 := this.module.configure.GetHeroAwakenConfig() AwakenConfig, err1 := this.module.configure.GetHeroAwakenConfig()
if err1 != nil { if err1 != nil {
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound

View File

@ -155,6 +155,7 @@ func (this *ModuleBase) CheckConsumeRes(uid string, res []*cfg.Game_atn, bPush b
if v.A == comm.AttrType { //用户属性资源 if v.A == comm.AttrType { //用户属性资源
if amount = this.ModuleUser.QueryAttributeValue(uid, v.T); amount < v.N { if amount = this.ModuleUser.QueryAttributeValue(uid, v.T); amount < v.N {
code = pb.ErrorCode_ResNoEnough code = pb.ErrorCode_ResNoEnough
this.Errorf("道具不足:A:%s,T:%s,N:%d", v.A, v.T, v.N)
return return
} }
} else if v.A == comm.ItemType { //道具资源 } else if v.A == comm.ItemType { //道具资源
@ -164,6 +165,7 @@ func (this *ModuleBase) CheckConsumeRes(uid string, res []*cfg.Game_atn, bPush b
} }
if amount = int32(this.ModuleItems.QueryItemAmount(source, uid, int32(resID))); amount < v.N { if amount = int32(this.ModuleItems.QueryItemAmount(source, uid, int32(resID))); amount < v.N {
code = pb.ErrorCode_ResNoEnough code = pb.ErrorCode_ResNoEnough
this.Errorf("道具不足:A:%s,T:%s,N:%d", v.A, v.T, v.N)
return return
} }
} }