diff --git a/worldsrv/welfmgr.go b/worldsrv/welfmgr.go index c9eea81..ce183c9 100644 --- a/worldsrv/welfmgr.go +++ b/worldsrv/welfmgr.go @@ -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 }