… | |
… | |
86 | default: |
86 | default: |
87 | flags = a_applied; |
87 | flags = a_applied; |
88 | break; |
88 | break; |
89 | } |
89 | } |
90 | |
90 | |
91 | if (op->type == CONTAINER && ((op->env && op->env->container == op) || (!op->env && QUERY_FLAG (op, FLAG_APPLIED)))) |
91 | if (op->is_open_container ()) |
92 | flags |= F_OPEN; |
92 | flags |= F_OPEN; |
93 | |
93 | |
94 | if (QUERY_FLAG (op, FLAG_KNOWN_CURSED)) |
94 | if (QUERY_FLAG (op, FLAG_KNOWN_CURSED)) |
95 | { |
95 | { |
96 | if (QUERY_FLAG (op, FLAG_DAMNED)) |
96 | if (QUERY_FLAG (op, FLAG_DAMNED)) |
… | |
… | |
533 | return pl; |
533 | return pl; |
534 | |
534 | |
535 | for (object *op = pl->inv; op; op = op->below) |
535 | for (object *op = pl->inv; op; op = op->below) |
536 | if (op->count == count) |
536 | if (op->count == count) |
537 | return op; |
537 | return op; |
538 | else if (op->type == CONTAINER && pl->container == op) |
538 | else if (op->type == CONTAINER && pl->container_ () == op) |
539 | for (object *tmp = op->inv; tmp; tmp = tmp->below) |
539 | for (object *tmp = op->inv; tmp; tmp = tmp->below) |
540 | if (tmp->count == count) |
540 | if (tmp->count == count) |
541 | return tmp; |
541 | return tmp; |
542 | |
542 | |
543 | for (object *op = GET_MAP_OB (pl->map, pl->x, pl->y); op; op = op->above) |
543 | for (object *op = GET_MAP_OB (pl->map, pl->x, pl->y); op; op = op->above) |
544 | if (op->head && op->head->count == count) |
544 | if (op->head && op->head->count == count) |
545 | return op; |
545 | return op; |
546 | else if (op->count == count) |
546 | else if (op->count == count) |
547 | return op; |
547 | return op; |
548 | else if (op->type == CONTAINER && pl->container == op) |
548 | else if (op->type == CONTAINER && pl->container_ () == op) |
549 | for (object *tmp = op->inv; tmp; tmp = tmp->below) |
549 | for (object *tmp = op->inv; tmp; tmp = tmp->below) |
550 | if (tmp->count == count) |
550 | if (tmp->count == count) |
551 | return tmp; |
551 | return tmp; |
552 | |
552 | |
553 | #if 0 |
553 | #if 0 |