Handyfon / Farchievements

Foundry Achievments. The first module to add player achievements to FoundryVTT!
3 stars 5 forks source link

BUG: Wrong Achievement Animation (banner animation) #10

Closed rbl047 closed 2 years ago

rbl047 commented 3 years ago

Description: When I activate an achievement the list is updated as expected (i.e: I activated the "translator" one and the achievement list or board is corect). BUT, the banner animation always shows one achievement before it (i.e: here it is showing the "mounted one").

When the bug started: After I had created a new achievement.

What I've done to try to fix it: I've closed/opened foundry (0.8.8) again, uninstalled/installed again the module, changed the player. Nothing works.

Can someone help? Thanks!

Lucky13524 commented 3 years ago

Having the same issue as described above and want to elaborate some more. As written above the correct achievement is shown on the achievement page. Only the banner is wrong.

The achievement that is displayed in the banner is always the one that is in one position in front of it. So as an example with the standard achievements they have the order of: Mounted, Translator, Argumenter. If you give the player the Translator achievement the banner will show the Mounted achievement (once again the achievement page shows the Translator one correctly). If you now want to give them the Argumenter achievement they will not get a banner notification because the notification system (presumably) thinks that the player already has that achievement. It probably checks if the player has the Translator achievement instead of the Argumenter achievement. And lastly if you give the player the first Achievement in your achievement list they will not get any banner notification.

I tried to look through the files myself but my knowledge on Javascript/HTML is limited so I couldn't find much. When looking through recent commits I saw that some changes were made to how arrays are handled so maybe something there went wrong or was forgotten?

I hope the additional insight and theory was able to help somewhat with solving this bug

Handyfon commented 3 years ago

fixed with 1.5.1