2019-06-25 00:53:45 +02:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
2019-07-16 23:37:18 +02:00
|
|
|
part of 'warband_roster.dart';
|
2019-06-25 00:53:45 +02:00
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
|
|
|
HenchmenGroup _$HenchmenGroupFromJson(Map json) {
|
2019-08-01 00:05:42 +02:00
|
|
|
$checkKeys(json, requiredKeys: const ['group', 'stats']);
|
2019-06-25 00:53:45 +02:00
|
|
|
return HenchmenGroup(
|
2019-07-25 16:44:51 +02:00
|
|
|
HenchmenGroup._henchmenHeaderFromJson(json['group'] as String),
|
|
|
|
Unit._statsFromJson(json['stats'] as String),
|
|
|
|
Unit._splitListFromJson(json['weapons'] as String),
|
2019-08-01 00:05:42 +02:00
|
|
|
Unit._splitListFromJson(json['armour'] as String),
|
2019-07-25 16:44:51 +02:00
|
|
|
);
|
2019-06-25 00:53:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Hero _$HeroFromJson(Map json) {
|
2019-08-01 00:05:42 +02:00
|
|
|
$checkKeys(json, requiredKeys: const ['hero', 'stats']);
|
2019-06-25 00:53:45 +02:00
|
|
|
return Hero(
|
2019-07-25 16:44:51 +02:00
|
|
|
Unit._statsFromJson(json['stats'] as String),
|
|
|
|
Unit._splitListFromJson(json['skilllists'] as String),
|
|
|
|
Unit._splitListFromJson(json['weapons'] as String),
|
2019-08-01 00:05:42 +02:00
|
|
|
Unit._splitListFromJson(json['armour'] as String),
|
2019-07-25 16:44:51 +02:00
|
|
|
Unit._splitListFromJson(json['rules'] as String),
|
2019-08-01 00:05:42 +02:00
|
|
|
json['warbandaddition'] as int ?? 0,
|
2019-07-25 16:44:51 +02:00
|
|
|
Hero._heroHeaderFromJson(json['hero'] as String),
|
|
|
|
);
|
2019-06-25 00:53:45 +02:00
|
|
|
}
|
|
|
|
|
2019-07-16 23:37:18 +02:00
|
|
|
WarbandRoster _$WarbandRosterFromJson(Map json) {
|
2019-08-01 00:05:42 +02:00
|
|
|
$checkKeys(json, requiredKeys: const [
|
|
|
|
'warband',
|
|
|
|
'objective',
|
|
|
|
'alignment',
|
|
|
|
'heros',
|
|
|
|
'henchmen'
|
|
|
|
]);
|
2019-07-16 23:37:18 +02:00
|
|
|
return WarbandRoster(
|
2019-07-25 16:44:51 +02:00
|
|
|
WarbandRoster._warbandNameAndRace(json['warband'] as String),
|
|
|
|
json['campaign'] as int ?? 0,
|
|
|
|
json['objective'] as String,
|
|
|
|
json['alignment'] as String,
|
|
|
|
json['gc'] as int ?? 0,
|
|
|
|
json['shards'] as int ?? 0,
|
|
|
|
json['equipment'] as String ?? '',
|
|
|
|
json['achievments'] as String ?? '',
|
|
|
|
(json['heros'] as List)
|
|
|
|
?.map((e) => e == null ? null : Hero.fromJson(e))
|
|
|
|
?.toList(),
|
|
|
|
(json['henchmen'] as List)
|
|
|
|
?.map((e) => e == null ? null : HenchmenGroup.fromJson(e))
|
|
|
|
?.toList(),
|
|
|
|
)..active = json['active'] as bool ?? true;
|
2019-06-25 00:53:45 +02:00
|
|
|
}
|