1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

- More commanders

- Improved finding closest tiles on battlefield
This commit is contained in:
DjWarmonger
2012-04-22 17:38:36 +00:00
parent 81e74f8c33
commit 96d198758c
10 changed files with 124 additions and 17 deletions

View File

@ -711,6 +711,7 @@ CGHeroInstance::CGHeroInstance()
visitedTown = NULL;
type = NULL;
boat = NULL;
commander = NULL;
sex = 0xff;
secSkills.push_back(std::make_pair(-1, -1));
speciality.setNodeType(CBonusSystemNode::SPECIALITY);
@ -773,6 +774,11 @@ void CGHeroInstance::initHero()
}
assert(validTypes());
if (GameConstants::COMMANDERS)
{
commander = new CCommanderInstance (VLC->creh->factionCommanders[type->heroType / 2]); //hopefully it returns town type
}
hoverName = VLC->generaltexth->allTexts[15];
boost::algorithm::replace_first(hoverName,"%s",name);
boost::algorithm::replace_first(hoverName,"%s", type->heroClass->name);