mirror of
https://github.com/Melledy/Nebula.git
synced 2025-12-14 13:24:43 +01:00
Allow battle pass weeklies to be reset
This commit is contained in:
@@ -101,14 +101,14 @@ public class BattlePass implements GameDatabaseObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void resetDailyQuests() {
|
public synchronized void resetDailyQuests(boolean resetWeekly) {
|
||||||
// Reset daily quests
|
// Reset daily quests
|
||||||
for (var data : GameData.getBattlePassQuestDataTable()) {
|
for (var data : GameData.getBattlePassQuestDataTable()) {
|
||||||
// Get quest
|
// Get quest
|
||||||
var quest = getQuests().computeIfAbsent(data.getId(), i -> new GameQuest(data));
|
var quest = getQuests().computeIfAbsent(data.getId(), i -> new GameQuest(data));
|
||||||
|
|
||||||
// Don't reset weekly quests
|
// Don't reset weekly quests
|
||||||
if (!data.isDaily()) {
|
if (!data.isDaily() && !resetWeekly) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -534,17 +534,17 @@ public class Player implements GameDatabaseObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reset dailies
|
// Reset dailies
|
||||||
this.resetDailies();
|
this.resetDailies(false);
|
||||||
|
|
||||||
// Update last epoch day
|
// Update last epoch day
|
||||||
this.lastEpochDay = Nebula.getGameContext().getEpochDays();
|
this.lastEpochDay = Nebula.getGameContext().getEpochDays();
|
||||||
Nebula.getGameDatabase().update(this, this.getUid(), "lastEpochDay", this.lastEpochDay);
|
Nebula.getGameDatabase().update(this, this.getUid(), "lastEpochDay", this.lastEpochDay);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resetDailies() {
|
public void resetDailies(boolean resetWeekly) {
|
||||||
// Reset daily quests
|
// Reset daily quests
|
||||||
this.getQuestManager().resetDailyQuests();
|
this.getQuestManager().resetDailyQuests();
|
||||||
this.getBattlePassManager().getBattlePass().resetDailyQuests();
|
this.getBattlePassManager().getBattlePass().resetDailyQuests(resetWeekly);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trigger quests
|
// Trigger quests
|
||||||
|
|||||||
Reference in New Issue
Block a user