mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Improve selection of bonus when bonus grouping is active
This commit is contained in:
@@ -247,7 +247,8 @@ void CTownHandler::loadBuildingBonuses(const JsonNode & source, BonusList & bonu
|
||||
if(!JsonUtils::parseBonus(b, bonus.get()))
|
||||
continue;
|
||||
|
||||
bonus->description.appendTextID(building->getNameTextID());
|
||||
if (bonus->description.empty() && (bonus->type == BonusType::MORALE || bonus->type == BonusType::LUCK))
|
||||
bonus->description.appendTextID(building->getNameTextID());
|
||||
|
||||
//JsonUtils::parseBuildingBonus produces UNKNOWN type propagator instead of empty.
|
||||
assert(bonus->propagator == nullptr || bonus->propagator->getPropagatorType() != CBonusSystemNode::ENodeTypes::UNKNOWN);
|
||||
|
||||
Reference in New Issue
Block a user