mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Hero experience tooltip will now be shown correctly despite of its type (bug #99)
This commit is contained in:
@@ -231,9 +231,11 @@ void CHeroWindow::setHero(const CGHeroInstance *hero)
|
|||||||
secSkillAreas[g]->hoverText = std::string(bufor);
|
secSkillAreas[g]->hoverText = std::string(bufor);
|
||||||
}
|
}
|
||||||
|
|
||||||
//printing experience
|
//printing experience - original foramt does not support ui64
|
||||||
sprintf(bufor, CGI->generaltexth->allTexts[2].c_str(), hero->level, CGI->heroh->reqExp(hero->level+1), hero->exp);
|
expArea->text = CGI->generaltexth->allTexts[2].c_str();
|
||||||
expArea->text = std::string(bufor);
|
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
|
//printing spell points
|
||||||
sprintf(bufor, CGI->generaltexth->allTexts[205].c_str(), hero->name.c_str(), hero->mana, hero->manaLimit());
|
sprintf(bufor, CGI->generaltexth->allTexts[205].c_str(), hero->name.c_str(), hero->mana, hero->manaLimit());
|
||||||
|
@@ -218,7 +218,7 @@ public:
|
|||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
CHero * type;
|
CHero * type;
|
||||||
ui64 exp; //experience point
|
ui64 exp; //experience points
|
||||||
si32 level; //current level of hero
|
si32 level; //current level of hero
|
||||||
std::string name; //may be custom
|
std::string name; //may be custom
|
||||||
std::string biography; //if custom
|
std::string biography; //if custom
|
||||||
|
Reference in New Issue
Block a user