From 6dd558df10440af2bf4fe1a21d85e7bdfd530103 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 22 Sep 2023 15:37:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=AD=89=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/caravan/api_buyorsell.go | 2 +- modules/caravan/module.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/caravan/api_buyorsell.go b/modules/caravan/api_buyorsell.go index d024c5900..a285eeaa6 100644 --- a/modules/caravan/api_buyorsell.go +++ b/modules/caravan/api_buyorsell.go @@ -121,11 +121,11 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.CaravanBuyOrSe caravan.Profit += int64(sellValue) curLv := this.module.CheckCaravavLvUp(caravan) update["profit"] = caravan.Profit + update["lv"] = curLv if curLv > caravan.Lv { for i := caravan.Lv; i <= curLv-caravan.Lv; i++ { if c, err := this.module.configure.GetCaravanLv(int32(i)); err == nil { lvReward = append(lvReward, c.Reward...) - update["lv"] = curLv update["baglimit"] = c.Bagtop } else { errdata = &pb.ErrorData{ diff --git a/modules/caravan/module.go b/modules/caravan/module.go index 90c0ee434..0db9b07b9 100644 --- a/modules/caravan/module.go +++ b/modules/caravan/module.go @@ -456,7 +456,7 @@ func (this *Caravan) CheckOverweight(data *pb.DBCaravan) (b bool) { // 获得利润判断是否能提升商队等级 func (this *Caravan) CheckCaravavLvUp(data *pb.DBCaravan) (curLv int32) { - curLv = data.Lv + curLv = 1 for { if conf, err := this.configure.GetCaravanLv(curLv); err == nil { if conf.Newmoneyexp <= int32(data.Profit) {