… | |
… | |
502 | |
502 | |
503 | for (pouch = pl->inv; pouch && to_pay; pouch = pouch->below) |
503 | for (pouch = pl->inv; pouch && to_pay; pouch = pouch->below) |
504 | if (pouch->type == CONTAINER && QUERY_FLAG (pouch, FLAG_APPLIED) && (pouch->race == NULL || strstr (pouch->race, "gold"))) |
504 | if (pouch->type == CONTAINER && QUERY_FLAG (pouch, FLAG_APPLIED) && (pouch->race == NULL || strstr (pouch->race, "gold"))) |
505 | pay_from_container (pl, pouch, to_pay); |
505 | pay_from_container (pl, pouch, to_pay); |
506 | |
506 | |
507 | fix_player (pl); |
507 | pl->update_stats (); |
508 | return 1; |
508 | return 1; |
509 | } |
509 | } |
510 | |
510 | |
511 | /* DAMN: This is now a wrapper for pay_from_container, which is |
511 | /* DAMN: This is now a wrapper for pay_from_container, which is |
512 | * called for the player, then for each active container that can hold |
512 | * called for the player, then for each active container that can hold |
… | |
… | |
542 | pay_from_container (pl, pouch, to_pay); |
542 | pay_from_container (pl, pouch, to_pay); |
543 | |
543 | |
544 | if (settings.real_wiz == FALSE && QUERY_FLAG (pl, FLAG_WAS_WIZ)) |
544 | if (settings.real_wiz == FALSE && QUERY_FLAG (pl, FLAG_WAS_WIZ)) |
545 | SET_FLAG (op, FLAG_WAS_WIZ); |
545 | SET_FLAG (op, FLAG_WAS_WIZ); |
546 | |
546 | |
547 | fix_player (pl); |
547 | pl->update_stats (); |
548 | return 1; |
548 | return 1; |
549 | } |
549 | } |
550 | |
550 | |
551 | /* This pays for the item, and takes the proper amount of money off |
551 | /* This pays for the item, and takes the proper amount of money off |
552 | * the player. |
552 | * the player. |