CryptoBlades / cryptoblades

535 stars 258 forks source link

Fix the infinity xp bug by dispatching the fetchPowerData call when updating character weapons. #1896

Closed Steart closed 1 year ago

Steart commented 1 year ago

All Submissions

Before: image

After: image

New Feature Submissions

Notes

Please note, your code must pass all tests and lint checks before it can be merged.

PR Description

Solves the infinity XP bug in the issue mentioned above.

The powerData would contain zeros in the following scenario:

  1. Recruit a new character.
  2. Equip a weapon.
  3. Move to the adventure tab (Without in between refreshes).

Testing

Has the code been tested, or does it need double checking?

Has been tested by myself, maybe that it would be neater to only dispatch this call when equiping a weapon instead of also dispatching it on unequip calls.