Exemplo n.º 1
0
 public Content_RandomComponents(LootContentSerializable serializable, Database database)
 {
     if (serializable == null || database == null)
     {
         return;
     }
     MinAmount  = new NumericValue <int>(serializable.MinAmount, 0, 100000000);
     MaxAmount  = new NumericValue <int>(serializable.MaxAmount, 0, 100000000);
     ValueRatio = new NumericValue <float>(serializable.ValueRatio, 0.001f, 1000f);
     Factions   = FactionFilterData.Deserialize(serializable.Factions, database);
 }
Exemplo n.º 2
0
 private FleetData(FleetSerializable serializable, Database database)
 {
     ItemId          = new ItemId <FleetData>(serializable.Id, serializable.FileName);
     Factions        = FactionFilterData.Deserialize(serializable.Factions, database);
     LevelBonus      = new NumericValue <int>(serializable.LevelBonus, -100, 100);
     NoRandomShips   = serializable.NoRandomShips;
     CombatTimeLimit = new NumericValue <int>(serializable.CombatTimeLimit, 0, 999);
     LootCondition   = serializable.LootCondition;
     ExpCondition    = serializable.ExpCondition;
     SpecificShips   = serializable.SpecificShips?.Select(item => new Wrapper <ShipBuildData> {
         Item = database.GetShipBuildId(item)
     }).ToArray();
 }