tienlen结算返回排名

This commit is contained in:
sk 2024-12-11 18:04:01 +08:00
parent cd76c7a5a9
commit 8f7df3ff41
1 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import (
"fmt"
"math"
"math/rand"
"slices"
"sort"
"time"
@ -2636,6 +2637,12 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
}
pack.WinSnids = sceneEx.winSnids
for _, v := range pack.Datas {
if !slices.Contains(pack.WinSnids, v.GetSnId()) {
pack.WinSnids = append(pack.WinSnids, v.GetSnId())
break
}
}
proto.SetDefaults(pack)
s.Broadcast(int(tienlen.TienLenPacketID_PACKET_SCTienLenGameBilled), pack, 0)
logger.Logger.Trace("TienLenPacketID_PACKET_SCTienLenGameBilled gameFreeId:", sceneEx.GetGameFreeId(), ";pack:", pack)