--- deliantra/server/ext/commands.ext 2009/01/11 06:08:40 1.72 +++ deliantra/server/ext/commands.ext 2009/10/03 22:36:08 1.73 @@ -80,6 +80,8 @@ cf::register_command body => sub { my ($ob) = @_; + my $observe = $ob->contr->observe; + # Too hard to try and make a header that lines everything up, so just # give a description. (comment from C++) my $reply = @@ -91,7 +93,7 @@ # first process all applied items and hash them into their slots my @slot; - for my $item (grep $_->flag (cf::FLAG_APPLIED), $ob->inv) { + for my $item (grep $_->flag (cf::FLAG_APPLIED), $observe->inv) { $item->slot_info ($_) and push @{ $slot[$_] }, $item for 0 .. cf::NUM_BODY_LOCATIONS-1; @@ -103,18 +105,18 @@ $msg =~ s/^.*? a //; $reply .= sprintf " %-20s %3d %5d %s\n", $msg, - $ob->slot_info ($_), - $ob->slot_used ($_), + $observe->slot_info ($_), + $observe->slot_used ($_), join ", ", map $_->query_short_name, @{ $slot[$_] } - if $ob->slot_info ($_) || $ob->slot_used ($_); + if $observe->slot_info ($_) || $observe->slot_used ($_); } $reply .= "You are not allowed to wear armor\r" - unless $ob->flag (cf::FLAG_USE_ARMOUR); + unless $observe->flag (cf::FLAG_USE_ARMOUR); $reply .= "You are not allowed to use weapons\r" - unless $ob->flag (cf::FLAG_USE_WEAPON); + unless $observe->flag (cf::FLAG_USE_WEAPON); - $ob->send_msg ("c/body" => $reply, cf::NDI_REPLY); + $ob->send_msg ("c/body" => $reply, cf::NDI_REPLY | cf::NDI_CLEAR); }; cf::register_command mark => sub {