mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 13:00:42 +00:00
5a065d71c5
Resolves #2464 ## Description This PR fixes a bug where the alliance renewal popup remained visible after an alliance was broken or betrayed. The issue occurred because renewal UI events were tied to player identifiers instead of the unique allianceId. When a player had multiple alliances, breaking one alliance did not correctly remove the associated renewal popup. This change ensures that renewal popups are correctly removed only for the specific alliance that was broken. ### What was wrong Alliance renewal UI events were previously associated implicitly with players. This caused incorrect behavior when a player had **multiple alliances**, because **players are not unique identifiers of an alliance**. As a result, breaking one alliance could leave stale renewal popups visible. ### What was changed - Alliance break logic now relies on **allianceId**, not player IDs - Renewal popups are removed **only for the specific broken alliance** - Alliances involving the same player but different allianceIds are unaffected - Added tests to ensure this bug cannot reappear ### Result - Renewal popup disappears immediately when an alliance is betrayed/broken - No unintended removal of other alliance renewal popups - Correct behavior even when a player is involved in multiple alliances ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: assessin.