fix 红包活动顺序
This commit is contained in:
parent
c8df34e266
commit
ac0daa39a4
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue