三消玩家最大积分

This commit is contained in:
meixiongfeng 2024-01-16 10:35:34 +08:00
parent b68fb48295
commit 681c1e448e

View File

@ -516,6 +516,7 @@ func (this *Room) GameOver(winner *pb.PlayerData) (errdata *pb.ErrorData) {
update["maxconsumeexp"] = list.Maxconsumeexp
}
if list.Maxsocre < winner.Score {
list.Maxsocre = winner.Score
update["maxsocre"] = list.Maxsocre
}
} else {
@ -545,17 +546,9 @@ func (this *Room) GameOver(winner *pb.PlayerData) (errdata *pb.ErrorData) {
}
this.module.model.modifyEntertainmList(winner.Userinfo.Uid, update)
if user, err := this.module.ModuleUser.GetUser(winner.Userinfo.Uid); err == nil {
p := &pb.XxlPlayer{
Uinfo: &pb.BaseUserInfo{
Uid: user.Uid,
Sid: user.Sid,
Name: user.Name,
Gender: user.Gender,
Skin: user.CurSkin,
Aframe: user.Curaframe,
Title: user.Curtitle,
Lv: user.Lv,
},
Uinfo: comm.GetUserBaseInfo(user),
Maxconsumeexp: list.Maxconsumeexp,
Consumeexp: list.Consumeexp,
Maxsocre: list.Maxsocre,
@ -626,6 +619,7 @@ func (this *Room) GameOver(winner *pb.PlayerData) (errdata *pb.ErrorData) {
}
}
if list.Maxsocre < winner.Score { // 单局最大积分
list.Maxsocre = winner.Score
update["maxsocre"] = list.Maxsocre
}
if len(update) > 0 {
@ -633,16 +627,7 @@ func (this *Room) GameOver(winner *pb.PlayerData) (errdata *pb.ErrorData) {
}
if user, err := this.module.ModuleUser.GetUser(winner.Userinfo.Uid); err == nil {
p := &pb.XxlPlayer{
Uinfo: &pb.BaseUserInfo{
Uid: user.Uid,
Sid: user.Sid,
Name: user.Name,
Gender: user.Gender,
Skin: user.CurSkin,
Aframe: user.Curaframe,
Title: user.Curtitle,
Lv: user.Lv,
},
Uinfo: comm.GetUserBaseInfo(user),
Maxconsumeexp: list.Maxconsumeexp,
Consumeexp: list.Consumeexp,
Maxsocre: list.Maxsocre,