--- deliantra/server/ext/Jeweler.pm 2007/02/04 11:17:52 1.9 +++ deliantra/server/ext/Jeweler.pm 2007/04/10 17:46:22 1.14 @@ -578,7 +578,8 @@ for my $key (keys %$costs) { my @grepar; if ($key =~ m/^(resist_|spec_|stat_)/) { # check the special items - @grepar = @{Jeweler::getcfg (plans => $key) || []}; + eval { @grepar = @{Jeweler::getcfg (plans => $key) || []} }; + next if $@; } else { # check the gems @grepar = ('gems', undef, undef, $key); } @@ -797,7 +798,7 @@ my $obj = cf::object::new $self->{hash}->{arch}; - $obj->item_power ($self->power_to_level); # there have to be strings attached! + $obj->item_power (floor ($self->power_to_level / 3)); # there have to be strings attached! $obj->face ($self->{hash}{face}); @@ -1085,6 +1086,12 @@ my $check_cnts = 0; my $check_true = 0; for my $match (@matchar) { + if ($i % 3 == 0) { + return 1 if $check_true && $check_cnts == $check_true; + $check_cnts = 0; + $check_true = 0; + } + if ($match =~ m/^\s*$/) { $i++; next; @@ -1103,9 +1110,8 @@ } $i++; } - if ($check_true && $check_cnts == $check_true) { - return 1; - } + #d# warn "CHECK $check_true | $check_cnts | [".(join ',', @matchar).":".join (",", ($thing->name, $thing->title, $thing->arch->name))."\n"; + return 1 if $check_true && $check_cnts == $check_true; return 0; }