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.6 by elmex, Thu Feb 1 01:46:45 2007 UTC vs.
Revision 1.8 by elmex, Sun Feb 4 00:35:23 2007 UTC

226 my $nrof = int ($archvalsum / (($outarchval || 1000) * $outarchvalfact)); 226 my $nrof = int ($archvalsum / (($outarchval || 1000) * $outarchvalfact));
227 if ($nrof) { 227 if ($nrof) {
228 # XXX: yes, i know what i'm doing here, i don't set nrof, but it didn't work somehow (pls. chek sometimes) 228 # XXX: yes, i know what i'm doing here, i don't set nrof, but it didn't work somehow (pls. chek sometimes)
229 for (1..$nrof) { 229 for (1..$nrof) {
230 $chdl->put (my $ob = cf::object::new $outarch); 230 $chdl->put (my $ob = cf::object::new $outarch);
231 $ob->set_animation (cf::rndm $ob->num_animations); 231 $ob->set_animation (cf::rndm $ob->num_animations)
232 if ($ob->type == cf::RING);
232 $ob->flag (cf::FLAG_IDENTIFIED, 1); 233 $ob->flag (cf::FLAG_IDENTIFIED, 1);
233 } 234 }
234 235
235 my $xp_sum = ($xp_gain * $nrof); 236 my $xp_sum = ($xp_gain * $nrof);
236 237
626 my $self = bless { }, $class; 627 my $self = bless { }, $class;
627 628
628 $self->ring_or_ammy_to_hash ($arg{object}); 629 $self->ring_or_ammy_to_hash ($arg{object});
629 630
630 $self; 631 $self;
632}
633
634sub has_resist {
635 my ($self, $resistnam, $resistval) = @_;
636 my $resnum = $REV_RESMAP{uc $resistnam};
637 if (defined ($resistval)) {
638 return 1 if $self->{hash}->{resist}->{$resnum} == $resistval;
639 } else {
640 return 1 if $self->{hash}->{resist}->{$resnum};
641 }
642 return undef;
631} 643}
632 644
633sub analyze { 645sub analyze {
634 my ($self, $sk, $pl) = @_; 646 my ($self, $sk, $pl) = @_;
635 647

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines