From d155a573803b72908eb5f6fbb450f1992679b48f Mon Sep 17 00:00:00 2001 From: Josh Shippam Date: Thu, 2 Mar 2023 00:25:55 +0000 Subject: [PATCH] Recalculate Weight When Buying/Selling Items (#632) --- .../src/main/java/com/rs2/game/shops/ShopAssistant.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/2006Scape Server/src/main/java/com/rs2/game/shops/ShopAssistant.java b/2006Scape Server/src/main/java/com/rs2/game/shops/ShopAssistant.java index a6a27b9b..37e124e5 100644 --- a/2006Scape Server/src/main/java/com/rs2/game/shops/ShopAssistant.java +++ b/2006Scape Server/src/main/java/com/rs2/game/shops/ShopAssistant.java @@ -1,6 +1,7 @@ package com.rs2.game.shops; import com.rs2.Constants; +import com.rs2.game.items.Weight; import org.apollo.cache.def.ItemDefinition; import com.rs2.game.bots.BotHandler; @@ -450,6 +451,7 @@ public class ShopAssistant { // Add item to the shop addShopItem(unNotedItemID, amount); player.getItemAssistant().resetItems(3823); + Weight.updateWeight(player); resetShop(player.shopId); updatePlayerShop(); return true; @@ -611,6 +613,7 @@ public class ShopAssistant { GameLogger.writeLog(player.playerName, "shopbuying", player.playerName + " bought " + amount + " " + itemName + " for " + totalValue + " " + currencyName + " from store " + shopID + "."); } player.getItemAssistant().resetItems(3823); + Weight.updateWeight(player); resetShop(player.shopId); updatePlayerShop(); return true; //return TRUE / FALSE Update = shop&Inventory / Doesnt Update