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

Comparing deliantra/maps/perl/adjust_levels.ext (file contents):
Revision 1.1 by root, Tue Mar 21 05:42:31 2006 UTC vs.
Revision 1.6 by root, Fri Aug 25 15:12:21 2006 UTC

1#! perl 1#! perl
2 2
3# adjust levels of players at login time in case the experience table changed 3# adjust levels of players at login time in case the experience table changed
4 4
5sub on_player_load { 5cf::attach_to_players
6 on_load => sub {
6 my ($event) = @_; 7 my ($pl) = @_;
7 my $path = $event->{message}; 8 my $ob = $pl->ob;
8 my $ob = $event->{who};
9 9
10 $ob->message ("\nAdjusting levels to experience table.\n"); 10 $ob->message ("\nAdjusting levels to experience table.\n");
11 11
12 $ob->player_lvl_adj; 12 $ob->player_lvl_adj;
13 $ob->player_lvl_adj ($_) for grep $_->type == cf::SKILL, $ob->inv; 13 $ob->player_lvl_adj ($_) for grep $_->type == cf::SKILL, $ob->inv;
14 14
15 $ob->message ("\nDone adjusting levels to experience table.\nIf you got a lot of level changes, then this is because the server changed its experience table.\nDo NOT panic!\n"); 15 $ob->message ("\nDone adjusting levels to experience table.\nIf you got a lot of level changes, then this is because the server changed its experience table.\nDo NOT panic!\n");
16} 16 },
17;
17 18

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines