ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/Jeweler.pm
(Generate patch)

Comparing deliantra/server/ext/Jeweler.pm (file contents):
Revision 1.19 by elmex, Thu Aug 9 10:49:56 2007 UTC vs.
Revision 1.21 by root, Fri Oct 12 19:13:26 2007 UTC

355 355
356sub put { 356sub put {
357 my ($self, $obj) = @_; 357 my ($self, $obj) = @_;
358 358
359 return undef unless $self->{cauldron}; 359 return undef unless $self->{cauldron};
360 $obj->insert_ob_in_ob ($self->{cauldron}); 360 $self->{cauldron}->insert ($obj);
361} 361}
362 362
363=back 363=back
364 364
365=cut 365=cut
477} 477}
478 478
479sub improve_ring_by_plan { 479sub 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
573sub check_costs { 573sub 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) || []} };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines