(Rest of the code, ran out of room in the above post)
Taken from act_obj.c
Function: get_obj
if ( IS_OBJ_STAT( container, ITEM_CLANCORPSE ) && !IS_NPC( ch ) && str_cmp( container->name+7, ch->name ) )
container->value[5]++;
obj_from_obj( obj );
}
else
{
/* This is the message that appears I think */
act( AT_ACTION, "You get $p.", ch, obj, container, TO_CHAR );
act( AT_ACTION, "$n gets $p.", ch, obj, container, TO_ROOM );
obj_from_room( obj );
}
/* Clan storeroom checks */
if ( IS_SET(ch->in_room->room_flags, ROOM_CLANSTOREROOM) && (!container || container->carried_by == NULL) )
{
save_clan_storeroom( ch );
}
if ( obj->item_type != ITEM_CONTAINER )
check_for_trap( ch, obj, TRAP_GET );
if ( char_died(ch) )
return;
/* Gold from containers and corpses here */
/* Gold/Copper/Silver Support -Druid */
if ( obj->item_type == ITEM_GOLD
|| obj->item_type == ITEM_COPPER
|| obj->item_type == ITEM_SILVER )
{
amt = obj->value[0];
if(obj->item_type == ITEM_GOLD) ch->gold += amt;
if(obj->item_type == ITEM_COPPER) ch->copper += amt;
if(obj->item_type == ITEM_SILVER) ch->silver +=amt;
extract_obj( obj );
}
else
{
obj = obj_to_char( obj, ch );
}
Taken from act_obj.c
Function: do_get
/* I think this is the right call to get_obj that is used. */
for ( obj = container->first_content; obj; obj = obj_next )
{
obj_next = obj->next_content;
if ( ( fAll || nifty_is_name( chk, obj->name ) ) && can_see_obj( ch, obj ) )
{
found = TRUE;
if ( number && (cnt + obj->count) > number )
split_obj( obj, number - cnt );
cnt += obj->count;
get_obj( ch, obj, container );
if ( char_died(ch)
|| ch->carry_number >= can_carry_n( ch )
|| ch->carry_weight >= can_carry_w( ch )
|| (number && cnt >= number) )
return;
}
}
/* And here is the message to say that it cant find said item in the container */
if ( !found )
{
if ( fAll )
{
if ( container->item_type == ITEM_KEYRING && !IS_OBJ_STAT(container, ITEM_COVERING) )
act( AT_PLAIN, "The $T holds no keys.", ch, NULL, arg2, TO_CHAR );
else
act( AT_PLAIN, IS_OBJ_STAT(container, ITEM_COVERING) ? "I see nothing beneath the $T." : "I see nothing in the $T.", ch, NULL, arg2, TO_CHAR );
}
else
{
if ( container->item_type == ITEM_KEYRING && !IS_OBJ_STAT(container, ITEM_COVERING) )
act( AT_PLAIN, "The $T does not hold that key.", ch, NULL, arg2, TO_CHAR );
else
act( AT_PLAIN, IS_OBJ_STAT(container, ITEM_COVERING) ? "I see nothing like that beneath the $T." : "I see nothing like that in the $T.", ch, NULL, arg2, TO_CHAR );
}
}
|