mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
@@ -2990,7 +2990,7 @@ InfoAboutHero & InfoAboutHero::operator=( const InfoAboutHero & iah )
|
||||
|
||||
|
||||
|
||||
ArmyDescriptor::ArmyDescriptor(const CArmedInstance *army, bool detailed)
|
||||
ArmyDescriptor::ArmyDescriptor(const CArmedInstance *army, bool detailed) : isDetailed(detailed)
|
||||
{
|
||||
for(TSlots::const_iterator i = army->Slots().begin(); i != army->Slots().end(); i++)
|
||||
{
|
||||
@@ -3001,11 +3001,27 @@ ArmyDescriptor::ArmyDescriptor(const CArmedInstance *army, bool detailed)
|
||||
}
|
||||
}
|
||||
|
||||
ArmyDescriptor::ArmyDescriptor()
|
||||
ArmyDescriptor::ArmyDescriptor() : isDetailed(true)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int ArmyDescriptor::getStrength() const
|
||||
{
|
||||
ui64 ret = 0;
|
||||
if(isDetailed)
|
||||
{
|
||||
for(const_iterator i = begin(); i != end(); i++)
|
||||
ret += i->second.type->AIValue * i->second.count;
|
||||
}
|
||||
else
|
||||
{
|
||||
for(const_iterator i = begin(); i != end(); i++)
|
||||
ret += i->second.type->AIValue * CCreature::estimateCreatureCount(i->second.count);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
DuelParameters::SideSettings::StackSettings::StackSettings()
|
||||
: type(-1), count(0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user