Allow battle pass weeklies to be reset

This commit is contained in:
Melledy
2025-11-17 08:19:56 -08:00
parent 334c8dc12e
commit 5f851a0367
2 changed files with 5 additions and 5 deletions

View File

@@ -101,14 +101,14 @@ public class BattlePass implements GameDatabaseObject {
}
}
public synchronized void resetDailyQuests() {
public synchronized void resetDailyQuests(boolean resetWeekly) {
// Reset daily quests
for (var data : GameData.getBattlePassQuestDataTable()) {
// Get quest
var quest = getQuests().computeIfAbsent(data.getId(), i -> new GameQuest(data));
// Don't reset weekly quests
if (!data.isDaily()) {
if (!data.isDaily() && !resetWeekly) {
continue;
}

View File

@@ -534,17 +534,17 @@ public class Player implements GameDatabaseObject {
}
// Reset dailies
this.resetDailies();
this.resetDailies(false);
// Update last epoch day
this.lastEpochDay = Nebula.getGameContext().getEpochDays();
Nebula.getGameDatabase().update(this, this.getUid(), "lastEpochDay", this.lastEpochDay);
}
public void resetDailies() {
public void resetDailies(boolean resetWeekly) {
// Reset daily quests
this.getQuestManager().resetDailyQuests();
this.getBattlePassManager().getBattlePass().resetDailyQuests();
this.getBattlePassManager().getBattlePass().resetDailyQuests(resetWeekly);
}
// Trigger quests