mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-14 02:33:51 +02:00
Fixed commanders starting with 2^32 experience.
This commit is contained in:
parent
3c5d6dd79a
commit
5b00d74e1a
@ -769,13 +769,6 @@ void CGHeroInstance::initHero()
|
|||||||
}
|
}
|
||||||
assert(validTypes());
|
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)
|
if (exp == 0xffffffff)
|
||||||
{
|
{
|
||||||
initExp();
|
initExp();
|
||||||
@ -789,6 +782,13 @@ void CGHeroInstance::initHero()
|
|||||||
level = 1;
|
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];
|
hoverName = VLC->generaltexth->allTexts[15];
|
||||||
boost::algorithm::replace_first(hoverName,"%s",name);
|
boost::algorithm::replace_first(hoverName,"%s",name);
|
||||||
boost::algorithm::replace_first(hoverName,"%s", type->heroClass->name);
|
boost::algorithm::replace_first(hoverName,"%s", type->heroClass->name);
|
||||||
|
Loading…
Reference in New Issue
Block a user