ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/apply.C
(Generate patch)

Comparing deliantra/server/server/apply.C (file contents):
Revision 1.239 by root, Mon Apr 5 17:28:11 2010 UTC vs.
Revision 1.242 by root, Mon Apr 5 22:00:15 2010 UTC

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
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 2907
2908 if (tmp->type == SPELL_EFFECT || tmp->invisible)
2909 continue;
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)
2911 if (player_apply (pl, tmp, 0)) 2913 if (player_apply (pl, tmp, 0))
2912 break; 2914 break;
2913
2914 break;
2915 } 2915 }
2916} 2916}
2917 2917
2918/** 2918/**
2919 * Unapplies specified item. 2919 * Unapplies specified item.
3553 )); 3553 ));
3554 else 3554 else
3555 who->failmsg (format ( 3555 who->failmsg (format (
3556 "You feel as if you wanted to do something funny, but you can't remember what. " 3556 "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.>", 3557 "H<The %s skill cannot be readied or used, it is always active.>",
3558 &op->skill, &op->skill 3558 &op->skill
3559 )); 3559 ));
3560 3560
3561 if (tmp) who->insert (tmp); 3561 if (tmp) who->insert (tmp);
3562
3562 return 1; 3563 return 1;
3563 } 3564 }
3564 3565
3565 if (who->contr) 3566 if (who->contr)
3566 who->statusmsg (format ( 3567 who->statusmsg (format (

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines