From 30569a112cc2aa2c1efc0ecd2361a1e2602307f7 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Tue, 16 Jul 2024 10:42:25 +0000 Subject: [PATCH] Fix crash on attempt to transfer component of a combined artifact --- lib/gameState/CGameStateCampaign.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/gameState/CGameStateCampaign.cpp b/lib/gameState/CGameStateCampaign.cpp index ea4f6d72e..a016cc6ee 100644 --- a/lib/gameState/CGameStateCampaign.cpp +++ b/lib/gameState/CGameStateCampaign.cpp @@ -120,6 +120,11 @@ void CGameStateCampaign::trimCrossoverHeroesParameters(const CampaignTravel & tr if(!info) return false; + // FIXME: double-check how H3 handles case of transferring components of a combined artifact if entire combined artifact is not transferrable + // For example, what happens if hero has assembled Angelic Alliance, AA is not marked is transferrable, but Sandals can be transferred? Should artifact be disassembled? + if (info->locked) + return false; + // TODO: why would there be nullptr artifacts? const CArtifactInstance *art = info->artifact; if(!art)