mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-01 00:45:26 +02:00
Add support for custom icons & descriptions for bonuses
This commit is contained in:
@ -109,8 +109,11 @@ void CSkill::addNewBonus(const std::shared_ptr<Bonus> & b, int level)
|
||||
b->source = BonusSource::SECONDARY_SKILL;
|
||||
b->sid = BonusSourceID(id);
|
||||
b->duration = BonusDuration::PERMANENT;
|
||||
b->description.appendTextID(getNameTextID());
|
||||
b->description.appendRawString(" %+d");
|
||||
if (b->description.empty() && (b->type == BonusType::LUCK || b->type == BonusType::MORALE))
|
||||
{
|
||||
b->description.appendTextID(getNameTextID());
|
||||
b->description.appendRawString(" %+d");
|
||||
}
|
||||
levels[level-1].effects.push_back(b);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user