1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Removed pointer to army from StackInstance

This commit is contained in:
Ivan Savenko
2025-03-18 23:30:06 +00:00
parent 16a06179cf
commit 63d00b080e
80 changed files with 260 additions and 280 deletions

View File

@@ -464,8 +464,8 @@ void CGHeroInstance::initHero(vstd::RNG & rand)
if (cb->getSettings().getBoolean(EGameSettings::MODULE_COMMANDERS) && !commander && getHeroClass()->commander.hasValue())
{
commander = std::make_unique<CCommanderInstance>(getHeroClass()->commander);
commander->setArmyObj (castToArmyObj()); //TODO: separate function for setting commanders
commander = std::make_unique<CCommanderInstance>(cb, getHeroClass()->commander);
commander->setArmy(getArmy()); //TODO: separate function for setting commanders
commander->giveStackExp (exp); //after our exp is set
}