… | |
… | |
1805 | op->failmsg (format ("You are unable to decipher the strange symbols. H<Your %s level is too low, it must be at least %d.>", |
1805 | op->failmsg (format ("You are unable to decipher the strange symbols. H<Your %s level is too low, it must be at least %d.>", |
1806 | &tmp->skill, learn_level)); |
1806 | &tmp->skill, learn_level)); |
1807 | return; |
1807 | return; |
1808 | } |
1808 | } |
1809 | |
1809 | |
1810 | op->statusmsg (format ("The spellbook contains the %s level spell %s.", get_levelnumber (spell->level), &spell->name)); |
1810 | op->statusmsg (format ("The spellbook contains the %s level spell %s.", ordinal (spell->level), &spell->name)); |
1811 | |
1811 | |
1812 | if (!QUERY_FLAG (tmp, FLAG_IDENTIFIED)) |
1812 | if (!QUERY_FLAG (tmp, FLAG_IDENTIFIED)) |
1813 | identify (tmp); |
1813 | identify (tmp); |
1814 | |
1814 | |
1815 | /* I removed the check for special_prayer_mark here - it didn't make |
1815 | /* I removed the check for special_prayer_mark here - it didn't make |
… | |
… | |
2631 | static int |
2631 | static int |
2632 | manual_apply (object *who, object *op, int aflag) |
2632 | manual_apply (object *who, object *op, int aflag) |
2633 | { |
2633 | { |
2634 | op = op->head_ (); |
2634 | op = op->head_ (); |
2635 | |
2635 | |
2636 | if (QUERY_FLAG (op, FLAG_UNPAID) && !QUERY_FLAG (op, FLAG_APPLIED)) |
2636 | if (op->flag [FLAG_UNPAID] && !op->flag [FLAG_APPLIED]) |
2637 | { |
2637 | { |
2638 | if (who->type == PLAYER) |
2638 | if (who->type == PLAYER) |
2639 | { |
2639 | { |
2640 | examine (who, op); |
2640 | examine (who, op); |
2641 | //who->failmsg ("You should pay for it first! H<You cannot use items marked as unpaid.>");//TODO remove |
2641 | //who->failmsg ("You should pay for it first! H<You cannot use items marked as unpaid.>");//TODO remove |
… | |
… | |
2897 | * we don't use a corrupt pointer for the next object, so we get the |
2897 | * we don't use a corrupt pointer for the next object, so we get the |
2898 | * next object in the stack before applying. This is can only be a |
2898 | * next object in the stack before applying. This is can only be a |
2899 | * problem if player_apply() has a bug in that it uses the object but does |
2899 | * problem if player_apply() has a bug in that it uses the object but does |
2900 | * not return a proper value. |
2900 | * not return a proper value. |
2901 | */ |
2901 | */ |
2902 | //TODO: currently looks only at the topmost objetc, no longer at multiple floors |
2902 | //TODO: no longer at multiple floors |
2903 | // and also not on move_on floors. what was this for, anyways? |
2903 | // and also not on move_on floors. what was this for, anyways? |
2904 | for (object *next, *tmp = pl->container_ () ? pl->container_ ()->inv : pl->below; tmp; tmp = next) |
2904 | for (object *next, *tmp = pl->container_ () ? pl->container_ ()->inv : pl->below; tmp; tmp = next) |
2905 | { |
2905 | { |
2906 | next = tmp->below; |
2906 | next = tmp->below; |
|
|
2907 | |
|
|
2908 | if (tmp->type == SPELL_EFFECT) |
|
|
2909 | continue; |
2907 | |
2910 | |
2908 | /* If it is visible, player can apply it. |
2911 | /* If it is visible, player can apply it. |
2909 | */ |
2912 | */ |
2910 | if (!tmp->invisible) |
2913 | if (!tmp->invisible) |
2911 | if (player_apply (pl, tmp, 0)) |
2914 | if (player_apply (pl, tmp, 0)) |
2912 | break; |
2915 | break; |
2913 | |
|
|
2914 | break; |
|
|
2915 | } |
2916 | } |
2916 | } |
2917 | } |
2917 | |
2918 | |
2918 | /** |
2919 | /** |
2919 | * Unapplies specified item. |
2920 | * Unapplies specified item. |
… | |
… | |
3553 | )); |
3554 | )); |
3554 | else |
3555 | else |
3555 | who->failmsg (format ( |
3556 | who->failmsg (format ( |
3556 | "You feel as if you wanted to do something funny, but you can't remember what. " |
3557 | "You feel as if you wanted to do something funny, but you can't remember what. " |
3557 | "H<The %s skill cannot be readied or used, it is always active.>", |
3558 | "H<The %s skill cannot be readied or used, it is always active.>", |
3558 | &op->skill, &op->skill |
3559 | &op->skill |
3559 | )); |
3560 | )); |
3560 | |
3561 | |
3561 | if (tmp) who->insert (tmp); |
3562 | if (tmp) who->insert (tmp); |
|
|
3563 | |
3562 | return 1; |
3564 | return 1; |
3563 | } |
3565 | } |
3564 | |
3566 | |
3565 | if (who->contr) |
3567 | if (who->contr) |
3566 | who->statusmsg (format ( |
3568 | who->statusmsg (format ( |