diff --git a/client/windows/CCastleInterface.cpp b/client/windows/CCastleInterface.cpp index 106de45be..d501464c2 100644 --- a/client/windows/CCastleInterface.cpp +++ b/client/windows/CCastleInterface.cpp @@ -901,7 +901,7 @@ void CCastleBuildings::enterDwelling(int level) { LOCPLINT->cb->recruitCreatures(town, town->getUpperArmy(), id, count, level); }; - GH.windows().createAndPushWindow(town, level, town, recruitCb, nullptr, -87); + GH.windows().createAndPushWindow(town, level, town->getUpperArmy(), recruitCb, nullptr, -87); } void CCastleBuildings::enterToTheQuickRecruitmentWindow() @@ -1110,7 +1110,7 @@ void CCreaInfo::clickPressed(const Point & cursorPosition) { LOCPLINT->cb->recruitCreatures(town, town->getUpperArmy(), id, count, level); }; - GH.windows().createAndPushWindow(town, level, town, recruitCb, nullptr, offset); + GH.windows().createAndPushWindow(town, level, town->getUpperArmy(), recruitCb, nullptr, offset); } std::string CCreaInfo::genGrowthText() diff --git a/client/windows/GUIClasses.cpp b/client/windows/GUIClasses.cpp index 498f4a6d4..d808480d9 100644 --- a/client/windows/GUIClasses.cpp +++ b/client/windows/GUIClasses.cpp @@ -159,7 +159,7 @@ void CRecruitmentWindow::buy() else { 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. boost::algorithm::replace_first(txt, "%s", slider->getValue() > 1 ? CGI->creh->objects[crid]->getNamePluralTranslated() : CGI->creh->objects[crid]->getNameSingularTranslated());