mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
This commit is contained in:
parent
936a310b0a
commit
0a2b04709f
@ -67,6 +67,7 @@ std::string Goals::AbstractGoal::name() const //TODO: virtualize
|
|||||||
if(obj)
|
if(obj)
|
||||||
desc = "GET OBJ " + obj->getObjectName();
|
desc = "GET OBJ " + obj->getObjectName();
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case FIND_OBJ:
|
case FIND_OBJ:
|
||||||
desc = "FIND OBJ " + boost::lexical_cast<std::string>(objid);
|
desc = "FIND OBJ " + boost::lexical_cast<std::string>(objid);
|
||||||
break;
|
break;
|
||||||
|
@ -3316,6 +3316,7 @@ bool shouldVisit(HeroPtr h, const CGObjectInstance * obj)
|
|||||||
(ai->myCb->getResourceAmount()[Res::GOLD] - GOLD_RESERVE < GameConstants::HERO_GOLD_COST))
|
(ai->myCb->getResourceAmount()[Res::GOLD] - GOLD_RESERVE < GameConstants::HERO_GOLD_COST))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
case Obj::BOAT:
|
case Obj::BOAT:
|
||||||
return false;
|
return false;
|
||||||
//Boats are handled by pathfinder
|
//Boats are handled by pathfinder
|
||||||
|
@ -308,6 +308,8 @@ int InfoBoxHeroData::getSubID()
|
|||||||
case HERO_SECONDARY_SKILL:
|
case HERO_SECONDARY_SKILL:
|
||||||
if(hero->secSkills.size() > index)
|
if(hero->secSkills.size() > index)
|
||||||
return hero->secSkills[index].first;
|
return hero->secSkills[index].first;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
case HERO_SPECIAL:
|
case HERO_SPECIAL:
|
||||||
return hero->type->ID.getNum();
|
return hero->type->ID.getNum();
|
||||||
case HERO_MANA:
|
case HERO_MANA:
|
||||||
@ -332,6 +334,8 @@ si64 InfoBoxHeroData::getValue()
|
|||||||
case HERO_SECONDARY_SKILL:
|
case HERO_SECONDARY_SKILL:
|
||||||
if(hero->secSkills.size() > index)
|
if(hero->secSkills.size() > index)
|
||||||
return hero->secSkills[index].second;
|
return hero->secSkills[index].second;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
case HERO_SPECIAL:
|
case HERO_SPECIAL:
|
||||||
return 0;
|
return 0;
|
||||||
default:
|
default:
|
||||||
@ -353,7 +357,6 @@ std::string InfoBoxHeroData::getHoverText()
|
|||||||
case HERO_SPECIAL:
|
case HERO_SPECIAL:
|
||||||
return CGI->generaltexth->heroscrn[27];
|
return CGI->generaltexth->heroscrn[27];
|
||||||
case HERO_SECONDARY_SKILL:
|
case HERO_SECONDARY_SKILL:
|
||||||
{
|
|
||||||
if (hero->secSkills.size() > index)
|
if (hero->secSkills.size() > index)
|
||||||
{
|
{
|
||||||
std::string level = CGI->generaltexth->levels[hero->secSkills[index].second-1];
|
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);
|
return boost::str(boost::format(CGI->generaltexth->heroscrn[21]) % level % skill);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user