From 1951f4ec0960b9798f8f54d97e3c491f16b186bd Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 19 Dec 2023 21:11:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A3=B0=E8=AE=A8=E6=9E=9C=E5=AE=9E=E5=A5=96?= =?UTF-8?q?=E5=8A=B1=E9=A2=86=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero/api_drawCard.go | 2 +- modules/hero/api_peachreward.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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)