Skip to content

Commit

Permalink
Updated characters.json and materials.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Mar 14, 2021
1 parent 30cf3e5 commit 13d8e2a
Show file tree
Hide file tree
Showing 8 changed files with 468 additions and 163 deletions.
310 changes: 155 additions & 155 deletions assets/db/characters.json

Large diffs are not rendered by default.

271 changes: 264 additions & 7 deletions assets/db/materials.json

Large diffs are not rendered by default.

Binary file added assets/items/others/bag.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/items/others/gacha.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions lib/domain/enums/enums.dart
Expand Up @@ -13,6 +13,7 @@ export 'day_type.dart';
export 'element_type.dart';
export 'item_location_type.dart';
export 'item_status_type.dart';
export 'material_filter_type.dart';
export 'material_type.dart';
export 'region_type.dart';
export 'sort_direction_type.dart';
Expand Down
4 changes: 4 additions & 0 deletions lib/domain/enums/material_filter_type.dart
@@ -0,0 +1,4 @@
enum MaterialFilterType {
name,
rarity,
}
3 changes: 2 additions & 1 deletion lib/domain/enums/material_type.dart
@@ -1,6 +1,7 @@
enum MaterialType {
all,
common,
elemental,
elementalStone,
jewels,
local,
talents,
Expand Down
42 changes: 42 additions & 0 deletions lib/presentation/shared/extensions/i18n_extensions.dart
Expand Up @@ -353,4 +353,46 @@ extension I18nExtensions on S {
throw Exception('Invalid server reset time type = $type');
}
}

String translateMaterialFilterType(MaterialFilterType type) {
switch (type) {
case MaterialFilterType.name:
return name;
case MaterialFilterType.rarity:
return rarity;
default:
throw Exception('Invalid material filter type = $type');
}
}

String translateMaterialType(MaterialType type) {
switch (type) {
case MaterialType.all:
return all;
case MaterialType.common:
return common;
case MaterialType.elementalStone:
return elementalStone;
case MaterialType.jewels:
return jewel;
case MaterialType.local:
return local;
case MaterialType.talents:
return talent;
case MaterialType.weapon:
case MaterialType.weaponPrimary:
return weapon;
case MaterialType.currency:
return currency;
case MaterialType.others:
return others;
case MaterialType.ingredient:
return ingredient;
case MaterialType.expWeapon:
case MaterialType.expCharacter:
return experience;
default:
throw Exception('Invalid material type = $type');
}
}
}

0 comments on commit 13d8e2a

Please sign in to comment.