1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Do not hide spells from reward if hero can't learn them

This commit is contained in:
Ivan Savenko 2024-07-27 16:58:22 +00:00
parent b6c22b2053
commit f9348fc84a

View File

@ -115,8 +115,7 @@ void Rewardable::Reward::loadComponents(std::vector<Component> & comps, const CG
comps.emplace_back(ComponentType::ARTIFACT, entry);
for(const auto & entry : spells)
if (!h || h->canLearnSpell(entry.toEntity(VLC), true))
comps.emplace_back(ComponentType::SPELL, entry);
comps.emplace_back(ComponentType::SPELL, entry);
for(const auto & entry : creatures)
comps.emplace_back(ComponentType::CREATURE, entry.type->getId(), entry.count);