like nxt_unbypassed_obj() but operates on sortloot_item array rather than an object linked list; the array contains obj==Null terminator; there's an added complication that the array may have stale pointers for deleted objects (see Multiple-Drop case in askchain(invent.c)) */
| 1156 | there's an added complication that the array may have stale pointers |
| 1157 | for deleted objects (see Multiple-Drop case in askchain(invent.c)) */ |
| 1158 | struct obj * |
| 1159 | nxt_unbypassed_loot(Loot *lootarray, struct obj *listhead) |
| 1160 | { |
| 1161 | struct obj *o, *obj; |
| 1162 | |
| 1163 | while ((obj = lootarray->obj) != 0) { |
| 1164 | for (o = listhead; o; o = o->nobj) |
| 1165 | if (o == obj) |
| 1166 | break; |
| 1167 | if (o && !obj->bypass) { |
| 1168 | bypass_obj(obj); |
| 1169 | break; |
| 1170 | } |
| 1171 | ++lootarray; |
| 1172 | } |
| 1173 | return obj; |
| 1174 | } |
| 1175 | |
| 1176 | void |
| 1177 | mon_break_armor(struct monst *mon, boolean polyspot) |
no test coverage detected