diff --git a/app/Services/ShopManager.php b/app/Services/ShopManager.php index 8cc7825014..9cbe8deb54 100644 --- a/app/Services/ShopManager.php +++ b/app/Services/ShopManager.php @@ -57,6 +57,8 @@ public function buyStock($data, $user) { throw new \Exception('You have already purchased the maximum amount of this item you can buy.'); } + if($shopStock->purchase_limit && $quantity > $shopStock->purchase_limit) throw new \Exception("The quantity specified exceeds the amount of this item you can buy."); + $total_cost = $shopStock->cost * $quantity; $character = null;