wheeloffortune bugfix

This commit is contained in:
Eriks K 2020-09-29 17:38:26 +03:00
parent 6f4bc65d1b
commit ad24338f4d
2 changed files with 16 additions and 16 deletions

View File

@ -683,9 +683,8 @@ class CitizenAnniversary(BaseCitizen):
_write_spin_data(current_cost, r.get('account'),
base.get('prizes').get('prizes').get(str(r.get('result'))).get('tooltip'))
else:
is_cost: Callable[[], bool] = lambda: (max_cost != current_cost if max_cost else True)
is_count: Callable[[], bool] = lambda: (spin_count != current_count if spin_count else True)
while is_cost() or is_count():
while max_cost >= current_cost if max_cost else spin_count >= current_count if spin_count else False:
return
r = self._spin_wheel_of_loosing(current_cost)
current_count += 1
current_cost = r.get('cost')
@ -694,8 +693,8 @@ class CitizenAnniversary(BaseCitizen):
def _spin_wheel_of_loosing(self, current_cost: int) -> Dict[str, Any]:
r = self._post_main_wheel_of_fortune_spin(current_cost).json()
self.details.cc = r.get('account')
return r.get('result')
self.details.cc = float(Decimal(r.get('account')))
return r
class CitizenTravel(BaseCitizen):

View File

@ -451,24 +451,25 @@ class Energy:
class Details:
xp = 0
cc = 0
pp = 0
pin = None
gold = 0
xp: int = 0
cc: float = 0
pp: int = 0
pin: str = None
gold: float = 0
next_pp: List[int] = None
citizen_id = 0
citizen_id: int = 0
citizenship: constants.Country
current_region = 0
current_region: int = 0
current_country: constants.Country
residence_region = 0
residence_region: int = 0
residence_country: constants.Country
daily_task_done = False
daily_task_reward = False
mayhem_skills = {1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, }
daily_task_done: bool = False
daily_task_reward: bool = False
mayhem_skills: Dict[int, int]
def __init__(self):
self.next_pp = []
self.mayhem_skills = {1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0}
@property
def xp_till_level_up(self):