mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-02 23:07:36 +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 "lib/CGameInfoCallback.h"
|
||||||
#include "int3.h" // for int3
|
#include "lib/int3.h" // for int3
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CCallback.h, part of VCMI engine
|
* CCallback.h, part of VCMI engine
|
||||||
|
@ -361,17 +361,18 @@ std::string InfoBoxHeroData::getHoverText()
|
|||||||
|
|
||||||
std::string InfoBoxHeroData::getValueText()
|
std::string InfoBoxHeroData::getValueText()
|
||||||
{
|
{
|
||||||
|
if (hero)
|
||||||
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case HERO_MANA:
|
case HERO_MANA:
|
||||||
if (hero)
|
|
||||||
return boost::lexical_cast<std::string>(hero->mana) + '/' +
|
return boost::lexical_cast<std::string>(hero->mana) + '/' +
|
||||||
boost::lexical_cast<std::string>(hero->manaLimit());
|
boost::lexical_cast<std::string>(hero->manaLimit());
|
||||||
case HERO_EXPERIENCE:
|
case HERO_EXPERIENCE:
|
||||||
return boost::lexical_cast<std::string>(hero->exp);
|
return boost::lexical_cast<std::string>(hero->exp);
|
||||||
default:
|
|
||||||
return InfoBoxAbstractHeroData::getValueText();
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return InfoBoxAbstractHeroData::getValueText();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InfoBoxHeroData::prepareMessage(std::string &text, CComponent**comp)
|
bool InfoBoxHeroData::prepareMessage(std::string &text, CComponent**comp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user