… | |
… | |
158 | $setup{$k} = $ns->itemcmd; |
158 | $setup{$k} = $ns->itemcmd; |
159 | |
159 | |
160 | } elsif ($k eq "mapsize") { |
160 | } elsif ($k eq "mapsize") { |
161 | my ($x, $y) = split /x/, $v; |
161 | my ($x, $y) = split /x/, $v; |
162 | |
162 | |
163 | $ns->mapx ($x = max 9, min cf::MAP_CLIENT_X, $x); |
163 | $ns->mapx ($x = max 9, min cf::MAP_CLIENT_X, ($x - 1) | 1); |
164 | $ns->mapy ($y = max 9, min cf::MAP_CLIENT_Y, $y); |
164 | $ns->mapy ($y = max 9, min cf::MAP_CLIENT_Y, ($y - 1) | 1); |
165 | |
165 | |
166 | $setup{$k} = "${x}x${y}"; |
166 | $setup{$k} = "${x}x${y}"; |
167 | |
167 | |
168 | } elsif ($k eq "extendedMapInfos") { |
168 | } elsif ($k eq "extendedMapInfos") { |
169 | $ns->ext_mapinfos ($v); |
169 | $ns->ext_mapinfos ($v); |
… | |
… | |
354 | . "(check for Numlock and other semi-obvious error sources).", |
354 | . "(check for Numlock and other semi-obvious error sources).", |
355 | cf::NDI_RED |
355 | cf::NDI_RED |
356 | ); |
356 | ); |
357 | next; |
357 | next; |
358 | } |
358 | } |
|
|
359 | } else { |
|
|
360 | # unable to load the playerfile: |
|
|
361 | # check wether the player dir exists, which means the file is corrupted or |
|
|
362 | # something very similar. |
|
|
363 | if (!aio_stat cf::player::playerdir $user) { |
|
|
364 | $ns->send_drawinfo ( |
|
|
365 | "Unable to retrieve this player. It might be a locked or broken account. " |
|
|
366 | . "If this is your account, ask a dungeon master for assistance. " |
|
|
367 | . "Otherwise choose a different login name.", |
|
|
368 | cf::NDI_RED |
|
|
369 | ); |
|
|
370 | next; |
|
|
371 | } |
359 | } |
372 | } |
360 | |
373 | |
361 | # the rest of this function is character creation |
374 | # the rest of this function is character creation |
362 | |
375 | |
363 | # just to make sure nothing is left over |
376 | # just to make sure nothing is left over |