diff --git a/hch/CObjectHandler.cpp b/hch/CObjectHandler.cpp index 0188556de..f48c28da5 100644 --- a/hch/CObjectHandler.cpp +++ b/hch/CObjectHandler.cpp @@ -2308,9 +2308,25 @@ void CGEvent::giveContents( const CGHeroInstance *h, bool afterBattle ) const } + if(spells.size()) + { + std::set spellsToGive; + iw.components.clear(); + for(int i=0; ichangeSpells(h->id,true,spellsToGive); + cb->showInfoDialog(&iw); + } + } + if(manaDiff) { - getText(iw,afterBattle,luckDiff,176,177,h); + getText(iw,afterBattle,manaDiff,176,177,h); iw.components.push_back(Component(Component::PRIM_SKILL,5,manaDiff,0)); cb->showInfoDialog(&iw); cb->setManaPoints(h->id, h->mana + manaDiff); @@ -2318,7 +2334,7 @@ void CGEvent::giveContents( const CGHeroInstance *h, bool afterBattle ) const if(moraleDiff) { - getText(iw,afterBattle,luckDiff,178,179,h); + getText(iw,afterBattle,moraleDiff,178,179,h); iw.components.push_back(Component(Component::MORALE,0,moraleDiff,0)); cb->showInfoDialog(&iw); GiveBonus gb;