Ivan Savenko преди 2 години
родител
ревизия
01920bb74e
променени са 2 файла, в които са добавени 6 реда и са изтрити 6 реда
  1. 3 3
      config/objects/rewardablePickable.json
  2. 3 3
      lib/mapObjects/CRewardableObject.cpp

+ 3 - 3
config/objects/rewardablePickable.json

@@ -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,
 					},
 					{

+ 3 - 3
lib/mapObjects/CRewardableObject.cpp

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