1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00
This commit is contained in:
AlexVinS
2018-02-09 22:12:21 +03:00
parent 936a310b0a
commit 0a2b04709f
3 changed files with 32 additions and 26 deletions

View File

@ -67,6 +67,7 @@ std::string Goals::AbstractGoal::name() const //TODO: virtualize
if(obj)
desc = "GET OBJ " + obj->getObjectName();
}
break;
case FIND_OBJ:
desc = "FIND OBJ " + boost::lexical_cast<std::string>(objid);
break;

View File

@ -3316,6 +3316,7 @@ bool shouldVisit(HeroPtr h, const CGObjectInstance * obj)
(ai->myCb->getResourceAmount()[Res::GOLD] - GOLD_RESERVE < GameConstants::HERO_GOLD_COST))
return false;
}
break;
case Obj::BOAT:
return false;
//Boats are handled by pathfinder

View File

@ -308,6 +308,8 @@ int InfoBoxHeroData::getSubID()
case HERO_SECONDARY_SKILL:
if(hero->secSkills.size() > index)
return hero->secSkills[index].first;
else
return 0;
case HERO_SPECIAL:
return hero->type->ID.getNum();
case HERO_MANA:
@ -332,6 +334,8 @@ si64 InfoBoxHeroData::getValue()
case HERO_SECONDARY_SKILL:
if(hero->secSkills.size() > index)
return hero->secSkills[index].second;
else
return 0;
case HERO_SPECIAL:
return 0;
default:
@ -353,7 +357,6 @@ std::string InfoBoxHeroData::getHoverText()
case HERO_SPECIAL:
return CGI->generaltexth->heroscrn[27];
case HERO_SECONDARY_SKILL:
{
if (hero->secSkills.size() > index)
{
std::string level = CGI->generaltexth->levels[hero->secSkills[index].second-1];
@ -361,6 +364,7 @@ std::string InfoBoxHeroData::getHoverText()
return boost::str(boost::format(CGI->generaltexth->heroscrn[21]) % level % skill);
}
else
{
return "";
}
default: