… | |
… | |
479 | } |
479 | } |
480 | |
480 | |
481 | sub improve_ring_by_plan { |
481 | sub improve_ring_by_plan { |
482 | my ($self, $plan, $ring) = @_; |
482 | my ($self, $plan, $ring) = @_; |
483 | |
483 | |
484 | $ring = do { my $guard = Coro::Storable::guard; dclone $ring }; |
484 | $ring = dclone $ring; |
485 | |
485 | |
486 | my $ingred = $self->{ingredients}; |
486 | my $ingred = $self->{ingredients}; |
487 | my $impr = {}; |
487 | my $impr = {}; |
488 | |
488 | |
489 | if ($plan =~ m/^stat_(\S+)$/) { |
489 | if ($plan =~ m/^stat_(\S+)$/) { |
… | |
… | |
573 | } |
573 | } |
574 | |
574 | |
575 | sub check_costs { |
575 | sub check_costs { |
576 | my ($self, $costs, $do_remove) = @_; |
576 | my ($self, $costs, $do_remove) = @_; |
577 | |
577 | |
578 | my $costs = do { my $guard = Coro::Storable::guard; dclone $costs }; |
578 | my $costs = dclone $costs; |
579 | |
579 | |
580 | for my $key (keys %$costs) { |
580 | for my $key (keys %$costs) { |
581 | my @grepar; |
581 | my @grepar; |
582 | if ($key =~ m/^(resist_|spec_|stat_)/) { # check the special items |
582 | if ($key =~ m/^(resist_|spec_|stat_)/) { # check the special items |
583 | eval { @grepar = @{Jeweler::getcfg (plans => $key) || []} }; |
583 | eval { @grepar = @{Jeweler::getcfg (plans => $key) || []} }; |