Changeset 407

Show
Ignore:
Timestamp:
07/29/07 01:37:40 (1 year ago)
Author:
ctate
Message:

Default monster recall listings to level order, not unsorted; change prompt accordingly but continue to accept 'p' as a legacy. Fixes #302.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/cmd3.c

    r399 r407  
    14441444 
    14451445        /* Prompt */ 
    1446         put_str("Recall details? (k/p/y/n): ", 0, 40); 
     1446        put_str("Recall details? (y/k/n): ", 0, 40); 
    14471447 
    14481448        /* Query */ 
     
    14521452        prt(buf, 0, 0); 
    14531453 
    1454  
    1455         /* Sort by kills (and level) */ 
     1454        /* Interpret the response */ 
    14561455        if (query == 'k') 
    14571456        { 
     1457                /* Sort by kills (and level) */ 
    14581458                why = 4; 
    1459                 query = 'y'; 
    1460         } 
    1461  
    1462         /* Sort by level */ 
    1463         if (query == 'p') 
    1464         { 
     1459        } 
     1460        else if (query == 'y' || query == 'p') 
     1461        { 
     1462                /* Sort by level; accept 'p' as legacy */ 
    14651463                why = 2; 
    1466                 query = 'y'; 
    1467         } 
    1468  
    1469         /* Catch "escape" */ 
    1470         if (query != 'y') 
    1471         { 
     1464        } 
     1465        else 
     1466        { 
     1467                /* Any unsupported response is "nope, no history please" */ 
     1468         
    14721469                /* XXX XXX Free the "who" array */ 
    14731470                FREE(who); 
     
    14761473        } 
    14771474 
    1478         /* Sort if needed */ 
    1479         if (why) 
    1480         { 
    1481                 /* Select the sort method */ 
    1482                 ang_sort_comp = ang_sort_comp_hook; 
    1483                 ang_sort_swap = ang_sort_swap_hook; 
    1484  
    1485                 /* Sort the array */ 
    1486                 ang_sort(who, &why, n); 
    1487         } 
    1488  
     1475 
     1476        /* Select the sort method */ 
     1477        ang_sort_comp = ang_sort_comp_hook; 
     1478        ang_sort_swap = ang_sort_swap_hook; 
     1479 
     1480        /* Sort the array */ 
     1481        ang_sort(who, &why, n); 
    14891482 
    14901483        /* Start at the end */