diff options
author | Jesusalva Jesusalva <jesusalva@themanaworld.org> | 2023-01-09 02:59:24 +0000 |
---|---|---|
committer | Jesusalva Jesusalva <jesusalva@themanaworld.org> | 2023-01-09 02:59:24 +0000 |
commit | 934cf5c93f3a323cea85384557b408c388b0848f (patch) | |
tree | 64ba50d1ba27fe705998964026cb4160fc5578cd | |
parent | 00318e4c05a399bcfc5bbca5453a302176cd52fa (diff) | |
download | manamarket-934cf5c93f3a323cea85384557b408c388b0848f.tar.gz manamarket-934cf5c93f3a323cea85384557b408c388b0848f.tar.bz2 manamarket-934cf5c93f3a323cea85384557b408c388b0848f.tar.xz manamarket-934cf5c93f3a323cea85384557b408c388b0848f.zip |
See a01f9d8865fb62e993864257ba28dfab21435ae7
-rw-r--r-- | stats/process_salelog/utils.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/stats/process_salelog/utils.py b/stats/process_salelog/utils.py index 4c59f5f..2a59ffa 100644 --- a/stats/process_salelog/utils.py +++ b/stats/process_salelog/utils.py @@ -49,7 +49,18 @@ class ItemDB: self.itemdb_file = ElementTree(file="../data/items.xml") for item in self.itemdb_file.getroot(): - if item.get('name'): + ## Item declaration + if item.get('id'): + item3 = item + item_struct = Item() + item_struct.name = item3.get('name') + item_struct.weight = int(item3.get('weight', 0)) + if item3.get('type'): + item_struct.type = item3.get('type') + item_struct.description = item3.get('description') + self.item_names[int(item3.get('id'))] = item_struct + ## Import statement + elif item.get('name'): file2 = ElementTree(file="../" + item.get('name')) for item2 in file2.getroot(): if item2.get('name'): |