|
|
@@ -1061,8 +1061,16 @@ void CCastleBuildings::enterAnyThievesGuild()
|
|
|
void CCastleBuildings::enterBank()
|
|
|
{
|
|
|
std::vector<std::shared_ptr<CComponent>> components;
|
|
|
- components.push_back(std::make_shared<CComponent>(ComponentType::RESOURCE, GameResID::GOLD, 2500));
|
|
|
- LOCPLINT->showYesNoDialog(CGI->generaltexth->translate("vcmi.adventureMap.noTownWithTavern"), [this](){ LOCPLINT->cb->triggerTownSpecialBuildingAction(town, BuildingSubID::BANK); }, nullptr, components);
|
|
|
+ if(town->bonusValue.second > 0)
|
|
|
+ {
|
|
|
+ components.push_back(std::make_shared<CComponent>(ComponentType::RESOURCE, GameResID(GameResID::GOLD), "-500/" + CGI->generaltexth->translate("core.genrltxt.64")));
|
|
|
+ LOCPLINT->showInfoDialog(CGI->generaltexth->translate("vcmi.townStructure.bank.payBack"), components);
|
|
|
+ }
|
|
|
+ else{
|
|
|
+
|
|
|
+ components.push_back(std::make_shared<CComponent>(ComponentType::RESOURCE, GameResID(GameResID::GOLD), 2500));
|
|
|
+ LOCPLINT->showYesNoDialog(CGI->generaltexth->translate("vcmi.townStructure.bank.borrow"), [this](){ LOCPLINT->cb->triggerTownSpecialBuildingAction(town, BuildingSubID::BANK); }, nullptr, components);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void CCastleBuildings::enterAnyMarket()
|