1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Implemented #479

This commit is contained in:
DjWarmonger
2011-06-21 12:45:57 +00:00
parent 423fd2ffb7
commit af8d8cbfc7
8 changed files with 24 additions and 11 deletions

View File

@@ -556,7 +556,7 @@ void CPlayerInterface::battleStart(const CCreatureSet *army1, const CCreatureSet
}
void CPlayerInterface::battleStacksHealedRes(const std::vector<std::pair<ui32, ui32> > & healedStacks, bool lifeDrain, si32 lifeDrainFrom)
void CPlayerInterface::battleStacksHealedRes(const std::vector<std::pair<ui32, ui32> > & healedStacks, bool lifeDrain, bool tentHeal, si32 lifeDrainFrom)
{
if(LOCPLINT != this)
{ //another local interface should do this
@@ -594,6 +594,14 @@ void CPlayerInterface::battleStacksHealedRes(const std::vector<std::pair<ui32, u
healedStacks[0].second, defender->getCreature()->namePl.c_str());
battleInt->console->addText(textBuf);
}
if (tentHeal)
{
std::string text = CGI->generaltexth->allTexts[414];
boost::algorithm::replace_first(text, "%s", cb->battleGetStackByID(lifeDrainFrom, false)->getCreature()->nameSing);
boost::algorithm::replace_first(text, "%s", cb->battleGetStackByID(healedStacks[0].first, false)->getCreature()->nameSing);
boost::algorithm::replace_first(text, "%d", boost::lexical_cast<std::string>(healedStacks[0].second));
battleInt->console->addText(text);
}
}
void CPlayerInterface::battleNewStackAppeared(const CStack * stack)