tienlen结算返回排名
This commit is contained in:
parent
cd76c7a5a9
commit
8f7df3ff41
|
@ -4,6 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
"slices"
|
||||||
"sort"
|
"sort"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -2636,6 +2637,12 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pack.WinSnids = sceneEx.winSnids
|
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)
|
proto.SetDefaults(pack)
|
||||||
s.Broadcast(int(tienlen.TienLenPacketID_PACKET_SCTienLenGameBilled), pack, 0)
|
s.Broadcast(int(tienlen.TienLenPacketID_PACKET_SCTienLenGameBilled), pack, 0)
|
||||||
logger.Logger.Trace("TienLenPacketID_PACKET_SCTienLenGameBilled gameFreeId:", sceneEx.GetGameFreeId(), ";pack:", pack)
|
logger.Logger.Trace("TienLenPacketID_PACKET_SCTienLenGameBilled gameFreeId:", sceneEx.GetGameFreeId(), ";pack:", pack)
|
||||||
|
|
Loading…
Reference in New Issue