From 521b6e935e6269862ec19ac5b7480adc72b72377 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Thu, 2 Jan 2025 16:46:23 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=BA=A2=E5=8C=85=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/welfmgr.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worldsrv/welfmgr.go b/worldsrv/welfmgr.go index 429b64f..3a8ec90 100644 --- a/worldsrv/welfmgr.go +++ b/worldsrv/welfmgr.go @@ -2292,7 +2292,7 @@ func (this *WelfareMgr) SendRedPacketInfo(p *Player) *welfare.SCRedPacketInfo { } if p.WelfData != nil && p.WelfData.RedPacket != nil { if p.WelfData.RedPacket[v.GetId()] != nil { - info.IsJoin = p.WelfData.RedPacket[v.GetId()].JN > 0 + info.IsJoin = p.WelfData.RedPacket[v.GetId()].JN > 0 || p.WelfData.RedPacket[v.GetId()].N > 0 } } _, info.RemainCount = RedPacketMgrInst.GetRemainTimesByConfig(p, v) @@ -2333,7 +2333,7 @@ func (this *WelfareMgr) GetRedPacket(p *Player, id int64) *welfare.SCRedPacketDr // 记录参与次数 if id == 0 { for _, v := range this.GetConfig(p.Platform).RedPacketConfig.GetList() { - if now >= common.IntToTime(int(v.GetStartHMS())).Unix() || now < common.IntToTime(int(v.GetEndHMS())).Unix() { + if v.GetOn() == common.On && now >= common.IntToTime(int(v.GetStartHMS())).Unix() || now < common.IntToTime(int(v.GetEndHMS())).Unix() { if p.WelfData.RedPacket[v.GetId()] == nil { p.WelfData.RedPacket[v.GetId()] = &model.RedPacketData{} }