Closed wallaceg09 closed 10 years ago
works nice so far. well done
only thing i found is that when you have 5* 4* or 3* equipped and you suddenly equip a non bonus item you will keep the buff like shown in the screenshot
Right on. I'll see if I can figure why that's happening.
This bug was caused by "BonusSetTemplate.getWornTemplateCount()" being called by the python script "equipment/bonus_set/set_bonus_hero.py" before the item was actually equipped, resulting in the method returning (n-1) where (n) is the correct output. Upon further inspection I found that processItemAttributes() was being called before the item was added/removed from the player's inventory. I then moved the method to be called after the item was added/removed and that appeared to fix the problem. I tested the starter clothing to make that I didn't break attribute-bearing equipment and it seems that it's fine.
If this fix causes problems there is another way to fix it, which is to decrement the required items per set bonus for each set. This way seemed like less work and was a bit more intuitive.