diff --git a/hch/CObjectHandler.cpp b/hch/CObjectHandler.cpp index 7b3f51c07..2112595f1 100644 --- a/hch/CObjectHandler.cpp +++ b/hch/CObjectHandler.cpp @@ -1097,6 +1097,7 @@ void CGHeroInstance::initObj() break; case 7://maxed mastery for spell bonus.type = Bonus::MAXED_SPELL; + bonus.subtype = it->subtype; //spell i speciality.bonuses.push_back (bonus); break; case 8://peculiar spells - enchantments @@ -1295,10 +1296,9 @@ ui8 CGHeroInstance::getSpellSchoolLevel(const CSpell * spell, int *outSelectedSc amax(skill, valOfBonuses(Bonus::MAGIC_SCHOOL_SKILL, 0)); //any school bonus - if (hasBonusOfType(Bonus::SPELL, spell->id)) - { - amax(skill, valOfBonuses(Bonus::SPELL, spell->id)); - } + amax(skill, valOfBonuses(Bonus::SPELL, spell->id)); //given by artifact or other effect + if (hasBonusOfType(Bonus::MAXED_SPELL, spell->id))//hero speciality (Daremyth, Melodia) + skill = 3; assert(skill >= 0 && skill <= 3); return skill; } diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index c98c7121b..eacd6114a 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -4402,7 +4402,7 @@ bool CGameHandler::makeCustomAction( BattleAction &ba ) sendAndApply(&StartAction(ba)); //start spell casting - handleSpellCasting(ba.additionalInfo, skill, ba.destinationTile, ba.side, h->tempOwner, h, secondHero, h->getPrimSkillLevel(2)); + handleSpellCasting (ba.additionalInfo, skill, ba.destinationTile, ba.side, h->tempOwner, h, secondHero, h->getPrimSkillLevel(2)); sendAndApply(&EndAction()); if( !gs->curB->getStack(gs->curB->activeStack, false)->alive() )