1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Fixed CID 1197463

This commit is contained in:
AlexVinS 2016-11-25 21:17:24 +03:00
parent a8cadfe25c
commit 0e57825679

View File

@ -442,6 +442,11 @@ void CGameHandler::changePrimSkill(const CGHeroInstance * hero, PrimarySkill::Pr
void CGameHandler::changeSecSkill(const CGHeroInstance * hero, SecondarySkill which, int val, bool abs/*=false*/)
{
if(!hero)
{
logGlobal->error("changeSecSkill provided no hero");
return;
}
SetSecSkill sss;
sss.id = hero->id;
sss.which = which;
@ -451,7 +456,7 @@ void CGameHandler::changeSecSkill(const CGHeroInstance * hero, SecondarySkill wh
if (which == SecondarySkill::WISDOM)
{
if (hero && hero->visitedTown)
if (hero->visitedTown)
giveSpells(hero->visitedTown, hero);
}
}