diff --git a/modules/hero/api_awaken.go b/modules/hero/api_awaken.go index 3fd2dc0e0..3be943c87 100644 --- a/modules/hero/api_awaken.go +++ b/modules/hero/api_awaken.go @@ -33,6 +33,7 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c if code != pb.ErrorCode_Success { return } + AwakenConfig, err1 := this.module.configure.GetHeroAwakenConfig() if err1 != nil { code = pb.ErrorCode_ConfigNoFound diff --git a/modules/modulebase.go b/modules/modulebase.go index 374fe09a7..d3a7f1209 100644 --- a/modules/modulebase.go +++ b/modules/modulebase.go @@ -155,6 +155,7 @@ func (this *ModuleBase) CheckConsumeRes(uid string, res []*cfg.Game_atn, bPush b if v.A == comm.AttrType { //用户属性资源 if amount = this.ModuleUser.QueryAttributeValue(uid, v.T); amount < v.N { code = pb.ErrorCode_ResNoEnough + this.Errorf("道具不足:A:%s,T:%s,N:%d", v.A, v.T, v.N) return } } 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 { code = pb.ErrorCode_ResNoEnough + this.Errorf("道具不足:A:%s,T:%s,N:%d", v.A, v.T, v.N) return } }