Revision: | 1.2 |
Committed: | Thu Dec 21 22:41:34 2006 UTC (17 years, 6 months ago) by root |
Branch: | MAIN |
Changes since 1.1: | +2 -2 lines |
Log Message: | - updated cf.pm to use a more generic and extendable syntax, now that it is clear that we will have multiple "attachable" objects. maybe bite the bullet in C++ and make attachable virtual? - completely rework the syntax for attaching and attachments - update all extensions |
# | Content |
---|---|
1 | #! perl |
2 | |
3 | # adjust levels of players at login time in case the experience table changed |
4 | |
5 | cf::player->attach ( |
6 | on_load => sub { |
7 | my ($pl) = @_; |
8 | my $ob = $pl->ob; |
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 | }, |
17 | ); |
18 |