mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Fix multi-creature dwelling only giving town growth bonus to last unit
This commit is contained in:
@@ -201,7 +201,7 @@ int CGTownInstance::getDwellingBonus(const std::vector<CreatureID>& creatureIds,
|
|||||||
const auto & dwellingCreatures = dwelling->asOwnable()->providedCreatures();
|
const auto & dwellingCreatures = dwelling->asOwnable()->providedCreatures();
|
||||||
bool hasMatch = false;
|
bool hasMatch = false;
|
||||||
for (const auto& creature : dwellingCreatures)
|
for (const auto& creature : dwellingCreatures)
|
||||||
hasMatch = vstd::contains(creatureIds, creature);
|
hasMatch |= vstd::contains(creatureIds, creature);
|
||||||
|
|
||||||
if (hasMatch)
|
if (hasMatch)
|
||||||
totalBonus += 1;
|
totalBonus += 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user