Commit 89adccd1 authored by hujiebin's avatar hujiebin

feat:调整排序

parent 03bf3894
...@@ -262,6 +262,12 @@ func SendSheepGameResult(matchId, winId, userId1, userId2 uint64, nick1, nick2, ...@@ -262,6 +262,12 @@ func SendSheepGameResult(matchId, winId, userId1, userId2 uint64, nick1, nick2,
players = append(players, &userProxy.SheepGamePlayer{IsWin: winId == userId2, User: &userProxy.User{ players = append(players, &userProxy.SheepGamePlayer{IsWin: winId == userId2, User: &userProxy.User{
Id: userId2, Nick: nick2, Avatar: avatar2, Id: userId2, Nick: nick2, Avatar: avatar2,
}}) }})
if !players[0].IsWin {
players[0], players[1] = players[1], players[0]
}
for i := range players {
players[i].Rank = int32(i) + 1
}
msg := &userProxy.SheepGameResult{ msg := &userProxy.SheepGameResult{
MatchId: matchId, MatchId: matchId,
Players: players, Players: players,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment