Skip to content

Commit

Permalink
Make sure the character imgs to use on weapons / artifacts aren't the…
Browse files Browse the repository at this point in the history
… ones from upcoming characters
  • Loading branch information
Wolfteam committed May 29, 2021
1 parent 1e911ca commit f1cc5e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/infrastructure/genshin_service.dart
Expand Up @@ -178,7 +178,7 @@ class GenshinServiceImpl implements GenshinService {
List<String> getCharacterImgsUsingWeapon(String key) {
final weapon = getWeapon(key);
final imgs = <String>[];
for (final char in _charactersFile.characters) {
for (final char in _charactersFile.characters.where((el) => !el.isComingSoon)) {
for (final build in char.builds) {
final isBeingUsed = build.weaponImages.contains(weapon.image);
final img = Assets.getCharacterPath(char.image);
Expand Down Expand Up @@ -211,7 +211,7 @@ class GenshinServiceImpl implements GenshinService {
List<String> getCharacterImgsUsingArtifact(String key) {
final artifact = getArtifact(key);
final imgs = <String>[];
for (final char in _charactersFile.characters) {
for (final char in _charactersFile.characters.where((el) => !el.isComingSoon)) {
for (final build in char.builds) {
final isBeingUsed = build.artifacts.any((a) => a.one == artifact.image || a.multiples.any((m) => m.image == artifact.image));

Expand Down

0 comments on commit f1cc5e6

Please sign in to comment.