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:
parent
b6c22b2053
commit
f9348fc84a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user