ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/dmcommands.ext
(Generate patch)

Comparing deliantra/maps/perl/dmcommands.ext (file contents):
Revision 1.5 by root, Mon Oct 2 00:21:44 2006 UTC vs.
Revision 1.6 by root, Tue Nov 7 15:04:44 2006 UTC

3# wizard commands 3# wizard commands
4 4
5cf::register_command goto => 0, sub { 5cf::register_command goto => 0, sub {
6 my ($ob, $arg) = @_; 6 my ($ob, $arg) = @_;
7 7
8 return unless $ob->flag (cf::FLAG_WIZ) || $cf::CFG{unpriv_goto}; 8 return unless $ob->may ("command_goto");
9 9
10 my $portal = cf::object::new "exit"; 10 my $portal = cf::object::new "exit";
11 11
12 $portal->slaying ($arg); 12 $portal->slaying ($arg);
13 $portal->stats->hp (0); 13 $portal->stats->hp (0);
19}; 19};
20 20
21cf::register_command wizpass => 0, sub { 21cf::register_command wizpass => 0, sub {
22 my ($ob, $arg) = @_; 22 my ($ob, $arg) = @_;
23 23
24 return unless $ob->flag (cf::FLAG_WIZ) || $cf::CFG{unpriv_wizpass}; 24 return unless $ob->may ("command_wizpass");
25 25
26 my $new_val = length $arg ? $arg * 1 : !$ob->flag (cf::FLAG_WIZPASS); 26 my $new_val = length $arg ? $arg * 1 : !$ob->flag (cf::FLAG_WIZPASS);
27 27
28 $ob->flag (cf::FLAG_WIZPASS, $new_val); 28 $ob->flag (cf::FLAG_WIZPASS, $new_val);
29 29
35}; 35};
36 36
37cf::register_command wizcast => 0, sub { 37cf::register_command wizcast => 0, sub {
38 my ($ob, $arg) = @_; 38 my ($ob, $arg) = @_;
39 39
40 return unless $ob->flag (cf::FLAG_WIZ) || $cf::CFG{unpriv_wizcast}; 40 return unless $ob->may ("command_wizcast");
41 41
42 my $new_val = length $arg ? $arg * 1 : !$ob->flag (cf::FLAG_WIZCAST); 42 my $new_val = length $arg ? $arg * 1 : !$ob->flag (cf::FLAG_WIZCAST);
43 43
44 $ob->flag (cf::FLAG_WIZCAST, $new_val); 44 $ob->flag (cf::FLAG_WIZCAST, $new_val);
45 45

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines