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