* Attach random player name and class from high score list * to an object (for statues or morgue corpses). */
| 1419 | * to an object (for statues or morgue corpses). |
| 1420 | */ |
| 1421 | struct obj * |
| 1422 | tt_oname(struct obj *otmp) |
| 1423 | { |
| 1424 | struct toptenentry *tt; |
| 1425 | if (!otmp) |
| 1426 | return (struct obj *) 0; |
| 1427 | |
| 1428 | tt = get_rnd_toptenentry(); |
| 1429 | |
| 1430 | if (!tt) |
| 1431 | return (struct obj *) 0; |
| 1432 | |
| 1433 | set_corpsenm(otmp, classmon(tt->plrole)); |
| 1434 | if (tt->plgend[0] == 'F') |
| 1435 | otmp->spe = CORPSTAT_FEMALE; |
| 1436 | else if (tt->plgend[0] == 'M') |
| 1437 | otmp->spe = CORPSTAT_MALE; |
| 1438 | otmp = oname(otmp, tt->name, ONAME_NO_FLAGS); |
| 1439 | |
| 1440 | return otmp; |
| 1441 | } |
| 1442 | |
| 1443 | /* Randomly select a topten entry to mimic */ |
| 1444 | int |
no test coverage detected