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:
@ -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())
|
||||
|
Reference in New Issue
Block a user