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