1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

fixed regression

This commit is contained in:
SoundSSGood 2024-01-11 13:52:12 +02:00
parent b840cf3650
commit 4df7de36c1
2 changed files with 3 additions and 4 deletions

View File

@ -51,6 +51,8 @@ CAltarCreatures::CAltarCreatures(const IMarket * market, const CGHeroInstance *
assert(leftTradePanel);
leftTradePanel->moveBy(Point(45, 110));
leftTradePanel->updateSlotsCallback = std::bind(&CCreaturesSelling::updateSubtitle, this);
for(const auto & slot : leftTradePanel->slots)
slot->clickPressedCallback = [this](const std::shared_ptr<CTradeableItem> & heroSlot) {CAltarCreatures::onSlotClickPressed(heroSlot, hLeft);};
// Altar creatures panel
rightTradePanel = std::make_shared<CreaturesPanel>([this](const std::shared_ptr<CTradeableItem> & altarSlot)

View File

@ -90,10 +90,7 @@ CCreaturesSelling::CCreaturesSelling()
if(const auto & creature = hero->getCreature(slotId))
slots.emplace_back(std::make_tuple(creature->getId(), slotId, hero->getStackCount(slotId)));
}
leftTradePanel = std::make_shared<CreaturesPanel>([this](const std::shared_ptr<CTradeableItem> & altarSlot)
{
CTradeBase::onSlotClickPressed(altarSlot, hLeft);
}, slots);
leftTradePanel = std::make_shared<CreaturesPanel>(nullptr, slots);
}
bool CCreaturesSelling::slotDeletingCheck(const std::shared_ptr<CTradeableItem> & slot)