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:
@ -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);
|
||||
|
Reference in New Issue
Block a user