Ivan Savenko 2 лет назад
Родитель
Сommit
f4ee9424e4

+ 0 - 5
lib/mapObjectConstructors/CBankInstanceConstructor.cpp

@@ -39,10 +39,7 @@ BankConfig CBankInstanceConstructor::generateConfig(const JsonNode & level, CRan
 	BankConfig bc;
 
 	bc.chance = static_cast<ui32>(level["chance"].Float());
-
 	bc.guards = JsonRandom::loadCreatures(level["guards"], rng);
-	bc.upgradeChance = static_cast<ui32>(level["upgrade_chance"].Float());
-	bc.combatValue = static_cast<ui32>(level["combat_value"].Float());
 
 	std::vector<SpellID> spells;
 	IObjectInterface::cb->getAllowedSpells(spells);
@@ -52,8 +49,6 @@ BankConfig CBankInstanceConstructor::generateConfig(const JsonNode & level, CRan
 	bc.artifacts = JsonRandom::loadArtifacts(level["reward"]["artifacts"], rng);
 	bc.spells = JsonRandom::loadSpells(level["reward"]["spells"], rng, spells);
 
-	bc.value = static_cast<ui32>(level["value"].Float());
-
 	return bc;
 }
 

+ 0 - 6
lib/mapObjectConstructors/CBankInstanceConstructor.h

@@ -20,10 +20,7 @@ VCMI_LIB_NAMESPACE_BEGIN
 
 struct BankConfig
 {
-	ui32 value = 0; //overall value of given things
 	ui32 chance = 0; //chance for this level being chosen
-	ui32 upgradeChance = 0; //chance for creatures to be in upgraded versions
-	ui32 combatValue = 0; //how hard are guards of this level
 	std::vector<CStackBasicDescriptor> guards; //creature ID, amount
 	ResourceSet resources; //resources given in case of victory
 	std::vector<CStackBasicDescriptor> creatures; //creatures granted in case of victory (creature ID, amount)
@@ -33,13 +30,10 @@ struct BankConfig
 	template <typename Handler> void serialize(Handler &h, const int version)
 	{
 		h & chance;
-		h & upgradeChance;
 		h & guards;
-		h & combatValue;
 		h & resources;
 		h & creatures;
 		h & artifacts;
-		h & value;
 		h & spells;
 	}
 };