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

Fix missing gold component in "join for money" dialog

This commit is contained in:
Dydzio 2024-02-07 21:57:25 +01:00
parent b319d16de6
commit 4e927d6417

View File

@ -171,6 +171,7 @@ void CGCreature::onHeroVisit( const CGHeroInstance * h ) const
//ask if player agrees to pay gold
BlockingDialog ynd(true,false);
ynd.player = h->tempOwner;
ynd.components.emplace_back(ComponentType::RESOURCE, GameResID(GameResID::GOLD), action);
std::string tmp = VLC->generaltexth->advobtxt[90];
boost::algorithm::replace_first(tmp, "%d", std::to_string(getStackCount(SlotID(0))));
boost::algorithm::replace_first(tmp, "%d", std::to_string(action));