ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/adjust_levels.ext
Revision: 1.2
Committed: Fri Mar 24 23:29:18 2006 UTC (18 years, 1 month ago) by elmex
Branch: MAIN
Changes since 1.1: +1 -0 lines
Log Message:
added some 0 and 1 to the callbacks

File Contents

# Content
1 #! perl
2
3 # adjust levels of players at login time in case the experience table changed
4
5 sub on_player_load {
6 my ($event) = @_;
7 my $path = $event->{message};
8 my $ob = $event->{who};
9
10 $ob->message ("\nAdjusting levels to experience table.\n");
11
12 $ob->player_lvl_adj;
13 $ob->player_lvl_adj ($_) for grep $_->type == cf::SKILL, $ob->inv;
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");
16 0
17 }
18