modify 红包活动

This commit is contained in:
sk 2025-01-03 09:31:34 +08:00
parent 231cff3c4a
commit 756f52dd63
2 changed files with 21 additions and 21 deletions

View File

@ -133,19 +133,19 @@ func init() {
RedList: []*webapi.RedInfo{ RedList: []*webapi.RedInfo{
{ {
Num: 1, Num: 1,
Rate: 50, Rate: 5000,
}, },
{ {
Num: 10, Num: 10,
Rate: 10, Rate: 1000,
}, },
{ {
Num: 20, Num: 20,
Rate: 10, Rate: 1000,
}, },
{ {
Num: 30, Num: 30,
Rate: 10, Rate: 1000,
}, },
}, },
}, },
@ -162,19 +162,19 @@ func init() {
RedList: []*webapi.RedInfo{ RedList: []*webapi.RedInfo{
{ {
Num: 1, Num: 1,
Rate: 50, Rate: 5000,
}, },
{ {
Num: 10, Num: 10,
Rate: 10, Rate: 1000,
}, },
{ {
Num: 20, Num: 20,
Rate: 10, Rate: 1000,
}, },
{ {
Num: 30, Num: 30,
Rate: 10, Rate: 1000,
}, },
}, },
}, },
@ -191,19 +191,19 @@ func init() {
RedList: []*webapi.RedInfo{ RedList: []*webapi.RedInfo{
{ {
Num: 1, Num: 1,
Rate: 50, Rate: 5000,
}, },
{ {
Num: 10, Num: 10,
Rate: 10, Rate: 1000,
}, },
{ {
Num: 20, Num: 20,
Rate: 10, Rate: 1000,
}, },
{ {
Num: 30, Num: 30,
Rate: 10, Rate: 1000,
}, },
}, },
}, },
@ -220,19 +220,19 @@ func init() {
RedList: []*webapi.RedInfo{ RedList: []*webapi.RedInfo{
{ {
Num: 1, Num: 1,
Rate: 50, Rate: 5000,
}, },
{ {
Num: 10, Num: 10,
Rate: 10, Rate: 1000,
}, },
{ {
Num: 20, Num: 20,
Rate: 10, Rate: 1000,
}, },
{ {
Num: 30, Num: 30,
Rate: 10, Rate: 1000,
}, },
}, },
}, },
@ -249,19 +249,19 @@ func init() {
RedList: []*webapi.RedInfo{ RedList: []*webapi.RedInfo{
{ {
Num: 1, Num: 1,
Rate: 50, Rate: 5000,
}, },
{ {
Num: 10, Num: 10,
Rate: 10, Rate: 1000,
}, },
{ {
Num: 20, Num: 20,
Rate: 10, Rate: 1000,
}, },
{ {
Num: 30, Num: 30,
Rate: 10, Rate: 1000,
}, },
}, },
}, },

View File

@ -2384,7 +2384,7 @@ func (this *WelfareMgr) GetRedPacket(p *Player, id int64) *welfare.SCRedPacketDr
f := func() { f := func() {
// 概率抽奖 // 概率抽奖
rate := 0 rate := 0
n := rand.Int63n(100) n := rand.Int63n(10000)
for _, v := range cfg.GetRedList() { for _, v := range cfg.GetRedList() {
rate += int(v.GetRate()) rate += int(v.GetRate())
if n < int64(rate) { if n < int64(rate) {