mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
vcmi: slightly rework limiters
1. Add vector to aggregates 2. Rework CreatureFactionLimiter to FactionLimiter
This commit is contained in:
@@ -569,9 +569,9 @@ void CTownHandler::loadSpecialBuildingBonuses(const JsonNode & source, BonusList
|
||||
|
||||
if(bonus->limiter != nullptr)
|
||||
{
|
||||
auto * limPtr = dynamic_cast<CreatureFactionLimiter *>(bonus->limiter.get());
|
||||
auto * limPtr = dynamic_cast<FactionLimiter *>(bonus->limiter.get());
|
||||
|
||||
if(limPtr != nullptr && limPtr->faction == FactionID::ANY)
|
||||
if(limPtr != nullptr && limPtr->faction == FactionID::DEFAULT)
|
||||
limPtr->faction = building->town->faction->getId();
|
||||
}
|
||||
//JsonUtils::parseBuildingBonus produces UNKNOWN type propagator instead of empty.
|
||||
|
||||
Reference in New Issue
Block a user