… | |
… | |
285 | * Unapplies up to number worth of items of type |
285 | * Unapplies up to number worth of items of type |
286 | */ |
286 | */ |
287 | static void |
287 | static void |
288 | stop_using_item (object *op, int type, int number) |
288 | stop_using_item (object *op, int type, int number) |
289 | { |
289 | { |
290 | object *tmp; |
|
|
291 | |
|
|
292 | for (tmp = op->inv; tmp && number; tmp = tmp->below) |
290 | for (object *tmp = op->inv; tmp && number; tmp = tmp->below) |
293 | if (tmp->type == type && QUERY_FLAG (tmp, FLAG_APPLIED)) |
291 | if (tmp->type == type && tmp->flag [FLAG_APPLIED]) |
294 | { |
292 | { |
295 | apply_special (op, tmp, AP_UNAPPLY | AP_IGNORE_CURSE); |
293 | op->apply (tmp, AP_UNAPPLY | AP_IGNORE_CURSE); |
296 | number--; |
294 | --number; |
297 | } |
295 | } |
298 | } |
296 | } |
299 | |
297 | |
300 | /** |
298 | /** |
301 | * If the god does/doesnt have this flag, we |
299 | * If the god does/doesnt have this flag, we |