--- deliantra/server/ext/Jeweler.pm 2007/02/04 11:57:22 1.11 +++ deliantra/server/ext/Jeweler.pm 2007/05/19 00:11:11 1.15 @@ -240,7 +240,7 @@ $pl->ob->change_exp ($xp_sum, "jeweler", cf::SK_EXP_SKILL_ONLY); } } else { - $pl->ob->message ("You fail to make something, propably you used not enough source material?"); + $pl->ob->message ("You fail to make something, probably you used not enough source material?"); } } @@ -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}); @@ -1086,6 +1087,7 @@ 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; } @@ -1109,9 +1111,7 @@ $i++; } #d# warn "CHECK $check_true | $check_cnts | [".(join ',', @matchar).":".join (",", ($thing->name, $thing->title, $thing->arch->name))."\n"; - if ($check_true && $check_cnts == $check_true) { - return 1; - } + return 1 if $check_true && $check_cnts == $check_true; return 0; }