1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

Merge branch 'develop' of https://github.com/vcmi/vcmi into WarmysBackup

This commit is contained in:
DjWarmonger 2014-04-27 12:49:29 +02:00
commit f418b468c4
2 changed files with 957 additions and 956 deletions

View File

@ -2,7 +2,7 @@
#include "lib/CGameInfoCallback.h"
#include "int3.h" // for int3
#include "lib/int3.h" // for int3
/*
* CCallback.h, part of VCMI engine

View File

@ -360,19 +360,20 @@ std::string InfoBoxHeroData::getHoverText()
}
std::string InfoBoxHeroData::getValueText()
{
if (hero)
{
switch (type)
{
case HERO_MANA:
if (hero)
return boost::lexical_cast<std::string>(hero->mana) + '/' +
boost::lexical_cast<std::string>(hero->manaLimit());
case HERO_EXPERIENCE:
return boost::lexical_cast<std::string>(hero->exp);
default:
return InfoBoxAbstractHeroData::getValueText();
}
}
return InfoBoxAbstractHeroData::getValueText();
}
bool InfoBoxHeroData::prepareMessage(std::string &text, CComponent**comp)
{