diff --git a/modules/hero/api_drawCard.go b/modules/hero/api_drawCard.go index fab704a68..30c141ed1 100644 --- a/modules/hero/api_drawCard.go +++ b/modules/hero/api_drawCard.go @@ -350,7 +350,7 @@ func (this *apiComp) wishDrawCard(session comm.IUserSession, heroRecord *pb.DBHe update map[string]interface{} rsp *pb.HeroDrawCardResp ) - + rsp = &pb.HeroDrawCardResp{} update = make(map[string]interface{}) if conf := this.module.configure.GetWishHeroReplaceConfig(); conf != nil { if heroRecord.WishHero == "" { // 如果当前许愿英雄是空 则读取 默认许愿英雄 diff --git a/modules/hero/api_peachreward.go b/modules/hero/api_peachreward.go index 614274ac4..76b84656e 100644 --- a/modules/hero/api_peachreward.go +++ b/modules/hero/api_peachreward.go @@ -52,8 +52,8 @@ func (this *apiComp) PeachReward(session comm.IUserSession, req *pb.HeroPeachRew for k, v := range allreawd { if _, ok := heroRecord.Peach[k]; !ok { - if v1, ok := heroRecord.Race[2]; ok { - if v1 > v.Num { //可以领取 + if v1, ok := heroRecord.Race[comm.DrawCardType0]; ok { + if v1 >= v.Num { //可以领取 heroRecord.Peach[k] = true bchange = true reward = append(reward, v.Reward)