1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

Fix assert and condition for counting spell hexes

This commit is contained in:
Dydzio
2024-09-22 18:25:18 +02:00
parent bf9a9283a4
commit bb69ab1a1a
4 changed files with 5 additions and 4 deletions

View File

@ -532,7 +532,7 @@ std::string BattleActionsController::actionGetStatusMessage(PossiblePlayerBattle
if(targetStack == nullptr) //should be true only for spell-like attack
{
auto spellLikeAttackBonus = owner.stacksController->getActiveStack()->getBonus(Selector::type()(BonusType::SPELL_LIKE_ATTACK));
assert(bonus != nullptr);
assert(spellLikeAttackBonus != nullptr);
return boost::str(boost::format(CGI->generaltexth->allTexts[26]) % spellLikeAttackBonus->subtype.as<SpellID>().toSpell()->getNameTranslated());
}