… | |
… | |
576 | my $costs = dclone ($costs); |
576 | my $costs = dclone ($costs); |
577 | |
577 | |
578 | for my $key (keys %$costs) { |
578 | for my $key (keys %$costs) { |
579 | my @grepar; |
579 | my @grepar; |
580 | if ($key =~ m/^(resist_|spec_|stat_)/) { # check the special items |
580 | if ($key =~ m/^(resist_|spec_|stat_)/) { # check the special items |
581 | @grepar = @{Jeweler::getcfg (plans => $key) || []}; |
581 | eval { @grepar = @{Jeweler::getcfg (plans => $key) || []} }; |
|
|
582 | next if $@; |
582 | } else { # check the gems |
583 | } else { # check the gems |
583 | @grepar = ('gems', undef, undef, $key); |
584 | @grepar = ('gems', undef, undef, $key); |
584 | } |
585 | } |
585 | |
586 | |
586 | if ($do_remove) { |
587 | if ($do_remove) { |
… | |
… | |
1083 | |
1084 | |
1084 | my $i = 0; |
1085 | my $i = 0; |
1085 | my $check_cnts = 0; |
1086 | my $check_cnts = 0; |
1086 | my $check_true = 0; |
1087 | my $check_true = 0; |
1087 | for my $match (@matchar) { |
1088 | for my $match (@matchar) { |
1088 | $check_cnts = 0 if $i % 3 == 0; |
1089 | if ($i % 3 == 0) { |
|
|
1090 | $check_cnts = 0; |
|
|
1091 | $check_true = 0; |
|
|
1092 | } |
1089 | |
1093 | |
1090 | if ($match =~ m/^\s*$/) { |
1094 | if ($match =~ m/^\s*$/) { |
1091 | $i++; |
1095 | $i++; |
1092 | next; |
1096 | next; |
1093 | } |
1097 | } |
… | |
… | |
1103 | $thing->arch->name eq $match |
1107 | $thing->arch->name eq $match |
1104 | and $check_true++; |
1108 | and $check_true++; |
1105 | } |
1109 | } |
1106 | $i++; |
1110 | $i++; |
1107 | } |
1111 | } |
|
|
1112 | #d# warn "CHECK $check_true | $check_cnts | [".(join ',', @matchar).":".join (",", ($thing->name, $thing->title, $thing->arch->name))."\n"; |
1108 | if ($check_true && $check_cnts == $check_true) { |
1113 | if ($check_true && $check_cnts == $check_true) { |
1109 | return 1; |
1114 | return 1; |
1110 | } |
1115 | } |
1111 | return 0; |
1116 | return 0; |
1112 | } |
1117 | } |