玩家胜利获得积分同步显示

This commit is contained in:
meixiongfeng 2023-11-08 14:46:51 +08:00
parent b2386a3a3e
commit d88d719560

View File

@ -593,9 +593,9 @@ func (this *Room) GameOver() (errdata *pb.ErrorData) {
for _, v := range res {
if v.A == "attr" && v.T == "consumeexp" {
if winner.Userinfo.Uid == this.player1.Userinfo.Uid {
this.player1.Score += v.N
this.player1.Consumeexp += v.N
} else {
this.player2.Score += v.N
this.player2.Consumeexp += v.N
}
}
}