1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +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

@@ -359,7 +359,7 @@ bool CGameInfoCallback::getHeroInfo(const CGObjectInstance * hero, InfoAboutHero
for(auto creature : VLC->creh->objects)
{
if(static_cast<si16>(creature->getFactionIndex()) == factionIndex && static_cast<int>(creature->getAIValue()) > maxAIValue)
if(creature->getFaction() == factionIndex && static_cast<int>(creature->getAIValue()) > maxAIValue)
{
maxAIValue = creature->getAIValue();
mostStrong = creature;