1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Adventure map spells are no longer visible on units in battle

This commit is contained in:
Ivan Savenko
2023-04-20 13:16:45 +03:00
parent 9882c37ce3
commit 4dc16b9ff7
2 changed files with 2 additions and 1 deletions

View File

@ -133,7 +133,7 @@ std::vector<si32> CStack::activeSpells() const
CSelector selector = Selector::sourceType()(Bonus::SPELL_EFFECT)
.And(CSelector([](const Bonus * b)->bool
{
return b->type != Bonus::NONE;
return b->type != Bonus::NONE && SpellID(b->sid).toSpell() && !SpellID(b->sid).toSpell()->isAdventure();
}));
TConstBonusListPtr spellEffects = getBonuses(selector, Selector::all, cachingStr.str());