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

* enum for secondary skills

* THex for battle positions
* towards removal of battleGetStackByID

TODO:
investigate the necessity of putting implementation of BattleAction CGlobalAI::activeStack( const CStack * stack ) in CGeniusAI.cpp
This commit is contained in:
mateuszb
2010-12-23 20:18:10 +00:00
parent 2fe8b07f4f
commit 4929cf9782
22 changed files with 191 additions and 157 deletions

View File

@ -201,7 +201,7 @@ void CHeroWindow::setHero(const CGHeroInstance *hero)
for(size_t g=0; g<std::min(secSkillAreas.size(),hero->secSkills.size()); ++g)
{
int skill = hero->secSkills[g].first,
level = hero->getSecSkillLevel(hero->secSkills[g].first);
level = hero->getSecSkillLevel(static_cast<CGHeroInstance::SecondarySkill>(hero->secSkills[g].first));
secSkillAreas[g]->type = skill;
secSkillAreas[g]->bonusValue = level;
secSkillAreas[g]->text = CGI->generaltexth->skillInfoTexts[skill][level-1];
@ -232,7 +232,7 @@ void CHeroWindow::setHero(const CGHeroInstance *hero)
}
dismissButton->block(!!hero->visitedTown || noDismiss);
if(hero->getSecSkillLevel(19) == 0)
if(hero->getSecSkillLevel(CGHeroInstance::TACTICS) == 0)
tacticsButton->block(true);
else
{