From 397371b969e933bedf3429ab665fc6809598b48f Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 2 Dec 2022 18:52:05 +0200 Subject: [PATCH] HoMM3 bug workaround: fixes missing slot on artifact merchant background image --- client/windows/CTradeWindow.cpp | 4 ++++ client/windows/CTradeWindow.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/client/windows/CTradeWindow.cpp b/client/windows/CTradeWindow.cpp index 63381e08e..0efefeacb 100644 --- a/client/windows/CTradeWindow.cpp +++ b/client/windows/CTradeWindow.cpp @@ -676,6 +676,10 @@ CMarketplaceWindow::CMarketplaceWindow(const IMarket * Market, const CGHeroInsta break; case EMarketMode::ARTIFACT_RESOURCE: title = (*CGI->townh)[market->o->subID]->town->buildings[BuildingID::ARTIFACT_MERCHANT]->Name(); + + // create image that copies part of background containing slot MISC_1 into position of slot MISC_5 + // this is workaround for bug in H3 files where this slot for ragdoll on this screen is missing + images.push_back(std::make_shared(background->bg, Rect(20, 187, 47, 47), 18, 339 )); sliderNeeded = false; break; default: diff --git a/client/windows/CTradeWindow.h b/client/windows/CTradeWindow.h index a19a56a62..49bc5e74c 100644 --- a/client/windows/CTradeWindow.h +++ b/client/windows/CTradeWindow.h @@ -21,6 +21,7 @@ VCMI_LIB_NAMESPACE_END class CSlider; class CTextBox; +class CPicture; class CGStatusBar; class CTradeWindow : public CWindowObject, public CWindowWithArtifacts //base for markets and altar of sacrifice @@ -108,6 +109,7 @@ public: protected: std::shared_ptr statusBar; std::vector> labels; + std::vector> images; std::vector> buttons; std::vector> texts; };