From 50c40107c4e1caea83660d60aa44693757d18d62 Mon Sep 17 00:00:00 2001 From: lukasthaler Date: Mon, 18 Dec 2023 23:40:37 +0100 Subject: [PATCH] fix hero hash --- coc/hero.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/coc/hero.py b/coc/hero.py index 0f02be85..8270e383 100644 --- a/coc/hero.py +++ b/coc/hero.py @@ -90,6 +90,12 @@ def __init__(self, data, townhall): self._townhall = townhall + # copies for a static hash + self.__name = data['name'] + self.__level = data['level'] + self.__village = data['village'] + self.__is_active = data.get("superTroopIsActive") + # end of copy & pasted init equipment = [try_enum(Equipment, equipment, townhall=townhall) for equipment in data.get('equipment', [])]