1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Fixed crash when artifact casts spell ( #991 )

This commit is contained in:
Michał W. Urbańczyk 2012-06-10 12:01:56 +00:00
parent e6ebf42308
commit d0816a7924

View File

@ -1792,7 +1792,7 @@ void CBattleInterface::spellCast( const BattleSpellCast * sc )
else
{
//TODO artifacts that cast spell; scripts some day
boost::algorithm::replace_first(text, "Something", CGI->creh->creatures[sc->attackerType]->namePl); //creature caster
boost::algorithm::replace_first(text, "%s", "Something");
}
boost::algorithm::replace_first(text, "%s", CGI->spellh->spells[sc->id]->name);
console->addText(text);