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

* minor refactoring

This commit is contained in:
mateuszb
2013-01-31 20:11:25 +00:00
parent 4ae4b998a3
commit a1da195b85
8 changed files with 24 additions and 22 deletions

View File

@ -1123,7 +1123,7 @@ void CGHeroInstance::initObj() //TODO: use bonus system
//initialize bonuses
BOOST_FOREACH(auto skill_info, secSkills)
updateSkill(skill_info.first, skill_info.second);
updateSkill(static_cast<CGHeroInstance::SecondarySkill>(skill_info.first), skill_info.second);
Updatespecialty();
mana = manaLimit(); //after all bonuses are taken into account, make sure this line is the last one
@ -1184,7 +1184,7 @@ void CGHeroInstance::Updatespecialty() //TODO: calculate special value of bonuse
}
}
}
void CGHeroInstance::updateSkill(int which, int val)
void CGHeroInstance::updateSkill(SecondarySkill which, int val)
{
if(which == LEADERSHIP || which == LUCK)
{ //luck-> VLC->generaltexth->arraytxt[73+luckSkill]; VLC->generaltexth->arraytxt[104+moraleSkill]