mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-07 23:33:15 +02:00
Fixed CID 1197409
This commit is contained in:
@@ -1299,14 +1299,6 @@ void CAltarWindow::selectionChanged(bool side)
|
|||||||
if(mode != EMarketMode::CREATURE_EXP)
|
if(mode != EMarketMode::CREATURE_EXP)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CTradeableItem *&selected = side ? hLeft : hRight;
|
|
||||||
CTradeableItem *&theOther = side ? hRight : hLeft;
|
|
||||||
|
|
||||||
theOther = *std::find_if(items[!side].begin(), items[!side].end(), [&](const CTradeableItem * item)
|
|
||||||
{
|
|
||||||
return item->serial == selected->serial;
|
|
||||||
});
|
|
||||||
|
|
||||||
int stackCount = 0;
|
int stackCount = 0;
|
||||||
for (int i = 0; i < GameConstants::ARMY_SIZE; i++)
|
for (int i = 0; i < GameConstants::ARMY_SIZE; i++)
|
||||||
if(hero->getStackCount(SlotID(i)) > sacrificedUnits[i])
|
if(hero->getStackCount(SlotID(i)) > sacrificedUnits[i])
|
||||||
|
|||||||
Reference in New Issue
Block a user