… | |
… | |
95 | $npc->set_ob_key_value (ext_reseller_sales => cf::to_json $sells); |
95 | $npc->set_ob_key_value (ext_reseller_sales => cf::to_json $sells); |
96 | |
96 | |
97 | 0 |
97 | 0 |
98 | }; |
98 | }; |
99 | |
99 | |
100 | cf::register_attachment "reseller_shopmat", |
100 | cf::object::attachment "reseller_shopmat", |
101 | on_move_trigger => sub { |
101 | on_move_trigger => sub { |
102 | my ($self, $who_caused, $who) = @_; |
102 | my ($self, $who_caused, $who) = @_; |
103 | |
103 | |
104 | my @obs = grep { $_->name eq $self->{reseller_shopmat}{npc_name} } |
104 | my @obs = grep { $_->name eq $self->{reseller_shopmat}{npc_name} } |
105 | $who->map->at ($self->{reseller_shopmat}{npc_x}, $self->{reseller_shopmat}{npc_y}); |
105 | $who->map->at ($self->{reseller_shopmat}{npc_x}, $self->{reseller_shopmat}{npc_y}); |
… | |
… | |
158 | |
158 | |
159 | cf::override; |
159 | cf::override; |
160 | }, |
160 | }, |
161 | ; |
161 | ; |
162 | |
162 | |
163 | cf::register_attachment "reseller_floor", |
163 | cf::object::attachment "reseller_floor", |
164 | on_drop_on => sub { |
164 | on_drop_on => sub { |
165 | my ($on, $what, $who) = @_; |
165 | my ($on, $what, $who) = @_; |
166 | my $name = $what->custom_name; |
166 | my $name = $what->custom_name; |
167 | |
167 | |
168 | return if $what->flag (cf::FLAG_UNPAID); |
168 | return if $what->flag (cf::FLAG_UNPAID); |