mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Fixed Scholar handling
This commit is contained in:
@ -55,12 +55,18 @@ std::vector<Component> CRewardableObject::loadComponents(const CGHeroInstance *
|
||||
{
|
||||
std::vector<Component> result;
|
||||
|
||||
if (rewardIndices.size() > 1)
|
||||
if (rewardIndices.empty())
|
||||
return result;
|
||||
|
||||
if (configuration.selectMode != Rewardable::SELECT_FIRST)
|
||||
{
|
||||
for (auto index : rewardIndices)
|
||||
result.push_back(configuration.info.at(index).reward.getDisplayedComponent(contextHero));
|
||||
|
||||
if (rewardIndices.size() == 1)
|
||||
}
|
||||
else
|
||||
{
|
||||
configuration.info.at(rewardIndices.front()).reward.loadComponents(result, contextHero);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user