Commit 7798f30d4d31babdf8049e3648f7f06d0dca47eb
1 parent
5fffc407
Exists in
master
提交
Showing
1 changed file
with
10 additions
and
7 deletions
Show diff stats
src/HttpServer/logic/logic.go
... | ... | @@ -642,18 +642,21 @@ func HandlerUploadhigestscore(w http.ResponseWriter, data string, uniqueuuid, ga |
642 | 642 | break |
643 | 643 | } |
644 | 644 | |
645 | - if rdata.Score < uinfo.HighScore { | |
645 | + /*if rdata.Score < uinfo.HighScore { | |
646 | 646 | //logger.Info("GetUserInfo HandlerUploadhigestscore data failed:%v,for:%v", err, data) |
647 | 647 | //resp.Message = "分数不足最高分" |
648 | - resp.Code = 0 | |
648 | + //resp.Code = 0 | |
649 | 649 | break |
650 | - } | |
650 | + }*/ | |
651 | 651 | |
652 | - uinfo.HighScore = rdata.Score | |
652 | + if rdata.Score >= uinfo.HighScore { | |
653 | + uinfo.HighScore = rdata.Score | |
654 | + | |
655 | + uinfo.AddToRank() | |
656 | + //加入排行榜 | |
657 | + SaveUserInfo(uinfo, uniqueuuid) | |
658 | + } | |
653 | 659 | |
654 | - uinfo.AddToRank() | |
655 | - //加入排行榜 | |
656 | - SaveUserInfo(uinfo, uniqueuuid) | |
657 | 660 | resp.Code = ERROR_OK |
658 | 661 | break |
659 | 662 | } | ... | ... |