1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

Do not allow special spells such as Titan Bolt as a reward

This commit is contained in:
Ivan Savenko 2023-11-21 21:22:17 +02:00
parent 07e7d6cc14
commit 9d298f42c3

View File

@ -406,7 +406,7 @@ namespace JsonRandom
{ {
std::set<SpellID> defaultSpells; std::set<SpellID> defaultSpells;
for(const auto & spell : VLC->spellh->objects) for(const auto & spell : VLC->spellh->objects)
if (IObjectInterface::cb->isAllowed(spell->getId())) if (IObjectInterface::cb->isAllowed(spell->getId()) && !spell->isSpecial())
defaultSpells.insert(spell->getId()); defaultSpells.insert(spell->getId());
std::set<SpellID> potentialPicks = filterKeys(value, defaultSpells, variables); std::set<SpellID> potentialPicks = filterKeys(value, defaultSpells, variables);