Changeset 1430 for trunk

Show
Ignore:
Timestamp:
06/04/09 23:28:31 (9 months ago)
Author:
ajps
Message:

Fix for bug which allowed the destruction of wielded cursed items.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/cmd3.c

    r1429 r1430  
    226226 
    227227        o_ptr = object_from_item_idx(item); 
     228 
     229        /* Can't destroy cursed items we're wielding. */ 
     230        if ((item >= INVEN_WIELD) && cursed_p(o_ptr)) 
     231        { 
     232                msg_print("You cannot destroy the cursed item."); 
     233                return; 
     234        }        
    228235 
    229236        /* Get local object */