So as Dwip and I were going over some stuff today, it came up that objects placed into the game via an O reset get their cost set to zero.
I checked our code in AFKMud. We use cost as would be expected - the object's worth. Our code has no other use case for the field.
Checked SmaugFUSS, it has the same issue. Object cost in an O reset is set to zero. Again, a check for where cost is used yields no reason for why this is happening.
So I checked the official 1.8 branch. Found the same. Checked 1.4. Also the same. Don't have a 1.02 handy but I figure it's the same too.
Does anyone have any idea why this would be done, and ONLY on an O reset? The snippet of code looks like this in reset.c:
if( count_obj_list( pObjIndex, pRoomIndex->first_content ) < 1 )
obj = create_object( pObjIndex, number_fuzzy( generate_itemlevel( room->area, pObjIndex ) ) );
if( num > 1 )
pObjIndex->count += ( num - 1 );
obj->count = pReset->arg2;
obj->level = UMIN( obj->level, LEVEL_AVATAR );
obj->cost = 0;
obj_to_room( obj, pRoomIndex );
Checked the other types, such as G, E, and P. They don't do this.