diff --git a/AI/Nullkiller/AIGateway.cpp b/AI/Nullkiller/AIGateway.cpp index 08ed86f6e..342592af9 100644 --- a/AI/Nullkiller/AIGateway.cpp +++ b/AI/Nullkiller/AIGateway.cpp @@ -330,7 +330,11 @@ void AIGateway::showRecruitmentDialog(const CGDwelling * dwelling, const CArmedI NET_EVENT_HANDLER; status.addQuery(queryID, "RecruitmentDialog"); - requestActionASAP([=](){ answerQuery(queryID, 0); }); + + requestActionASAP([=](){ + recruitCreatures(dwelling, dst); + answerQuery(queryID, 0); + }); } void AIGateway::heroMovePointsChanged(const CGHeroInstance * hero) @@ -845,9 +849,6 @@ void AIGateway::performObjectInteraction(const CGObjectInstance * obj, HeroPtr h LOG_TRACE_PARAMS(logAi, "Hero %s and object %s at %s", h->getNameTranslated() % obj->getObjectName() % obj->pos.toString()); switch(obj->ID) { - case Obj::CREATURE_GENERATOR1: - recruitCreatures(dynamic_cast(obj), h.get()); - break; case Obj::TOWN: if(h->visitedTown) //we are inside, not just attacking { diff --git a/AI/VCAI/VCAI.cpp b/AI/VCAI/VCAI.cpp index bb6e0a1c9..2c9b4d897 100644 --- a/AI/VCAI/VCAI.cpp +++ b/AI/VCAI/VCAI.cpp @@ -366,7 +366,11 @@ void VCAI::showRecruitmentDialog(const CGDwelling * dwelling, const CArmedInstan NET_EVENT_HANDLER; status.addQuery(queryID, "RecruitmentDialog"); - requestActionASAP([=](){ answerQuery(queryID, 0); }); + requestActionASAP([=](){ + recruitCreatures(dwelling, dst); + checkHeroArmy(dynamic_cast(dst)); + answerQuery(queryID, 0); + }); } void VCAI::heroMovePointsChanged(const CGHeroInstance * hero) @@ -1056,10 +1060,6 @@ void VCAI::performObjectInteraction(const CGObjectInstance * obj, HeroPtr h) LOG_TRACE_PARAMS(logAi, "Hero %s and object %s at %s", h->getNameTranslated() % obj->getObjectName() % obj->pos.toString()); switch(obj->ID) { - case Obj::CREATURE_GENERATOR1: - recruitCreatures(dynamic_cast(obj), h.get()); - checkHeroArmy(h); - break; case Obj::TOWN: moveCreaturesToHero(dynamic_cast(obj)); if(h->visitedTown) //we are inside, not just attacking