| 1353 | } |
| 1354 | |
| 1355 | staticfn int |
| 1356 | classmon(char *plch) |
| 1357 | { |
| 1358 | int i; |
| 1359 | |
| 1360 | /* Look for this role in the role table */ |
| 1361 | for (i = 0; roles[i].name.m; i++) { |
| 1362 | if (!strncmp(plch, roles[i].filecode, ROLESZ)) { |
| 1363 | if (roles[i].mnum != NON_PM) |
| 1364 | return roles[i].mnum; |
| 1365 | else |
| 1366 | return PM_HUMAN; |
| 1367 | } |
| 1368 | } |
| 1369 | /* this might be from a 3.2.x score for former Elf class */ |
| 1370 | if (!strcmp(plch, "E")) |
| 1371 | return PM_RANGER; |
| 1372 | |
| 1373 | impossible("What weird role is this? (%s)", plch); |
| 1374 | return PM_HUMAN_MUMMY; |
| 1375 | } |
| 1376 | |
| 1377 | /* |
| 1378 | * Get a random player name and class from the high score list, |
no test coverage detected