This fixes the reported sanity check warning about a buried object
within shop boundary staying flagged no_charge after the shopkeeper
leaves the shop. Leaving the shop to pursue the hero moves unpaid
items off the bill to owed-as-robbery and changes no_charge items
to shop-owned but it wasn't doing the latter for buried objects.
I haven't attempted to test on a level with multiple shopkeepers.
If that was working correctly for unpaid items than I think it
ought to work correctly for no_charge items now. I'm not sure how
thoroughly the handling for unpaid items was tested though.
* returns.
*/
if (!shkp
- || (otmp->where != OBJ_FLOOR && otmp->where != OBJ_CONTAINED)
+ || (otmp->where != OBJ_FLOOR
+ && otmp->where != OBJ_CONTAINED
+ && otmp->where != OBJ_BURIED)
|| !get_obj_location(otmp, &x, &y, OBJ_CONTAINED | OBJ_BURIED)
|| !isok(x, y)
|| (rno = levl[x][y].roomno) < ROOMOFFSET
/* clear obj->no_charge for all obj in shkp's shop */
clear_no_charge(shkp, fobj);
+ clear_no_charge(shkp, gl.level.buriedobjlist);
while ((obj = gb.billobjs) != 0) {
obj_extract_self(obj);