m3talstorm / foe-bot

:robot: A simple bot to automate the main functions of Forge of Empires (FoE)
MIT License
45 stars 15 forks source link

Some new features and fixes #19

Open ruscon opened 6 years ago

ruscon commented 6 years ago

I don't know python, but it's working, u can check :)

druban commented 6 years ago

There's a bug in the hidden reward code. When it picks up a hidden reward, it doesn't clear it, meaning that in the next account refresh cycle it'll attempt to collect it again resulting in "internal error" message.

druban commented 6 years ago

At the end of collect() method, before return, add:

Clean up. Otherwise entry will be picked up on the next reload resulting in server error

    self.session.query(HiddenReward).filter_by(hiddenRewardId=self.hiddenRewardId).delete()