diff --git a/lib/CObjectHandler.cpp b/lib/CObjectHandler.cpp index 0780358ec..0c76ae8ce 100644 --- a/lib/CObjectHandler.cpp +++ b/lib/CObjectHandler.cpp @@ -4987,7 +4987,9 @@ void CGPandoraBox::giveContents( const CGHeroInstance *h, bool afterBattle ) con if(gainedExp || changesPrimSkill || abilities.size()) { expType expVal = h->calculateXp(gainedExp); - getText(iw,afterBattle,175,h); + //getText(iw,afterBattle,175,h); //wtf? + iw.text.addTxt(MetaString::ADVOB_TXT, 175); //%s learns something + iw.text.addReplacement(h->name); if(expVal) iw.components.push_back(Component(Component::EXPERIENCE,0,expVal,0)); @@ -5026,6 +5028,15 @@ void CGPandoraBox::giveContents( const CGHeroInstance *h, bool afterBattle ) con { std::set spellsToGive; iw.components.clear(); + if (spells.size() > 1) + { + iw.text.addTxt(MetaString::ADVOB_TXT, 188); //%s learns spells + } + else + { + iw.text.addTxt(MetaString::ADVOB_TXT, 184); //%s learns a spell + } + iw.text.addReplacement(h->name); std::vector > * sp = &VLC->spellh->spells; for(std::vector::const_iterator i=spells.begin(); i != spells.end(); i++) { @@ -5100,6 +5111,8 @@ void CGPandoraBox::giveContents( const CGHeroInstance *h, bool afterBattle ) con iw.components.clear(); // getText(iw,afterBattle,183,h); + iw.text.addTxt(MetaString::ADVOB_TXT, 183); //% has found treasure + iw.text.addReplacement(h->name); for(int i=0; ishowInfoDialog(&iw); iw.components.clear(); + iw.text.addTxt(MetaString::ADVOB_TXT, 183); //% has found treasure - once more? + iw.text.addReplacement(h->name); } } if(iw.components.size())