From 22cc427ea5560ca3b6ab7370771634f7a3b12d3e Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Thu, 25 Jul 2024 11:26:32 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9A=AE=E8=82=A4=E6=8A=80=E8=83=BD=E5=8A=A0?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/action_phonelottery.go | 8 ++++++-- worldsrv/welfmgr.go | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/worldsrv/action_phonelottery.go b/worldsrv/action_phonelottery.go index 4b7c8dd..dc888b9 100644 --- a/worldsrv/action_phonelottery.go +++ b/worldsrv/action_phonelottery.go @@ -321,7 +321,11 @@ func (this *CSDiamondLotteryHandler) Process(s *netlib.Session, packetid int, da } random := rand.Intn(weight) + 1 value := 0 - p.DiamondLotteryScore += 1 + p.DiamondLotteryScore += 100 + add := p.GetSkillAdd(common.SkillIdDiamondLottery) + if add > 0 { + p.DiamondLotteryScore += int64(add) + } //判断是否白名单用户 whiteList := config.Players status := false @@ -332,7 +336,7 @@ func (this *CSDiamondLotteryHandler) Process(s *netlib.Session, packetid int, da break } } - if playerData != nil && p.DiamondLotteryScore%int64(playerData.Count) == 0 { + if playerData != nil && p.DiamondLotteryScore%int64(playerData.Count*100) == 0 { status = true } if status { diff --git a/worldsrv/welfmgr.go b/worldsrv/welfmgr.go index 1db3fe1..1f92ae5 100644 --- a/worldsrv/welfmgr.go +++ b/worldsrv/welfmgr.go @@ -219,6 +219,9 @@ func (this *WelfareMgr) UpdatePhoneLotteryStatus(cfg *webapi_proto.WelfarePhoneL func (this *WelfareMgr) UpdateDiamondLotteryConfig(cfg *webapi_proto.DiamondLotteryConfig) { info := this.GetConfig(cfg.Platform) info.DiamondLotteryConfig = cfg + for _, v := range info.DiamondLotteryConfig.GetLotteryData() { + v.MaxScore *= 100 + } } func (this *WelfareMgr) GetPhoneLotteryStatus(platform string) int32 {