| 2695 | } |
| 2696 | |
| 2697 | void |
| 2698 | add_to_migration(struct obj *obj) |
| 2699 | { |
| 2700 | if (obj->where != OBJ_FREE) |
| 2701 | panic("add_to_migration: obj where=%d, not free", obj->where); |
| 2702 | |
| 2703 | if (obj->unpaid) /* caller should have changed unpaid item to stolen */ |
| 2704 | impossible("unpaid object migrating to another level? [%s]", |
| 2705 | simpleonames(obj)); |
| 2706 | obj->no_charge = 0; /* was only relevant while inside a shop */ |
| 2707 | |
| 2708 | /* lock picking context becomes stale if it's for this object */ |
| 2709 | if (Is_container(obj)) |
| 2710 | maybe_reset_pick(obj); |
| 2711 | |
| 2712 | obj->where = OBJ_MIGRATING; |
| 2713 | obj->nobj = gm.migrating_objs; |
| 2714 | obj->omigr_from_dnum = u.uz.dnum; |
| 2715 | obj->omigr_from_dlevel = u.uz.dlevel; |
| 2716 | gm.migrating_objs = obj; |
| 2717 | } |
| 2718 | |
| 2719 | void |
| 2720 | add_to_buried(struct obj *obj) |
no test coverage detected