浏览代码

vcmi: fixup cast in Heal effect

Konstantin 2 年之前
父节点
当前提交
c400e83874
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/spells/effects/Heal.cpp

+ 1 - 1
lib/spells/effects/Heal.cpp

@@ -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);