| Revision: | 1.5 |
| Committed: | Fri Aug 25 15:07:43 2006 UTC (20 years, 2 months ago) by root |
| Branch: | MAIN |
| Changes since 1.4: | +10 -7 lines |
| Log Message: | Convert remainin scripts to new event system, noted conversion status of all plugins in second line, to aid in further event conversions. |
| # | 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.5 | cf::attach_to_players |
| 6 | on_player_load => sub { | ||
| 7 | my ($pl) = @_; | ||
| 8 | my $ob = $pl->ob; | ||
| 9 | root | 1.1 | |
| 10 | root | 1.5 | $ob->message ("\nAdjusting levels to experience table.\n"); |
| 11 | root | 1.1 | |
| 12 | root | 1.5 | $ob->player_lvl_adj; |
| 13 | $ob->player_lvl_adj ($_) for grep $_->type == cf::SKILL, $ob->inv; | ||
| 14 | root | 1.1 | |
| 15 | root | 1.5 | $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 | root | 1.1 |