1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Hero experience tooltip will now be shown correctly despite of its type (bug #99)

This commit is contained in:
DjWarmonger 2009-10-27 20:40:11 +00:00
parent f22570712e
commit 2c77785bc7
2 changed files with 6 additions and 4 deletions

View File

@ -231,9 +231,11 @@ void CHeroWindow::setHero(const CGHeroInstance *hero)
secSkillAreas[g]->hoverText = std::string(bufor);
}
//printing experience
sprintf(bufor, CGI->generaltexth->allTexts[2].c_str(), hero->level, CGI->heroh->reqExp(hero->level+1), hero->exp);
expArea->text = std::string(bufor);
//printing experience - original foramt does not support ui64
expArea->text = CGI->generaltexth->allTexts[2].c_str();
boost::replace_first(expArea->text, "%d", boost::lexical_cast<std::string>(hero->level));
boost::replace_first(expArea->text, "%d", boost::lexical_cast<std::string>(CGI->heroh->reqExp(hero->level+1)));
boost::replace_first(expArea->text, "%d", boost::lexical_cast<std::string>(hero->exp));
//printing spell points
sprintf(bufor, CGI->generaltexth->allTexts[205].c_str(), hero->name.c_str(), hero->mana, hero->manaLimit());

View File

@ -218,7 +218,7 @@ public:
//////////////////////////////////////////////////////////////////////////
CHero * type;
ui64 exp; //experience point
ui64 exp; //experience points
si32 level; //current level of hero
std::string name; //may be custom
std::string biography; //if custom