From 86405d89f4d250954fec5450a78f56229a9f0849 Mon Sep 17 00:00:00 2001 From: Ceikry Date: Sat, 18 Feb 2023 07:04:59 +0000 Subject: [PATCH] Fixed blast furnace crashing the entire server when using "take all" Fixed blast furnace bar duplication when using "take all" --- .../minigame/blastfurnace/BlastFurnaceInterfaceListener.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Server/src/main/content/minigame/blastfurnace/BlastFurnaceInterfaceListener.kt b/Server/src/main/content/minigame/blastfurnace/BlastFurnaceInterfaceListener.kt index fce578a01..62d49b4ed 100644 --- a/Server/src/main/content/minigame/blastfurnace/BlastFurnaceInterfaceListener.kt +++ b/Server/src/main/content/minigame/blastfurnace/BlastFurnaceInterfaceListener.kt @@ -74,9 +74,9 @@ class BlastFurnaceInterfaceListener : InterfaceListener { while(amtToWithdraw > 0){ - if(addItem(player, barItemId, amtToWithdraw) && player.blastBars.remove(Item(barItemId))) { + if(addItem(player, barItemId, 1) && player.blastBars.remove(Item(barItemId))) { amtToWithdraw-- - } + } else break } if(player.blastBars.isEmpty) player.varpManager.get(543).clear().send(player) return@on true