… | |
… | |
477 | } |
477 | } |
478 | |
478 | |
479 | sub improve_ring_by_plan { |
479 | sub improve_ring_by_plan { |
480 | my ($self, $plan, $ring) = @_; |
480 | my ($self, $plan, $ring) = @_; |
481 | |
481 | |
482 | $ring = dclone ($ring); |
482 | $ring = do { my $guard = Coro::Storable::guard; dclone $ring }; |
483 | |
483 | |
484 | my $ingred = $self->{ingredients}; |
484 | my $ingred = $self->{ingredients}; |
485 | my $impr = {}; |
485 | my $impr = {}; |
486 | |
486 | |
487 | if ($plan =~ m/^stat_(\S+)$/) { |
487 | if ($plan =~ m/^stat_(\S+)$/) { |
… | |
… | |
571 | } |
571 | } |
572 | |
572 | |
573 | sub check_costs { |
573 | sub check_costs { |
574 | my ($self, $costs, $do_remove) = @_; |
574 | my ($self, $costs, $do_remove) = @_; |
575 | |
575 | |
576 | my $costs = dclone ($costs); |
576 | my $costs = do { my $guard = Coro::Storable::guard; 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 | eval { @grepar = @{Jeweler::getcfg (plans => $key) || []} }; |
581 | eval { @grepar = @{Jeweler::getcfg (plans => $key) || []} }; |