bugfix: runs_per_repair = 0 modulo issue (#515)
This commit is contained in:
@@ -323,7 +323,9 @@ class Bot:
|
||||
|
||||
# Check if we are out of tps or need repairing
|
||||
need_repair = self._ui_manager.repair_needed()
|
||||
need_routine_repair = self._config.char["runs_per_repair"] and ((self._game_stats._run_counter) % int(self._config.char["runs_per_repair"]) == 0)
|
||||
need_routine_repair = False
|
||||
if type(self._config.char["runs_per_repair"]) == int and self._config.char["runs_per_repair"] > 0:
|
||||
need_routine_repair = self._game_stats._run_counter % self._config.char["runs_per_repair"] == 0
|
||||
need_refill_teleport = self._char.capabilities.can_teleport_with_charges and self.need_refill_teleport_charges()
|
||||
if self._tps_left < random.randint(3, 5) or need_repair or need_routine_repair or need_refill_teleport:
|
||||
if need_repair: Logger.info("Repair needed. Gear is about to break")
|
||||
|
||||
@@ -242,7 +242,7 @@ class Config:
|
||||
"atk_len_diablo": float(Config._select_val("char", "atk_len_diablo")),
|
||||
"atk_len_cs_trashmobs": float(Config._select_val("char", "atk_len_cs_trashmobs")),
|
||||
"kill_cs_trash": float(Config._select_val("char", "kill_cs_trash")),
|
||||
"runs_per_repair": Config._select_val("char", "runs_per_repair"),
|
||||
"runs_per_repair": False if not Config._select_val("char", "runs_per_repair") else int(Config._select_val("char", "runs_per_repair")),
|
||||
"gamble_items": Config._select_val("char", "gamble_items").replace(" ","").split(","),
|
||||
}
|
||||
# Sorc base config
|
||||
|
||||
Reference in New Issue
Block a user