1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fixed commanders starting with 2^32 experience.

This commit is contained in:
DjWarmonger 2013-02-04 19:22:19 +00:00
parent 3c5d6dd79a
commit 5b00d74e1a

View File

@ -769,13 +769,6 @@ void CGHeroInstance::initHero()
}
assert(validTypes());
if (VLC->modh->modules.COMMANDERS)
{
commander = new CCommanderInstance (VLC->townh->factions[type->heroClass->faction].commander);
commander->setArmyObj (castToArmyObj()); //TODO: separate function for setting commanders
commander->giveStackExp (exp);
}
if (exp == 0xffffffff)
{
initExp();
@ -789,6 +782,13 @@ void CGHeroInstance::initHero()
level = 1;
}
if (VLC->modh->modules.COMMANDERS)
{
commander = new CCommanderInstance (VLC->townh->factions[type->heroClass->faction].commander);
commander->setArmyObj (castToArmyObj()); //TODO: separate function for setting commanders
commander->giveStackExp (exp); //after our exp is set
}
hoverName = VLC->generaltexth->allTexts[15];
boost::algorithm::replace_first(hoverName,"%s",name);
boost::algorithm::replace_first(hoverName,"%s", type->heroClass->name);