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

Comparing deliantra/server/ext/town_portal.ext (file contents):
Revision 1.1 by root, Tue May 22 10:40:43 2007 UTC vs.
Revision 1.4 by root, Wed Apr 30 13:46:40 2008 UTC

1#! perl 1#! perl
2 2
3# this module implements the town portal spell: 3# this module implements the town portal spell:
4# casting it creates a magic portal to the nearest town portal (regions) 4# casting it creates a magic portal to the nearest town portal (regions)
5# using the magic portal brings you to the town portal and remembers your magic portal 5# using the magic portal brings you to the town portal and remembers your magic portal
6# using the town portal brings you back to the magic portla if it still exists 6# using the town portal brings you back to the magic portal if it still exists
7 7
8cf::object->attach ( 8cf::object->attach (
9 type => cf::SPELL, 9 type => cf::SPELL,
10 subtype => cf::SP_TOWN_PORTAL, 10 subtype => cf::SP_TOWN_PORTAL,
11 on_cast_spell => sub { 11 on_cast_spell => sub {
43 43
44cf::object::attachment town_portal => 44cf::object::attachment town_portal =>
45 on_apply => sub { 45 on_apply => sub {
46 my ($self, $who) = @_; 46 my ($self, $who) = @_;
47 47
48 $who->{town_portal} = [$who->map, $who->x, $who->y, $self->uuid]; 48 $who->{town_portal} = [$who->map->as_string, $who->x, $who->y, $self->uuid];
49 }, 49 },
50; 50;
51 51
52cf::object::attachment town_portal_return => 52cf::object::attachment town_portal_return =>
53 on_apply => sub { 53 on_apply => sub {
78 } 78 }
79 79
80 cf::override 1; 80 cf::override 1;
81 }, 81 },
82; 82;
83

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines