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:
commit
f418b468c4
@ -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
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user