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.240 by root, Mon Apr 5 20:33:13 2010 UTC vs.
Revision 1.241 by root, Mon Apr 5 21:13:47 2010 UTC

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 (

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines