Revision: | 1.3 |
Committed: | Fri Dec 22 16:34:00 2006 UTC (17 years, 7 months ago) by root |
Branch: | MAIN |
CVS Tags: | rel-2_2, rel-2_0, rel-2_1 |
Changes since 1.2: | +1 -1 lines |
Log Message: | - preliminary check in, stuff is rudimentarily working - moved most of the player creation process into a perl coroutine - changed internal design of player management to not reuse and morph the object in funny ways. should be safer and much nicer to handle. - got rid of some annoying hacks, such as clear() (TODO: get rid of player_pod and other stuff now unnecessary?) |
# | User | Rev | Content |
---|---|---|---|
1 | root | 1.1 | #! perl |
2 | |||
3 | # adjust levels of players at login time in case the experience table changed | ||
4 | |||
5 | root | 1.2 | cf::player->attach ( |
6 | root | 1.3 | on_login => sub { |
7 | root | 1.1 | 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 | root | 1.2 | ); |
18 | root | 1.1 |