diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index 1ff10cfc4..858024fd7 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -87,6 +87,7 @@ #include "../lib/gameState/CGameState.h" +#include "../lib/mapObjects/CGMarket.h" #include "../lib/mapObjects/CGTownInstance.h" #include "../lib/mapObjects/MiscObjects.h" #include "../lib/mapObjects/ObjectTemplate.h" @@ -1659,6 +1660,15 @@ void CPlayerInterface::showMarketWindow(const IMarket *market, const CGHeroInsta cb->selectionMade(0, queryID); }; + if (market->allowsTrade(EMarketMode::ARTIFACT_EXP) && dynamic_cast(market) == nullptr) + { + // compatibility check, safe to remove for 1.6 + // 1.4 saves loaded in 1.5 will not be able to visit Altar of Sacrifice due to Altar now requiring different map object class + static_assert(ESerializationVersion::RELEASE_143 < ESerializationVersion::CURRENT, "Please remove this compatibility check once it no longer needed"); + onWindowClosed(); + return; + } + if(market->allowsTrade(EMarketMode::ARTIFACT_EXP) && visitor->getAlignment() != EAlignment::EVIL) GH.windows().createAndPushWindow(market, visitor, onWindowClosed, EMarketMode::ARTIFACT_EXP); else if(market->allowsTrade(EMarketMode::CREATURE_EXP) && visitor->getAlignment() != EAlignment::GOOD) diff --git a/lib/serializer/ESerializationVersion.h b/lib/serializer/ESerializationVersion.h index f19e635c0..32636068f 100644 --- a/lib/serializer/ESerializationVersion.h +++ b/lib/serializer/ESerializationVersion.h @@ -42,5 +42,7 @@ enum class ESerializationVersion : int32_t TURN_TIMERS_STATE, // 839 current state of turn timers is serialized ARTIFACT_COSTUMES, // 840 swappable artifacts set added + RELEASE_150 = ARTIFACT_COSTUMES, // for convenience + CURRENT = ARTIFACT_COSTUMES };