1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Source ID from bonusing objects is not object index but object type. Fixes at least partially #1822

This commit is contained in:
Ivan Savenko 2014-07-07 08:29:07 +03:00
parent ec7e58786d
commit aaf314baf4

View File

@ -263,8 +263,7 @@ DLL_LINKAGE void GiveBonus::applyGs( CGameState *gs )
if(!bdescr.message.size()
&& bonus.source == Bonus::OBJECT
&& (bonus.type == Bonus::LUCK || bonus.type == Bonus::MORALE)
&& gs->map->objects[bonus.sid]->ID == Obj::EVENT) //it's morale/luck bonus from an event without description
&& (bonus.type == Bonus::LUCK || bonus.type == Bonus::MORALE))
{
descr = VLC->generaltexth->arraytxt[bonus.val > 0 ? 110 : 109]; //+/-%d Temporary until next battle"
}