From 152ad6426330e164b8e7ee7006f756c61b9054cb Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Fri, 12 Jul 2024 18:10:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=91=E6=8D=A2=E5=95=86=E5=9F=8E=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E6=98=AF=E5=90=A6=E6=98=BE=E7=A4=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- worldsrv/shopmgr.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/worldsrv/shopmgr.go b/worldsrv/shopmgr.go index e0aaeaf..b881c42 100644 --- a/worldsrv/shopmgr.go +++ b/worldsrv/shopmgr.go @@ -815,7 +815,15 @@ func (this *ShopMgr) Exchange(p *Player, goodsId int32, username, mobile, commen break } } - + for _, weight := range this.GetConfig(p.Platform).ExchangeShopList.Weight { + if weight.ShopType == cdata.ShopType { + if weight.IsShow == 2 { + pack.RetCode = shop.OpResultCode_OPRC_Error + p.SendToClient(int(shop.SPacketID_PACKET_SC_SHOP_EXCHANGE), pack) + return false + } + } + } if info == nil || (info.Price == 0 && info.JPrice == 0 && info.Cash == 0) { return false }