diff --git a/src/main/java/emu/nebula/game/inventory/Inventory.java b/src/main/java/emu/nebula/game/inventory/Inventory.java index 20afb22..5826354 100644 --- a/src/main/java/emu/nebula/game/inventory/Inventory.java +++ b/src/main/java/emu/nebula/game/inventory/Inventory.java @@ -829,6 +829,20 @@ public class Inventory extends PlayerManager implements GameDatabaseObject { return change.setSuccess(true); } + public void resetShopPurchases() { + // Clear shop purchases if it's not empty + if (!this.getShopBuyCount().isEmpty()) { + this.getShopBuyCount().clear(); + Nebula.getGameDatabase().update(this, this.getUid(), "shopBuyCount", this.getShopBuyCount()); + } + + // Clear mall purchases if it's not empty + if (!this.getMallBuyCount().isEmpty()) { + this.getMallBuyCount().clear(); + Nebula.getGameDatabase().update(this, this.getUid(), "mallBuyCount", this.getMallBuyCount()); + } + } + // Database public void loadFromDatabase() { diff --git a/src/main/java/emu/nebula/game/player/Player.java b/src/main/java/emu/nebula/game/player/Player.java index 72335bf..4ec7346 100644 --- a/src/main/java/emu/nebula/game/player/Player.java +++ b/src/main/java/emu/nebula/game/player/Player.java @@ -691,6 +691,11 @@ public class Player implements GameDatabaseObject { // Reset daily quests this.getQuestManager().resetDailyQuests(); this.getBattlePassManager().getBattlePass().resetDailyQuests(resetWeekly); + + // Reset monthly shop purchases + if (resetMonthly) { + this.getInventory().resetShopPurchases(); + } } // Trigger quests + achievements