mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Removed pointer to VLC entity from CStackBasicDescriptor
This commit is contained in:
@@ -345,10 +345,10 @@ bool CGameInfoCallback::getHeroInfo(const CGObjectInstance * hero, InfoAboutHero
|
||||
|
||||
for(auto & elem : info.army)
|
||||
{
|
||||
if(static_cast<int>(elem.second.type->getAIValue()) > maxAIValue)
|
||||
if(static_cast<int>(elem.second.getCreature()->getAIValue()) > maxAIValue)
|
||||
{
|
||||
maxAIValue = elem.second.type->getAIValue();
|
||||
mostStrong = elem.second.type;
|
||||
maxAIValue = elem.second.getCreature()->getAIValue();
|
||||
mostStrong = elem.second.getCreature();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ bool CGameInfoCallback::getHeroInfo(const CGObjectInstance * hero, InfoAboutHero
|
||||
else
|
||||
for(auto & elem : info.army)
|
||||
{
|
||||
elem.second.type = mostStrong;
|
||||
elem.second.setType(mostStrong);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -390,7 +390,7 @@ bool CGameInfoCallback::getHeroInfo(const CGObjectInstance * hero, InfoAboutHero
|
||||
|
||||
if(nullptr != mostStrong) //possible, faction may have no creatures at all
|
||||
for(auto & elem : info.army)
|
||||
elem.second.type = mostStrong;
|
||||
elem.second.setType(mostStrong);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user