Howdy all, once again here to ask the pros. Here's what I'm trying to do... I have an item flag (ITEM_STORED) - and what I want it to do is not separate an object from a player when they die. I traced that back to make_corpse where it separates objects and puts them in the corpse but I have had no success trying to make it pass over items with this flag - here is what I have currently.
I've tried to do a return; instead of a break; - neither seems to work, had plenty of crashes during my failed attempts :( Hopefully someone has done something like this before!
for ( obj = ch->first_carrying; obj; obj = obj_next )
{
obj_next = obj->next_content;
obj_from_char( obj );
if (IS_OBJ_STAT(obj, ITEM_STORED))
break;
if ( IS_NPC(ch) && (IS_OBJ_STAT( obj, ITEM_DEATHROT ) || IS_OBJ_STAT( obj, ITEM_INVENTORY)))
extract_obj( obj );
else if ( !IS_NPC(ch) && IS_OBJ_STAT(obj, ITEM_DEATHROT))
extract_obj(obj);
else if ( IS_OBJ_STAT(obj, ITEM_INVENTORY) && !IS_NPC(ch) )
obj_to_room(obj, get_room_index(ROOM_VNUM_DEATH));
else
obj_to_obj( obj, corpse );
}
I've tried to do a return; instead of a break; - neither seems to work, had plenty of crashes during my failed attempts :( Hopefully someone has done something like this before!