From e75a9a90a81a8cf2c086db6412cee123c048cf0f Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Sat, 15 Jun 2024 01:52:50 +0800 Subject: [PATCH] Fix: Weekly items are calculated in PlannerOverall --- tasks/planner/model.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tasks/planner/model.py b/tasks/planner/model.py index 84d9e149a..4bb596683 100644 --- a/tasks/planner/model.py +++ b/tasks/planner/model.py @@ -405,6 +405,22 @@ class StoredPlannerProxy(BaseModelWithFallback): self.total += row.total self.synthesize += row.synthesize + def can_daily_farm(self): + """ + Returns: + bool: True if item can be farmed in daily + False if item.is_ItemWeekly or Tracks_of_Destiny + """ + if self.item.is_ItemAscension: + return True + if self.item.is_ItemTrace: + return True + if self.item.is_ItemExp: + return True + if self.item.is_ItemCurrency: + return True + return False + def need_farm(self): return self.progress < 100 @@ -532,6 +548,8 @@ class PlannerProgressParser: progress_current = 0. progress_total = 0. for row in self.rows.values(): + if not row.can_daily_farm(): + continue eta += row.eta progress_current += row.progress_current progress_total += row.progress_total