1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

vcmi: fixup cast in Heal effect

This commit is contained in:
Konstantin 2023-04-07 18:51:54 +03:00 committed by Konstantin P
parent 7c56fbd16b
commit c400e83874

View File

@ -127,7 +127,7 @@ void Heal::prepareHealEffect(int64_t value, BattleUnitsChanged & pack, BattleLog
else if (unitHPgained > 0 && m->caster->getHeroCaster() == nullptr) //Show text about healed HP if healed by unit
{
MetaString healText;
auto casterUnit = dynamic_cast<const battle::CUnitState*>(m->caster)->acquire();
auto casterUnit = dynamic_cast<const battle::Unit*>(m->caster);
healText.addTxt(MetaString::GENERAL_TXT, 414);
casterUnit->addNameReplacement(healText, false);
state->addNameReplacement(healText, false);