ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/invite.ext
(Generate patch)

Comparing deliantra/server/ext/invite.ext (file contents):
Revision 1.4 by root, Sat May 3 09:30:38 2008 UTC vs.
Revision 1.5 by root, Sun May 4 08:55:52 2008 UTC

93 $who->message ("canceling all invites"); 93 $who->message ("canceling all invites");
94 delete $invite{$name}; 94 delete $invite{$name};
95 } 95 }
96}; 96};
97 97
98sub teleport {
99 my ($pl, $map, $x, $y) = @_;
100
101 my $portal = cf::object::new "exit";
102
103 $portal->slaying ($map->path);
104 $portal->stats->hp ($x);
105 $portal->stats->sp ($y);
106
107 $portal->apply ($pl);
108
109 $portal->destroy;
110}
111
112cf::register_command "accept-invitation" => sub { 98cf::register_command "accept-invitation" => sub {
113 my ($who, $args) = @_; 99 my ($who, $args) = @_;
114 100
115 $who->speed_left ($who->speed_left - 0.2); 101 $who->speed_left ($who->speed_left - 0.2);
116 102
126 $who->message ("Sorry, $args\'s invitation has expired. " 112 $who->message ("Sorry, $args\'s invitation has expired. "
127 . "H<Invites are only valid for $TIMEOUT seconds, ask $args to invite you again.>"); 113 . "H<Invites are only valid for $TIMEOUT seconds, ask $args to invite you again.>");
128 } else { 114 } else {
129 my $inv = delete $invite{$args}{$name}; 115 my $inv = delete $invite{$args}{$name};
130 $who->message ("A godly force starts to pull you up..."); 116 $who->message ("A godly force starts to pull you up...");
131 teleport $who, @{$inv}[1,2,3]; 117 $who->goto ($inv->[1,2,3]);
132 $who->message ("... and sets you down where $args invited you to."); 118 $who->message ("... and sets you down where $args invited you to.");
133 } 119 }
134}; 120};
135 121

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines