1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00

Remove save compatibility with 1.5.X

This commit is contained in:
Ivan Savenko
2025-03-18 11:35:15 +00:00
parent 81759143f4
commit eb3b51a6cf
27 changed files with 86 additions and 542 deletions

View File

@ -36,37 +36,6 @@ public:
int getMarketEfficiency() const override;
int availableUnits(EMarketMode mode, int marketItemSerial) const override; //-1 if unlimited
std::set<EMarketMode> availableModes() const override;
template <typename Handler>
void serialize(Handler &h)
{
h & static_cast<CGObjectInstance&>(*this);
if (h.version < Handler::Version::NEW_MARKETS)
{
std::set<EMarketMode> marketModes;
h & marketModes;
}
if (h.version < Handler::Version::MARKET_TRANSLATION_FIX)
{
int unused = 0;
h & unused;
}
if (h.version < Handler::Version::NEW_MARKETS)
{
std::string speech;
std::string title;
h & speech;
h & title;
}
}
template <typename Handler> void serializeArtifactsAltar(Handler &h)
{
serialize(h);
IMarket::serializeArtifactsAltar(h);
}
};
class DLL_LINKAGE CGBlackMarket : public CGMarket
@ -82,24 +51,7 @@ public:
template <typename Handler> void serialize(Handler &h)
{
h & static_cast<CGMarket&>(*this);
if (h.version < Handler::Version::REMOVE_VLC_POINTERS)
{
int32_t size = 0;
h & size;
for (int32_t i = 0; i < size; ++i)
{
bool isNull = false;
ArtifactID artifact;
h & isNull;
if (!isNull)
h & artifact;
artifacts.push_back(artifact);
}
}
else
{
h & artifacts;
}
h & artifacts;
}
};
@ -119,12 +71,6 @@ public:
{
h & static_cast<CGMarket&>(*this);
h & skills;
if (h.version >= Handler::Version::NEW_MARKETS && h.version < Handler::Version::MARKET_TRANSLATION_FIX)
{
std::string temp;
h & temp;
h & temp;
}
}
};