--- deliantra/server/ext/jeweler.ext 2007/02/01 01:46:45 1.5 +++ deliantra/server/ext/jeweler.ext 2007/02/02 12:05:28 1.6 @@ -115,6 +115,29 @@ $ingred; } +cf::object::attachment check_ring_drop_on => + on_drop_on => sub { + my ($self, $obj, $who) = @_; + my $cfg = $self->{check_ring_drop_on}; + if ($obj->type == cf::RING + && !$obj->flag (cf::FLAG_CURSED) + && !$obj->flag (cf::FLAG_DAMNED) + ) { + my $ringo = Jeweler::Object->new (object => $obj); + for (grep { /^resist_/ } keys %$cfg) { + if (/^resist_(\S+)$/) { + if ($ringo->has_resist ($1)) { + $self->map->trigger ( + $cfg->{connection}, + $cfg->{state} + ); + cf::override; + } + } + } + } + }; + cf::object->attach ( type => cf::SKILL, subtype => cf::SK_JEWELER,