Changeset 335

Show
Ignore:
Timestamp:
07/13/07 14:06:25 (1 year ago)
Author:
ajps
Message:

Various minor store bugfixes. Closes #231, #233 and #247.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/angband-3.0.8/src/store.c

    r328 r335  
    174174 
    175175        const char *owner_name = &b_name[ot_ptr->owner_name]; 
    176         int i = p_ptr->lev / 5; 
     176        /* We go from level 1 - 50  */ 
     177        int i = (p_ptr->lev - 1) / 5; 
     178 
     179        /* Sanity check in case we increase the max level carelessly */ 
     180        i = MIN(i, N_ELEMENTS(comment_welcome) - 1); 
    177181 
    178182        /* Only show the message one in four times to stop it being irritating. */ 
     
    19241928 
    19251929                /* Message */ 
     1930                object_desc(o_name, sizeof(o_name), &inventory[item_new], TRUE, 3); 
    19261931                msg_format("You have %s (%c).", o_name, index_to_label(item_new)); 
    19271932                store_flags |= STORE_KEEP_PROMPT; 
     
    26442649                        if (store_flags & STORE_KEEP_PROMPT) 
    26452650                        { 
     2651                                /* Unset so that the prompt is cleared next time */ 
    26462652                                store_flags &= ~STORE_KEEP_PROMPT; 
    26472653                        } 
    26482654                        else 
    26492655                        { 
    2650                                 /* Clear the prompt, and mark it as read (i.e. no -more- 
    2651                                    prompt will be issued when messages are flushed. */ 
     2656                                /* Clear the prompt */ 
    26522657                                prt("", 0, 0); 
    2653                                 msg_flag = FALSE; 
    26542658                        } 
    26552659                } 
     
    26792683                                leave = store_overflow(); 
    26802684                } 
     2685 
     2686                msg_flag = FALSE; 
    26812687        } 
    26822688