mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-10 22:31:40 +02:00
Fix crash on using life drain with area attacks, like magog w life drain
This commit is contained in:
@@ -1557,7 +1557,12 @@ void BattleActionProcessor::addGenericDrainedLifeLog(BattleLogMessage& blm, cons
|
||||
attackerState->addText(text, EMetaText::GENERAL_TXT, 361);
|
||||
attackerState->addNameReplacement(text);
|
||||
text.replaceNumber(drainedLife);
|
||||
defender->addNameReplacement(text);
|
||||
|
||||
if (defender)
|
||||
defender->addNameReplacement(text);
|
||||
else
|
||||
text.replaceTextID("core.genrltxt.43"); // creatures
|
||||
|
||||
blm.lines.push_back(std::move(text));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user