mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Fix treasure chests
This commit is contained in:
parent
8f4791914e
commit
01920bb74e
@ -235,7 +235,7 @@
|
||||
},
|
||||
{
|
||||
"appearChance" : { "max" : 33 },
|
||||
"gainedExp" : 1500,
|
||||
"heroExperience" : 1500,
|
||||
"removeObject" : true,
|
||||
},
|
||||
{
|
||||
@ -245,7 +245,7 @@
|
||||
},
|
||||
{
|
||||
"appearChance" : { "min" : 33, "max" : 65 },
|
||||
"gainedExp" : 1000,
|
||||
"heroExperience" : 1000,
|
||||
"removeObject" : true,
|
||||
},
|
||||
{
|
||||
@ -255,7 +255,7 @@
|
||||
},
|
||||
{
|
||||
"appearChance" : { "min" : 65, "max" : 95 },
|
||||
"gainedExp" : 500,
|
||||
"heroExperience" : 500,
|
||||
"removeObject" : true,
|
||||
},
|
||||
{
|
||||
|
@ -58,9 +58,6 @@ std::vector<Component> CRewardableObject::loadComponents(const CGHeroInstance *
|
||||
if (rewardIndices.empty())
|
||||
return result;
|
||||
|
||||
if (!configuration.showScoutedPreview)
|
||||
return result;
|
||||
|
||||
if (configuration.selectMode != Rewardable::SELECT_FIRST)
|
||||
{
|
||||
for (auto index : rewardIndices)
|
||||
@ -317,6 +314,9 @@ std::vector<Component> CRewardableObject::getPopupComponentsImpl(PlayerColor pla
|
||||
if (!wasScouted(player))
|
||||
return {};
|
||||
|
||||
if (!configuration.showScoutedPreview)
|
||||
return {};
|
||||
|
||||
auto rewardIndices = getAvailableRewards(hero, Rewardable::EEventType::EVENT_FIRST_VISIT);
|
||||
if (rewardIndices.empty() && !configuration.info.empty())
|
||||
rewardIndices.push_back(0);
|
||||
|
Loading…
Reference in New Issue
Block a user