fix 红包活动顺序

This commit is contained in:
sk 2025-01-08 11:24:09 +08:00
parent c8df34e266
commit ac0daa39a4
1 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import (
"math"
"math/rand"
"slices"
"sort"
"time"
"mongo.games.com/goserver/core/logger"
@ -2313,6 +2314,10 @@ func (this *WelfareMgr) SendRedPacketInfo(p *Player) *welfare.SCRedPacketInfo {
}
}
sort.Slice(pack.Info, func(i, j int) bool {
return pack.Info[i].StartTs < pack.Info[j].StartTs
})
p.SendToClient(int(welfare.SPacketID_PACKET_SCRedPacketInfo), pack)
return pack
}