mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Merge branch 'vcmi/beta' into 'vcmi/develop'
This commit is contained in:
@@ -567,6 +567,25 @@ std::string CGHeroInstance::getObjectName() const
|
||||
return VLC->objtypeh->getObjectName(ID, 0);
|
||||
}
|
||||
|
||||
std::string CGHeroInstance::getHoverText(PlayerColor player) const
|
||||
{
|
||||
std::string hoverText = CArmedInstance::getHoverText(player) + getMovementPointsTextIfOwner(player);
|
||||
return hoverText;
|
||||
}
|
||||
|
||||
std::string CGHeroInstance::getMovementPointsTextIfOwner(PlayerColor player) const
|
||||
{
|
||||
std::string output = "";
|
||||
if(player == getOwner())
|
||||
{
|
||||
output += " " + VLC->generaltexth->translate("vcmi.adventureMap.movementPointsHeroInfo");
|
||||
boost::replace_first(output, "%POINTS", std::to_string(movementPointsLimit(!boat)));
|
||||
boost::replace_first(output, "%REMAINING", std::to_string(movementPointsRemaining()));
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
ui8 CGHeroInstance::maxlevelsToMagicSchool() const
|
||||
{
|
||||
return type->heroClass->isMagicHero() ? 3 : 4;
|
||||
|
||||
Reference in New Issue
Block a user