mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fixes 1895 - Properly select upper army for recruitment
This commit is contained in:
parent
8e1e8abe90
commit
33c0e24940
@ -2203,7 +2203,7 @@ void VCAI::buildArmyIn(const CGTownInstance * t)
|
||||
{
|
||||
makePossibleUpgrades(t->visitingHero);
|
||||
makePossibleUpgrades(t);
|
||||
recruitCreatures(t, t);
|
||||
recruitCreatures(t, t->getUpperArmy());
|
||||
moveCreaturesToHero(t);
|
||||
}
|
||||
|
||||
|
@ -777,7 +777,7 @@ void CCastleBuildings::enterCastleGate()
|
||||
void CCastleBuildings::enterDwelling(int level)
|
||||
{
|
||||
assert(level >= 0 && level < town->creatures.size());
|
||||
auto recruitCb = [=](CreatureID id, int count){ LOCPLINT->cb->recruitCreatures(town, town, id, count, level); };
|
||||
auto recruitCb = [=](CreatureID id, int count){ LOCPLINT->cb->recruitCreatures(town, town->getUpperArmy(), id, count, level); };
|
||||
GH.pushInt(new CRecruitmentWindow(town, level, town, recruitCb, -87));
|
||||
}
|
||||
|
||||
@ -1066,7 +1066,7 @@ void CCreaInfo::clickLeft(tribool down, bool previousState)
|
||||
if(previousState && (!down))
|
||||
{
|
||||
int offset = LOCPLINT->castleInt? (-87) : 0;
|
||||
auto recruitCb = [=](CreatureID id, int count) { LOCPLINT->cb->recruitCreatures(town, town, id, count, level); };
|
||||
auto recruitCb = [=](CreatureID id, int count) { LOCPLINT->cb->recruitCreatures(town, town->getUpperArmy(), id, count, level); };
|
||||
GH.pushInt(new CRecruitmentWindow(town, level, town, recruitCb, offset));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user