瀏覽代碼

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

Ivan Savenko 1 年之前
父節點
當前提交
f9348fc84a
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      lib/rewardable/Reward.cpp

+ 1 - 2
lib/rewardable/Reward.cpp

@@ -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);