From b65e912b07dc53cc05ef9deaf0736f8d46fa2482 Mon Sep 17 00:00:00 2001 From: IllianiCBT Date: Mon, 18 Nov 2024 11:51:56 -0600 Subject: [PATCH] Fix Spouse Dependency Check in Divorce Logic. Corrected an error where the departing partner was incorrectly set to the origin partner rather than the spouse. This ensures that the dependent spouse is properly added to the departing partners list. --- MekHQ/src/mekhq/campaign/personnel/divorce/AbstractDivorce.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MekHQ/src/mekhq/campaign/personnel/divorce/AbstractDivorce.java b/MekHQ/src/mekhq/campaign/personnel/divorce/AbstractDivorce.java index 1d4642f854..d1aa784ce5 100644 --- a/MekHQ/src/mekhq/campaign/personnel/divorce/AbstractDivorce.java +++ b/MekHQ/src/mekhq/campaign/personnel/divorce/AbstractDivorce.java @@ -266,7 +266,7 @@ public void divorce(final Campaign campaign, final LocalDate today, final Person } if (spouse.getPrimaryRole().isDependent()) { - departingPartners.add(origin); + departingPartners.add(spouse); } if (!departingPartners.isEmpty()) {