"(contents, N zorkmids)" fix (trunk only)

Some code I recently added was misusing count_unpaid() and would
traverse some or all of inventory instead of just container's contents
when looking for unpaid items.  Add mew routine `is_unpaid(obj)' to do
what I was intending to do with count_unpaid().
This commit is contained in:
nethack.rankin
2006-11-09 05:20:00 +00:00
parent b5633d17c3
commit ef2085bcaf
5 changed files with 15 additions and 7 deletions

View File

@@ -1311,7 +1311,7 @@ boolean shop_floor_obj;
(toloc != MIGR_LADDER_UP && rn2(3));
container = Has_contents(otmp);
unpaid = (otmp->unpaid || (container && count_unpaid(otmp->cobj)));
unpaid = is_unpaid(otmp);
if(OBJ_AT(x, y)) {
for(obj = level.objects[x][y]; obj; obj = obj->nexthere)