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

- reorganized hero classes

- artifact iconIndex should work
- new file with hardcoded string constants: lib/StringConstants.h

Note: some minor bugs, will fix soon:
- slow to open hero window
- hero adventure map images serialization is broken\incorrect
This commit is contained in:
Ivan Savenko
2012-12-14 15:32:53 +00:00
parent afe3f77a59
commit ffe8b99369
31 changed files with 2786 additions and 1355 deletions

View File

@ -725,7 +725,7 @@ void CGHeroInstance::initHero()
{
for(int g=0; g<GameConstants::PRIMARY_SKILLS; ++g)
{
pushPrimSkill(static_cast<PrimarySkill::PrimarySkill>(g), type->heroClass->initialPrimSkills[g]);
pushPrimSkill(static_cast<PrimarySkill::PrimarySkill>(g), type->heroClass->primarySkillInitial[g]);
}
}
if(secSkills.size() == 1 && secSkills[0] == std::pair<ui8,ui8>(-1, -1)) //set secondary skills to default
@ -753,7 +753,7 @@ void CGHeroInstance::initHero()
if (VLC->modh->modules.COMMANDERS)
{
commander = new CCommanderInstance (VLC->creh->factionCommanders[type->heroType / 2]); //hopefully it returns town type
commander = new CCommanderInstance (VLC->creh->factionCommanders[type->heroClass->faction]);
commander->setArmyObj (castToArmyObj()); //TODO: separate function for setting commanders
}