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

Comparing deliantra/server/ext/nimbus.ext (file contents):
Revision 1.1 by root, Fri Dec 15 19:29:18 2006 UTC vs.
Revision 1.2 by root, Thu Dec 21 22:41:34 2006 UTC

51 } 51 }
52} 52}
53 53
54# called when the player will likely die (modulo explore mode) 54# called when the player will likely die (modulo explore mode)
55# but before any stats/exp is changed 55# but before any stats/exp is changed
56cf::attach_to_players 56cf::player->attach (
57 on_death => sub { 57 on_death => sub {
58 my ($pl) = @_; 58 my ($pl) = @_;
59 my $ob = $pl->ob; 59 my $ob = $pl->ob;
60 60
61 # save player stats and experience to restore it later 61 # save player stats and experience to restore it later
85 $nimbus->unique (1); 85 $nimbus->unique (1);
86 86
87 $pl->savebed ($path, 24, 12); 87 $pl->savebed ($path, 24, 12);
88 } 88 }
89 }, 89 },
90; 90);
91 91
92sub teleport { 92sub teleport {
93 my ($pl, $map, $x, $y) = @_; 93 my ($pl, $map, $x, $y) = @_;
94 94
95 return if $pl->ob->map->path eq $map 95 return if $pl->ob->map->path eq $map
105 $portal->apply ($pl->ob); 105 $portal->apply ($pl->ob);
106 106
107 $portal->destroy; 107 $portal->destroy;
108} 108}
109 109
110cf::register_attachment nimbus_exit => 110cf::object::attachment nimbus_exit =>
111 on_trigger => sub { 111 on_trigger => sub {
112 my ($self, $ob) = @_; 112 my ($self, $ob) = @_;
113 113
114 my $pl = $ob->contr; 114 my $pl = $ob->contr;
115 my @savebed; 115 my @savebed;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines