From 337cc9fcd5afed5197e06aad9fb261468e29c767 Mon Sep 17 00:00:00 2001 From: BlackDog86 <122568778+BlackDog86@users.noreply.github.com> Date: Fri, 27 Dec 2024 10:16:41 +0000 Subject: [PATCH] Adjust XCGS_Item to ignore the number of upgrade slots in HasBeenModified --- .../Src/XComGame/Classes/XComGameState_Item.uc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComGameState_Item.uc b/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComGameState_Item.uc index cb5191a7f..3aab7ce0e 100644 --- a/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComGameState_Item.uc +++ b/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComGameState_Item.uc @@ -792,10 +792,14 @@ simulated function bool HasBeenModified() return true; //end issue #104 - WeaponTemplate = X2WeaponTemplate( m_ItemTemplate ); - - // Single line for Issues #93 and #306 - if ((WeaponTemplate != none) && (GetNumUpgradeSlots() > 0) && (GetMyWeaponUpgradeCount() > 0)) + WeaponTemplate = X2WeaponTemplate( m_ItemTemplate ); + /// HL-Docs: ref:Bugfixes; issue:1429 + /// Fix bug that caused weapons that have weapon upgrades installed, despite not having any weapon upgrade slots, + /// to stack in the HQ inventory, causing them to lose their installed upgrades when equipped. The fix removes the + /// check for the number of weapon upgrade slots on the weapon from the logic that determines whether the item has + /// been modified or not, and leaves just the check for number of installed weapon upgrades. + // Single line for Issues #93, #306 and #1429 + if ((WeaponTemplate != none) /* && (GetNumUpgradeSlots() > 0)*/ && (GetMyWeaponUpgradeCount() > 0)) return true; return false;