mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-21 00:19:29 +02:00
Breaking things - first commit towards configurable object(s).
- New files: lib/CObjectWithReward.h/cpp - Classes that will be replaced by configurable object are now in this fil Status: far from functional, currently at "it compiles" point, some essential pieces are still missing.
This commit is contained in:
@ -246,15 +246,14 @@ DLL_LINKAGE void GiveBonus::applyGs( CGameState *gs )
|
||||
&& gs->map->objects[bonus.sid]->ID == Obj::EVENT) //it's morale/luck bonus from an event without description
|
||||
{
|
||||
descr = VLC->generaltexth->arraytxt[bonus.val > 0 ? 110 : 109]; //+/-%d Temporary until next battle"
|
||||
|
||||
// Some of(?) versions of H3 use %s here instead of %d. Try to replace both of them
|
||||
boost::replace_first(descr,"%d",boost::lexical_cast<std::string>(std::abs(bonus.val)));
|
||||
boost::replace_first(descr,"%s",boost::lexical_cast<std::string>(std::abs(bonus.val)));
|
||||
}
|
||||
else
|
||||
{
|
||||
bdescr.toString(descr);
|
||||
}
|
||||
// Some of(?) versions of H3 use %s here instead of %d. Try to replace both of them
|
||||
boost::replace_first(descr,"%d",boost::lexical_cast<std::string>(std::abs(bonus.val)));
|
||||
boost::replace_first(descr,"%s",boost::lexical_cast<std::string>(std::abs(bonus.val)));
|
||||
}
|
||||
|
||||
DLL_LINKAGE void ChangeObjPos::applyGs( CGameState *gs )
|
||||
|
Reference in New Issue
Block a user