mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Fixed check for free slots when recruiting in towns
This commit is contained in:
@@ -901,7 +901,7 @@ void CCastleBuildings::enterDwelling(int level)
|
|||||||
{
|
{
|
||||||
LOCPLINT->cb->recruitCreatures(town, town->getUpperArmy(), id, count, level);
|
LOCPLINT->cb->recruitCreatures(town, town->getUpperArmy(), id, count, level);
|
||||||
};
|
};
|
||||||
GH.windows().createAndPushWindow<CRecruitmentWindow>(town, level, town, recruitCb, nullptr, -87);
|
GH.windows().createAndPushWindow<CRecruitmentWindow>(town, level, town->getUpperArmy(), recruitCb, nullptr, -87);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCastleBuildings::enterToTheQuickRecruitmentWindow()
|
void CCastleBuildings::enterToTheQuickRecruitmentWindow()
|
||||||
@@ -1110,7 +1110,7 @@ void CCreaInfo::clickPressed(const Point & cursorPosition)
|
|||||||
{
|
{
|
||||||
LOCPLINT->cb->recruitCreatures(town, town->getUpperArmy(), id, count, level);
|
LOCPLINT->cb->recruitCreatures(town, town->getUpperArmy(), id, count, level);
|
||||||
};
|
};
|
||||||
GH.windows().createAndPushWindow<CRecruitmentWindow>(town, level, town, recruitCb, nullptr, offset);
|
GH.windows().createAndPushWindow<CRecruitmentWindow>(town, level, town->getUpperArmy(), recruitCb, nullptr, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CCreaInfo::genGrowthText()
|
std::string CCreaInfo::genGrowthText()
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ void CRecruitmentWindow::buy()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string txt;
|
std::string txt;
|
||||||
if(dst->ID == Obj::HERO)
|
if(dwelling->ID != Obj::TOWN)
|
||||||
{
|
{
|
||||||
txt = CGI->generaltexth->allTexts[425]; //The %s would join your hero, but there aren't enough provisions to support them.
|
txt = CGI->generaltexth->allTexts[425]; //The %s would join your hero, but there aren't enough provisions to support them.
|
||||||
boost::algorithm::replace_first(txt, "%s", slider->getValue() > 1 ? CGI->creh->objects[crid]->getNamePluralTranslated() : CGI->creh->objects[crid]->getNameSingularTranslated());
|
boost::algorithm::replace_first(txt, "%s", slider->getValue() > 1 ? CGI->creh->objects[crid]->getNamePluralTranslated() : CGI->creh->objects[crid]->getNameSingularTranslated());
|
||||||
|
|||||||
Reference in New Issue
Block a user