1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-01 00:45:26 +02:00

- fixes crash on giving banned skills to hero (partial #1427)

- fixes hover text for prisons - they should not display name of imprisoned hero
- missing bits for launcher, Linux-specific
This commit is contained in:
Ivan Savenko
2013-09-04 23:00:51 +00:00
parent 6fc87d0df1
commit 0a627698d8
5 changed files with 38 additions and 18 deletions

View File

@ -828,10 +828,6 @@ void CGHeroInstance::initHero()
commander->giveStackExp (exp); //after our exp is set
}
hoverName = VLC->generaltexth->allTexts[15];
boost::algorithm::replace_first(hoverName,"%s",name);
boost::algorithm::replace_first(hoverName,"%s", type->heroClass->name);
if (mana < 0)
mana = manaLimit();
}
@ -969,6 +965,21 @@ void CGHeroInstance::onHeroVisit(const CGHeroInstance * h) const
}
}
const std::string & CGHeroInstance::getHoverText() const
{
if(ID != Obj::PRISON)
{
hoverName = VLC->generaltexth->allTexts[15];
boost::algorithm::replace_first(hoverName,"%s",name);
boost::algorithm::replace_first(hoverName,"%s", type->heroClass->name);
return hoverName;
}
else
hoverName = VLC->generaltexth->names[ID];
return hoverName;
}
const std::string & CGHeroInstance::getBiography() const
{
if (biography.length())