ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.58k stars 360 forks source link

Combat screen, Captured Artifact window, artifact is displayed only once when opposing hero has two copies of the same artifact #8844

Closed LeHerosInconnu closed 4 days ago

LeHerosInconnu commented 1 week ago

Preliminary checks

Platform

Windows

Describe the bug

In fheroes2, in the example, the opposing hero has two copies of the same artifact, but the artifact is displayed only once in Captured Artifact window.

In fheroes2:

Artifact two only one

https://github.com/ihhub/fheroes2/assets/43583994/c9a07798-3ab3-4060-8deb-6097d3ba3018

Save file

Not needed.

Additional info

No response

oleg-derevenetz commented 1 week ago

This is a regression introduced in #8244.

zenseii commented 1 week ago

I remember when making that PR I was suprised that it worked that way, but iirc I checked the OG and that's how it worked, or that was how it was before the PR.

In either case, I'm completely fine with displaying duplicate artifacts.

oleg-derevenetz commented 1 week ago

Hi @zenseii

I remember when making that PR I was suprised that it worked that way, but iirc I checked the OG and that's how it worked, or that was how it was before the PR.

I understood that your idea was not to redraw the same artifacts running in a row, which is correct in general (and now the redraw is not being done either), you just shouldn't skip the event loop :)