diff --git a/modules/entertainment/room.go b/modules/entertainment/room.go index 1d1ee116f..d25962c9c 100644 --- a/modules/entertainment/room.go +++ b/modules/entertainment/room.go @@ -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, diff --git a/modules/pagoda/model_cycle.go b/modules/pagoda/model_cycle.go index f21e5e2ea..1c041d1ed 100644 --- a/modules/pagoda/model_cycle.go +++ b/modules/pagoda/model_cycle.go @@ -43,7 +43,7 @@ func (this *ModelCycle) getPagodaCycleList(uid string) (result *pb.DBPagodaCycle result.Uid = uid result.Itype = 1 result.Rtime = configure.Now().Unix() - if conf, e := this.module.configure.GetPagodaCirculateConf(1, 1); e != nil { + if conf, e := this.module.configure.GetPagodaCirculateConf(1, 1); e == nil { result.Etime = configure.Now().Unix() + int64(conf.Time)*24*3600 } else { err = fmt.Errorf("conf not found: %v", e.Error())