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:
@ -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;
|
||||
|
Reference in New Issue
Block a user