From 22a651b4aaed18755357e692a26bf9901a6ba519 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Mon, 2 May 2022 04:28:38 +0800 Subject: [PATCH] Fix goods limit bug --- .../emu/grasscutter/server/packet/recv/HandlerBuyGoodsReq.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerBuyGoodsReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerBuyGoodsReq.java index e0257c4c8..0088b7176 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerBuyGoodsReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerBuyGoodsReq.java @@ -54,7 +54,7 @@ public class HandlerBuyGoodsReq extends PacketHandler { session.getPlayer().save(); } - if (bought + buyGoodsReq.getBoughtNum() > sg.getBuyLimit()) { + if ((bought + buyGoodsReq.getBoughtNum() > sg.getBuyLimit()) && sg.getBuyLimit() != 0) { return; }