1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

vcmi: remove TFaction

This is a huge change and will break save compatibility
This commit is contained in:
Konstantin
2023-04-09 18:26:32 +03:00
parent 452cebfdfd
commit fedf7d377c
44 changed files with 135 additions and 134 deletions

View File

@ -426,7 +426,7 @@ CGCreature * ObjectManager::chooseGuard(si32 strength, bool zoneGuard)
continue;
if(!cre->getAIValue()) //bug #2681
continue;
if(!vstd::contains(zone.getMonsterTypes(), cre->getFactionIndex()))
if(!vstd::contains(zone.getMonsterTypes(), cre->getFaction()))
continue;
if((static_cast<si32>(cre->getAIValue() * (cre->ammMin + cre->ammMax) / 2) < strength) && (strength < static_cast<si32>(cre->getAIValue()) * 100)) //at least one full monster. size between average size of given stack and 100
{