is 'obj' inside a container whose contents aren't known? if so, return the outermost container meeting that criterium */
| 681 | /* is 'obj' inside a container whose contents aren't known? |
| 682 | if so, return the outermost container meeting that criterium */ |
| 683 | struct obj * |
| 684 | unknwn_contnr_contents(struct obj *obj) |
| 685 | { |
| 686 | struct obj *result = 0, *parent; |
| 687 | |
| 688 | while (obj->where == OBJ_CONTAINED) { |
| 689 | parent = obj->ocontainer; |
| 690 | if (!parent->cknown) |
| 691 | result = parent; |
| 692 | obj = parent; |
| 693 | } |
| 694 | return result; |
| 695 | } |
| 696 | |
| 697 | /* |
| 698 | * Create a dummy duplicate to put on shop bill. The duplicate exists |