1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00

bigfixing & new file: launcher/jsonutils.cpp

- launcher uses json parser from vcmi lib instead of one from Qt #1469
- fixed abilities overrides for some creatures #1476
- fixed hero portraits in seer huts #1402
- ttf fonts will render text in utf-8 mode. Not really useful at this point
- new settings entry, available in launcher: encoding. Unused for now.
This commit is contained in:
Ivan Savenko
2013-09-21 18:29:26 +00:00
parent d06b02638b
commit 208df34fc2
25 changed files with 423 additions and 257 deletions

View File

@ -1011,15 +1011,15 @@ DLL_LINKAGE void HeroLevelUp::applyGs( CGameState *gs )
CGHeroInstance* h = gs->getHero(hero->id);
h->level = level;
//deterministic secondary skills
h->skillsInfo.magicSchoolCounter = (++h->skillsInfo.magicSchoolCounter) % h->maxlevelsToMagicSchool();
h->skillsInfo.wisdomCounter = (++h->skillsInfo.wisdomCounter) % h->maxlevelsToWisdom();
h->skillsInfo.magicSchoolCounter = (h->skillsInfo.magicSchoolCounter + 1) % h->maxlevelsToMagicSchool();
h->skillsInfo.wisdomCounter = (h->skillsInfo.wisdomCounter + 1) % h->maxlevelsToWisdom();
if (vstd::contains(skills, SecondarySkill::WISDOM))
h->skillsInfo.resetWisdomCounter();
SecondarySkill spellSchools[] = {
SecondarySkill::FIRE_MAGIC, SecondarySkill::WATER_MAGIC, SecondarySkill::EARTH_MAGIC, SecondarySkill::EARTH_MAGIC};
for (auto skill : spellSchools)
{
if (vstd::contains(skills, SecondarySkill::WISDOM))
if (vstd::contains(skills, skill))
{
h->skillsInfo.resetMagicSchoolCounter();
break;