Fix weekly boss entry tickets resetting every day

This commit is contained in:
Melledy
2025-12-09 23:28:24 -08:00
parent 0ad87dd751
commit 5d797fb9d3

View File

@@ -633,13 +633,7 @@ public class Player implements GameDatabaseObject {
// Trigger quest/achievement login
this.trigger(QuestCondition.LoginTotal, 1);
// Add weekly boss entry item
int entries = this.getInventory().getResourceCount(GameConstants.WEEKLY_ENTRY_ITEM_ID);
if (entries < 3) {
this.getInventory().addItem(GameConstants.WEEKLY_ENTRY_ITEM_ID, 3 - entries);
}
// Give sign-in rewards
this.getSignInRewards(hasMonthChanged);
@@ -685,8 +679,18 @@ public class Player implements GameDatabaseObject {
this.getQuestManager().resetDailyQuests();
this.getBattlePassManager().getBattlePass().resetDailyQuests(resetWeekly);
// Reset monthly shop purchases
// Check to reset weeklies
if (resetWeekly) {
// Add weekly boss entry item
int entries = this.getInventory().getResourceCount(GameConstants.WEEKLY_ENTRY_ITEM_ID);
if (entries < 3) {
this.getInventory().addItem(GameConstants.WEEKLY_ENTRY_ITEM_ID, 3 - entries);
}
}
// Check if we need to reset monthly
if (resetMonthly) {
// Reset monthly shop purchases
this.getInventory().resetShopPurchases();
}
}