1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

Altar artifacts widget refactoring

This commit is contained in:
SoundSSGood
2024-02-29 12:02:39 +02:00
parent 4839891de4
commit ae8d70748b
19 changed files with 216 additions and 238 deletions

View File

@ -26,8 +26,7 @@
#include "../../../lib/mapObjects/CGMarket.h"
CAltarCreatures::CAltarCreatures(const IMarket * market, const CGHeroInstance * hero)
: CTradeBase(market, hero)
, CMarketMisc([this](){return CAltarCreatures::getSelectionParams();})
: CTradeBase(market, hero, [this](){return CAltarCreatures::getSelectionParams();})
{
OBJECT_CONSTRUCTION_CUSTOM_CAPTURING(255 - DISPOSE);
@ -166,7 +165,7 @@ void CAltarCreatures::makeDeal()
}
}
CMarketMisc::SelectionParams CAltarCreatures::getSelectionParams()
CTradeBase::SelectionParams CAltarCreatures::getSelectionParams() const
{
std::optional<SelectionParamOneSide> bidSelected = std::nullopt;
std::optional<SelectionParamOneSide> offerSelected = std::nullopt;