From 756f52dd63bf3671f2446a8ec892f70c7d40dd5f Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Fri, 3 Jan 2025 09:31:34 +0800 Subject: [PATCH] =?UTF-8?q?modify=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/etcd.go | 40 ++++++++++++++++++++-------------------- worldsrv/welfmgr.go | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/worldsrv/etcd.go b/worldsrv/etcd.go index a9bcd29..4f7b904 100644 --- a/worldsrv/etcd.go +++ b/worldsrv/etcd.go @@ -133,19 +133,19 @@ func init() { RedList: []*webapi.RedInfo{ { Num: 1, - Rate: 50, + Rate: 5000, }, { Num: 10, - Rate: 10, + Rate: 1000, }, { Num: 20, - Rate: 10, + Rate: 1000, }, { Num: 30, - Rate: 10, + Rate: 1000, }, }, }, @@ -162,19 +162,19 @@ func init() { RedList: []*webapi.RedInfo{ { Num: 1, - Rate: 50, + Rate: 5000, }, { Num: 10, - Rate: 10, + Rate: 1000, }, { Num: 20, - Rate: 10, + Rate: 1000, }, { Num: 30, - Rate: 10, + Rate: 1000, }, }, }, @@ -191,19 +191,19 @@ func init() { RedList: []*webapi.RedInfo{ { Num: 1, - Rate: 50, + Rate: 5000, }, { Num: 10, - Rate: 10, + Rate: 1000, }, { Num: 20, - Rate: 10, + Rate: 1000, }, { Num: 30, - Rate: 10, + Rate: 1000, }, }, }, @@ -220,19 +220,19 @@ func init() { RedList: []*webapi.RedInfo{ { Num: 1, - Rate: 50, + Rate: 5000, }, { Num: 10, - Rate: 10, + Rate: 1000, }, { Num: 20, - Rate: 10, + Rate: 1000, }, { Num: 30, - Rate: 10, + Rate: 1000, }, }, }, @@ -249,19 +249,19 @@ func init() { RedList: []*webapi.RedInfo{ { Num: 1, - Rate: 50, + Rate: 5000, }, { Num: 10, - Rate: 10, + Rate: 1000, }, { Num: 20, - Rate: 10, + Rate: 1000, }, { Num: 30, - Rate: 10, + Rate: 1000, }, }, }, diff --git a/worldsrv/welfmgr.go b/worldsrv/welfmgr.go index 198d2c3..eb48281 100644 --- a/worldsrv/welfmgr.go +++ b/worldsrv/welfmgr.go @@ -2384,7 +2384,7 @@ func (this *WelfareMgr) GetRedPacket(p *Player, id int64) *welfare.SCRedPacketDr f := func() { // 概率抽奖 rate := 0 - n := rand.Int63n(100) + n := rand.Int63n(10000) for _, v := range cfg.GetRedList() { rate += int(v.GetRate()) if n < int64(rate) {