TFT-OCR-BOT
TFT-OCR-BOT copied to clipboard
Bot stops equipping items over time
Unsure of the cause but I have noticed after updating to the latest version, the bot seems to equip items perfectly at first. After several consecutive games, it for some reason does not equip items despite successfully scanning them on the bench. I am not sure how to provide logs but I was wondering if anyone else had this issue.
Yeah that is odd, whats probably happening is the item pool for champions isn't being reset after each game so after a few games there is no items left. I thought I fixed this a few months ago but I will look into it again after work
Adding this line below move_known() in arena.py can temporarily solve this problem
champion.build = comps.COMP[champion.name]["items"].copy()
The cause of this problem may be "champion.build" and "comps.COMP[name]["items"]" in bought_champion has refer to same memory address.
So after few games, items in comps file will be deleted if that item was built in these games.
I will test it later.