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.23 by root, Mon Dec 17 08:03:22 2007 UTC vs.
Revision 1.24 by elmex, Sun Feb 17 22:37:34 2008 UTC

164 164
165sub analyze { 165sub analyze {
166 my ($sk, $chdl, $pl, $input_level) = @_; 166 my ($sk, $chdl, $pl, $input_level) = @_;
167 167
168 my $hadunid = 0; 168 my $hadunid = 0;
169 my $found = 0;
169 for ($chdl->grep_by_type (cf::RING, cf::AMULET)) { 170 for ($chdl->grep_by_type (cf::RING, cf::AMULET)) {
170 if (!$_->flag (cf::FLAG_IDENTIFIED) && $_->need_identify) { 171 if (!$_->flag (cf::FLAG_IDENTIFIED) && $_->need_identify) {
171 $hadunid = 1; 172 $hadunid = 1;
172 next; 173 next;
173 } 174 }
175 $found = 1;
174 my $r = Jeweler::Object->new (object => $_); 176 my $r = Jeweler::Object->new (object => $_);
175 my $msg = $r->analyze ($sk, $pl, $input_level); 177 my $msg = $r->analyze ($sk, $pl, $input_level);
176 $pl->message ($r->to_string . ": " . $msg); 178 $pl->message ($r->to_string . ": " . $msg);
177 if ($pl->flag (cf::FLAG_WIZ)) { 179 if ($pl->flag (cf::FLAG_WIZ)) {
178 $r->wiz_analyze ($pl); 180 $r->wiz_analyze ($pl);
179 } 181 }
180 } 182 }
181 $pl->message ("You couldn't identify the other rings and not analyze them!") 183 $pl->message ("You couldn't identify the other rings and not analyze them!")
182 if $hadunid; 184 if $hadunid;
185 $pl->message ("You couldn't find anything in the bench to analyse!")
186 unless $found;
183} 187}
184 188
185# this function converts metals/minerals into a raw ring (of adornment) 189# this function converts metals/minerals into a raw ring (of adornment)
186sub simple_converter { 190sub simple_converter {
187 my ($pl, $ingred, $chdl, $conv) = @_; 191 my ($pl, $ingred, $chdl, $conv) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines